@beam3_dev/api_module 0.0.298 → 0.0.300

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
@@ -4,7 +4,7 @@ import { requirejs as $, widget as L } from "@widget-lab/3ddashboard-utils";
4
4
  function Y() {
5
5
  return V();
6
6
  }
7
- const H = {
7
+ const z = {
8
8
  b3M3Yellow: "#FFB300",
9
9
  b3AboutageBlue: "#42A5F5",
10
10
  b3UsinageGreen: "#689F38",
@@ -65,7 +65,7 @@ async function xe(e, t = void 0, s = void 0) {
65
65
  s && s(n), console.error("Erreur : " + n);
66
66
  });
67
67
  }
68
- async function Fe(e, t = H) {
68
+ async function Fe(e, t = z) {
69
69
  let s = O.now().year;
70
70
  const n = e, i = [], r = (o) => {
71
71
  for (let c in o)
@@ -100,7 +100,7 @@ async function Fe(e, t = H) {
100
100
  return o;
101
101
  })();
102
102
  }
103
- function z(e, t, s) {
103
+ function H(e, t, s) {
104
104
  const { credentials: n, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
105
105
  for (let c = 0; c < i.length; c += r) {
106
106
  const d = i.slice(c, c + r);
@@ -401,7 +401,7 @@ function Ke(e, t) {
401
401
  method: "DELETE"
402
402
  });
403
403
  }
404
- function Be(e, t, s, n = void 0, i = void 0) {
404
+ function qe(e, t, s, n = void 0, i = void 0) {
405
405
  const { space: r, tenant: a } = e, o = {
406
406
  URITI: "/3drdfpersist/resources/v1/template-instances",
407
407
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -424,7 +424,7 @@ function Be(e, t, s, n = void 0, i = void 0) {
424
424
  }
425
425
  });
426
426
  }
427
- function qe(e, t, s, n = void 0, i = void 0) {
427
+ function Be(e, t, s, n = void 0, i = void 0) {
428
428
  const { space: r } = e, o = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
429
429
  m(o, {
430
430
  method: "PATCH",
@@ -655,17 +655,27 @@ function G(e, t, s, n, i, r = void 0, a = void 0) {
655
655
  e,
656
656
  t,
657
657
  (c) => {
658
- console.log("_3DSpace_file_update | _3DSpace_get_csrf| onDone | result", c), e.token = c, o();
658
+ console.log(
659
+ "_3DSpace_file_update | _3DSpace_get_csrf| onDone | result",
660
+ c
661
+ ), e.token = c, o();
659
662
  }
660
663
  );
661
664
  }
662
665
  function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
663
- const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
666
+ const c = e.space + `/resources/v1/modeler/documents/files/CheckinTicket?tenant=${e.tenant.toUpperCase()}&e6w-lang=fr&e6w-timezone=-60&xrequestedwith=xmlhttprequest`;
664
667
  m(c, {
665
668
  method: "PUT",
666
669
  headers: {
667
670
  ENO_CSRF_TOKEN: e.token
668
671
  },
672
+ data: JSON.stringify({
673
+ csrf: {
674
+ name: "ENO_CSRF_TOKEN",
675
+ value: e.token
676
+ }
677
+ }),
678
+ type: "json",
669
679
  onComplete(d, u, p) {
670
680
  const f = JSON.parse(d).csrf, l = JSON.parse(d).data[0].dataelements, h = new FormData();
671
681
  let g;
@@ -708,7 +718,7 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
708
718
  }
709
719
  };
710
720
  e.tenant.toUpperCase(), m(
711
- e.space + `/resources/v1/modeler/documents/${docid}/files/${fileid}`,
721
+ e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${e.tenant.toUpperCase()}&e6w-lang=fr&e6w-timezone=-60&xrequestedwith=xmlhttprequest`,
712
722
  w
713
723
  );
714
724
  }, _.onFailure = function(y) {
@@ -856,7 +866,7 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
856
866
  }
857
867
  );
858
868
  }
859
- async function He(e, t, s, n = void 0, i = void 0) {
869
+ async function ze(e, t, s, n = void 0, i = void 0) {
860
870
  e.space, e.token, e.ctx, J(
861
871
  e,
862
872
  t,
@@ -881,7 +891,7 @@ async function He(e, t, s, n = void 0, i = void 0) {
881
891
  }
882
892
  );
883
893
  }
884
- async function ze(e, t, s, n, i = void 0, r = void 0) {
894
+ async function He(e, t, s, n, i = void 0, r = void 0) {
885
895
  oe(
886
896
  e,
887
897
  (a) => {
@@ -1051,7 +1061,7 @@ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1
1051
1061
  }
1052
1062
  });
1053
1063
  }
1054
- async function B(e, t = void 0, s = void 0) {
1064
+ async function q(e, t = void 0, s = void 0) {
1055
1065
  return (!e.objID || e.objID === "") && (console.warn(
1056
1066
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1057
1067
  ), s && s(
@@ -1104,7 +1114,7 @@ async function B(e, t = void 0, s = void 0) {
1104
1114
  });
1105
1115
  }
1106
1116
  async function ce(e, t, s = void 0, n = void 0) {
1107
- typeof t < "u" && Array.isArray(t) && t?.length > 0 ? z({
1117
+ typeof t < "u" && Array.isArray(t) && t?.length > 0 ? H({
1108
1118
  credentials: e,
1109
1119
  myArray: t,
1110
1120
  chunk: 80,
@@ -1550,7 +1560,7 @@ function dt(e, t, s, n = void 0, i = void 0) {
1550
1560
  }
1551
1561
  );
1552
1562
  }
1553
- let q, E;
1563
+ let B, E;
1554
1564
  const A = [];
1555
1565
  async function ut(e, t = void 0, s = void 0) {
1556
1566
  e.objID && e.objID !== "" ? I(
@@ -1572,7 +1582,7 @@ async function ut(e, t = void 0, s = void 0) {
1572
1582
  );
1573
1583
  }
1574
1584
  async function pt(e, t = void 0, s = void 0) {
1575
- console.log("getDatasByTenant (getDocuments)", e), await B(
1585
+ console.log("getDatasByTenant (getDocuments)", e), await q(
1576
1586
  e,
1577
1587
  (n) => {
1578
1588
  const i = {};
@@ -1590,11 +1600,11 @@ function lt(e, t = void 0, s = void 0) {
1590
1600
  return;
1591
1601
  }
1592
1602
  e.objIds.forEach((i, r) => {
1593
- B(
1603
+ q(
1594
1604
  e,
1595
1605
  i.objID,
1596
1606
  (a) => {
1597
- n.push({ [i.name]: a }), i.name === "dbProjets" && (q = a.affaires.map((o) => o.objectID), pe(e, E)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1607
+ n.push({ [i.name]: a }), i.name === "dbProjets" && (B = a.affaires.map((o) => o.objectID), pe(e, E)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1598
1608
  }
1599
1609
  );
1600
1610
  });
@@ -1602,7 +1612,7 @@ function lt(e, t = void 0, s = void 0) {
1602
1612
  function pe(e, t, s = void 0, n = void 0) {
1603
1613
  ce(
1604
1614
  e,
1605
- q,
1615
+ B,
1606
1616
  (i) => {
1607
1617
  const r = [...t];
1608
1618
  r.find((a) => a.objectID === i.objectId).data = i.data, E = r, A.push(i.data), s && s(A);
@@ -2746,7 +2756,7 @@ async function Kt(e, t, s, n = void 0, i = void 0) {
2746
2756
  });
2747
2757
  }
2748
2758
  }
2749
- async function Bt(e, t, s, n, i, r = void 0, a = void 0) {
2759
+ async function qt(e, t, s, n, i, r = void 0, a = void 0) {
2750
2760
  if (e.tenant) {
2751
2761
  const o = e.tenant.toLowerCase();
2752
2762
  fetch(
@@ -2761,7 +2771,7 @@ async function Bt(e, t, s, n, i, r = void 0, a = void 0) {
2761
2771
  });
2762
2772
  }
2763
2773
  }
2764
- async function qt(e, t, s, n, i = void 0, r = void 0) {
2774
+ async function Bt(e, t, s, n, i = void 0, r = void 0) {
2765
2775
  if (e.tenant) {
2766
2776
  const a = e.tenant.toLowerCase();
2767
2777
  fetch(
@@ -2879,13 +2889,13 @@ function Wt(e, t = void 0, s = void 0) {
2879
2889
  export {
2880
2890
  Y as UUID,
2881
2891
  Wt as _3DSearch_usersGroup,
2882
- ze as _3DSpace_Create_Doc,
2883
- He as _3DSpace_Update_Doc,
2892
+ He as _3DSpace_Create_Doc,
2893
+ ze as _3DSpace_Update_Doc,
2884
2894
  Ye as _3DSpace_Upload_File,
2885
2895
  at as _3DSpace_bookmark_addSubsciptions,
2886
2896
  it as _3DSpace_bookmark_newWorkspace,
2887
2897
  T as _3DSpace_csrf,
2888
- B as _3DSpace_download_doc,
2898
+ q as _3DSpace_download_doc,
2889
2899
  ce as _3DSpace_download_multidoc,
2890
2900
  G as _3DSpace_file_update,
2891
2901
  ae as _3DSpace_file_update_csr,
@@ -2928,8 +2938,8 @@ export {
2928
2938
  jt as _Iterop_Auth_CAS,
2929
2939
  Kt as _Iterop_GetOneDependencyTable,
2930
2940
  Et as _Iterop_GetOneList,
2931
- Bt as _Iterop_PatchDependencyTable,
2932
- qt as _Iterop_PutDependencyTable,
2941
+ qt as _Iterop_PatchDependencyTable,
2942
+ Bt as _Iterop_PutDependencyTable,
2933
2943
  Lt as _Iterop_businessTableSearchInRows,
2934
2944
  Jt as _Iterop_createBusinessTable,
2935
2945
  Dt as _Iterop_getAllBusinessTables,
@@ -2949,9 +2959,9 @@ export {
2949
2959
  je as _setDroppable,
2950
2960
  Re as _setupTagger,
2951
2961
  ft as addTagToDoc,
2952
- z as chunkArray,
2962
+ H as chunkArray,
2953
2963
  Ae as compass_getListAdditionalApps,
2954
- H as couleurs,
2964
+ z as couleurs,
2955
2965
  Me as createUserGroups,
2956
2966
  pe as dataMixing,
2957
2967
  Ke as deleteUserGroups,
@@ -2969,8 +2979,8 @@ export {
2969
2979
  Ge as getUserGroupsList,
2970
2980
  ee as getUsersGroupRules,
2971
2981
  ut as get_3DSpace_csrf,
2972
- Be as patchUserGroups,
2973
- qe as patchUserGroupsControl,
2982
+ qe as patchUserGroups,
2983
+ Be as patchUserGroupsControl,
2974
2984
  dt as pushDataIn3DSpace,
2975
2985
  Ee as readUserGroupControl,
2976
2986
  mt as removeTagToDoc,