@beam3_dev/api_module 0.0.296 → 0.0.298

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
@@ -565,7 +565,7 @@ function I(e, t = void 0, s = void 0) {
565
565
  }
566
566
  });
567
567
  } else
568
- b(
568
+ T(
569
569
  e,
570
570
  (n) => {
571
571
  console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), e.token = n, t && t(e);
@@ -575,7 +575,7 @@ function I(e, t = void 0, s = void 0) {
575
575
  }
576
576
  );
577
577
  }
578
- function b(e, t = void 0, s = void 0) {
578
+ function T(e, t = void 0, s = void 0) {
579
579
  if (e.space) {
580
580
  const n = e.space + "/resources/v1/application/CSRF";
581
581
  m(n, {
@@ -674,7 +674,7 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
674
674
  }), h.append("__fcs__jobTicket", l.ticket), h.append("file_0", g, i);
675
675
  const _ = {};
676
676
  _.method = "POST", _.data = h, _.onComplete = function(y) {
677
- let S = {
677
+ let w = {
678
678
  method: "PUT",
679
679
  headers: {
680
680
  SecurityContext: "ctx::" + e.ctx
@@ -700,16 +700,16 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
700
700
  ]
701
701
  }),
702
702
  type: "json",
703
- onComplete(T) {
704
- a && a(T);
703
+ onComplete(S) {
704
+ a && a(S);
705
705
  },
706
- onFailure(T) {
707
- o && o(T);
706
+ onFailure(S) {
707
+ o && o(S);
708
708
  }
709
- }, w = e.tenant.toUpperCase();
710
- m(
711
- e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${w}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
712
- S
709
+ };
710
+ e.tenant.toUpperCase(), m(
711
+ e.space + `/resources/v1/modeler/documents/${docid}/files/${fileid}`,
712
+ w
713
713
  );
714
714
  }, _.onFailure = function(y) {
715
715
  o && o(y);
@@ -781,14 +781,14 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
781
781
  onComplete(l, h, g) {
782
782
  try {
783
783
  if (l = JSON.parse(l), l?.ticket) {
784
- const { ticket: _, actionurl: y, jobticket: S } = l;
784
+ const { ticket: _, actionurl: y, jobticket: w } = l;
785
785
  K(
786
786
  { dataelements: { ticket: _, ticketURL: y } },
787
787
  s,
788
788
  t,
789
- (w) => {
789
+ (S) => {
790
790
  const R = new DOMParser().parseFromString(
791
- w,
791
+ S,
792
792
  "text/html"
793
793
  ).body.firstChild.querySelector("input").getAttributeNode("value").value, D = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${o}/contents?receipt=${encodeURIComponent(
794
794
  R
@@ -830,11 +830,11 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
830
830
  }
831
831
  });
832
832
  },
833
- (w) => {
834
- console.warn("pushFileInFcs", w), i && i(w);
833
+ (S) => {
834
+ console.warn("pushFileInFcs", S), i && i(S);
835
835
  },
836
- (w) => {
837
- r && r({ fileName: t, progress: w });
836
+ (S) => {
837
+ r && r({ fileName: t, progress: S });
838
838
  }
839
839
  );
840
840
  }
@@ -1015,18 +1015,18 @@ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1
1015
1015
  p = t;
1016
1016
  let g = h.couples;
1017
1017
  g = g.filter(
1018
- (_, y, S) => y === S.findIndex(
1019
- (w) => w.organization.pid === _.organization.pid && w.role.pid === _.role.pid
1018
+ (_, y, w) => y === w.findIndex(
1019
+ (S) => S.organization.pid === _.organization.pid && S.role.pid === _.role.pid
1020
1020
  )
1021
1021
  ), s && (Array.isArray(s) ? s.forEach((_) => {
1022
1022
  l || g.forEach((y) => {
1023
1023
  if (_ === y.role.name && n === y.organization.title)
1024
1024
  l = _, f = n;
1025
1025
  else if (_ === y.role.name) {
1026
- let S = g.filter(
1027
- (w) => w.role.name === _
1026
+ let w = g.filter(
1027
+ (S) => S.role.name === _
1028
1028
  );
1029
- S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
1029
+ w.length === 1 ? (l = w[0].role.name, f = w[0].organization.title) : r(w);
1030
1030
  }
1031
1031
  });
1032
1032
  }) : g.forEach((_) => {
@@ -1034,7 +1034,7 @@ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1
1034
1034
  l = s, f = n;
1035
1035
  else if (s === _.role.name) {
1036
1036
  let y = g.filter(
1037
- (S) => S.role.name === s
1037
+ (w) => w.role.name === s
1038
1038
  );
1039
1039
  y.length === 1 ? (l = y[0].role.name, f = y[0].organization.title) : r(y);
1040
1040
  }
@@ -1172,7 +1172,7 @@ function de(e, t, s = void 0, n = void 0, i = void 0) {
1172
1172
  }
1173
1173
  function Qe(e, t, s = void 0, n = void 0) {
1174
1174
  return new Promise((i) => {
1175
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1175
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1176
1176
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
1177
1177
  let a = {
1178
1178
  method: "POST",
@@ -1203,7 +1203,7 @@ function Qe(e, t, s = void 0, n = void 0) {
1203
1203
  }
1204
1204
  function Ze(e, t, s, n = void 0, i = void 0) {
1205
1205
  return new Promise((r) => {
1206
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1206
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1207
1207
  const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1208
1208
  let o = {
1209
1209
  method: "POST",
@@ -1235,7 +1235,7 @@ function Ze(e, t, s, n = void 0, i = void 0) {
1235
1235
  }
1236
1236
  function et(e, t, s = void 0, n = void 0) {
1237
1237
  return new Promise((i) => {
1238
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1238
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1239
1239
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1240
1240
  U(
1241
1241
  e.space,
@@ -1276,7 +1276,7 @@ function et(e, t, s = void 0, n = void 0) {
1276
1276
  }
1277
1277
  function tt(e, t, s = void 0, n = void 0) {
1278
1278
  return new Promise((i) => {
1279
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1279
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1280
1280
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1281
1281
  U(
1282
1282
  e.space,
@@ -1323,7 +1323,7 @@ function tt(e, t, s = void 0, n = void 0) {
1323
1323
  }
1324
1324
  function nt(e, t, s, n = void 0, i = void 0) {
1325
1325
  return new Promise((r) => {
1326
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1326
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1327
1327
  const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1328
1328
  U(
1329
1329
  e.space,
@@ -1530,7 +1530,7 @@ function dt(e, t, s, n = void 0, i = void 0) {
1530
1530
  e,
1531
1531
  (a) => {
1532
1532
  console.log("_3DSpace_get_csrf | onDone | data", a);
1533
- const o = a.datas.relateddata.files[0].id, c = a.data[0].dataelements.secondaryTitle !== "" ? a.data[0].dataelements.secondaryTitle : a.data[0].dataelements.title;
1533
+ const o = a.datas.relateddata.files[0].id, c = a.datas.relateddata.files[0].dataelements.title;
1534
1534
  G(
1535
1535
  e,
1536
1536
  s,
@@ -1561,7 +1561,7 @@ async function ut(e, t = void 0, s = void 0) {
1561
1561
  (n) => {
1562
1562
  s && s(n);
1563
1563
  }
1564
- ) : (e.objID === null || e.objID === "") && b(
1564
+ ) : (e.objID === null || e.objID === "") && T(
1565
1565
  e,
1566
1566
  (n) => {
1567
1567
  t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
@@ -1671,11 +1671,11 @@ function ft(e, t, s = void 0, n = void 0) {
1671
1671
  l.name = g, l.ext = _, l.createBy = y, t.info = { ...l }, he(
1672
1672
  e,
1673
1673
  t,
1674
- (S) => {
1675
- s && s(S);
1674
+ (w) => {
1675
+ s && s(w);
1676
1676
  },
1677
- (S) => {
1678
- n && n(S);
1677
+ (w) => {
1678
+ n && n(w);
1679
1679
  }
1680
1680
  );
1681
1681
  },
@@ -2348,17 +2348,17 @@ function Nt(e, t, s = void 0, n = void 0) {
2348
2348
  headers: {
2349
2349
  "X-DS-SWYM-CSRFTOKEN": g.result.ServerToken
2350
2350
  },
2351
- onComplete(S) {
2352
- const w = { response: JSON.parse(S) };
2353
- if (f = Math.ceil(Number(w.response.nb_result) / 100), S && f >= o) {
2351
+ onComplete(w) {
2352
+ const S = { response: JSON.parse(w) };
2353
+ if (f = Math.ceil(Number(S.response.nb_result) / 100), w && f >= o) {
2354
2354
  if (o++, l.page = `/page/${o}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2355
- d.push(w.response.result);
2355
+ d.push(S.response.result);
2356
2356
  else {
2357
- const T = w.response.result.find(
2357
+ const b = S.response.result.find(
2358
2358
  (R) => R.title.includes(c)
2359
2359
  );
2360
- if (T) {
2361
- s(T);
2360
+ if (b) {
2361
+ s(b);
2362
2362
  return;
2363
2363
  }
2364
2364
  }
@@ -2369,9 +2369,9 @@ function Nt(e, t, s = void 0, n = void 0) {
2369
2369
  _(y);
2370
2370
  }
2371
2371
  },
2372
- onFailure(S, w) {
2373
- const T = S;
2374
- T.status = w.status, T.response = w.errormsg, n && n(T);
2372
+ onFailure(w, S) {
2373
+ const b = w;
2374
+ b.status = S.status, b.response = S.errormsg, n && n(b);
2375
2375
  }
2376
2376
  });
2377
2377
  };
@@ -2799,7 +2799,7 @@ function Xt(e) {
2799
2799
  }
2800
2800
  function Wt(e, t = void 0, s = void 0) {
2801
2801
  return console.log("credentials", e), new Promise((n) => {
2802
- if (e.token === "" && b(e), !e.space || e.space === "") {
2802
+ if (e.token === "" && T(e), !e.space || e.space === "") {
2803
2803
  const a = Z();
2804
2804
  console.log("platformeInfo", a);
2805
2805
  }
@@ -2884,7 +2884,7 @@ export {
2884
2884
  Ye as _3DSpace_Upload_File,
2885
2885
  at as _3DSpace_bookmark_addSubsciptions,
2886
2886
  it as _3DSpace_bookmark_newWorkspace,
2887
- b as _3DSpace_csrf,
2887
+ T as _3DSpace_csrf,
2888
2888
  B as _3DSpace_download_doc,
2889
2889
  ce as _3DSpace_download_multidoc,
2890
2890
  G as _3DSpace_file_update,