@beam3_dev/api_module 0.0.275 → 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 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 v } from "@widget-lab/3ddashboard-utils";
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
- (u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
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: v.id,
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 = v.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
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 x(e, t = void 0, s = void 0) {
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((u) => {
250
- const p = u.attributes.name, f = u.id;
251
- return { name: p, id: f };
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
  },
@@ -258,7 +258,7 @@ function Ie(e, t, s) {
258
258
  }
259
259
  });
260
260
  }
261
- function Ue(e, t = void 0, s = void 0) {
261
+ function Re(e, t = void 0, s = void 0) {
262
262
  let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
263
263
  m(n, {
264
264
  onComplete(i, r, o) {
@@ -271,7 +271,7 @@ function Ue(e, t = void 0, s = void 0) {
271
271
  }
272
272
  });
273
273
  }
274
- function Fe(e, t, s = void 0, n = void 0) {
274
+ function Ue(e, t, s = void 0, n = 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 Fe(e, t, s = void 0, n = void 0) {
284
284
  }
285
285
  });
286
286
  }
287
- const R = {
287
+ const F = {
288
288
  "Content-Type": "application/json",
289
289
  Accept: "application/json,text/javascript,*/*"
290
290
  };
291
- function Re(e, t, s = void 0, n = void 0) {
291
+ function Fe(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 = {
@@ -305,15 +305,15 @@ function Re(e, t, s = void 0, n = void 0) {
305
305
  };
306
306
  m(a, {
307
307
  method: "POST",
308
- headers: R,
308
+ headers: F,
309
309
  data: JSON.stringify(c),
310
310
  onComplete(d) {
311
311
  s && s(JSON.parse(d));
312
312
  },
313
- onFailure(d, u) {
313
+ onFailure(d, p) {
314
314
  console.log(d);
315
- const p = d;
316
- p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
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(u) {
347
- t && t(JSON.parse(u));
346
+ onComplete(p) {
347
+ t && t(JSON.parse(p));
348
348
  },
349
- onFailure(u, p) {
350
- const f = u;
351
- f.msg = p.errormsg, f.errCode = p.errorcode, s && s(f);
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(u) {
364
- const p = JSON.parse(u), f = {}, l = p.groups.filter((g) => g.uri.startsWith("uuid:"));
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(u) {
379
- s && s(u);
378
+ onFailure(p) {
379
+ s && s(p);
380
380
  }
381
381
  });
382
- } catch (u) {
383
- console.log(u);
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 ve(e, t, s, n = void 0, i = void 0) {
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,25 +398,25 @@ 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}`, u = JSON.stringify(c);
401
+ }, c = s, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
402
402
  m(d, {
403
- headers: R,
403
+ headers: F,
404
404
  method: "PATCH",
405
- data: u,
405
+ data: p,
406
406
  type: "json",
407
- onComplete(p) {
408
- n && n(p);
407
+ onComplete(u) {
408
+ n && n(u);
409
409
  },
410
- onFailure(p) {
411
- i && i(p);
410
+ onFailure(u) {
411
+ i && i(u);
412
412
  }
413
413
  });
414
414
  }
415
- function xe(e, t, s, n = void 0, i = void 0) {
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",
419
- headers: R,
419
+ headers: F,
420
420
  data: JSON.stringify(s),
421
421
  type: "json",
422
422
  onComplete(d) {
@@ -427,7 +427,7 @@ function xe(e, t, s, n = void 0, i = void 0) {
427
427
  }
428
428
  });
429
429
  }
430
- function De(e, t, s = void 0, n = void 0) {
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"), u = d.indexOf(s), p, f, l, g;
478
- u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), z(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
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 D(e, t = void 0, s = void 0, n = void 0) {
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,15 +532,15 @@ 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 u = JSON.parse(a);
536
- s && s(u);
535
+ const p = JSON.parse(a);
536
+ s && s(p);
537
537
  },
538
538
  onFailure(a) {
539
539
  n && n(a);
540
540
  }
541
541
  });
542
542
  }
543
- function U(e, t = void 0, s = void 0) {
543
+ function R(e, t = void 0, s = void 0) {
544
544
  if (e.objID && e.objID !== "") {
545
545
  let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
546
546
  m(n, {
@@ -584,7 +584,7 @@ function b(e, t = void 0, s = void 0) {
584
584
  }
585
585
  function k(e, t = void 0, s = void 0) {
586
586
  let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
587
- U(
587
+ R(
588
588
  e,
589
589
  (i) => {
590
590
  m(n, {
@@ -639,7 +639,7 @@ function P(e, t, s, n, i, r = void 0, o = void 0) {
639
639
  r,
640
640
  o
641
641
  );
642
- e.token ? a() : U(
642
+ e.token ? a() : R(
643
643
  e,
644
644
  t,
645
645
  (c) => {
@@ -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, u, p) {
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, D(
738
+ e.space, e.token, e.ctx, x(
739
739
  e,
740
740
  t,
741
741
  (r) => {
@@ -879,17 +879,17 @@ function se(e, t, s, n = void 0, i = void 0, r = void 0) {
879
879
  }
880
880
  });
881
881
  }
882
- function F(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1) {
882
+ function U(e, t = void 0, s = void 0, n = 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",
886
886
  onComplete(c) {
887
887
  const d = JSON.parse(c);
888
- let u = "", p, f, l;
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
- p = t;
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 F(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
- p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && o ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
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((u) => {
1018
+ c.success === !0 && (s && s(), d.forEach((p) => {
1019
1019
  try {
1020
- const p = u.dataelements.fileName, f = u.dataelements.ticketURL;
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: u.id,
1030
+ objectId: p.id,
1031
1031
  headers: g,
1032
- fileName: p,
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 (p) {
1041
- console.log(p), i && i(p);
1040
+ } catch (u) {
1041
+ console.log(u), i && i(u);
1042
1042
  }
1043
1043
  }));
1044
1044
  },
@@ -1114,7 +1114,7 @@ function Be(e, t, s = void 0, n = 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
- F(
1117
+ U(
1118
1118
  e.space,
1119
1119
  "ESPACE COMMUN",
1120
1120
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1155,7 +1155,7 @@ function We(e, t, s = void 0, n = 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
- F(
1158
+ U(
1159
1159
  e.space,
1160
1160
  "ESPACE COMMUN",
1161
1161
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1202,7 +1202,7 @@ function Xe(e, t, s, n = 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
- F(
1205
+ U(
1206
1206
  e.space,
1207
1207
  "ESPACE COMMUN",
1208
1208
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -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 u = {
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(p) {
1272
- i && i(p);
1271
+ onComplete(u) {
1272
+ i && i(u);
1273
1273
  },
1274
- onFailure(p) {
1275
- r && r(p);
1274
+ onFailure(u) {
1275
+ r && r(u);
1276
1276
  }
1277
1277
  };
1278
- m(a, u);
1278
+ m(a, p);
1279
1279
  });
1280
1280
  }
1281
1281
  function qe(e, t, s, n, i = void 0, r = void 0) {
@@ -1354,7 +1354,7 @@ async function ze(e, t, s = void 0, n = void 0) {
1354
1354
  }
1355
1355
  function Qe(e, t, s, n = void 0, i = void 0) {
1356
1356
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1357
- U(
1357
+ R(
1358
1358
  e,
1359
1359
  s,
1360
1360
  (o) => {
@@ -1378,7 +1378,7 @@ function Qe(e, t, s, n = void 0, i = void 0) {
1378
1378
  let M, J;
1379
1379
  const j = [];
1380
1380
  async function Ze(e, t = void 0, s = void 0) {
1381
- e.objID && e.objID !== "" ? U(
1381
+ e.objID && e.objID !== "" ? R(
1382
1382
  e,
1383
1383
  (n) => {
1384
1384
  t && t(n);
@@ -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
- }, u = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
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(u, {
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(p),
1486
+ data: JSON.stringify(u),
1487
1487
  onComplete(f) {
1488
1488
  JSON.parse(f);
1489
1489
  const l = {};
1490
1490
  setTimeout(() => {
1491
- D(
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(u) {
1594
- const p = JSON.parse(u);
1595
- s(p);
1593
+ onComplete(p) {
1594
+ const u = JSON.parse(p);
1595
+ s(u);
1596
1596
  },
1597
- onFailure(u, p) {
1598
- const f = u;
1599
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
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(u) {
1631
- s && s(u);
1630
+ onComplete(p) {
1631
+ s && s(p);
1632
1632
  },
1633
- onFailure(u, p) {
1634
- const f = u;
1635
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f);
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, u) {
1657
- const p = d;
1658
- p.msg = u.error, n && n(p);
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 p = JSON.parse(a).result;
1749
+ const u = JSON.parse(a).result;
1750
1750
  let f = 0;
1751
- p.forEach((l) => {
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 === p.length && t && t(r);
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 u = !1;
1839
+ let p = !1;
1840
1840
  le(
1841
1841
  c.users,
1842
- (p) => {
1843
- p !== void 0 && (d.id_msg = p.id, u = !0, A(e, d));
1842
+ (u) => {
1843
+ u !== void 0 && (d.id_msg = u.id, p = !0, A(e, d));
1844
1844
  },
1845
- (p) => {
1846
- u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), n && n(p), d.id_msg = "";
1845
+ (u) => {
1846
+ p = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", u), n && n(u), d.id_msg = "";
1847
1847
  }
1848
- ), u === !1 && setTimeout(() => {
1849
- u === !1 && C(e, (p) => {
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": p.result.ServerToken
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((p) => {
1883
- p.users = p.users.sort((f, l) => f.login.localeCompare(l.login)), p.users.length === t.length && c.push(p);
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(), u = c.find((p) => {
1885
+ const d = t.sort(), p = c.find((u) => {
1886
1886
  const f = [];
1887
- return p.users.forEach((l) => {
1887
+ return u.users.forEach((l) => {
1888
1888
  f.push(l.login);
1889
1889
  }), JSON.stringify(f) === JSON.stringify(d);
1890
1890
  });
1891
- s && u !== void 0 ? s(u) : (n || u === void 0) && n(u);
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, u) {
1927
- const p = c;
1928
- p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
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 u = c;
1932
- u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
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(u, p, f) {
1973
- const l = JSON.parse(u);
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(u, p, f) {
1977
- const l = u;
1978
- l.status = p.status, l.response = p.errormsg, n && n(l);
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, u) {
2040
- const p = { response: c };
2041
- typeof p.response == "string" && (p.response = JSON.parse(p.response)), p.status = u.status, t && t(p);
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, u) {
2044
- const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
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: p, rep: f }
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 u = a;
2078
- u.status = c.status, u.response = c.errormsg, n && n(u);
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: u
2121
- } = e, p = {
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: u,
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(p.base + p.uri, l);
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 = [], u = 1;
2160
- let p = !1, f = 2;
2161
- a || (a = u), o || (o = 100);
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
- p = !0, s(d);
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
- p || y(g);
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, u) {
2302
- const p = d;
2303
- p.status = u.status, p.response = u.errormsg, s && s(p);
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,9 +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
- a = a.replace('"[', "[").replace(']"', "]").replace('"{', "{").replace('}"', "}").replace(/\\/g, "");
2324
- const u = JSON.parse(a);
2325
- u.first_name = u.firstName, u.last_name = u.lastName, console.log("_3DSwym_get_currentUser | info", u), r = u, n(u);
2323
+ let p = a.replace('"[', "[").replace(']"', "]").replace('"{', "{").replace('}"', "}").replace(/\\/g, "");
2324
+ console.log("result", p);
2325
+ let u = {};
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);
2326
2332
  },
2327
2333
  onFailure(a) {
2328
2334
  i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", a);
@@ -2370,26 +2376,26 @@ function St(e, t = void 0, s = void 0) {
2370
2376
  },
2371
2377
  data: JSON.stringify({ richMessage: o }),
2372
2378
  type: "json",
2373
- onComplete(u, p, f) {
2379
+ onComplete(p, u, f) {
2374
2380
  const l = {
2375
- response: typeof u == "string" ? JSON.parse(u) : u
2381
+ response: typeof p == "string" ? JSON.parse(p) : p
2376
2382
  };
2377
2383
  l.status = f.status, t && t(l);
2378
2384
  },
2379
- onFailure(u) {
2380
- s && s(u);
2385
+ onFailure(p) {
2386
+ s && s(p);
2381
2387
  }
2382
2388
  };
2383
2389
  m(a, d);
2384
2390
  }
2385
2391
  function wt(e, t = void 0, s = void 0) {
2386
- e.tenant && x(e, (n) => {
2392
+ e.tenant && v(e, (n) => {
2387
2393
  const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2388
2394
  return t && t(i), i;
2389
2395
  });
2390
2396
  }
2391
2397
  function Ct(e, t = void 0, s = void 0) {
2392
- e.tenant && x(e, (n) => {
2398
+ e.tenant && v(e, (n) => {
2393
2399
  const i = n.services.find(
2394
2400
  (a) => a.id === "3dpassport"
2395
2401
  )?.url, r = n.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
@@ -2499,7 +2505,7 @@ async function It(e, t, s, n, i, r = void 0, o = void 0) {
2499
2505
  });
2500
2506
  }
2501
2507
  }
2502
- async function Ut(e, t, s, n, i = void 0, r = void 0) {
2508
+ async function Rt(e, t, s, n, i = void 0, r = void 0) {
2503
2509
  if (e.tenant) {
2504
2510
  const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${s}?t=${t}&b=${encodeURIComponent(
2505
2511
  n
@@ -2516,7 +2522,7 @@ async function Ut(e, t, s, n, i = void 0, r = void 0) {
2516
2522
  });
2517
2523
  }
2518
2524
  }
2519
- async function Ft(e, t, s, n = void 0, i = void 0) {
2525
+ async function Ut(e, t, s, n = void 0, i = void 0) {
2520
2526
  if (e.tenant) {
2521
2527
  const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${t}&b=${encodeURIComponent(
2522
2528
  s
@@ -2533,7 +2539,7 @@ async function Ft(e, t, s, n = void 0, i = void 0) {
2533
2539
  });
2534
2540
  }
2535
2541
  }
2536
- async function Rt(e, t, s, n, i = void 0, r = void 0) {
2542
+ async function Ft(e, t, s, n, i = void 0, r = void 0) {
2537
2543
  if (e.tenant) {
2538
2544
  const o = e.tenant.toLowerCase();
2539
2545
  fetch(
@@ -2594,7 +2600,7 @@ async function At(e, t, s, n, i = void 0, r = void 0) {
2594
2600
  }
2595
2601
  }
2596
2602
  //!SECTION
2597
- async function vt(e, t, s, n = void 0, i = void 0) {
2603
+ async function Dt(e, t, s, n = void 0, i = void 0) {
2598
2604
  if (e.tenant) {
2599
2605
  const r = e.tenant.toLowerCase();
2600
2606
  fetch(
@@ -2610,17 +2616,17 @@ async function vt(e, t, s, n = void 0, i = void 0) {
2610
2616
  }
2611
2617
  }
2612
2618
  //!SECTION
2613
- function xt(e) {
2619
+ function vt(e) {
2614
2620
  const t = "Hello " + e;
2615
2621
  return console.log(t), t;
2616
2622
  }
2617
- function Dt(e, t = void 0, s = void 0) {
2623
+ function xt(e, t = void 0, s = void 0) {
2618
2624
  return console.log("credentials", e), new Promise((n) => {
2619
2625
  if (e.token === "" && b(e), !e.space || e.space === "") {
2620
2626
  const o = q();
2621
2627
  console.log("platformeInfo", o);
2622
2628
  }
2623
- F(
2629
+ U(
2624
2630
  e,
2625
2631
  "Common space",
2626
2632
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -2695,7 +2701,7 @@ function Dt(e, t = void 0, s = void 0) {
2695
2701
  }
2696
2702
  export {
2697
2703
  B as UUID,
2698
- Dt as _3DSearch_usersGroup,
2704
+ xt as _3DSearch_usersGroup,
2699
2705
  Ge as _3DSpace_Create_Doc,
2700
2706
  Je as _3DSpace_Update_Doc,
2701
2707
  qe as _3DSpace_bookmark_addSubsciptions,
@@ -2706,11 +2712,11 @@ export {
2706
2712
  P as _3DSpace_file_update,
2707
2713
  ee as _3DSpace_file_update_csr,
2708
2714
  Le as _3DSpace_file_url_csr,
2709
- U as _3DSpace_get_csrf,
2710
- D as _3DSpace_get_docInfo,
2715
+ R as _3DSpace_get_csrf,
2716
+ x as _3DSpace_get_docInfo,
2711
2717
  ae as _3DSpace_get_downloadTicket_multidoc,
2712
2718
  Pe as _3DSpace_get_multiDocInfo,
2713
- F as _3DSpace_get_securityContexts,
2719
+ U as _3DSpace_get_securityContexts,
2714
2720
  k as _3DSpace_get_ticket,
2715
2721
  Xe as _3DSpace_lifecycle_changeRevision,
2716
2722
  Ke as _3DSpace_lifecycle_changeState,
@@ -2737,25 +2743,25 @@ export {
2737
2743
  pt as _3DSwym_postIdea,
2738
2744
  ut as _3DSwym_postIdeaTemplate,
2739
2745
  A as _3DSwym_sendMessageData,
2740
- Fe as _AppMngt_get_info_user,
2741
- Ue as _AppMngt_get_users,
2746
+ Ue as _AppMngt_get_info_user,
2747
+ Re as _AppMngt_get_users,
2742
2748
  Nt as _Iterop_AddOrRemoveRows,
2743
2749
  Ct as _Iterop_Auth_CAS,
2744
2750
  kt as _Iterop_GetOneDependencyTable,
2745
- vt as _Iterop_GetOneList,
2751
+ Dt as _Iterop_GetOneList,
2746
2752
  jt as _Iterop_PatchDependencyTable,
2747
2753
  At as _Iterop_PutDependencyTable,
2748
2754
  It as _Iterop_businessTableSearchInRows,
2749
- Ft as _Iterop_createBusinessTable,
2755
+ Ut as _Iterop_createBusinessTable,
2750
2756
  bt as _Iterop_getAllBusinessTables,
2751
2757
  Ot as _Iterop_getOneBusinessTable,
2752
2758
  $t as _Iterop_getOneBusinessTableRows,
2753
2759
  Tt as _Iterop_jwtUser,
2754
- Rt as _Iterop_runProcess,
2755
- Ut as _Iterop_updateBusinessTable,
2760
+ Ft as _Iterop_runProcess,
2761
+ Rt as _Iterop_updateBusinessTable,
2756
2762
  q as _getPlateformInfos,
2757
2763
  $e as _getPlatformServices,
2758
- x as _getServiceUrl,
2764
+ v as _getServiceUrl,
2759
2765
  Ne as _getServiceUrl_3DPassport,
2760
2766
  wt as _getServiceUrl_Iterop,
2761
2767
  m as _httpCallAuthenticated,
@@ -2766,7 +2772,7 @@ export {
2766
2772
  X as chunkArray,
2767
2773
  Ie as compass_getListAdditionalApps,
2768
2774
  W as couleurs,
2769
- Re as createUserGroups,
2775
+ Fe as createUserGroups,
2770
2776
  oe as dataMixing,
2771
2777
  Ae as deleteUserGroups,
2772
2778
  Se as findAdresse,
@@ -2783,12 +2789,12 @@ export {
2783
2789
  je as getUserGroupsList,
2784
2790
  Y as getUsersGroupRules,
2785
2791
  Ze as get_3DSpace_csrf,
2786
- ve as patchUserGroups,
2787
- xe as patchUserGroupsControl,
2792
+ De as patchUserGroups,
2793
+ ve as patchUserGroupsControl,
2788
2794
  Qe as pushDataIn3DSpace,
2789
- De as readUserGroupControl,
2795
+ xe as readUserGroupControl,
2790
2796
  st as removeTagToDoc,
2791
- xt as sayHello,
2797
+ vt as sayHello,
2792
2798
  Ce as updateEvent
2793
2799
  };
2794
2800
  //# sourceMappingURL=wb3Api.js.map