@beam3_dev/api_module 0.0.262 → 0.0.264

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 CHANGED
@@ -1,8 +1,8 @@
1
- import { v4 as E } from "uuid";
1
+ import { v4 as K } from "uuid";
2
2
  import { DateTime as O } from "luxon";
3
- import { requirejs as $, widget as x } from "@widget-lab/3ddashboard-utils";
3
+ import { requirejs as $, widget as A } from "@widget-lab/3ddashboard-utils";
4
4
  function B() {
5
- return E();
5
+ return K();
6
6
  }
7
7
  const W = {
8
8
  b3M3Yellow: "#FFB300",
@@ -34,7 +34,7 @@ const W = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function Se(e, t = void 0, n = void 0) {
37
+ async function _e(e, t = void 0, n = void 0) {
38
38
  const s = parseInt(e);
39
39
  await fetch(
40
40
  "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
@@ -50,7 +50,7 @@ async function Se(e, t = void 0, n = void 0) {
50
50
  n && n(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function _e(e, t = void 0, n = void 0) {
53
+ async function Se(e, t = void 0, n = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -155,7 +155,7 @@ function be(e, t = void 0) {
155
155
  $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
156
156
  let s;
157
157
  s === void 0 && (s = n.createProxy({
158
- widgetId: x.id,
158
+ widgetId: A.id,
159
159
  filteringMode: "WithFilteringServices"
160
160
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
161
161
  });
@@ -171,7 +171,7 @@ async function $e(e, t = void 0, n = void 0) {
171
171
  await $(
172
172
  ["DS/i3DXCompassServices/i3DXCompassServices"],
173
173
  (s) => {
174
- (!e || e === "") && (e = x.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
174
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
175
175
  s.getPlatformServices({
176
176
  platformId: e,
177
177
  onComplete: t,
@@ -195,7 +195,7 @@ function Y() {
195
195
  };
196
196
  }), console.log("%cRETOUR API :", "color:blue", e), e;
197
197
  }
198
- function R(e, t = void 0, n = void 0) {
198
+ function x(e, t = void 0, n = void 0) {
199
199
  if (e.tenant) {
200
200
  const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
201
201
  m(s, {
@@ -271,7 +271,7 @@ function Fe(e, t = void 0, n = void 0) {
271
271
  }
272
272
  });
273
273
  }
274
- function je(e, t, n = void 0, s = void 0) {
274
+ function Re(e, t, n = void 0, s = void 0) {
275
275
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
276
276
  m(i, {
277
277
  onComplete(r, o, a) {
@@ -284,11 +284,11 @@ function je(e, t, n = void 0, s = void 0) {
284
284
  }
285
285
  });
286
286
  }
287
- const k = {
287
+ const U = {
288
288
  "Content-Type": "application/json",
289
289
  Accept: "application/json,text/javascript,*/*"
290
290
  };
291
- function ke(e, t, n = void 0, s = void 0) {
291
+ function Ue(e, t, n = void 0, s = void 0) {
292
292
  const { space: i, currentUser: r } = e, a = `${i}${{
293
293
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
294
294
  }.URIUGr}`, c = {
@@ -305,7 +305,7 @@ function ke(e, t, n = void 0, s = void 0) {
305
305
  };
306
306
  m(a, {
307
307
  method: "POST",
308
- headers: k,
308
+ headers: U,
309
309
  data: JSON.stringify(c),
310
310
  onComplete(d) {
311
311
  n && n(JSON.parse(d));
@@ -317,7 +317,7 @@ function ke(e, t, n = void 0, s = void 0) {
317
317
  }
318
318
  });
319
319
  }
320
- function Ue(e, t, n = void 0, s = void 0) {
320
+ function je(e, t, n = void 0, s = 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: {
@@ -352,7 +352,7 @@ function q(e, t = void 0, n = void 0) {
352
352
  }
353
353
  });
354
354
  }
355
- function ve(e, t = void 0, n = void 0) {
355
+ function ke(e, t = void 0, n = void 0) {
356
356
  const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
357
357
  "Content-Type": "application/json",
358
358
  Accept: "application/json,text/javascript,*/*"
@@ -363,14 +363,14 @@ function ve(e, t = void 0, n = void 0) {
363
363
  onComplete(u) {
364
364
  const p = JSON.parse(u), f = {}, l = p.groups.filter((g) => g.uri.startsWith("uuid:"));
365
365
  if (i && Object.keys(i).length > 0) {
366
- const g = l.filter((S) => S.owner === i.email), h = l.filter((S) => S.members.includes(i.email)), y = g.concat(h);
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, q(
368
368
  e,
369
- (S) => {
370
- f.rules = S, t && t(f);
369
+ (_) => {
370
+ f.rules = _, t && t(f);
371
371
  },
372
- (S) => {
373
- n && n(S);
372
+ (_) => {
373
+ n && n(_);
374
374
  }
375
375
  );
376
376
  }
@@ -383,13 +383,13 @@ function ve(e, t = void 0, n = void 0) {
383
383
  console.log(u);
384
384
  }
385
385
  }
386
- function Ae(e, t) {
386
+ function ve(e, t) {
387
387
  const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
388
388
  m(i, {
389
389
  method: "DELETE"
390
390
  });
391
391
  }
392
- function xe(e, t, n, s = void 0, i = void 0) {
392
+ function Ae(e, t, n, s = 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",
@@ -400,7 +400,7 @@ function xe(e, t, n, s = void 0, i = void 0) {
400
400
  OPTsTenant: `tenant=dstenant:${o}`
401
401
  }, c = n, d = `${r}${a.URIUGr}/${t}`, u = JSON.stringify(c);
402
402
  m(d, {
403
- headers: k,
403
+ headers: U,
404
404
  method: "PATCH",
405
405
  data: u,
406
406
  type: "json",
@@ -412,11 +412,11 @@ function xe(e, t, n, s = void 0, i = void 0) {
412
412
  }
413
413
  });
414
414
  }
415
- function Re(e, t, n, s = void 0, i = void 0) {
415
+ function xe(e, t, n, s = 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",
419
- headers: k,
419
+ headers: U,
420
420
  data: JSON.stringify(n),
421
421
  type: "json",
422
422
  onComplete(d) {
@@ -582,7 +582,7 @@ function b(e, t = void 0, n = void 0) {
582
582
  } else
583
583
  n && n("ERROR : url du 3DSpace non défini.");
584
584
  }
585
- function U(e, t = void 0, n = void 0) {
585
+ function j(e, t = void 0, n = void 0) {
586
586
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
587
587
  F(
588
588
  e,
@@ -661,8 +661,8 @@ function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
661
661
  type: "text/plain"
662
662
  }), g.append("__fcs__jobTicket", l.ticket), g.append("file_0", h, i);
663
663
  const y = {};
664
- y.method = "POST", y.data = g, y.onComplete = function(S) {
665
- let _ = {
664
+ y.method = "POST", y.data = g, y.onComplete = function(_) {
665
+ let S = {
666
666
  method: "PUT",
667
667
  headers: {
668
668
  SecurityContext: "ctx::" + e.ctx
@@ -676,7 +676,7 @@ function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
676
676
  {
677
677
  dataelements: {
678
678
  title: i,
679
- receipt: S
679
+ receipt: _
680
680
  },
681
681
  updateAction: "REVISE"
682
682
  }
@@ -697,10 +697,10 @@ function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
697
697
  }, C = e.tenant.toUpperCase();
698
698
  m(
699
699
  e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${C}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
700
- _
700
+ S
701
701
  );
702
- }, y.onFailure = function(S) {
703
- a && a(S);
702
+ }, y.onFailure = function(_) {
703
+ a && a(_);
704
704
  }, y.timeout = 0, m(l.ticketURL, y);
705
705
  }
706
706
  });
@@ -763,13 +763,13 @@ async function Ge(e, t, n, s, i = void 0, r = void 0) {
763
763
  te(
764
764
  e,
765
765
  (o) => {
766
- console.log("resultCheckinTicket", n, o), o?.items >= 1 && o.data.forEach((a) => {
766
+ o?.items >= 1 && o.data.forEach((a) => {
767
767
  ne(
768
768
  a,
769
769
  t,
770
770
  n,
771
771
  (c) => {
772
- console.log("receipt", n, c), se(
772
+ se(
773
773
  e,
774
774
  c,
775
775
  n,
@@ -879,7 +879,7 @@ function se(e, t, n, s = void 0, i = void 0, r = void 0) {
879
879
  }
880
880
  });
881
881
  }
882
- function j(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
882
+ function R(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
883
883
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
884
884
  m(a, {
885
885
  method: "GET",
@@ -892,28 +892,28 @@ function j(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
892
892
  p = t;
893
893
  let h = g.couples;
894
894
  h = h.filter(
895
- (y, S, _) => S === _.findIndex(
895
+ (y, _, S) => _ === S.findIndex(
896
896
  (C) => C.organization.pid === y.organization.pid && C.role.pid === y.role.pid
897
897
  )
898
898
  ), n && (Array.isArray(n) ? n.forEach((y) => {
899
- l || h.forEach((S) => {
900
- if (y === S.role.name && s === S.organization.title)
899
+ l || h.forEach((_) => {
900
+ if (y === _.role.name && s === _.organization.title)
901
901
  l = y, f = s;
902
- else if (y === S.role.name) {
903
- let _ = h.filter(
902
+ else if (y === _.role.name) {
903
+ let S = h.filter(
904
904
  (C) => C.role.name === y
905
905
  );
906
- _.length === 1 ? (l = _[0].role.name, f = _[0].organization.title) : r(_);
906
+ S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
907
907
  }
908
908
  });
909
909
  }) : h.forEach((y) => {
910
910
  if (n === y.role.name && s === y.organization.title)
911
911
  l = n, f = s;
912
912
  else if (n === y.role.name) {
913
- let S = h.filter(
914
- (_) => _.role.name === n
913
+ let _ = h.filter(
914
+ (S) => S.role.name === n
915
915
  );
916
- S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
916
+ _.length === 1 ? (l = _[0].role.name, f = _[0].organization.title) : r(_);
917
917
  }
918
918
  }));
919
919
  }
@@ -944,7 +944,7 @@ async function L(e, t = void 0, n = void 0) {
944
944
  console.log("☠️ error => ", s);
945
945
  }
946
946
  ), new Promise((s, i) => {
947
- U(
947
+ j(
948
948
  e,
949
949
  (r) => {
950
950
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
@@ -1047,7 +1047,7 @@ function ae(e, t, n = void 0, s = void 0, i = void 0) {
1047
1047
  }
1048
1048
  });
1049
1049
  }
1050
- function Ke(e, t, n = void 0, s = void 0) {
1050
+ function Ee(e, t, n = void 0, s = void 0) {
1051
1051
  return new Promise((i) => {
1052
1052
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1053
1053
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
@@ -1078,7 +1078,7 @@ function Ke(e, t, n = void 0, s = void 0) {
1078
1078
  }
1079
1079
  });
1080
1080
  }
1081
- function Ee(e, t, n, s = void 0, i = void 0) {
1081
+ function Ke(e, t, n, s = void 0, i = void 0) {
1082
1082
  return new Promise((r) => {
1083
1083
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1084
1084
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -1114,7 +1114,7 @@ function Be(e, t, n = void 0, s = void 0) {
1114
1114
  return new Promise((i) => {
1115
1115
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1116
1116
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1117
- j(
1117
+ R(
1118
1118
  e.space,
1119
1119
  "ESPACE COMMUN",
1120
1120
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1155,7 +1155,7 @@ function We(e, t, n = void 0, s = void 0) {
1155
1155
  return new Promise((i) => {
1156
1156
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1157
1157
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1158
- j(
1158
+ R(
1159
1159
  e.space,
1160
1160
  "ESPACE COMMUN",
1161
1161
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1202,7 +1202,7 @@ function Xe(e, t, n, s = void 0, i = void 0) {
1202
1202
  return new Promise((r) => {
1203
1203
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1204
1204
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1205
- j(
1205
+ R(
1206
1206
  e.space,
1207
1207
  "ESPACE COMMUN",
1208
1208
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1324,7 +1324,7 @@ function qe(e, t = void 0, n = void 0) {
1324
1324
  });
1325
1325
  }
1326
1326
  function He(e, t, n, s) {
1327
- U(
1327
+ j(
1328
1328
  e.space,
1329
1329
  t,
1330
1330
  (i) => {
@@ -1342,7 +1342,7 @@ function He(e, t, n, s) {
1342
1342
  }
1343
1343
  async function ze(e, t, n = void 0, s = void 0) {
1344
1344
  return new Promise((i) => {
1345
- U(e, t, (r) => {
1345
+ j(e, t, (r) => {
1346
1346
  m(r, {
1347
1347
  onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1348
1348
  onFailure: (o, a, c) => {
@@ -1376,7 +1376,7 @@ function Qe(e, t, n, s = void 0, i = void 0) {
1376
1376
  );
1377
1377
  }
1378
1378
  let M, J;
1379
- const v = [];
1379
+ const k = [];
1380
1380
  async function Ze(e, t = void 0, n = void 0) {
1381
1381
  e.objID && e.objID !== "" ? F(
1382
1382
  e,
@@ -1430,7 +1430,7 @@ function oe(e, t, n = void 0, s = void 0) {
1430
1430
  M,
1431
1431
  (i) => {
1432
1432
  const r = [...t];
1433
- r.find((o) => o.objectID === i.objectId).data = i.data, J = r, v.push(i.data), n && n(v);
1433
+ r.find((o) => o.objectID === i.objectId).data = i.data, J = r, k.push(i.data), n && n(k);
1434
1434
  },
1435
1435
  (i) => {
1436
1436
  s && (s(i), console.log(i));
@@ -1492,15 +1492,15 @@ function nt(e, t, n = void 0, s = void 0) {
1492
1492
  e,
1493
1493
  o,
1494
1494
  (g) => {
1495
- 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;
1496
- l.name = h, l.ext = y, l.createBy = S, t.info = { ...l }, ue(
1495
+ const h = g.data[0].dataelements.title, y = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1496
+ l.name = h, l.ext = y, l.createBy = _, t.info = { ...l }, ue(
1497
1497
  e,
1498
1498
  t,
1499
- (_) => {
1500
- n && n(_);
1499
+ (S) => {
1500
+ n && n(S);
1501
1501
  },
1502
- (_) => {
1503
- s && s(_);
1502
+ (S) => {
1503
+ s && s(S);
1504
1504
  }
1505
1505
  );
1506
1506
  },
@@ -1840,7 +1840,7 @@ function dt(e, t, n = void 0, s = void 0) {
1840
1840
  le(
1841
1841
  c.users,
1842
1842
  (p) => {
1843
- p !== void 0 && (d.id_msg = p.id, u = !0, A(e, d));
1843
+ p !== void 0 && (d.id_msg = p.id, u = !0, v(e, d));
1844
1844
  },
1845
1845
  (p) => {
1846
1846
  u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
@@ -1858,7 +1858,7 @@ function dt(e, t, n = void 0, s = void 0) {
1858
1858
  type: "json",
1859
1859
  onComplete(f, l, g) {
1860
1860
  const h = f;
1861
- h.reponse = JSON.parse(g.response), h.status = g.status, n && n(h), d.id_msg = h.result.id, A(e, d);
1861
+ h.reponse = JSON.parse(g.response), h.status = g.status, n && n(h), d.id_msg = h.result.id, v(e, d);
1862
1862
  },
1863
1863
  onFailure(f, l, g) {
1864
1864
  const h = f;
@@ -1897,7 +1897,7 @@ function le(e, t, n, s) {
1897
1897
  });
1898
1898
  });
1899
1899
  }
1900
- function A(e, t, n = void 0, s = void 0) {
1900
+ function v(e, t, n = void 0, s = void 0) {
1901
1901
  const i = {
1902
1902
  base: e._3DSwym,
1903
1903
  uri: "/api/community",
@@ -2142,10 +2142,10 @@ function mt(e, t, n) {
2142
2142
  }),
2143
2143
  type: "json",
2144
2144
  onComplete(g, h, y) {
2145
- const S = {
2145
+ const _ = {
2146
2146
  response: typeof g == "string" ? JSON.parse(g) : g
2147
2147
  };
2148
- S.status = y.status, t && t(S);
2148
+ _.status = y.status, t && t(_);
2149
2149
  },
2150
2150
  onFailure(g) {
2151
2151
  n && n(g);
@@ -2167,20 +2167,20 @@ function gt(e, t, n = void 0, s = void 0) {
2167
2167
  };
2168
2168
  let g = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
2169
2169
  w(e, (h) => {
2170
- const y = (S) => {
2171
- m(S, {
2170
+ const y = (_) => {
2171
+ m(_, {
2172
2172
  method: "GET",
2173
2173
  headers: {
2174
2174
  "X-DS-SWYM-CSRFTOKEN": h.result.ServerToken
2175
2175
  },
2176
- onComplete(_) {
2177
- const C = { response: JSON.parse(_) };
2178
- if (f = Math.ceil(Number(C.response.nb_result) / 100), _ && f >= a) {
2179
- if (a++, l.page = `/page/${a}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2176
+ onComplete(S) {
2177
+ const C = { response: JSON.parse(S) };
2178
+ if (f = Math.ceil(Number(C.response.nb_result) / 100), S && f >= a) {
2179
+ if (a++, l.page = `/page/${a}`, _ = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2180
2180
  d.push(C.response.result);
2181
2181
  else {
2182
2182
  const T = C.response.result.find(
2183
- (K) => K.title.includes(c)
2183
+ (E) => E.title.includes(c)
2184
2184
  );
2185
2185
  if (T) {
2186
2186
  n(T);
@@ -2191,11 +2191,11 @@ function gt(e, t, n = void 0, s = void 0) {
2191
2191
  p = !0, n(d);
2192
2192
  return;
2193
2193
  }
2194
- y(S);
2194
+ y(_);
2195
2195
  }
2196
2196
  },
2197
- onFailure(_, C) {
2198
- const T = _;
2197
+ onFailure(S, C) {
2198
+ const T = S;
2199
2199
  T.status = C.status, T.response = C.errormsg, s && s(T);
2200
2200
  }
2201
2201
  });
@@ -2312,25 +2312,54 @@ function ht(e, t = void 0, n = void 0) {
2312
2312
  });
2313
2313
  }
2314
2314
  function yt(e, t = void 0, n = void 0) {
2315
- const s = e._3DSwym + "/api/user/getcurrent/";
2316
- w(e, (i) => {
2317
- m(s, {
2318
- method: "GET",
2319
- headers: {
2320
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
2321
- },
2322
- onComplete(r, o, a) {
2323
- const c = JSON.parse(r);
2324
- t && t(c.result);
2325
- },
2326
- onFailure(r, o, a) {
2327
- const c = { erreur: JSON.parse(r), headers: o, xhr: a };
2328
- n && n(c);
2315
+ return new Promise((s, i) => {
2316
+ try {
2317
+ const { _3DDashboard: r, _3DSwym: o } = e;
2318
+ let a = null;
2319
+ if (o) {
2320
+ const c = e._3DSwym + "/api/user/getcurrent/";
2321
+ w(e, (d) => {
2322
+ m(c, {
2323
+ method: "GET",
2324
+ headers: {
2325
+ "X-DS-SWYM-CSRFTOKEN": d.result.ServerToken
2326
+ },
2327
+ onComplete(u, p, f) {
2328
+ const l = JSON.parse(u);
2329
+ t && t(l.result), a = l.result;
2330
+ },
2331
+ onFailure(u, p, f) {
2332
+ const l = { erreur: JSON.parse(u), headers: p, xhr: f };
2333
+ n && n(l), n && console.error(
2334
+ "ERROR | _3DSwym_get_currentUser => _3dswym_get_version | onFailure",
2335
+ u
2336
+ );
2337
+ }
2338
+ });
2339
+ });
2340
+ } else {
2341
+ const c = e._3DDashboard + "/api/users/current";
2342
+ m(c, {
2343
+ method: "GET",
2344
+ onComplete(d, u, p) {
2345
+ const f = JSON.parse(d);
2346
+ t && t(f), f.first_name = f.firstName, f.last_name = f.lastName, a = f;
2347
+ },
2348
+ onFailure(d, u, p) {
2349
+ const f = { erreur: JSON.parse(d), headers: u, xhr: p };
2350
+ n && n(f), n && console.error(
2351
+ "ERROR | _3DSwym_get_currentUser => _3dswym_get_version | onFailure",
2352
+ d
2353
+ );
2354
+ }
2355
+ });
2329
2356
  }
2330
- });
2357
+ a ? s(a) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2358
+ } catch {
2359
+ }
2331
2360
  });
2332
2361
  }
2333
- function St(e, t, n = void 0, s = void 0) {
2362
+ function _t(e, t, n = void 0, s = void 0) {
2334
2363
  const i = e.space + "/api/user/find/login/" + t;
2335
2364
  w(
2336
2365
  e,
@@ -2350,7 +2379,7 @@ function St(e, t, n = void 0, s = void 0) {
2350
2379
  s
2351
2380
  );
2352
2381
  }
2353
- function _t(e, t = void 0, n = void 0) {
2382
+ function St(e, t = void 0, n = void 0) {
2354
2383
  const {
2355
2384
  _3DSwym: s,
2356
2385
  _3DSwym_token: i,
@@ -2378,13 +2407,13 @@ function _t(e, t = void 0, n = void 0) {
2378
2407
  m(a, d);
2379
2408
  }
2380
2409
  function wt(e, t = void 0, n = void 0) {
2381
- e.tenant && R(e, (s) => {
2410
+ e.tenant && x(e, (s) => {
2382
2411
  const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2383
2412
  return t && t(i), i;
2384
2413
  });
2385
2414
  }
2386
2415
  function Ct(e, t = void 0, n = void 0) {
2387
- e.tenant && R(e, (s) => {
2416
+ e.tenant && x(e, (s) => {
2388
2417
  const i = s.services.find(
2389
2418
  (a) => a.id === "3dpassport"
2390
2419
  )?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
@@ -2511,7 +2540,7 @@ async function Ft(e, t, n, s, i = void 0, r = void 0) {
2511
2540
  });
2512
2541
  }
2513
2542
  }
2514
- async function jt(e, t, n, s = void 0, i = void 0) {
2543
+ async function Rt(e, t, n, s = void 0, i = void 0) {
2515
2544
  if (e.tenant) {
2516
2545
  const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${t}&b=${encodeURIComponent(
2517
2546
  n
@@ -2528,7 +2557,7 @@ async function jt(e, t, n, s = void 0, i = void 0) {
2528
2557
  });
2529
2558
  }
2530
2559
  }
2531
- async function kt(e, t, n, s, i = void 0, r = void 0) {
2560
+ async function Ut(e, t, n, s, i = void 0, r = void 0) {
2532
2561
  if (e.tenant) {
2533
2562
  const o = e.tenant.toLowerCase();
2534
2563
  fetch(
@@ -2543,7 +2572,7 @@ async function kt(e, t, n, s, i = void 0, r = void 0) {
2543
2572
  });
2544
2573
  }
2545
2574
  }
2546
- async function Ut(e, t, n, s = void 0, i = void 0) {
2575
+ async function jt(e, t, n, s = void 0, i = void 0) {
2547
2576
  if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
2548
2577
  const r = e.tenant.toLowerCase();
2549
2578
  fetch(
@@ -2558,7 +2587,7 @@ async function Ut(e, t, n, s = void 0, i = void 0) {
2558
2587
  });
2559
2588
  }
2560
2589
  }
2561
- async function vt(e, t, n, s, i, r = void 0, o = void 0) {
2590
+ async function kt(e, t, n, s, i, r = void 0, o = void 0) {
2562
2591
  if (e.tenant) {
2563
2592
  const a = e.tenant.toLowerCase();
2564
2593
  fetch(
@@ -2573,7 +2602,7 @@ async function vt(e, t, n, s, i, r = void 0, o = void 0) {
2573
2602
  });
2574
2603
  }
2575
2604
  }
2576
- async function At(e, t, n, s, i = void 0, r = void 0) {
2605
+ async function vt(e, t, n, s, i = void 0, r = void 0) {
2577
2606
  if (e.tenant) {
2578
2607
  const o = e.tenant.toLowerCase();
2579
2608
  fetch(
@@ -2589,7 +2618,7 @@ async function At(e, t, n, s, i = void 0, r = void 0) {
2589
2618
  }
2590
2619
  }
2591
2620
  //!SECTION
2592
- async function xt(e, t, n, s = void 0, i = void 0) {
2621
+ async function At(e, t, n, s = void 0, i = void 0) {
2593
2622
  if (e.tenant) {
2594
2623
  const r = e.tenant.toLowerCase();
2595
2624
  fetch(
@@ -2605,7 +2634,7 @@ async function xt(e, t, n, s = void 0, i = void 0) {
2605
2634
  }
2606
2635
  }
2607
2636
  //!SECTION
2608
- function Rt(e) {
2637
+ function xt(e) {
2609
2638
  const t = "Hello " + e;
2610
2639
  return console.log(t), t;
2611
2640
  }
@@ -2615,7 +2644,7 @@ function Pt(e, t = void 0, n = void 0) {
2615
2644
  const o = Y();
2616
2645
  console.log("platformeInfo", o);
2617
2646
  }
2618
- j(
2647
+ R(
2619
2648
  e,
2620
2649
  "Common space",
2621
2650
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -2705,16 +2734,16 @@ export {
2705
2734
  P as _3DSpace_get_docInfo,
2706
2735
  ae as _3DSpace_get_downloadTicket_multidoc,
2707
2736
  De as _3DSpace_get_multiDocInfo,
2708
- j as _3DSpace_get_securityContexts,
2709
- U as _3DSpace_get_ticket,
2737
+ R as _3DSpace_get_securityContexts,
2738
+ j as _3DSpace_get_ticket,
2710
2739
  Xe as _3DSpace_lifecycle_changeRevision,
2711
- Ee as _3DSpace_lifecycle_changeState,
2740
+ Ke as _3DSpace_lifecycle_changeState,
2712
2741
  Be as _3DSpace_lifecycle_getGraph,
2713
2742
  We as _3DSpace_lifecycle_getNextRevision,
2714
- Ke as _3DSpace_lifecycle_getNextStates,
2743
+ Ee as _3DSpace_lifecycle_getNextStates,
2715
2744
  Me as _3DSpace_put_docInfo,
2716
2745
  ht as _3DSwym_ForwardIdea,
2717
- _t as _3DSwym_addComment,
2746
+ St as _3DSwym_addComment,
2718
2747
  dt as _3DSwym_buildDirectMessage,
2719
2748
  lt as _3DSwym_deleteIdea,
2720
2749
  mt as _3DSwym_editIdea,
@@ -2728,29 +2757,29 @@ export {
2728
2757
  ft as _3DSwym_getOneIdea,
2729
2758
  w as _3DSwym_get_Token,
2730
2759
  yt as _3DSwym_get_currentUser,
2731
- St as _3DSwym_get_findUser,
2760
+ _t as _3DSwym_get_findUser,
2732
2761
  pt as _3DSwym_postIdea,
2733
2762
  ut as _3DSwym_postIdeaTemplate,
2734
- A as _3DSwym_sendMessageData,
2735
- je as _AppMngt_get_info_user,
2763
+ v as _3DSwym_sendMessageData,
2764
+ Re as _AppMngt_get_info_user,
2736
2765
  Fe as _AppMngt_get_users,
2737
2766
  Nt as _Iterop_AddOrRemoveRows,
2738
2767
  Ct as _Iterop_Auth_CAS,
2739
- Ut as _Iterop_GetOneDependencyTable,
2740
- xt as _Iterop_GetOneList,
2741
- vt as _Iterop_PatchDependencyTable,
2742
- At as _Iterop_PutDependencyTable,
2768
+ jt as _Iterop_GetOneDependencyTable,
2769
+ At as _Iterop_GetOneList,
2770
+ kt as _Iterop_PatchDependencyTable,
2771
+ vt as _Iterop_PutDependencyTable,
2743
2772
  It as _Iterop_businessTableSearchInRows,
2744
- jt as _Iterop_createBusinessTable,
2773
+ Rt as _Iterop_createBusinessTable,
2745
2774
  bt as _Iterop_getAllBusinessTables,
2746
2775
  Ot as _Iterop_getOneBusinessTable,
2747
2776
  $t as _Iterop_getOneBusinessTableRows,
2748
2777
  Tt as _Iterop_jwtUser,
2749
- kt as _Iterop_runProcess,
2778
+ Ut as _Iterop_runProcess,
2750
2779
  Ft as _Iterop_updateBusinessTable,
2751
2780
  Y as _getPlateformInfos,
2752
2781
  $e as _getPlatformServices,
2753
- R as _getServiceUrl,
2782
+ x as _getServiceUrl,
2754
2783
  Ne as _getServiceUrl_3DPassport,
2755
2784
  wt as _getServiceUrl_Iterop,
2756
2785
  m as _httpCallAuthenticated,
@@ -2761,29 +2790,29 @@ export {
2761
2790
  X as chunkArray,
2762
2791
  Ie as compass_getListAdditionalApps,
2763
2792
  W as couleurs,
2764
- ke as createUserGroups,
2793
+ Ue as createUserGroups,
2765
2794
  oe as dataMixing,
2766
- Ae as deleteUserGroups,
2767
- _e as findAdresse,
2795
+ ve as deleteUserGroups,
2796
+ Se as findAdresse,
2768
2797
  qe as getAllContextSecurity,
2769
2798
  H as getCSRFToken,
2770
- Se as getCommunes,
2771
- Ue as getComplementUG,
2799
+ _e as getCommunes,
2800
+ je as getComplementUG,
2772
2801
  He as getDataFrom3DSpace,
2773
2802
  we as getDataFromGouvFr,
2774
2803
  et as getDatasByTenant,
2775
2804
  tt as getDatasFrom3DSpace,
2776
2805
  ze as getDownloadDocument,
2777
2806
  it as getInfoDocTags,
2778
- ve as getUserGroupsList,
2807
+ ke as getUserGroupsList,
2779
2808
  q as getUsersGroupRules,
2780
2809
  Ze as get_3DSpace_csrf,
2781
- xe as patchUserGroups,
2782
- Re as patchUserGroupsControl,
2810
+ Ae as patchUserGroups,
2811
+ xe as patchUserGroupsControl,
2783
2812
  Qe as pushDataIn3DSpace,
2784
2813
  Pe as readUserGroupControl,
2785
2814
  st as removeTagToDoc,
2786
- Rt as sayHello,
2815
+ xt as sayHello,
2787
2816
  Ce as updateEvent
2788
2817
  };
2789
2818
  //# sourceMappingURL=wb3Api.js.map