@beam3_dev/api_module 0.0.169 → 0.0.171

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
@@ -250,7 +250,7 @@ function be(e, t, n = void 0, s = void 0) {
250
250
  }
251
251
  });
252
252
  }
253
- const F = {
253
+ const U = {
254
254
  "Content-Type": "application/json",
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
@@ -271,7 +271,7 @@ function Ne(e, t, n = void 0, s = void 0) {
271
271
  };
272
272
  m(a, {
273
273
  method: "POST",
274
- headers: F,
274
+ headers: U,
275
275
  data: JSON.stringify(r),
276
276
  onComplete(d) {
277
277
  n && n(JSON.parse(d));
@@ -366,7 +366,7 @@ function Ae(e, t, n, s = void 0, i = void 0) {
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
367
  }, r = n, d = `${c}${a.URIUGr}/${t}`, p = JSON.stringify(r);
368
368
  m(d, {
369
- headers: F,
369
+ headers: U,
370
370
  method: "PATCH",
371
371
  data: p,
372
372
  type: "json",
@@ -382,7 +382,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
382
382
  const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
383
  m(a, {
384
384
  method: "PATCH",
385
- headers: F,
385
+ headers: U,
386
386
  data: JSON.stringify(n),
387
387
  type: "json",
388
388
  onComplete(d) {
@@ -393,7 +393,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
393
393
  }
394
394
  });
395
395
  }
396
- function Fe(e, t, n = void 0, s = void 0) {
396
+ function Ue(e, t, n = void 0, s = void 0) {
397
397
  const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
398
  m(o, {
399
399
  opts: {
@@ -482,7 +482,7 @@ async function H(e, t = void 0, n = void 0, s = void 0) {
482
482
  }
483
483
  });
484
484
  }
485
- async function Ue(e, t = void 0, n = void 0, s = void 0) {
485
+ async function Fe(e, t = void 0, n = void 0, s = void 0) {
486
486
  const i = e.space;
487
487
  if (t === void 0) {
488
488
  console.log("Le paramètre docids est obligatoire");
@@ -548,7 +548,7 @@ function T(e, t = void 0, n = void 0) {
548
548
  } else
549
549
  n && n("ERROR : url du 3DSpace non défini.");
550
550
  }
551
- function U(e, t = void 0, n = void 0) {
551
+ function F(e, t = void 0, n = void 0) {
552
552
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
553
553
  A(
554
554
  e,
@@ -628,13 +628,11 @@ function q(e, t, n, s, i, c, o = void 0, a = void 0) {
628
628
  let _ = {
629
629
  method: "PUT",
630
630
  headers: {
631
- SecurityContext: e.ctx
631
+ SecurityContext: "ctx::" + e.ctx
632
632
  },
633
633
  data: JSON.stringify({
634
634
  csrf: f,
635
635
  data: [{
636
- id: t,
637
- updateAction: "NONE",
638
636
  relateddata: {
639
637
  files: [{
640
638
  dataelements: {
@@ -643,19 +641,22 @@ function q(e, t, n, s, i, c, o = void 0, a = void 0) {
643
641
  },
644
642
  updateAction: "REVISE"
645
643
  }]
646
- }
644
+ },
645
+ id: t,
646
+ updateAction: "NONE"
647
647
  }]
648
648
  }),
649
649
  type: "json",
650
- onComplete(y) {
651
- o && o(y);
650
+ onComplete(w) {
651
+ o && o(w);
652
652
  },
653
- onFailure(y) {
654
- a && a(y);
653
+ onFailure(w) {
654
+ a && a(w);
655
655
  }
656
656
  };
657
+ const y = e.tenant.toUpperCase();
657
658
  m(
658
- e.space + "/resources/v1/modeler/documents/",
659
+ e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${y}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
659
660
  _
660
661
  );
661
662
  }, h.onFailure = function(S) {
@@ -686,7 +687,7 @@ async function Pe(e, t, n, s, i = void 0, c = void 0) {
686
687
  const S = {
687
688
  method: "POST",
688
689
  data: d,
689
- onComplete(C) {
690
+ onComplete(w) {
690
691
  if (r !== "" && a !== "") {
691
692
  const k = {
692
693
  method: "POST",
@@ -707,7 +708,7 @@ async function Pe(e, t, n, s, i = void 0, c = void 0) {
707
708
  files: [{
708
709
  dataelements: {
709
710
  title: `${n}.json`,
710
- receipt: C
711
+ receipt: w
711
712
  }
712
713
  }]
713
714
  },
@@ -725,12 +726,12 @@ async function Pe(e, t, n, s, i = void 0, c = void 0) {
725
726
  },
726
727
  onFailure: y
727
728
  };
728
- function _(C) {
729
- console.log("Success -- response ", C.data[0]), i && i(C);
729
+ function _(w) {
730
+ console.log("Success -- response ", w.data[0]), i && i(w);
730
731
  }
731
- function y(C, k) {
732
- console.log("Erreur -- response ", C, `
733
- headers `, k), c && c(C);
732
+ function y(w, k) {
733
+ console.log("Erreur -- response ", w, `
734
+ headers `, k), c && c(w);
734
735
  }
735
736
  m(h.ticketURL, S);
736
737
  }
@@ -750,7 +751,7 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1
750
751
  let h = g.couples;
751
752
  h = h.filter(
752
753
  (S, _, y) => _ === y.findIndex(
753
- (C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
754
+ (w) => w.organization.pid === S.organization.pid && w.role.pid === S.role.pid
754
755
  )
755
756
  ), n && (Array.isArray(n) ? n.forEach((S) => {
756
757
  u || h.forEach((_) => {
@@ -758,7 +759,7 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1
758
759
  u = S, f = s;
759
760
  else if (S === _.role.name) {
760
761
  let y = h.filter(
761
- (C) => C.role.name === S
762
+ (w) => w.role.name === S
762
763
  );
763
764
  y.length === 1 ? (u = y[0].role.name, f = y[0].organization.title) : c(y);
764
765
  }
@@ -799,7 +800,7 @@ async function D(e, t = void 0, n = void 0) {
799
800
  console.log("☠️ error => ", s);
800
801
  }
801
802
  ), new Promise((s, i) => {
802
- U(
803
+ F(
803
804
  e,
804
805
  (c) => {
805
806
  e?.returnType === "blob" ? (console.log("ticketURL blob", c), fetch(c).then((o) => o.blob()).then((o) => {
@@ -1200,7 +1201,7 @@ function Ee(e, t = void 0, n = void 0) {
1200
1201
  });
1201
1202
  }
1202
1203
  function Ke(e, t, n, s) {
1203
- U(
1204
+ F(
1204
1205
  e.space,
1205
1206
  t,
1206
1207
  (i) => {
@@ -1218,7 +1219,7 @@ function Ke(e, t, n, s) {
1218
1219
  }
1219
1220
  async function Ve(e, t, n = void 0, s = void 0) {
1220
1221
  return new Promise((i) => {
1221
- U(e, t, (c) => {
1222
+ F(e, t, (c) => {
1222
1223
  m(c, {
1223
1224
  onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
1224
1225
  onFailure: (o, a, r) => {
@@ -1535,7 +1536,7 @@ function qe(e, t = "", n = void 0, s = void 0) {
1535
1536
  }
1536
1537
  });
1537
1538
  }
1538
- async function w(e, t = void 0, n = void 0) {
1539
+ async function C(e, t = void 0, n = void 0) {
1539
1540
  const s = e.space + "/api/index/tk";
1540
1541
  return m(s, {
1541
1542
  onComplete(i, c, o) {
@@ -1559,7 +1560,7 @@ function Qe(e, t = void 0, n = void 0) {
1559
1560
  start: 0
1560
1561
  }
1561
1562
  };
1562
- w(e, (c) => {
1563
+ C(e, (c) => {
1563
1564
  m(s, {
1564
1565
  method: "POST",
1565
1566
  headers: {
@@ -1588,7 +1589,7 @@ function Ze(e, t = void 0, n = void 0) {
1588
1589
  maxNbOfCommonElements: "5"
1589
1590
  }
1590
1591
  };
1591
- w(e, (c) => {
1592
+ C(e, (c) => {
1592
1593
  m(s, {
1593
1594
  method: "POST",
1594
1595
  headers: {
@@ -1615,7 +1616,7 @@ function et(e, t = void 0, n = void 0) {
1615
1616
  limit: `/limit/${e.limit ? e.limit : 128}`,
1616
1617
  page: `/page/${e.page ? e.page : "1"}`
1617
1618
  }, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1618
- w(e, (o) => {
1619
+ C(e, (o) => {
1619
1620
  m(i, {
1620
1621
  method: "GET",
1621
1622
  headers: {
@@ -1658,7 +1659,7 @@ function ae(e, t, n, s) {
1658
1659
  community_id: t
1659
1660
  }
1660
1661
  };
1661
- w(e, (o) => {
1662
+ C(e, (o) => {
1662
1663
  m(i, {
1663
1664
  method: "POST",
1664
1665
  headers: {
@@ -1682,7 +1683,7 @@ function tt(e, t = void 0, n = void 0) {
1682
1683
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1683
1684
  e.commu_id || (e.commu_id = s);
1684
1685
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1685
- w(e, (c) => {
1686
+ C(e, (c) => {
1686
1687
  m(i, {
1687
1688
  method: "GET",
1688
1689
  headers: {
@@ -1722,7 +1723,7 @@ function nt(e, t, n = void 0, s = void 0) {
1722
1723
  d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), r.id_msg = "";
1723
1724
  }
1724
1725
  ), d === !1 && setTimeout(() => {
1725
- d === !1 && w(e, (p) => {
1726
+ d === !1 && C(e, (p) => {
1726
1727
  m(o, {
1727
1728
  method: "POST",
1728
1729
  headers: {
@@ -1746,7 +1747,7 @@ function nt(e, t, n = void 0, s = void 0) {
1746
1747
  }
1747
1748
  function oe(e, t, n, s) {
1748
1749
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1749
- w(e, (c) => {
1750
+ C(e, (c) => {
1750
1751
  m(i, {
1751
1752
  method: "GET",
1752
1753
  headers: {
@@ -1789,7 +1790,7 @@ function P(e, t, n = void 0, s = void 0) {
1789
1790
  parentCommentUri: null,
1790
1791
  richMessage: t.msg
1791
1792
  };
1792
- console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1793
+ console.log("_3dSwym_sendDirectMessageData url ", c), C(e, (a) => {
1793
1794
  m(c, {
1794
1795
  method: "POST",
1795
1796
  headers: {
@@ -1844,7 +1845,7 @@ function st(e, t, n = void 0, s = void 0) {
1844
1845
  // 1 publier, 0 non publier
1845
1846
  }
1846
1847
  };
1847
- w(e, (r) => {
1848
+ C(e, (r) => {
1848
1849
  const d = {
1849
1850
  "Content-type": "application/json;charset=UTF-8",
1850
1851
  Accept: "application/json",
@@ -1873,7 +1874,7 @@ function it(e, t, n = void 0, s = void 0) {
1873
1874
  ideationIds: [t.idee_id]
1874
1875
  }
1875
1876
  };
1876
- w(e, (o) => {
1877
+ C(e, (o) => {
1877
1878
  m(i, {
1878
1879
  method: "POST",
1879
1880
  headers: {
@@ -1901,7 +1902,7 @@ function at(e, t = "", n = void 0, s = void 0) {
1901
1902
  id: t
1902
1903
  }
1903
1904
  };
1904
- w(e, (a) => {
1905
+ C(e, (a) => {
1905
1906
  m(c, {
1906
1907
  method: "POST",
1907
1908
  headers: {
@@ -1928,7 +1929,7 @@ function ot(e, t = ce, n = void 0, s = void 0) {
1928
1929
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1929
1930
  limit: `/limit/${t.limit ? t.limit : 10}`
1930
1931
  }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1931
- w(e, (o) => {
1932
+ C(e, (o) => {
1932
1933
  m(c, {
1933
1934
  method: "GET",
1934
1935
  headers: {
@@ -2022,7 +2023,7 @@ function de(e) {
2022
2023
  }
2023
2024
  function rt(e, t = void 0, n = void 0) {
2024
2025
  const s = e.space + "/api/user/getcurrent/";
2025
- w(e, (i) => {
2026
+ C(e, (i) => {
2026
2027
  m(s, {
2027
2028
  method: "GET",
2028
2029
  headers: {
@@ -2041,7 +2042,7 @@ function rt(e, t = void 0, n = void 0) {
2041
2042
  }
2042
2043
  function ct(e, t, n = void 0, s = void 0) {
2043
2044
  const i = e.space + "/api/user/find/login/" + t;
2044
- w(
2045
+ C(
2045
2046
  e,
2046
2047
  (c) => {
2047
2048
  m(i, {
@@ -2264,9 +2265,9 @@ export {
2264
2265
  A as _3DSpace_get_csrf,
2265
2266
  H as _3DSpace_get_docInfo,
2266
2267
  Z as _3DSpace_get_downloadTicket_multidoc,
2267
- Ue as _3DSpace_get_multiDocInfo,
2268
+ Fe as _3DSpace_get_multiDocInfo,
2268
2269
  N as _3DSpace_get_securityContexts,
2269
- U as _3DSpace_get_ticket,
2270
+ F as _3DSpace_get_ticket,
2270
2271
  Me as _3DSpace_lifecycle_changeRevision,
2271
2272
  xe as _3DSpace_lifecycle_changeState,
2272
2273
  De as _3DSpace_lifecycle_getGraph,
@@ -2284,7 +2285,7 @@ export {
2284
2285
  ot as _3DSwym_get_AllSWYMIdeas,
2285
2286
  rt as _3DSwym_get_currentUser,
2286
2287
  ct as _3DSwym_get_findUser,
2287
- w as _3DSwym_get_version,
2288
+ C as _3DSwym_get_version,
2288
2289
  st as _3DSwym_postIdea,
2289
2290
  P as _3DSwym_sendMessageData,
2290
2291
  be as _AppMngt_get_info_user,
@@ -2328,7 +2329,7 @@ export {
2328
2329
  Ae as patchUserGroups,
2329
2330
  ke as patchUserGroupsControl,
2330
2331
  Be as pushDataIn3DSpace,
2331
- Fe as readUserGroupControl,
2332
+ Ue as readUserGroupControl,
2332
2333
  ze as removeTagToDoc,
2333
2334
  St as sayHello,
2334
2335
  he as updateEvent