@beam3_dev/api_module 0.0.49 → 0.0.50

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
@@ -208,7 +208,7 @@ function Se(e, t, n = void 0, s = void 0) {
208
208
  }
209
209
  });
210
210
  }
211
- const U = {
211
+ const D = {
212
212
  "Content-Type": "application/json",
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
@@ -229,7 +229,7 @@ function _e(e, t, n = void 0, s = void 0) {
229
229
  };
230
230
  f(a, {
231
231
  method: "POST",
232
- headers: U,
232
+ headers: D,
233
233
  data: JSON.stringify(c),
234
234
  onComplete(d) {
235
235
  n && n(JSON.parse(d));
@@ -324,7 +324,7 @@ function Ce(e, t, n, s = void 0, i = void 0) {
324
324
  OPTsTenant: `tenant=dstenant:${o}`
325
325
  }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
326
326
  f(d, {
327
- headers: U,
327
+ headers: D,
328
328
  method: "PATCH",
329
329
  data: l,
330
330
  type: "json",
@@ -340,7 +340,7 @@ function Oe(e, t, n, s = void 0, i = void 0) {
340
340
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  f(a, {
342
342
  method: "PATCH",
343
- headers: U,
343
+ headers: D,
344
344
  data: JSON.stringify(n),
345
345
  type: "json",
346
346
  onComplete(d) {
@@ -416,12 +416,12 @@ function C(e, t = void 0, n = void 0) {
416
416
  } else
417
417
  n && n("ERROR : url du 3DSpace non défini.");
418
418
  }
419
- function D(e, t = void 0, n = void 0) {
419
+ function U(e, t = void 0, n = void 0) {
420
420
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
421
421
  k(
422
422
  e,
423
423
  (i) => {
424
- console.log("onComplete / ☠️ info => ", i), i.csrf.value === e.token && f(s, {
424
+ console.log("onComplete / ☠️ info => ", i, e.token), f(s, {
425
425
  method: "PUT",
426
426
  headers: {
427
427
  ENO_CSRF_TOKEN: i.csrf.value === e.token ? i.csrf.value : e.token
@@ -433,11 +433,13 @@ function D(e, t = void 0, n = void 0) {
433
433
  e.ticket = a, t && t(a);
434
434
  },
435
435
  onFailure(r, o) {
436
- console.log("☠️ error => ", r, o), n && n(r, o);
436
+ console.warn("☠️ error => ", r, o), n && n(r, o);
437
437
  }
438
438
  });
439
439
  },
440
- n
440
+ (i) => {
441
+ console.warn("_3DSpace_file_url / error => ", i), n && n(i);
442
+ }
441
443
  );
442
444
  }
443
445
  function be(e, t, n, s = void 0, i = void 0) {
@@ -665,7 +667,7 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
665
667
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
666
668
  );
667
669
  try {
668
- console.log("_3DSpace_download_doc / credentials", e), D(
670
+ console.log("_3DSpace_download_doc / credentials", e), U(
669
671
  e,
670
672
  (r) => {
671
673
  f(r, {
@@ -796,7 +798,7 @@ function Fe(e, t, n = void 0, s = void 0) {
796
798
  }
797
799
  });
798
800
  }
799
- function Ue(e, t, n, s = void 0, i = void 0) {
801
+ function De(e, t, n, s = void 0, i = void 0) {
800
802
  return new Promise((r) => {
801
803
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
802
804
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -838,7 +840,7 @@ function Ue(e, t, n, s = void 0, i = void 0) {
838
840
  }
839
841
  });
840
842
  }
841
- function De(e, t, n = void 0, s = void 0) {
843
+ function Ue(e, t, n = void 0, s = void 0) {
842
844
  return new Promise((i) => {
843
845
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
844
846
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
@@ -1007,7 +1009,7 @@ function Re(e, t = void 0, n = void 0) {
1007
1009
  });
1008
1010
  }
1009
1011
  function Ie(e, t, n, s) {
1010
- D(
1012
+ U(
1011
1013
  e.space,
1012
1014
  t,
1013
1015
  (i) => {
@@ -1025,7 +1027,7 @@ function Ie(e, t, n, s) {
1025
1027
  }
1026
1028
  async function ve(e, t, n = void 0, s = void 0) {
1027
1029
  return new Promise((i) => {
1028
- D(e.space, t, (r) => {
1030
+ U(e.space, t, (r) => {
1029
1031
  f(r, {
1030
1032
  onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1031
1033
  onFailure: (o, a, c) => {
@@ -1080,7 +1082,7 @@ async function Pe(e, t = void 0, n = void 0) {
1080
1082
  );
1081
1083
  }
1082
1084
  async function Me(e, t = void 0, n = void 0) {
1083
- console.log("getDatasByTenant", e), await I(
1085
+ console.log("getDatasByTenant (getDocuments)", e), await I(
1084
1086
  e,
1085
1087
  (s) => {
1086
1088
  const i = {};
@@ -1886,15 +1888,15 @@ export {
1886
1888
  W as _3DSpace_download_multidoc,
1887
1889
  G as _3DSpace_file_update,
1888
1890
  K as _3DSpace_file_update_csr,
1889
- D as _3DSpace_file_url,
1891
+ U as _3DSpace_file_url,
1890
1892
  be as _3DSpace_file_url_csr,
1891
1893
  k as _3DSpace_get_csrf,
1892
1894
  J as _3DSpace_get_docInfo,
1893
1895
  X as _3DSpace_get_downloadTicket_multidoc,
1894
1896
  N as _3DSpace_get_securityContexts,
1895
1897
  je as _3DSpace_lifecycle_changeRevision,
1896
- Ue as _3DSpace_lifecycle_changeState,
1897
- De as _3DSpace_lifecycle_getGraph,
1898
+ De as _3DSpace_lifecycle_changeState,
1899
+ Ue as _3DSpace_lifecycle_getGraph,
1898
1900
  $e as _3DSpace_lifecycle_getNextRevision,
1899
1901
  Fe as _3DSpace_lifecycle_getNextStates,
1900
1902
  We as _3DSwim_getAllCommunities,