@beam3_dev/api_module 0.0.192 → 0.0.194

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
@@ -355,7 +355,7 @@ function Ae(e, t) {
355
355
  method: "DELETE"
356
356
  });
357
357
  }
358
- function ke(e, t, s, n = void 0, i = void 0) {
358
+ function Ue(e, t, s, n = void 0, i = void 0) {
359
359
  const { space: r, tenant: o } = e, a = {
360
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
361
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -378,7 +378,7 @@ function ke(e, t, s, n = void 0, i = void 0) {
378
378
  }
379
379
  });
380
380
  }
381
- function Ue(e, t, s, n = void 0, i = void 0) {
381
+ function ke(e, t, s, n = void 0, i = void 0) {
382
382
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
383
  m(a, {
384
384
  method: "PATCH",
@@ -506,7 +506,7 @@ async function je(e, t = void 0, s = void 0, n = void 0) {
506
506
  }
507
507
  });
508
508
  }
509
- function k(e, t = void 0, s = void 0) {
509
+ function U(e, t = void 0, s = void 0) {
510
510
  if (e.objID && e.objID !== "") {
511
511
  let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
512
512
  m(n, {
@@ -550,7 +550,7 @@ function b(e, t = void 0, s = void 0) {
550
550
  }
551
551
  function j(e, t = void 0, s = void 0) {
552
552
  let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
553
- k(
553
+ U(
554
554
  e,
555
555
  (i) => {
556
556
  m(n, {
@@ -605,7 +605,7 @@ function M(e, t, s, n, i, r = void 0, o = void 0) {
605
605
  r,
606
606
  o
607
607
  );
608
- e.token ? a() : k(
608
+ e.token ? a() : U(
609
609
  e,
610
610
  t,
611
611
  (c) => {
@@ -748,11 +748,11 @@ async function Re(e, t, s, n, i = void 0, r = void 0) {
748
748
  ]
749
749
  }),
750
750
  type: "json",
751
- onComplete(U) {
752
- i && i(U);
751
+ onComplete(k) {
752
+ i && i(k);
753
753
  },
754
- onFailure(U) {
755
- r && r(U);
754
+ onFailure(k) {
755
+ r && r(k);
756
756
  }
757
757
  };
758
758
  m(
@@ -1278,7 +1278,7 @@ async function We(e, t, s = void 0, n = void 0) {
1278
1278
  }
1279
1279
  function Xe(e, t, s, n = void 0, i = void 0) {
1280
1280
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1281
- k(
1281
+ U(
1282
1282
  e,
1283
1283
  s,
1284
1284
  (o) => {
@@ -1302,7 +1302,7 @@ function Xe(e, t, s, n = void 0, i = void 0) {
1302
1302
  let E, G;
1303
1303
  const P = [];
1304
1304
  async function Ye(e, t = void 0, s = void 0) {
1305
- e.objID && e.objID !== "" ? k(
1305
+ e.objID && e.objID !== "" ? U(
1306
1306
  e,
1307
1307
  (n) => {
1308
1308
  t && t(n);
@@ -1957,9 +1957,9 @@ function ot(e, t = void 0, s = void 0) {
1957
1957
  w(e, (o) => {
1958
1958
  if (!o)
1959
1959
  throw new Error(
1960
- "☠️ token n'est pas renseigner dans le paramètre credentials ",
1960
+ `☠️ token n'est pas disponible pour cette requête : ${n.base + n.uri}`,
1961
1961
  {
1962
- cause: o?.result?.ServerToken
1962
+ cause: o
1963
1963
  }
1964
1964
  );
1965
1965
  const a = {
@@ -2000,7 +2000,7 @@ function rt(e, t, s = void 0, n = void 0) {
2000
2000
  headers: {
2001
2001
  "Content-type": "application/json;charset=UTF-8",
2002
2002
  Accept: "application/json",
2003
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
2003
+ "X-DS-SWYM-CSRFTOKEN": o?.result?.ServerToken
2004
2004
  },
2005
2005
  data: JSON.stringify(r),
2006
2006
  type: "json",
@@ -2064,13 +2064,15 @@ function dt(e, t, s) {
2064
2064
  const o = {
2065
2065
  method: "POST",
2066
2066
  headers: {
2067
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
2067
+ "X-DS-SWYM-CSRFTOKEN": r?.result?.ServerToken,
2068
2068
  "Content-type": "application/json;charset=UTF-8"
2069
2069
  },
2070
2070
  data: JSON.stringify(i),
2071
- onComplete(a) {
2072
- const c = JSON.parse(a);
2073
- t && t(c);
2071
+ onComplete(a, c, d) {
2072
+ const p = {
2073
+ response: typeof a == "string" ? JSON.parse(a) : a
2074
+ };
2075
+ p.status = d.status, t && t(p);
2074
2076
  },
2075
2077
  onFailure(a) {
2076
2078
  s && s(a);
@@ -2479,7 +2481,7 @@ export {
2479
2481
  M as _3DSpace_file_update,
2480
2482
  Q as _3DSpace_file_update_csr,
2481
2483
  Pe as _3DSpace_file_url_csr,
2482
- k as _3DSpace_get_csrf,
2484
+ U as _3DSpace_get_csrf,
2483
2485
  L as _3DSpace_get_docInfo,
2484
2486
  ee as _3DSpace_get_downloadTicket_multidoc,
2485
2487
  je as _3DSpace_get_multiDocInfo,
@@ -2549,8 +2551,8 @@ export {
2549
2551
  Ie as getUserGroupsList,
2550
2552
  X as getUsersGroupRules,
2551
2553
  Ye as get_3DSpace_csrf,
2552
- ke as patchUserGroups,
2553
- Ue as patchUserGroupsControl,
2554
+ Ue as patchUserGroups,
2555
+ ke as patchUserGroupsControl,
2554
2556
  Xe as pushDataIn3DSpace,
2555
2557
  Fe as readUserGroupControl,
2556
2558
  Qe as removeTagToDoc,