@beam3_dev/api_module 0.0.105 → 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
@@ -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
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,
@@ -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
  }
@@ -2050,14 +2051,14 @@ function at(e, t = void 0, n = void 0) {
2050
2051
  export {
2051
2052
  j as UUID,
2052
2053
  at as _3DSearch_usersGroup,
2053
- ve as _3DSpace_Create_Doc,
2054
+ Fe as _3DSpace_Create_Doc,
2054
2055
  Ie as _3DSpace_bookmark_addSubsciptions,
2055
2056
  T as _3DSpace_csrf,
2056
2057
  I as _3DSpace_download_doc,
2057
2058
  B as _3DSpace_download_multidoc,
2058
2059
  V as _3DSpace_file_update,
2059
2060
  W as _3DSpace_file_update_csr,
2060
- Fe as _3DSpace_file_url_csr,
2061
+ ve as _3DSpace_file_url_csr,
2061
2062
  k as _3DSpace_get_csrf,
2062
2063
  X as _3DSpace_get_docInfo,
2063
2064
  Y as _3DSpace_get_downloadTicket_multidoc,