@beam3_dev/api_module 0.0.191 → 0.0.192

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
@@ -250,7 +250,7 @@ function $e(e, t, s = void 0, n = void 0) {
250
250
  }
251
251
  });
252
252
  }
253
- const j = {
253
+ const F = {
254
254
  "Content-Type": "application/json",
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
@@ -271,7 +271,7 @@ function Ne(e, t, s = void 0, n = void 0) {
271
271
  };
272
272
  m(a, {
273
273
  method: "POST",
274
- headers: j,
274
+ headers: F,
275
275
  data: JSON.stringify(c),
276
276
  onComplete(d) {
277
277
  s && s(JSON.parse(d));
@@ -355,7 +355,7 @@ function Ae(e, t) {
355
355
  method: "DELETE"
356
356
  });
357
357
  }
358
- function Ue(e, t, s, n = void 0, i = void 0) {
358
+ function ke(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",
@@ -366,7 +366,7 @@ function Ue(e, t, s, n = void 0, i = void 0) {
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
367
  }, c = s, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
368
368
  m(d, {
369
- headers: j,
369
+ headers: F,
370
370
  method: "PATCH",
371
371
  data: p,
372
372
  type: "json",
@@ -378,11 +378,11 @@ function Ue(e, t, s, n = void 0, i = void 0) {
378
378
  }
379
379
  });
380
380
  }
381
- function Fe(e, t, s, n = void 0, i = void 0) {
381
+ function Ue(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",
385
- headers: j,
385
+ headers: F,
386
386
  data: JSON.stringify(s),
387
387
  type: "json",
388
388
  onComplete(d) {
@@ -393,7 +393,7 @@ function Fe(e, t, s, n = void 0, i = void 0) {
393
393
  }
394
394
  });
395
395
  }
396
- function je(e, t, s = void 0, n = void 0) {
396
+ function Fe(e, t, s = void 0, n = void 0) {
397
397
  const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
398
  m(o, {
399
399
  opts: {
@@ -482,7 +482,7 @@ async function L(e, t = void 0, s = void 0, n = void 0) {
482
482
  }
483
483
  });
484
484
  }
485
- async function ke(e, t = void 0, s = void 0, n = void 0) {
485
+ async function je(e, t = void 0, s = void 0, n = void 0) {
486
486
  const i = e.space;
487
487
  if (t === void 0) {
488
488
  console.log("Le paramètre docids est obligatoire");
@@ -506,7 +506,7 @@ async function ke(e, t = void 0, s = void 0, n = void 0) {
506
506
  }
507
507
  });
508
508
  }
509
- function U(e, t = void 0, s = void 0) {
509
+ function k(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, {
@@ -548,9 +548,9 @@ function b(e, t = void 0, s = void 0) {
548
548
  } else
549
549
  s && s("ERROR : url du 3DSpace non défini.");
550
550
  }
551
- function k(e, t = void 0, s = void 0) {
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
- U(
553
+ k(
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() : U(
608
+ e.token ? a() : k(
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(F) {
752
- i && i(F);
751
+ onComplete(U) {
752
+ i && i(U);
753
753
  },
754
- onFailure(F) {
755
- r && r(F);
754
+ onFailure(U) {
755
+ r && r(U);
756
756
  }
757
757
  };
758
758
  m(
@@ -835,7 +835,7 @@ async function J(e, t = void 0, s = void 0) {
835
835
  console.log("☠️ error => ", n);
836
836
  }
837
837
  ), new Promise((n, i) => {
838
- k(
838
+ j(
839
839
  e,
840
840
  (r) => {
841
841
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
@@ -1248,7 +1248,7 @@ function Be(e, t = void 0, s = void 0) {
1248
1248
  });
1249
1249
  }
1250
1250
  function Ve(e, t, s, n) {
1251
- k(
1251
+ j(
1252
1252
  e.space,
1253
1253
  t,
1254
1254
  (i) => {
@@ -1266,7 +1266,7 @@ function Ve(e, t, s, n) {
1266
1266
  }
1267
1267
  async function We(e, t, s = void 0, n = void 0) {
1268
1268
  return new Promise((i) => {
1269
- k(e, t, (r) => {
1269
+ j(e, t, (r) => {
1270
1270
  m(r, {
1271
1271
  onComplete: (o, a, c) => (i(JSON.parse(o)), s && s(JSON.parse(o), a, c), i),
1272
1272
  onFailure: (o, a, c) => {
@@ -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
- U(
1281
+ k(
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 !== "" ? U(
1305
+ e.objID && e.objID !== "" ? k(
1306
1306
  e,
1307
1307
  (n) => {
1308
1308
  t && t(n);
@@ -1955,15 +1955,18 @@ function ot(e, t = void 0, s = void 0) {
1955
1955
  }
1956
1956
  };
1957
1957
  w(e, (o) => {
1958
- if (o)
1959
- throw new Error(o, {
1960
- cause: o
1961
- });
1958
+ if (!o)
1959
+ throw new Error(
1960
+ "☠️ token n'est pas renseigner dans le paramètre credentials ",
1961
+ {
1962
+ cause: o?.result?.ServerToken
1963
+ }
1964
+ );
1962
1965
  const a = {
1963
1966
  headers: {
1964
1967
  "Content-type": "application/json;charset=UTF-8",
1965
1968
  Accept: "application/json",
1966
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1969
+ "X-DS-SWYM-CSRFTOKEN": o?.result?.ServerToken
1967
1970
  },
1968
1971
  method: "POST",
1969
1972
  data: JSON.stringify(r),
@@ -2476,12 +2479,12 @@ export {
2476
2479
  M as _3DSpace_file_update,
2477
2480
  Q as _3DSpace_file_update_csr,
2478
2481
  Pe as _3DSpace_file_url_csr,
2479
- U as _3DSpace_get_csrf,
2482
+ k as _3DSpace_get_csrf,
2480
2483
  L as _3DSpace_get_docInfo,
2481
2484
  ee as _3DSpace_get_downloadTicket_multidoc,
2482
- ke as _3DSpace_get_multiDocInfo,
2485
+ je as _3DSpace_get_multiDocInfo,
2483
2486
  $ as _3DSpace_get_securityContexts,
2484
- k as _3DSpace_get_ticket,
2487
+ j as _3DSpace_get_ticket,
2485
2488
  Ee as _3DSpace_lifecycle_changeRevision,
2486
2489
  Le as _3DSpace_lifecycle_changeState,
2487
2490
  Me as _3DSpace_lifecycle_getGraph,
@@ -2546,10 +2549,10 @@ export {
2546
2549
  Ie as getUserGroupsList,
2547
2550
  X as getUsersGroupRules,
2548
2551
  Ye as get_3DSpace_csrf,
2549
- Ue as patchUserGroups,
2550
- Fe as patchUserGroupsControl,
2552
+ ke as patchUserGroups,
2553
+ Ue as patchUserGroupsControl,
2551
2554
  Xe as pushDataIn3DSpace,
2552
- je as readUserGroupControl,
2555
+ Fe as readUserGroupControl,
2553
2556
  Qe as removeTagToDoc,
2554
2557
  $t as sayHello,
2555
2558
  Se as updateEvent