@beam3_dev/api_module 0.0.213 → 0.0.214
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 +131 -123
- 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 I } 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 = I.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 === I.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: I.fromISO(c.date).toISODate(),
|
|
96
|
+
end: I.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 C(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, f = p.id;
|
|
251
|
+
return { name: u, id: f };
|
|
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 Ie(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 Ne(e, t, s = void 0, n = void 0) {
|
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Ne(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 Ie(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(f) {
|
|
331
|
+
s && s(JSON.parse(f));
|
|
332
332
|
},
|
|
333
|
-
onFailure(
|
|
334
|
-
const g =
|
|
335
|
-
g.msg =
|
|
333
|
+
onFailure(f, l) {
|
|
334
|
+
const g = f;
|
|
335
|
+
g.msg = l.errormsg, g.errCode = l.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 f = p;
|
|
351
|
+
f.msg = u.errormsg, f.errCode = u.errorcode, s && s(f);
|
|
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), f = {}, l = u.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
365
365
|
if (i && Object.keys(i).length > 0) {
|
|
366
|
-
const g =
|
|
367
|
-
|
|
366
|
+
const g = l.filter((S) => S.owner === i.email), h = l.filter((S) => S.members.includes(i.email)), y = g.concat(h);
|
|
367
|
+
f.iam = y, f.UG = l, f.iamMember = h, q(
|
|
368
368
|
e,
|
|
369
369
|
(S) => {
|
|
370
|
-
|
|
370
|
+
f.rules = S, t && t(f);
|
|
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 N = {};
|
|
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, 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
|
}, 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
|
+
N.decode = N.parse = Q;
|
|
501
|
+
N.encode = N.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 = N.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 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], {
|
|
661
661
|
type: "text/plain"
|
|
662
|
-
}), g.append("__fcs__jobTicket",
|
|
662
|
+
}), g.append("__fcs__jobTicket", l.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: f,
|
|
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
|
+
}, T = 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=${T}&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(l.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, f) {
|
|
743
|
+
let l = 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", l.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 T = 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: T
|
|
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(l.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, f, l;
|
|
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
|
+
(T) => T.organization.pid === y.organization.pid && T.role.pid === y.role.pid
|
|
820
820
|
)
|
|
821
821
|
), s && (Array.isArray(s) ? s.forEach((y) => {
|
|
822
|
-
|
|
822
|
+
l || h.forEach((S) => {
|
|
823
823
|
if (y === S.role.name && n === S.organization.title)
|
|
824
|
-
|
|
824
|
+
l = y, f = n;
|
|
825
825
|
else if (y === S.role.name) {
|
|
826
826
|
let _ = h.filter(
|
|
827
|
-
(
|
|
827
|
+
(T) => T.role.name === y
|
|
828
828
|
);
|
|
829
|
-
_.length === 1 ? (
|
|
829
|
+
_.length === 1 ? (l = _[0].role.name, f = _[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
|
+
l = s, f = 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 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
|
|
840
840
|
}
|
|
841
841
|
}));
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
-
u &&
|
|
844
|
+
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));
|
|
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, f = p.dataelements.ticketURL;
|
|
944
|
+
m(f, {
|
|
945
|
+
onComplete: (l, g) => {
|
|
946
946
|
let h;
|
|
947
947
|
try {
|
|
948
|
-
h = JSON.parse(
|
|
948
|
+
h = JSON.parse(l);
|
|
949
949
|
} catch {
|
|
950
|
-
h =
|
|
950
|
+
h = l.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: (l) => {
|
|
960
|
+
console.log("error http", l);
|
|
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(f) {
|
|
1411
|
+
JSON.parse(f);
|
|
1412
|
+
const l = {};
|
|
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
|
+
l.name = h, l.ext = y, l.createBy = S, t.info = { ...l }, 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(f, l) {
|
|
1438
|
+
const g = f;
|
|
1439
|
+
g.msg = l.errormsg, g.errCode = l.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 f = p;
|
|
1522
|
+
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);
|
|
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 f = p;
|
|
1558
|
+
f.msg = u.errormsg, f.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f);
|
|
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 f = 0;
|
|
1674
|
+
u.forEach((l) => {
|
|
1675
1675
|
const g = {
|
|
1676
|
-
description:
|
|
1677
|
-
id:
|
|
1678
|
-
title:
|
|
1679
|
-
owner:
|
|
1680
|
-
role:
|
|
1681
|
-
access:
|
|
1676
|
+
description: l.description,
|
|
1677
|
+
id: l.id,
|
|
1678
|
+
title: l.title,
|
|
1679
|
+
owner: l.owner,
|
|
1680
|
+
role: l.role,
|
|
1681
|
+
access: l.access
|
|
1682
1682
|
};
|
|
1683
1683
|
ce(
|
|
1684
1684
|
e,
|
|
1685
|
-
|
|
1685
|
+
l.id,
|
|
1686
1686
|
(h) => {
|
|
1687
|
-
|
|
1687
|
+
f++, g.members = h, r.push(g), f === 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, f, l) {
|
|
1783
1783
|
const g = u;
|
|
1784
|
-
g.reponse = JSON.parse(
|
|
1784
|
+
g.reponse = JSON.parse(l.response), g.status = l.status, s && s(g), c.id_msg = g.result.id, P(e, c);
|
|
1785
1785
|
},
|
|
1786
|
-
onFailure(u,
|
|
1786
|
+
onFailure(u, f, l) {
|
|
1787
1787
|
const g = u;
|
|
1788
|
-
g.msg =
|
|
1788
|
+
g.msg = f.errormsg, g.status = f.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((f, l) => f.login.localeCompare(l.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 f = [];
|
|
1810
|
+
return u.users.forEach((l) => {
|
|
1811
|
+
f.push(l.login);
|
|
1812
|
+
}), JSON.stringify(f) === 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, f) {
|
|
1896
|
+
const l = JSON.parse(p);
|
|
1897
|
+
l.status = f.status, l.response = f.response, s && s(l);
|
|
1898
1898
|
},
|
|
1899
|
-
onFailure(p, u,
|
|
1900
|
-
const
|
|
1901
|
-
|
|
1899
|
+
onFailure(p, u, f) {
|
|
1900
|
+
const l = p;
|
|
1901
|
+
l.status = u.status, l.response = u.errormsg, n && n(l);
|
|
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), f = JSON.parse(c), l = 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: f }
|
|
1971
1971
|
}
|
|
1972
1972
|
);
|
|
1973
|
-
s && s(
|
|
1973
|
+
s && s(l);
|
|
1974
1974
|
}
|
|
1975
1975
|
};
|
|
1976
1976
|
m(n.base + n.uri, a);
|
|
@@ -2074,33 +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 =
|
|
2077
|
+
let p = 2;
|
|
2078
2078
|
a || (a = d), o || (o = 100);
|
|
2079
|
-
const
|
|
2079
|
+
const u = {
|
|
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}${u.uri}${u.comId}${u.limit}${u.page}`;
|
|
2086
|
+
w(e, (l) => {
|
|
2087
|
+
const g = (h) => {
|
|
2088
|
+
m(h, {
|
|
2089
2089
|
method: "GET",
|
|
2090
2090
|
headers: {
|
|
2091
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
2091
|
+
"X-DS-SWYM-CSRFTOKEN": l.result.ServerToken
|
|
2092
2092
|
},
|
|
2093
|
-
onComplete(
|
|
2094
|
-
const
|
|
2095
|
-
|
|
2093
|
+
onComplete(y) {
|
|
2094
|
+
const S = { response: JSON.parse(y) };
|
|
2095
|
+
if (p = Math.ceil(Number(S.response.nb_result) / 100), y && p >= a) {
|
|
2096
|
+
if (a++, c.push(S.response.result), p < a)
|
|
2097
|
+
return;
|
|
2098
|
+
u.page = `/page/${a}`, h = `${i}${u.uri}${u.comId}${u.limit}${u.page}`, g(h);
|
|
2099
|
+
}
|
|
2100
|
+
if (s && p <= a) {
|
|
2101
|
+
thisIsTheEnd = !0, s(c);
|
|
2102
|
+
return;
|
|
2103
|
+
}
|
|
2096
2104
|
},
|
|
2097
|
-
onFailure(
|
|
2098
|
-
const
|
|
2099
|
-
|
|
2105
|
+
onFailure(y, S) {
|
|
2106
|
+
const _ = y;
|
|
2107
|
+
_.status = S.status, _.response = S.errormsg, n && n(_);
|
|
2100
2108
|
}
|
|
2101
2109
|
});
|
|
2102
2110
|
};
|
|
2103
|
-
|
|
2111
|
+
g(f);
|
|
2104
2112
|
});
|
|
2105
2113
|
}
|
|
2106
2114
|
function ue(e) {
|
|
@@ -2218,14 +2226,14 @@ function ft(e, t, s = void 0, n = void 0) {
|
|
|
2218
2226
|
);
|
|
2219
2227
|
}
|
|
2220
2228
|
function mt(e, t = void 0, s = void 0) {
|
|
2221
|
-
e.tenant &&
|
|
2229
|
+
e.tenant && C(e, (n) => {
|
|
2222
2230
|
console.log("serviceUrls", n);
|
|
2223
2231
|
const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
2224
2232
|
return t && t(i), i;
|
|
2225
2233
|
});
|
|
2226
2234
|
}
|
|
2227
2235
|
function gt(e, t = void 0, s = void 0) {
|
|
2228
|
-
e.tenant &&
|
|
2236
|
+
e.tenant && C(e, (n) => {
|
|
2229
2237
|
console.log("serviceUrls", n);
|
|
2230
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`;
|
|
2231
2239
|
m(o, {
|
|
@@ -2257,7 +2265,7 @@ function ht(e, t = void 0, s = void 0) {
|
|
|
2257
2265
|
}
|
|
2258
2266
|
}
|
|
2259
2267
|
async function yt(e, t, s = void 0, n = void 0) {
|
|
2260
|
-
e.tenant &&
|
|
2268
|
+
e.tenant && C(e, (i) => {
|
|
2261
2269
|
const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
|
|
2262
2270
|
fetch(`https://api.uixhome.fr/${a}/iterop/listusers?t=${t}&s=${o}`, {
|
|
2263
2271
|
method: "POST"
|
|
@@ -2269,7 +2277,7 @@ async function yt(e, t, s = void 0, n = void 0) {
|
|
|
2269
2277
|
});
|
|
2270
2278
|
}
|
|
2271
2279
|
async function St(e, t, s = void 0, n = void 0) {
|
|
2272
|
-
e.tenant &&
|
|
2280
|
+
e.tenant && C(e, (i) => {
|
|
2273
2281
|
const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
|
|
2274
2282
|
fetch(`https://api.uixhome.fr/${a}/iterop/repository/data/tables?t=${t}&s=${o}`, {
|
|
2275
2283
|
method: "GET"
|
|
@@ -2305,7 +2313,7 @@ async function wt(e, t, s, n = void 0, i = void 0) {
|
|
|
2305
2313
|
}
|
|
2306
2314
|
}
|
|
2307
2315
|
async function Ct(e, t, s, n, i = void 0, r = void 0) {
|
|
2308
|
-
e.tenant &&
|
|
2316
|
+
e.tenant && C(e, (o) => {
|
|
2309
2317
|
o.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2310
2318
|
const a = e.tenant.toLowerCase();
|
|
2311
2319
|
fetch(
|
|
@@ -2321,7 +2329,7 @@ async function Ct(e, t, s, n, i = void 0, r = void 0) {
|
|
|
2321
2329
|
});
|
|
2322
2330
|
}
|
|
2323
2331
|
async function Tt(e, t, s, n, i, r = void 0, o = void 0) {
|
|
2324
|
-
e.tenant &&
|
|
2332
|
+
e.tenant && C(e, (a) => {
|
|
2325
2333
|
a.services.find((d) => d.id === "businessprocess")?.url + "";
|
|
2326
2334
|
const c = e.tenant.toLowerCase();
|
|
2327
2335
|
fetch(
|
|
@@ -2337,7 +2345,7 @@ async function Tt(e, t, s, n, i, r = void 0, o = void 0) {
|
|
|
2337
2345
|
});
|
|
2338
2346
|
}
|
|
2339
2347
|
async function bt(e, t, s, n = void 0, i = void 0) {
|
|
2340
|
-
e.tenant &&
|
|
2348
|
+
e.tenant && C(e, (r) => {
|
|
2341
2349
|
r.services.find((a) => a.id === "businessprocess")?.url + "";
|
|
2342
2350
|
const o = e.tenant.toLowerCase();
|
|
2343
2351
|
fetch(
|
|
@@ -2353,7 +2361,7 @@ async function bt(e, t, s, n = void 0, i = void 0) {
|
|
|
2353
2361
|
});
|
|
2354
2362
|
}
|
|
2355
2363
|
async function Ot(e, t, s, n, i, r = void 0, o = void 0) {
|
|
2356
|
-
e.tenant &&
|
|
2364
|
+
e.tenant && C(e, (a) => {
|
|
2357
2365
|
a.services.find((d) => d.id === "businessprocess")?.url + "";
|
|
2358
2366
|
const c = e.tenant.toLowerCase();
|
|
2359
2367
|
fetch(
|
|
@@ -2369,7 +2377,7 @@ async function Ot(e, t, s, n, i, r = void 0, o = void 0) {
|
|
|
2369
2377
|
});
|
|
2370
2378
|
}
|
|
2371
2379
|
async function $t(e, t, s, n, i = void 0, r = void 0) {
|
|
2372
|
-
e.tenant &&
|
|
2380
|
+
e.tenant && C(e, (o) => {
|
|
2373
2381
|
o.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2374
2382
|
const a = e.tenant.toLowerCase();
|
|
2375
2383
|
fetch(
|
|
@@ -2388,7 +2396,7 @@ function vt(e) {
|
|
|
2388
2396
|
const t = "Hello " + e;
|
|
2389
2397
|
return console.log(t), t;
|
|
2390
2398
|
}
|
|
2391
|
-
function
|
|
2399
|
+
function It(e, t = void 0, s = void 0) {
|
|
2392
2400
|
return console.log("credentials", e), new Promise((n) => {
|
|
2393
2401
|
if (e.token === "" && b(e), !e.space || e.space === "") {
|
|
2394
2402
|
const o = Y();
|
|
@@ -2405,7 +2413,7 @@ function Nt(e, t = void 0, s = void 0) {
|
|
|
2405
2413
|
},
|
|
2406
2414
|
!0
|
|
2407
2415
|
);
|
|
2408
|
-
const i =
|
|
2416
|
+
const i = I.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
2409
2417
|
m(r, {
|
|
2410
2418
|
onComplete(o) {
|
|
2411
2419
|
if (Array.isArray(JSON.parse(o))) {
|
|
@@ -2469,7 +2477,7 @@ function Nt(e, t = void 0, s = void 0) {
|
|
|
2469
2477
|
}
|
|
2470
2478
|
export {
|
|
2471
2479
|
D as UUID,
|
|
2472
|
-
|
|
2480
|
+
It as _3DSearch_usersGroup,
|
|
2473
2481
|
De as _3DSpace_Create_Doc,
|
|
2474
2482
|
Re as _3DSpace_Update_Doc,
|
|
2475
2483
|
Be as _3DSpace_bookmark_addSubsciptions,
|
|
@@ -2523,7 +2531,7 @@ export {
|
|
|
2523
2531
|
Ct as _Iterop_runProcess,
|
|
2524
2532
|
Y as _getPlateformInfos,
|
|
2525
2533
|
Te as _getPlatformServices,
|
|
2526
|
-
|
|
2534
|
+
C as _getServiceUrl,
|
|
2527
2535
|
be as _getServiceUrl_3DPassport,
|
|
2528
2536
|
mt as _getServiceUrl_Iterop,
|
|
2529
2537
|
m as _httpCallAuthenticated,
|
|
@@ -2534,14 +2542,14 @@ export {
|
|
|
2534
2542
|
W as chunkArray,
|
|
2535
2543
|
Oe as compass_getListAdditionalApps,
|
|
2536
2544
|
V as couleurs,
|
|
2537
|
-
|
|
2545
|
+
Ie as createUserGroups,
|
|
2538
2546
|
se as dataMixing,
|
|
2539
2547
|
ke as deleteUserGroups,
|
|
2540
2548
|
he as findAdresse,
|
|
2541
2549
|
Ve as getAllContextSecurity,
|
|
2542
2550
|
H as getCSRFToken,
|
|
2543
2551
|
ge as getCommunes,
|
|
2544
|
-
|
|
2552
|
+
Ne as getComplementUG,
|
|
2545
2553
|
We as getDataFrom3DSpace,
|
|
2546
2554
|
ye as getDataFromGouvFr,
|
|
2547
2555
|
He as getDatasByTenant,
|