@beam3_dev/api_module 0.0.214 → 0.0.215
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 +127 -127
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v4 as B } from "uuid";
|
|
2
|
-
import { DateTime as
|
|
2
|
+
import { DateTime as N } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function D() {
|
|
5
5
|
return B();
|
|
@@ -66,7 +66,7 @@ async function he(e, t = void 0, s = void 0) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async function ye(e, t = V) {
|
|
69
|
-
let s =
|
|
69
|
+
let s = N.now().year;
|
|
70
70
|
const n = e, i = [], r = (a) => {
|
|
71
71
|
for (let c in a)
|
|
72
72
|
i.push({ date: c, comment: a[c] });
|
|
@@ -89,11 +89,11 @@ async function ye(e, t = V) {
|
|
|
89
89
|
} : n;
|
|
90
90
|
for (let c of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(p) => p.start ===
|
|
92
|
+
(p) => p.start === N.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
94
|
name: "Férié : " + c.comment,
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
95
|
+
start: N.fromISO(c.date).toISODate(),
|
|
96
|
+
end: N.fromISO(c.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
@@ -195,7 +195,7 @@ function Y() {
|
|
|
195
195
|
};
|
|
196
196
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function T(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, {
|
|
@@ -247,8 +247,8 @@ function Oe(e, t, s) {
|
|
|
247
247
|
},
|
|
248
248
|
onComplete(r, o, a) {
|
|
249
249
|
const c = JSON.parse(r), d = c.data.map((p) => {
|
|
250
|
-
const u = p.attributes.name,
|
|
251
|
-
return { name: u, id:
|
|
250
|
+
const u = p.attributes.name, l = p.id;
|
|
251
|
+
return { name: u, id: l };
|
|
252
252
|
});
|
|
253
253
|
t && t(d, c);
|
|
254
254
|
},
|
|
@@ -288,7 +288,7 @@ const j = {
|
|
|
288
288
|
"Content-Type": "application/json",
|
|
289
289
|
Accept: "application/json,text/javascript,*/*"
|
|
290
290
|
};
|
|
291
|
-
function
|
|
291
|
+
function Ne(e, t, s = void 0, n = void 0) {
|
|
292
292
|
const { space: i, currentUser: r } = e, a = `${i}${{
|
|
293
293
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
294
294
|
}.URIUGr}`, c = {
|
|
@@ -317,7 +317,7 @@ function Ie(e, t, s = void 0, n = void 0) {
|
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Ie(e, t, s = void 0, n = void 0) {
|
|
321
321
|
const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
|
|
322
322
|
m(d, {
|
|
323
323
|
opts: {
|
|
@@ -327,12 +327,12 @@ function Ne(e, t, s = void 0, n = void 0) {
|
|
|
327
327
|
Accept: "application/json,text/javascript,*/*"
|
|
328
328
|
}
|
|
329
329
|
},
|
|
330
|
-
onComplete(
|
|
331
|
-
s && s(JSON.parse(
|
|
330
|
+
onComplete(l) {
|
|
331
|
+
s && s(JSON.parse(l));
|
|
332
332
|
},
|
|
333
|
-
onFailure(
|
|
334
|
-
const g =
|
|
335
|
-
g.msg =
|
|
333
|
+
onFailure(l, f) {
|
|
334
|
+
const g = l;
|
|
335
|
+
g.msg = f.errormsg, g.errCode = f.errorcode, n && n(g);
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
@@ -347,8 +347,8 @@ function q(e, t = void 0, s = void 0) {
|
|
|
347
347
|
t && t(JSON.parse(p));
|
|
348
348
|
},
|
|
349
349
|
onFailure(p, u) {
|
|
350
|
-
const
|
|
351
|
-
|
|
350
|
+
const l = p;
|
|
351
|
+
l.msg = u.errormsg, l.errCode = u.errorcode, s && s(l);
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
354
|
}
|
|
@@ -361,13 +361,13 @@ function Ae(e, t = void 0, s = void 0) {
|
|
|
361
361
|
m(a, {
|
|
362
362
|
opts: d,
|
|
363
363
|
onComplete(p) {
|
|
364
|
-
const u = JSON.parse(p),
|
|
364
|
+
const u = JSON.parse(p), l = {}, f = u.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
365
365
|
if (i && Object.keys(i).length > 0) {
|
|
366
|
-
const g =
|
|
367
|
-
|
|
366
|
+
const g = f.filter((S) => S.owner === i.email), h = f.filter((S) => S.members.includes(i.email)), y = g.concat(h);
|
|
367
|
+
l.iam = y, l.UG = f, l.iamMember = h, q(
|
|
368
368
|
e,
|
|
369
369
|
(S) => {
|
|
370
|
-
|
|
370
|
+
l.rules = S, t && t(l);
|
|
371
371
|
},
|
|
372
372
|
(S) => {
|
|
373
373
|
s && s(S);
|
|
@@ -458,7 +458,7 @@ async function H(e, t, s) {
|
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
461
|
+
var I = {};
|
|
462
462
|
function z(e, t) {
|
|
463
463
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
464
464
|
}
|
|
@@ -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"), p = d.indexOf(s), u,
|
|
478
|
-
p >= 0 ? (u = d.substr(0, p),
|
|
477
|
+
var d = e[c].replace(r, "%20"), p = d.indexOf(s), u, l, f, g;
|
|
478
|
+
p >= 0 ? (u = d.substr(0, p), l = d.substr(p + 1)) : (u = d, l = ""), f = decodeURIComponent(u), g = decodeURIComponent(l), z(i, f) ? Array.isArray(i[f]) ? i[f].push(g) : i[f] = [i[f], g] : i[f] = g;
|
|
479
479
|
}
|
|
480
480
|
return i;
|
|
481
481
|
}, v = function(e) {
|
|
@@ -497,8 +497,8 @@ var Q = function(e, t, s, n) {
|
|
|
497
497
|
}).join(t) : r + encodeURIComponent(v(e[i]));
|
|
498
498
|
}).filter(Boolean).join(t) : n ? encodeURIComponent(v(n)) + s + encodeURIComponent(v(e)) : "";
|
|
499
499
|
};
|
|
500
|
-
|
|
501
|
-
|
|
500
|
+
I.decode = I.parse = Q;
|
|
501
|
+
I.encode = I.stringify = Z;
|
|
502
502
|
async function L(e, t = void 0, s = void 0, n = void 0) {
|
|
503
503
|
const i = e.space;
|
|
504
504
|
if (t === void 0) {
|
|
@@ -522,7 +522,7 @@ async function xe(e, t = void 0, s = void 0, n = void 0) {
|
|
|
522
522
|
console.log("Le paramètre docids est obligatoire");
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
|
-
let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o =
|
|
525
|
+
let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
|
|
526
526
|
$ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
|
|
527
527
|
});
|
|
528
528
|
m(r, {
|
|
@@ -655,11 +655,11 @@ function ee(e, t, s, n, i, r, o = void 0, a = void 0) {
|
|
|
655
655
|
ENO_CSRF_TOKEN: e.token
|
|
656
656
|
},
|
|
657
657
|
onComplete(d, p, u) {
|
|
658
|
-
const
|
|
658
|
+
const l = JSON.parse(d).csrf, f = JSON.parse(d).data[0].dataelements, g = new FormData();
|
|
659
659
|
let h;
|
|
660
660
|
n instanceof Blob ? h = n : h = new Blob([n], {
|
|
661
661
|
type: "text/plain"
|
|
662
|
-
}), g.append("__fcs__jobTicket",
|
|
662
|
+
}), g.append("__fcs__jobTicket", f.ticket), g.append("file_0", h, i);
|
|
663
663
|
const y = {};
|
|
664
664
|
y.method = "POST", y.data = g, y.onComplete = function(S) {
|
|
665
665
|
let _ = {
|
|
@@ -668,7 +668,7 @@ function ee(e, t, s, n, i, r, o = void 0, a = void 0) {
|
|
|
668
668
|
SecurityContext: "ctx::" + e.ctx
|
|
669
669
|
},
|
|
670
670
|
data: JSON.stringify({
|
|
671
|
-
csrf:
|
|
671
|
+
csrf: l,
|
|
672
672
|
data: [
|
|
673
673
|
{
|
|
674
674
|
relateddata: {
|
|
@@ -694,14 +694,14 @@ function ee(e, t, s, n, i, r, o = void 0, a = void 0) {
|
|
|
694
694
|
onFailure($) {
|
|
695
695
|
a && a($);
|
|
696
696
|
}
|
|
697
|
-
},
|
|
697
|
+
}, C = e.tenant.toUpperCase();
|
|
698
698
|
m(
|
|
699
|
-
e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${
|
|
699
|
+
e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${C}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
|
|
700
700
|
_
|
|
701
701
|
);
|
|
702
702
|
}, y.onFailure = function(S) {
|
|
703
703
|
a && a(S);
|
|
704
|
-
}, y.timeout = 0, m(
|
|
704
|
+
}, y.timeout = 0, m(f.ticketURL, y);
|
|
705
705
|
}
|
|
706
706
|
});
|
|
707
707
|
}
|
|
@@ -739,17 +739,17 @@ async function De(e, t, s, n, i = void 0, r = void 0) {
|
|
|
739
739
|
headers: {
|
|
740
740
|
ENO_CSRF_TOKEN: a
|
|
741
741
|
},
|
|
742
|
-
onComplete(p, u,
|
|
743
|
-
let
|
|
742
|
+
onComplete(p, u, l) {
|
|
743
|
+
let f = JSON.parse(p).data[0].dataelements, g = new FormData(), h;
|
|
744
744
|
t instanceof Blob ? h = t : h = new Blob([t], {
|
|
745
745
|
type: "text/plain"
|
|
746
|
-
}), g.append("__fcs__jobTicket",
|
|
746
|
+
}), g.append("__fcs__jobTicket", f.ticket), g.append("filename", h, s);
|
|
747
747
|
const y = (_) => _.indexOf(".") === -1 ? _ : _.split(".").slice(0, -1).join(".");
|
|
748
748
|
let S = {
|
|
749
749
|
method: "POST",
|
|
750
750
|
data: g,
|
|
751
751
|
onComplete(_) {
|
|
752
|
-
let
|
|
752
|
+
let C = D(), $ = {
|
|
753
753
|
method: "POST",
|
|
754
754
|
headers: {
|
|
755
755
|
ENO_CSRF_TOKEN: a,
|
|
@@ -775,7 +775,7 @@ async function De(e, t, s, n, i = void 0, r = void 0) {
|
|
|
775
775
|
}
|
|
776
776
|
]
|
|
777
777
|
},
|
|
778
|
-
tempId:
|
|
778
|
+
tempId: C
|
|
779
779
|
}
|
|
780
780
|
]
|
|
781
781
|
}),
|
|
@@ -797,7 +797,7 @@ async function De(e, t, s, n, i = void 0, r = void 0) {
|
|
|
797
797
|
},
|
|
798
798
|
timeout: 0
|
|
799
799
|
};
|
|
800
|
-
m(
|
|
800
|
+
m(f.ticketURL, S);
|
|
801
801
|
}
|
|
802
802
|
});
|
|
803
803
|
}
|
|
@@ -808,7 +808,7 @@ function k(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1
|
|
|
808
808
|
method: "GET",
|
|
809
809
|
onComplete(c) {
|
|
810
810
|
const d = JSON.parse(c);
|
|
811
|
-
let p = "", u,
|
|
811
|
+
let p = "", u, l, f;
|
|
812
812
|
if (t) {
|
|
813
813
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
814
814
|
if (g) {
|
|
@@ -816,32 +816,32 @@ function k(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1
|
|
|
816
816
|
let h = g.couples;
|
|
817
817
|
h = h.filter(
|
|
818
818
|
(y, S, _) => S === _.findIndex(
|
|
819
|
-
(
|
|
819
|
+
(C) => C.organization.pid === y.organization.pid && C.role.pid === y.role.pid
|
|
820
820
|
)
|
|
821
821
|
), s && (Array.isArray(s) ? s.forEach((y) => {
|
|
822
|
-
|
|
822
|
+
f || h.forEach((S) => {
|
|
823
823
|
if (y === S.role.name && n === S.organization.title)
|
|
824
|
-
|
|
824
|
+
f = y, l = n;
|
|
825
825
|
else if (y === S.role.name) {
|
|
826
826
|
let _ = h.filter(
|
|
827
|
-
(
|
|
827
|
+
(C) => C.role.name === y
|
|
828
828
|
);
|
|
829
|
-
_.length === 1 ? (
|
|
829
|
+
_.length === 1 ? (f = _[0].role.name, l = _[0].organization.title) : r(_);
|
|
830
830
|
}
|
|
831
831
|
});
|
|
832
832
|
}) : h.forEach((y) => {
|
|
833
833
|
if (s === y.role.name && n === y.organization.title)
|
|
834
|
-
|
|
834
|
+
f = s, l = n;
|
|
835
835
|
else if (s === y.role.name) {
|
|
836
836
|
let S = h.filter(
|
|
837
837
|
(_) => _.role.name === s
|
|
838
838
|
);
|
|
839
|
-
S.length === 1 ? (
|
|
839
|
+
S.length === 1 ? (f = S[0].role.name, l = S[0].organization.title) : r(S);
|
|
840
840
|
}
|
|
841
841
|
}));
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
-
u &&
|
|
844
|
+
u && l && f ? (p = f + "." + l + "." + u, i(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) : r && (p = f + "." + l + "." + u, r(p));
|
|
845
845
|
},
|
|
846
846
|
onFailure(c, d) {
|
|
847
847
|
console.warn("Erreur de récupération du contexte de sécurité. => ", {
|
|
@@ -940,14 +940,14 @@ function ne(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
940
940
|
const d = c.data;
|
|
941
941
|
c.success === !0 && (s && s(), d.forEach((p) => {
|
|
942
942
|
try {
|
|
943
|
-
const u = p.dataelements.fileName,
|
|
944
|
-
m(
|
|
945
|
-
onComplete: (
|
|
943
|
+
const u = p.dataelements.fileName, l = p.dataelements.ticketURL;
|
|
944
|
+
m(l, {
|
|
945
|
+
onComplete: (f, g) => {
|
|
946
946
|
let h;
|
|
947
947
|
try {
|
|
948
|
-
h = JSON.parse(
|
|
948
|
+
h = JSON.parse(f);
|
|
949
949
|
} catch {
|
|
950
|
-
h =
|
|
950
|
+
h = f.blob();
|
|
951
951
|
}
|
|
952
952
|
n && n({
|
|
953
953
|
objectId: p.id,
|
|
@@ -956,8 +956,8 @@ function ne(e, t, s = void 0, n = void 0, i = void 0) {
|
|
|
956
956
|
data: h
|
|
957
957
|
});
|
|
958
958
|
},
|
|
959
|
-
onFailure: (
|
|
960
|
-
console.log("error http",
|
|
959
|
+
onFailure: (f) => {
|
|
960
|
+
console.log("error http", f);
|
|
961
961
|
}
|
|
962
962
|
});
|
|
963
963
|
} catch (u) {
|
|
@@ -1407,16 +1407,16 @@ function Qe(e, t, s = void 0, n = void 0) {
|
|
|
1407
1407
|
Accept: "application/json"
|
|
1408
1408
|
},
|
|
1409
1409
|
data: JSON.stringify(u),
|
|
1410
|
-
onComplete(
|
|
1411
|
-
JSON.parse(
|
|
1412
|
-
const
|
|
1410
|
+
onComplete(l) {
|
|
1411
|
+
JSON.parse(l);
|
|
1412
|
+
const f = {};
|
|
1413
1413
|
setTimeout(() => {
|
|
1414
1414
|
L(
|
|
1415
1415
|
e,
|
|
1416
1416
|
o,
|
|
1417
1417
|
(g) => {
|
|
1418
1418
|
const h = g.data[0].dataelements.title, y = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", S = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1419
|
-
|
|
1419
|
+
f.name = h, f.ext = y, f.createBy = S, t.info = { ...f }, re(
|
|
1420
1420
|
e,
|
|
1421
1421
|
t,
|
|
1422
1422
|
(_) => {
|
|
@@ -1434,9 +1434,9 @@ function Qe(e, t, s = void 0, n = void 0) {
|
|
|
1434
1434
|
);
|
|
1435
1435
|
}, 2e3);
|
|
1436
1436
|
},
|
|
1437
|
-
onFailure(
|
|
1438
|
-
const g =
|
|
1439
|
-
g.msg =
|
|
1437
|
+
onFailure(l, f) {
|
|
1438
|
+
const g = l;
|
|
1439
|
+
g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
|
|
1440
1440
|
}
|
|
1441
1441
|
});
|
|
1442
1442
|
}
|
|
@@ -1518,8 +1518,8 @@ function re(e, t, s = void 0, n = void 0) {
|
|
|
1518
1518
|
s(u);
|
|
1519
1519
|
},
|
|
1520
1520
|
onFailure(p, u) {
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1521
|
+
const l = p;
|
|
1522
|
+
l.msg = u.errormsg, l.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l), console.log("Erreur de recuperation d'id du doc et des tags", p);
|
|
1523
1523
|
}
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
@@ -1554,8 +1554,8 @@ function Ze(e, t, s = void 0, n = void 0) {
|
|
|
1554
1554
|
s && s(p);
|
|
1555
1555
|
},
|
|
1556
1556
|
onFailure(p, u) {
|
|
1557
|
-
const
|
|
1558
|
-
|
|
1557
|
+
const l = p;
|
|
1558
|
+
l.msg = u.errormsg, l.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
|
|
1559
1559
|
}
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
@@ -1670,21 +1670,21 @@ function st(e, t = void 0, s = void 0) {
|
|
|
1670
1670
|
},
|
|
1671
1671
|
onComplete(a, c, d) {
|
|
1672
1672
|
const u = JSON.parse(a).result;
|
|
1673
|
-
let
|
|
1674
|
-
u.forEach((
|
|
1673
|
+
let l = 0;
|
|
1674
|
+
u.forEach((f) => {
|
|
1675
1675
|
const g = {
|
|
1676
|
-
description:
|
|
1677
|
-
id:
|
|
1678
|
-
title:
|
|
1679
|
-
owner:
|
|
1680
|
-
role:
|
|
1681
|
-
access:
|
|
1676
|
+
description: f.description,
|
|
1677
|
+
id: f.id,
|
|
1678
|
+
title: f.title,
|
|
1679
|
+
owner: f.owner,
|
|
1680
|
+
role: f.role,
|
|
1681
|
+
access: f.access
|
|
1682
1682
|
};
|
|
1683
1683
|
ce(
|
|
1684
1684
|
e,
|
|
1685
|
-
|
|
1685
|
+
f.id,
|
|
1686
1686
|
(h) => {
|
|
1687
|
-
|
|
1687
|
+
l++, g.members = h, r.push(g), l === u.length && t && t(r);
|
|
1688
1688
|
},
|
|
1689
1689
|
(h) => s(h)
|
|
1690
1690
|
);
|
|
@@ -1779,13 +1779,13 @@ function at(e, t, s = void 0, n = void 0) {
|
|
|
1779
1779
|
},
|
|
1780
1780
|
data: JSON.stringify(a),
|
|
1781
1781
|
type: "json",
|
|
1782
|
-
onComplete(u,
|
|
1782
|
+
onComplete(u, l, f) {
|
|
1783
1783
|
const g = u;
|
|
1784
|
-
g.reponse = JSON.parse(
|
|
1784
|
+
g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), c.id_msg = g.result.id, P(e, c);
|
|
1785
1785
|
},
|
|
1786
|
-
onFailure(u,
|
|
1786
|
+
onFailure(u, l, f) {
|
|
1787
1787
|
const g = u;
|
|
1788
|
-
g.msg =
|
|
1788
|
+
g.msg = l.errormsg, g.status = l.status, n && n(g);
|
|
1789
1789
|
}
|
|
1790
1790
|
});
|
|
1791
1791
|
});
|
|
@@ -1803,13 +1803,13 @@ function de(e, t, s, n) {
|
|
|
1803
1803
|
onComplete(o) {
|
|
1804
1804
|
const a = JSON.parse(o), c = [];
|
|
1805
1805
|
a.result.forEach((u) => {
|
|
1806
|
-
u.users = u.users.sort((
|
|
1806
|
+
u.users = u.users.sort((l, f) => l.login.localeCompare(f.login)), u.users.length === t.length && c.push(u);
|
|
1807
1807
|
});
|
|
1808
1808
|
const d = t.sort(), p = c.find((u) => {
|
|
1809
|
-
const
|
|
1810
|
-
return u.users.forEach((
|
|
1811
|
-
|
|
1812
|
-
}), JSON.stringify(
|
|
1809
|
+
const l = [];
|
|
1810
|
+
return u.users.forEach((f) => {
|
|
1811
|
+
l.push(f.login);
|
|
1812
|
+
}), JSON.stringify(l) === JSON.stringify(d);
|
|
1813
1813
|
});
|
|
1814
1814
|
s && p !== void 0 ? s(p) : (n || p === void 0) && n(p);
|
|
1815
1815
|
},
|
|
@@ -1892,13 +1892,13 @@ function ot(e, t, s = void 0, n = void 0) {
|
|
|
1892
1892
|
headers: d,
|
|
1893
1893
|
data: JSON.stringify(a),
|
|
1894
1894
|
type: "json",
|
|
1895
|
-
onComplete(p, u,
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1895
|
+
onComplete(p, u, l) {
|
|
1896
|
+
const f = JSON.parse(p);
|
|
1897
|
+
f.status = l.status, f.response = l.response, s && s(f);
|
|
1898
1898
|
},
|
|
1899
|
-
onFailure(p, u,
|
|
1900
|
-
const
|
|
1901
|
-
|
|
1899
|
+
onFailure(p, u, l) {
|
|
1900
|
+
const f = p;
|
|
1901
|
+
f.status = u.status, f.response = u.errormsg, n && n(f);
|
|
1902
1902
|
}
|
|
1903
1903
|
});
|
|
1904
1904
|
});
|
|
@@ -1964,13 +1964,13 @@ function rt(e, t = void 0, s = void 0) {
|
|
|
1964
1964
|
typeof u.response == "string" && (u.response = JSON.parse(u.response)), u.status = p.status, t && t(u);
|
|
1965
1965
|
},
|
|
1966
1966
|
onFailure(c, d, p) {
|
|
1967
|
-
const u = JSON.parse(d),
|
|
1967
|
+
const u = JSON.parse(d), l = JSON.parse(c), f = new Error(
|
|
1968
1968
|
`Erreur sur cette requête : ${n.base + n.uri}`,
|
|
1969
1969
|
{
|
|
1970
|
-
cause: { head: u, rep:
|
|
1970
|
+
cause: { head: u, rep: l }
|
|
1971
1971
|
}
|
|
1972
1972
|
);
|
|
1973
|
-
s && s(
|
|
1973
|
+
s && s(f);
|
|
1974
1974
|
}
|
|
1975
1975
|
};
|
|
1976
1976
|
m(n.base + n.uri, a);
|
|
@@ -2074,41 +2074,41 @@ function ut(e, t, s = void 0, n = void 0) {
|
|
|
2074
2074
|
const { space: i } = e;
|
|
2075
2075
|
let { community_id: r, limit: o, page: a } = t;
|
|
2076
2076
|
const c = [], d = 1;
|
|
2077
|
-
let p = 2;
|
|
2077
|
+
let p = !1, u = 2;
|
|
2078
2078
|
a || (a = d), o || (o = 100);
|
|
2079
|
-
const
|
|
2079
|
+
const l = {
|
|
2080
2080
|
uri: "/api/idea/list",
|
|
2081
2081
|
comId: `/community_id/${r}`,
|
|
2082
2082
|
limit: `/limit/${o}`,
|
|
2083
2083
|
page: `/page/${a}`
|
|
2084
2084
|
};
|
|
2085
|
-
let f = `${i}${
|
|
2086
|
-
w(e, (
|
|
2087
|
-
const
|
|
2088
|
-
m(
|
|
2085
|
+
let f = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
|
|
2086
|
+
w(e, (g) => {
|
|
2087
|
+
const h = (y) => {
|
|
2088
|
+
m(y, {
|
|
2089
2089
|
method: "GET",
|
|
2090
2090
|
headers: {
|
|
2091
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
2091
|
+
"X-DS-SWYM-CSRFTOKEN": g.result.ServerToken
|
|
2092
2092
|
},
|
|
2093
|
-
onComplete(
|
|
2094
|
-
const
|
|
2095
|
-
if (
|
|
2096
|
-
if (a++, c.push(
|
|
2093
|
+
onComplete(S) {
|
|
2094
|
+
const _ = { response: JSON.parse(S) };
|
|
2095
|
+
if (u = Math.ceil(Number(_.response.nb_result) / 100), S && u >= a) {
|
|
2096
|
+
if (a++, c.push(_.response.result), u < a)
|
|
2097
2097
|
return;
|
|
2098
|
-
|
|
2098
|
+
l.page = `/page/${a}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, h(y);
|
|
2099
2099
|
}
|
|
2100
|
-
if (s &&
|
|
2101
|
-
|
|
2100
|
+
if (s && u <= a) {
|
|
2101
|
+
p = !0, s(c);
|
|
2102
2102
|
return;
|
|
2103
2103
|
}
|
|
2104
2104
|
},
|
|
2105
|
-
onFailure(
|
|
2106
|
-
const
|
|
2107
|
-
|
|
2105
|
+
onFailure(S, _) {
|
|
2106
|
+
const C = S;
|
|
2107
|
+
C.status = _.status, C.response = _.errormsg, n && n(C);
|
|
2108
2108
|
}
|
|
2109
2109
|
});
|
|
2110
2110
|
};
|
|
2111
|
-
|
|
2111
|
+
p || h(f);
|
|
2112
2112
|
});
|
|
2113
2113
|
}
|
|
2114
2114
|
function ue(e) {
|
|
@@ -2226,14 +2226,14 @@ function ft(e, t, s = void 0, n = void 0) {
|
|
|
2226
2226
|
);
|
|
2227
2227
|
}
|
|
2228
2228
|
function mt(e, t = void 0, s = void 0) {
|
|
2229
|
-
e.tenant &&
|
|
2229
|
+
e.tenant && T(e, (n) => {
|
|
2230
2230
|
console.log("serviceUrls", n);
|
|
2231
2231
|
const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
2232
2232
|
return t && t(i), i;
|
|
2233
2233
|
});
|
|
2234
2234
|
}
|
|
2235
2235
|
function gt(e, t = void 0, s = void 0) {
|
|
2236
|
-
e.tenant &&
|
|
2236
|
+
e.tenant && T(e, (n) => {
|
|
2237
2237
|
console.log("serviceUrls", n);
|
|
2238
2238
|
const i = n.services.find((a) => a.id === "3dpassport")?.url, r = n.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
|
|
2239
2239
|
m(o, {
|
|
@@ -2265,7 +2265,7 @@ function ht(e, t = void 0, s = void 0) {
|
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
async function yt(e, t, s = void 0, n = void 0) {
|
|
2268
|
-
e.tenant &&
|
|
2268
|
+
e.tenant && T(e, (i) => {
|
|
2269
2269
|
const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
|
|
2270
2270
|
fetch(`https://api.uixhome.fr/${a}/iterop/listusers?t=${t}&s=${o}`, {
|
|
2271
2271
|
method: "POST"
|
|
@@ -2277,7 +2277,7 @@ async function yt(e, t, s = void 0, n = void 0) {
|
|
|
2277
2277
|
});
|
|
2278
2278
|
}
|
|
2279
2279
|
async function St(e, t, s = void 0, n = void 0) {
|
|
2280
|
-
e.tenant &&
|
|
2280
|
+
e.tenant && T(e, (i) => {
|
|
2281
2281
|
const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
|
|
2282
2282
|
fetch(`https://api.uixhome.fr/${a}/iterop/repository/data/tables?t=${t}&s=${o}`, {
|
|
2283
2283
|
method: "GET"
|
|
@@ -2313,7 +2313,7 @@ async function wt(e, t, s, n = void 0, i = void 0) {
|
|
|
2313
2313
|
}
|
|
2314
2314
|
}
|
|
2315
2315
|
async function Ct(e, t, s, n, i = void 0, r = void 0) {
|
|
2316
|
-
e.tenant &&
|
|
2316
|
+
e.tenant && T(e, (o) => {
|
|
2317
2317
|
o.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2318
2318
|
const a = e.tenant.toLowerCase();
|
|
2319
2319
|
fetch(
|
|
@@ -2329,7 +2329,7 @@ async function Ct(e, t, s, n, i = void 0, r = void 0) {
|
|
|
2329
2329
|
});
|
|
2330
2330
|
}
|
|
2331
2331
|
async function Tt(e, t, s, n, i, r = void 0, o = void 0) {
|
|
2332
|
-
e.tenant &&
|
|
2332
|
+
e.tenant && T(e, (a) => {
|
|
2333
2333
|
a.services.find((d) => d.id === "businessprocess")?.url + "";
|
|
2334
2334
|
const c = e.tenant.toLowerCase();
|
|
2335
2335
|
fetch(
|
|
@@ -2345,7 +2345,7 @@ async function Tt(e, t, s, n, i, r = void 0, o = void 0) {
|
|
|
2345
2345
|
});
|
|
2346
2346
|
}
|
|
2347
2347
|
async function bt(e, t, s, n = void 0, i = void 0) {
|
|
2348
|
-
e.tenant &&
|
|
2348
|
+
e.tenant && T(e, (r) => {
|
|
2349
2349
|
r.services.find((a) => a.id === "businessprocess")?.url + "";
|
|
2350
2350
|
const o = e.tenant.toLowerCase();
|
|
2351
2351
|
fetch(
|
|
@@ -2361,7 +2361,7 @@ async function bt(e, t, s, n = void 0, i = void 0) {
|
|
|
2361
2361
|
});
|
|
2362
2362
|
}
|
|
2363
2363
|
async function Ot(e, t, s, n, i, r = void 0, o = void 0) {
|
|
2364
|
-
e.tenant &&
|
|
2364
|
+
e.tenant && T(e, (a) => {
|
|
2365
2365
|
a.services.find((d) => d.id === "businessprocess")?.url + "";
|
|
2366
2366
|
const c = e.tenant.toLowerCase();
|
|
2367
2367
|
fetch(
|
|
@@ -2377,7 +2377,7 @@ async function Ot(e, t, s, n, i, r = void 0, o = void 0) {
|
|
|
2377
2377
|
});
|
|
2378
2378
|
}
|
|
2379
2379
|
async function $t(e, t, s, n, i = void 0, r = void 0) {
|
|
2380
|
-
e.tenant &&
|
|
2380
|
+
e.tenant && T(e, (o) => {
|
|
2381
2381
|
o.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2382
2382
|
const a = e.tenant.toLowerCase();
|
|
2383
2383
|
fetch(
|
|
@@ -2396,7 +2396,7 @@ function vt(e) {
|
|
|
2396
2396
|
const t = "Hello " + e;
|
|
2397
2397
|
return console.log(t), t;
|
|
2398
2398
|
}
|
|
2399
|
-
function
|
|
2399
|
+
function Nt(e, t = void 0, s = void 0) {
|
|
2400
2400
|
return console.log("credentials", e), new Promise((n) => {
|
|
2401
2401
|
if (e.token === "" && b(e), !e.space || e.space === "") {
|
|
2402
2402
|
const o = Y();
|
|
@@ -2413,7 +2413,7 @@ function It(e, t = void 0, s = void 0) {
|
|
|
2413
2413
|
},
|
|
2414
2414
|
!0
|
|
2415
2415
|
);
|
|
2416
|
-
const i =
|
|
2416
|
+
const i = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
2417
2417
|
m(r, {
|
|
2418
2418
|
onComplete(o) {
|
|
2419
2419
|
if (Array.isArray(JSON.parse(o))) {
|
|
@@ -2477,7 +2477,7 @@ function It(e, t = void 0, s = void 0) {
|
|
|
2477
2477
|
}
|
|
2478
2478
|
export {
|
|
2479
2479
|
D as UUID,
|
|
2480
|
-
|
|
2480
|
+
Nt as _3DSearch_usersGroup,
|
|
2481
2481
|
De as _3DSpace_Create_Doc,
|
|
2482
2482
|
Re as _3DSpace_Update_Doc,
|
|
2483
2483
|
Be as _3DSpace_bookmark_addSubsciptions,
|
|
@@ -2531,7 +2531,7 @@ export {
|
|
|
2531
2531
|
Ct as _Iterop_runProcess,
|
|
2532
2532
|
Y as _getPlateformInfos,
|
|
2533
2533
|
Te as _getPlatformServices,
|
|
2534
|
-
|
|
2534
|
+
T as _getServiceUrl,
|
|
2535
2535
|
be as _getServiceUrl_3DPassport,
|
|
2536
2536
|
mt as _getServiceUrl_Iterop,
|
|
2537
2537
|
m as _httpCallAuthenticated,
|
|
@@ -2542,14 +2542,14 @@ export {
|
|
|
2542
2542
|
W as chunkArray,
|
|
2543
2543
|
Oe as compass_getListAdditionalApps,
|
|
2544
2544
|
V as couleurs,
|
|
2545
|
-
|
|
2545
|
+
Ne as createUserGroups,
|
|
2546
2546
|
se as dataMixing,
|
|
2547
2547
|
ke as deleteUserGroups,
|
|
2548
2548
|
he as findAdresse,
|
|
2549
2549
|
Ve as getAllContextSecurity,
|
|
2550
2550
|
H as getCSRFToken,
|
|
2551
2551
|
ge as getCommunes,
|
|
2552
|
-
|
|
2552
|
+
Ie as getComplementUG,
|
|
2553
2553
|
We as getDataFrom3DSpace,
|
|
2554
2554
|
ye as getDataFromGouvFr,
|
|
2555
2555
|
He as getDatasByTenant,
|