@beam3_dev/api_module 0.0.104 → 0.0.106

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,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as N } from "luxon";
3
- import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
4
- function U() {
3
+ import { requirejs as O, widget as U } from "@widget-lab/3ddashboard-utils";
4
+ function j() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -121,7 +121,7 @@ function fe(e, t = void 0) {
121
121
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
122
122
  let s;
123
123
  s === void 0 && (s = n.createProxy({
124
- widgetId: j.id,
124
+ widgetId: U.id,
125
125
  filteringMode: "WithFilteringServices"
126
126
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
127
127
  });
@@ -137,7 +137,7 @@ async function ge(e, t = void 0, n = void 0) {
137
137
  await O(
138
138
  ["DS/i3DXCompassServices/i3DXCompassServices"],
139
139
  (s) => {
140
- (!e || e === "") && (e = j.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
140
+ (!e || e === "") && (e = U.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
141
141
  s.getPlatformServices({
142
142
  platformId: e,
143
143
  onComplete: t,
@@ -166,12 +166,13 @@ function E(e, t = void 0, n = void 0) {
166
166
  const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
167
  f(s, {
168
168
  onComplete(o) {
169
+ console.log("_getServiceUrl", o);
169
170
  const r = JSON.parse(o);
170
- if (console.log("_getServiceUrl", r), r && "platforms" in r) {
171
+ if (r && "platforms" in r) {
171
172
  const i = r.platforms.find((a) => {
172
- a.id, e.tenant;
173
+ a.id, e.tenant.toUpperCase();
173
174
  });
174
- t && t(i);
175
+ t && i ? t(i) : n && n("_getServiceUrl return listServiceUrl = undefined");
175
176
  }
176
177
  },
177
178
  onFailure(o) {
@@ -249,7 +250,7 @@ function ye(e, t, n = void 0, s = void 0) {
249
250
  }
250
251
  });
251
252
  }
252
- const v = {
253
+ const F = {
253
254
  "Content-Type": "application/json",
254
255
  Accept: "application/json,text/javascript,*/*"
255
256
  };
@@ -270,7 +271,7 @@ function we(e, t, n = void 0, s = void 0) {
270
271
  };
271
272
  f(a, {
272
273
  method: "POST",
273
- headers: v,
274
+ headers: F,
274
275
  data: JSON.stringify(c),
275
276
  onComplete(d) {
276
277
  n && n(JSON.parse(d));
@@ -365,7 +366,7 @@ function be(e, t, n, s = void 0, o = void 0) {
365
366
  OPTsTenant: `tenant=dstenant:${i}`
366
367
  }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
367
368
  f(d, {
368
- headers: v,
369
+ headers: F,
369
370
  method: "PATCH",
370
371
  data: l,
371
372
  type: "json",
@@ -381,7 +382,7 @@ function Ne(e, t, n, s = void 0, o = void 0) {
381
382
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
382
383
  f(a, {
383
384
  method: "PATCH",
384
- headers: v,
385
+ headers: F,
385
386
  data: JSON.stringify(n),
386
387
  type: "json",
387
388
  onComplete(d) {
@@ -506,7 +507,7 @@ function A(e, t = void 0, n = void 0) {
506
507
  }
507
508
  );
508
509
  }
509
- function Fe(e, t, n, s = void 0, o = void 0) {
510
+ function ve(e, t, n, s = void 0, o = void 0) {
510
511
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
511
512
  n || (n = e.token), f(r, {
512
513
  method: "PUT",
@@ -597,7 +598,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
597
598
  }
598
599
  });
599
600
  }
600
- async function ve(e, t, n, s, o = void 0, r = void 0) {
601
+ async function Fe(e, t, n, s, o = void 0, r = void 0) {
601
602
  const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
602
603
  type: "text/plain"
603
604
  }), p = {
@@ -621,7 +622,7 @@ async function ve(e, t, n, s, o = void 0, r = void 0) {
621
622
  data: d,
622
623
  onComplete(C) {
623
624
  if (c !== "" && a !== "") {
624
- const F = {
625
+ const v = {
625
626
  method: "POST",
626
627
  headers: {
627
628
  ENO_CSRF_TOKEN: a,
@@ -644,7 +645,7 @@ async function ve(e, t, n, s, o = void 0, r = void 0) {
644
645
  }
645
646
  }]
646
647
  },
647
- tempId: U()
648
+ tempId: j()
648
649
  }]
649
650
  }),
650
651
  type: "json",
@@ -652,7 +653,7 @@ async function ve(e, t, n, s, o = void 0, r = void 0) {
652
653
  onComplete: _,
653
654
  onFailure: y
654
655
  };
655
- c !== "" && f(p.url_Post, F);
656
+ c !== "" && f(p.url_Post, v);
656
657
  } else
657
658
  console.warn("le store est vide");
658
659
  },
@@ -661,9 +662,9 @@ async function ve(e, t, n, s, o = void 0, r = void 0) {
661
662
  function _(C) {
662
663
  console.log("Success -- response ", C.data[0]), o && o(C);
663
664
  }
664
- function y(C, F) {
665
+ function y(C, v) {
665
666
  console.log("Erreur -- response ", C, `
666
- headers `, F), r && r(C);
667
+ headers `, v), r && r(C);
667
668
  }
668
669
  f(h.ticketURL, S);
669
670
  }
@@ -957,7 +958,7 @@ function De(e, t, n = void 0, s = void 0) {
957
958
  }
958
959
  });
959
960
  }
960
- function je(e, t, n = void 0, s = void 0) {
961
+ function Ue(e, t, n = void 0, s = void 0) {
961
962
  return new Promise((o) => {
962
963
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
963
964
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
@@ -1002,7 +1003,7 @@ function je(e, t, n = void 0, s = void 0) {
1002
1003
  }
1003
1004
  });
1004
1005
  }
1005
- function Ue(e, t, n, s = void 0, o = void 0) {
1006
+ function je(e, t, n, s = void 0, o = void 0) {
1006
1007
  return new Promise((r) => {
1007
1008
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1008
1009
  const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
@@ -1292,7 +1293,7 @@ function Z(e, t, n = void 0, s = void 0) {
1292
1293
  }, i = `${r.baseUrl}${r.uri}`, a = {
1293
1294
  "Content-Type": "application/json",
1294
1295
  Accept: "application/json,text/javascript,*/*"
1295
- }, c = U(), d = {
1296
+ }, c = j(), d = {
1296
1297
  with_indexing_date: !0,
1297
1298
  with_synthesis: !0,
1298
1299
  with_nls: !1,
@@ -1952,6 +1953,7 @@ function tt(e, t, n = void 0, s = void 0) {
1952
1953
  }
1953
1954
  function nt(e, t = void 0, n = void 0) {
1954
1955
  e.tenant && E(e, (s) => {
1956
+ console.log("serviceUrls", s);
1955
1957
  const o = s.find((a) => a.id === "3dpassport")?.url, r = s.find((a) => a.id === "businessprocess")?.url + "/api/v2", i = `${o}/login/?service=${r}/auth/cas`;
1956
1958
  f(i, {
1957
1959
  onComplete(a, c) {
@@ -2047,25 +2049,25 @@ function at(e, t = void 0, n = void 0) {
2047
2049
  });
2048
2050
  }
2049
2051
  export {
2050
- U as UUID,
2052
+ j as UUID,
2051
2053
  at as _3DSearch_usersGroup,
2052
- ve as _3DSpace_Create_Doc,
2054
+ Fe as _3DSpace_Create_Doc,
2053
2055
  Ie as _3DSpace_bookmark_addSubsciptions,
2054
2056
  T as _3DSpace_csrf,
2055
2057
  I as _3DSpace_download_doc,
2056
2058
  B as _3DSpace_download_multidoc,
2057
2059
  V as _3DSpace_file_update,
2058
2060
  W as _3DSpace_file_update_csr,
2059
- Fe as _3DSpace_file_url_csr,
2061
+ ve as _3DSpace_file_url_csr,
2060
2062
  k as _3DSpace_get_csrf,
2061
2063
  X as _3DSpace_get_docInfo,
2062
2064
  Y as _3DSpace_get_downloadTicket_multidoc,
2063
2065
  b as _3DSpace_get_securityContexts,
2064
2066
  A as _3DSpace_get_ticket,
2065
- Ue as _3DSpace_lifecycle_changeRevision,
2067
+ je as _3DSpace_lifecycle_changeRevision,
2066
2068
  $e as _3DSpace_lifecycle_changeState,
2067
2069
  De as _3DSpace_lifecycle_getGraph,
2068
- je as _3DSpace_lifecycle_getNextRevision,
2070
+ Ue as _3DSpace_lifecycle_getNextRevision,
2069
2071
  Ae as _3DSpace_lifecycle_getNextStates,
2070
2072
  qe as _3DSwym_buildDirectMessage,
2071
2073
  ze as _3DSwym_deleteIdea,