@beam3_dev/api_module 0.0.292 → 0.0.294

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
@@ -195,7 +195,7 @@ function Z() {
195
195
  };
196
196
  }), console.log("%cRETOUR API :", "color:blue", e), e;
197
197
  }
198
- function ve(e, t = void 0, s = void 0) {
198
+ function De(e, t = void 0, s = void 0) {
199
199
  if (e.tenant) {
200
200
  const n = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
201
  m(n, {
@@ -227,7 +227,7 @@ function M(e, t = void 0, s = void 0) {
227
227
  });
228
228
  }
229
229
  }
230
- function Ae(e, t = void 0, s = void 0) {
230
+ function ve(e, t = void 0, s = void 0) {
231
231
  if (e.tenant) {
232
232
  const n = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
233
  m(n, {
@@ -244,7 +244,7 @@ function Ae(e, t = void 0, s = void 0) {
244
244
  });
245
245
  }
246
246
  }
247
- function De(e, t, s) {
247
+ function Ae(e, t, s) {
248
248
  const n = {
249
249
  base: `${e.space}`,
250
250
  uri: "/resources/AppsMngt/api/custom/applications",
@@ -375,14 +375,14 @@ function Ge(e, t = void 0, s = void 0) {
375
375
  onComplete(u) {
376
376
  const p = JSON.parse(u), f = {}, l = p.groups.filter((h) => h.uri.startsWith("uuid:"));
377
377
  if (i && Object.keys(i).length > 0) {
378
- const h = l.filter((_) => _.owner === i.email), g = l.filter((_) => _.members.includes(i.email)), y = h.concat(g);
379
- f.iam = y, f.UG = l, f.iamMember = g, ee(
378
+ const h = l.filter((y) => y.owner === i.email), g = l.filter((y) => y.members.includes(i.email)), _ = h.concat(g);
379
+ f.iam = _, f.UG = l, f.iamMember = g, ee(
380
380
  e,
381
- (_) => {
382
- f.rules = _, t && t(f);
381
+ (y) => {
382
+ f.rules = y, t && t(f);
383
383
  },
384
- (_) => {
385
- s && s(_);
384
+ (y) => {
385
+ s && s(y);
386
386
  }
387
387
  );
388
388
  }
@@ -568,7 +568,7 @@ function I(e, t = void 0, s = void 0) {
568
568
  b(
569
569
  e,
570
570
  (n) => {
571
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
571
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), e.token = n, t && t(e);
572
572
  },
573
573
  (n) => {
574
574
  s && s(n);
@@ -655,7 +655,7 @@ function G(e, t, s, n, i, r = void 0, a = void 0) {
655
655
  e,
656
656
  t,
657
657
  (c) => {
658
- e.token = c.csrf.value, o();
658
+ console.log("_3DSpace_file_update | _3DSpace_get_csrf| onDone | result", c), e.token = c, o();
659
659
  }
660
660
  );
661
661
  }
@@ -672,8 +672,8 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
672
672
  n instanceof Blob ? g = n : g = new Blob([n], {
673
673
  type: "text/plain"
674
674
  }), h.append("__fcs__jobTicket", l.ticket), h.append("file_0", g, i);
675
- const y = {};
676
- y.method = "POST", y.data = h, y.onComplete = function(_) {
675
+ const _ = {};
676
+ _.method = "POST", _.data = h, _.onComplete = function(y) {
677
677
  let S = {
678
678
  method: "PUT",
679
679
  headers: {
@@ -688,7 +688,7 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
688
688
  {
689
689
  dataelements: {
690
690
  title: i,
691
- receipt: _
691
+ receipt: y
692
692
  },
693
693
  updateAction: "REVISE"
694
694
  }
@@ -711,9 +711,9 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
711
711
  e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${w}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
712
712
  S
713
713
  );
714
- }, y.onFailure = function(_) {
715
- o && o(_);
716
- }, y.timeout = 0, m(l.ticketURL, y);
714
+ }, _.onFailure = function(y) {
715
+ o && o(y);
716
+ }, _.timeout = 0, m(l.ticketURL, _);
717
717
  }
718
718
  });
719
719
  }
@@ -781,20 +781,20 @@ 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: y, actionurl: _, jobticket: S } = l;
784
+ const { ticket: _, actionurl: y, jobticket: S } = l;
785
785
  K(
786
- { dataelements: { ticket: y, ticketURL: _ } },
786
+ { dataelements: { ticket: _, ticketURL: y } },
787
787
  s,
788
788
  t,
789
789
  (w) => {
790
790
  const R = new DOMParser().parseFromString(
791
791
  w,
792
792
  "text/html"
793
- ).body.firstChild.querySelector("input").getAttributeNode("value").value, v = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${o}/contents?receipt=${encodeURIComponent(
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
795
795
  )}`;
796
796
  let W = /(?:\.([^.]+))?$/.exec(t)[1];
797
- const A = JSON.stringify({
797
+ const v = JSON.stringify({
798
798
  actions: [],
799
799
  businessobj: {
800
800
  description: e?.description,
@@ -810,14 +810,14 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
810
810
  },
811
811
  collabspace: o
812
812
  });
813
- m(v, {
813
+ m(D, {
814
814
  method: "POST",
815
815
  headers: {
816
816
  Accept: "application/json",
817
817
  "Content-Type": "application/json;charset=UTF-8",
818
818
  "X-DS-CSRFTOKEN": p
819
819
  },
820
- data: A,
820
+ data: v,
821
821
  type: "json",
822
822
  onComplete(F, Ce, Te) {
823
823
  n && n(F);
@@ -825,7 +825,7 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
825
825
  onFailure(F) {
826
826
  console.warn(
827
827
  "_3DSpace_Upload_Doc | pushFileInFcs | onFailure",
828
- { url: v, bodyRequest: A, err: F }
828
+ { url: D, bodyRequest: v, err: F }
829
829
  ), i && i(F);
830
830
  }
831
831
  });
@@ -838,8 +838,8 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
838
838
  }
839
839
  );
840
840
  }
841
- } catch (y) {
842
- i && i(y);
841
+ } catch (_) {
842
+ i && i(_);
843
843
  }
844
844
  },
845
845
  onFailure(l) {
@@ -1015,28 +1015,28 @@ 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) => _ === S.findIndex(
1019
- (w) => w.organization.pid === y.organization.pid && w.role.pid === y.role.pid
1018
+ (_, y, S) => y === S.findIndex(
1019
+ (w) => w.organization.pid === _.organization.pid && w.role.pid === _.role.pid
1020
1020
  )
1021
- ), s && (Array.isArray(s) ? s.forEach((y) => {
1022
- l || g.forEach((_) => {
1023
- if (y === _.role.name && n === _.organization.title)
1024
- l = y, f = n;
1025
- else if (y === _.role.name) {
1021
+ ), s && (Array.isArray(s) ? s.forEach((_) => {
1022
+ l || g.forEach((y) => {
1023
+ if (_ === y.role.name && n === y.organization.title)
1024
+ l = _, f = n;
1025
+ else if (_ === y.role.name) {
1026
1026
  let S = g.filter(
1027
- (w) => w.role.name === y
1027
+ (w) => w.role.name === _
1028
1028
  );
1029
1029
  S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
1030
1030
  }
1031
1031
  });
1032
- }) : g.forEach((y) => {
1033
- if (s === y.role.name && n === y.organization.title)
1032
+ }) : g.forEach((_) => {
1033
+ if (s === _.role.name && n === _.organization.title)
1034
1034
  l = s, f = n;
1035
- else if (s === y.role.name) {
1036
- let _ = g.filter(
1035
+ else if (s === _.role.name) {
1036
+ let y = g.filter(
1037
1037
  (S) => S.role.name === s
1038
1038
  );
1039
- _.length === 1 ? (l = _[0].role.name, f = _[0].organization.title) : r(_);
1039
+ y.length === 1 ? (l = y[0].role.name, f = y[0].organization.title) : r(y);
1040
1040
  }
1041
1041
  }));
1042
1042
  }
@@ -1529,6 +1529,7 @@ function dt(e, t, s, n = void 0, i = void 0) {
1529
1529
  e = { ...e, objID: s }, I(
1530
1530
  e,
1531
1531
  (a) => {
1532
+ console.log("_3DSpace_get_csrf | onDone | data", a);
1532
1533
  const o = a.data[0].relateddata.files[0].id, c = a.data[0].dataelements.secondaryTitle !== "" ? a.data[0].dataelements.secondaryTitle : a.data[0].dataelements.title;
1533
1534
  G(
1534
1535
  e,
@@ -1550,7 +1551,7 @@ function dt(e, t, s, n = void 0, i = void 0) {
1550
1551
  );
1551
1552
  }
1552
1553
  let q, E;
1553
- const D = [];
1554
+ const A = [];
1554
1555
  async function ut(e, t = void 0, s = void 0) {
1555
1556
  e.objID && e.objID !== "" ? I(
1556
1557
  e,
@@ -1604,7 +1605,7 @@ function pe(e, t, s = void 0, n = void 0) {
1604
1605
  q,
1605
1606
  (i) => {
1606
1607
  const r = [...t];
1607
- r.find((a) => a.objectID === i.objectId).data = i.data, E = r, D.push(i.data), s && s(D);
1608
+ r.find((a) => a.objectID === i.objectId).data = i.data, E = r, A.push(i.data), s && s(A);
1608
1609
  },
1609
1610
  (i) => {
1610
1611
  n && (n(i), console.log(i));
@@ -1666,8 +1667,8 @@ function ft(e, t, s = void 0, n = void 0) {
1666
1667
  e,
1667
1668
  a,
1668
1669
  (h) => {
1669
- const g = h.data[0].dataelements.title, y = h.data[0].dataelements.fileExtension !== void 0 ? h.data[0].dataelements.fileExtension : "", _ = h.data[0].relateddata.ownerInfo[0].dataelements.name;
1670
- l.name = g, l.ext = y, l.createBy = _, t.info = { ...l }, he(
1670
+ const g = h.data[0].dataelements.title, _ = h.data[0].dataelements.fileExtension !== void 0 ? h.data[0].dataelements.fileExtension : "", y = h.data[0].relateddata.ownerInfo[0].dataelements.name;
1671
+ l.name = g, l.ext = _, l.createBy = y, t.info = { ...l }, he(
1671
1672
  e,
1672
1673
  t,
1673
1674
  (S) => {
@@ -1679,8 +1680,8 @@ function ft(e, t, s = void 0, n = void 0) {
1679
1680
  );
1680
1681
  },
1681
1682
  (h, g) => {
1682
- const y = h;
1683
- y.msg = g.errormsg, y.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", y), n && n(y);
1683
+ const _ = h;
1684
+ _.msg = g.errormsg, _.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", _), n && n(_);
1684
1685
  }
1685
1686
  );
1686
1687
  }, 2e3);
@@ -1876,7 +1877,7 @@ function gt(e, t = void 0, s = void 0) {
1876
1877
  });
1877
1878
  });
1878
1879
  }
1879
- function yt(e, t = void 0, s = void 0) {
1880
+ function _t(e, t = void 0, s = void 0) {
1880
1881
  const n = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1881
1882
  params: {
1882
1883
  idsToFilterArr: [],
@@ -1906,7 +1907,7 @@ function yt(e, t = void 0, s = void 0) {
1906
1907
  });
1907
1908
  });
1908
1909
  }
1909
- function _t(e, t = void 0, s = void 0) {
1910
+ function yt(e, t = void 0, s = void 0) {
1910
1911
  const n = {
1911
1912
  base: e._3DSwym,
1912
1913
  uri: "/api/community/listmycommunities",
@@ -2008,10 +2009,10 @@ function wt(e, t, s = void 0, n = void 0) {
2008
2009
  id_msg: "",
2009
2010
  senderId: e.currentUser.login,
2010
2011
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
2011
- msg: _e(t.msg)
2012
+ msg: ye(t.msg)
2012
2013
  };
2013
2014
  let u = !1;
2014
- ye(
2015
+ _e(
2015
2016
  c.users,
2016
2017
  (p) => {
2017
2018
  p !== void 0 && (d.id_msg = p.id, u = !0, P(e, d));
@@ -2042,7 +2043,7 @@ function wt(e, t, s = void 0, n = void 0) {
2042
2043
  });
2043
2044
  }, 500);
2044
2045
  }
2045
- function ye(e, t, s, n) {
2046
+ function _e(e, t, s, n) {
2046
2047
  const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
2047
2048
  C(e, (r) => {
2048
2049
  m(i, {
@@ -2108,7 +2109,7 @@ function P(e, t, s = void 0, n = void 0) {
2108
2109
  });
2109
2110
  });
2110
2111
  }
2111
- function _e(e) {
2112
+ function ye(e) {
2112
2113
  const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2113
2114
  return `<p>${e} </p>
2114
2115
  <br/>
@@ -2315,11 +2316,11 @@ function $t(e, t, s) {
2315
2316
  }
2316
2317
  }),
2317
2318
  type: "json",
2318
- onComplete(h, g, y) {
2319
- const _ = {
2319
+ onComplete(h, g, _) {
2320
+ const y = {
2320
2321
  response: typeof h == "string" ? JSON.parse(h) : h
2321
2322
  };
2322
- _.status = y.status, t && t(_);
2323
+ y.status = _.status, t && t(y);
2323
2324
  },
2324
2325
  onFailure(h) {
2325
2326
  s && s(h);
@@ -2341,8 +2342,8 @@ function Nt(e, t, s = void 0, n = void 0) {
2341
2342
  };
2342
2343
  let h = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
2343
2344
  C(e, (g) => {
2344
- const y = (_) => {
2345
- m(_, {
2345
+ const _ = (y) => {
2346
+ m(y, {
2346
2347
  method: "GET",
2347
2348
  headers: {
2348
2349
  "X-DS-SWYM-CSRFTOKEN": g.result.ServerToken
@@ -2350,7 +2351,7 @@ function Nt(e, t, s = void 0, n = void 0) {
2350
2351
  onComplete(S) {
2351
2352
  const w = { response: JSON.parse(S) };
2352
2353
  if (f = Math.ceil(Number(w.response.nb_result) / 100), S && f >= o) {
2353
- if (o++, l.page = `/page/${o}`, _ = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2354
+ if (o++, l.page = `/page/${o}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2354
2355
  d.push(w.response.result);
2355
2356
  else {
2356
2357
  const T = w.response.result.find(
@@ -2365,7 +2366,7 @@ function Nt(e, t, s = void 0, n = void 0) {
2365
2366
  p = !0, s(d);
2366
2367
  return;
2367
2368
  }
2368
- y(_);
2369
+ _(y);
2369
2370
  }
2370
2371
  },
2371
2372
  onFailure(S, w) {
@@ -2374,7 +2375,7 @@ function Nt(e, t, s = void 0, n = void 0) {
2374
2375
  }
2375
2376
  });
2376
2377
  };
2377
- p || y(h);
2378
+ p || _(h);
2378
2379
  });
2379
2380
  }
2380
2381
  function Se(e) {
@@ -2602,7 +2603,7 @@ function kt(e, t = void 0, s = void 0) {
2602
2603
  });
2603
2604
  }
2604
2605
  }
2605
- async function vt(e, t, s = void 0, n = void 0) {
2606
+ async function Dt(e, t, s = void 0, n = void 0) {
2606
2607
  if (e.tenant) {
2607
2608
  const i = e.tenant.toLowerCase();
2608
2609
  fetch(
@@ -2617,7 +2618,7 @@ async function vt(e, t, s = void 0, n = void 0) {
2617
2618
  });
2618
2619
  }
2619
2620
  }
2620
- async function At(e, t, s, n = void 0, i = void 0) {
2621
+ async function vt(e, t, s, n = void 0, i = void 0) {
2621
2622
  if (e.tenant) {
2622
2623
  const r = e.tenant.toLowerCase();
2623
2624
  fetch(
@@ -2632,7 +2633,7 @@ async function At(e, t, s, n = void 0, i = void 0) {
2632
2633
  });
2633
2634
  }
2634
2635
  }
2635
- async function Dt(e, t, s, n = void 0, i = void 0) {
2636
+ async function At(e, t, s, n = void 0, i = void 0) {
2636
2637
  if (e.tenant) {
2637
2638
  const r = e.tenant.toLowerCase();
2638
2639
  fetch(
@@ -2907,11 +2908,11 @@ export {
2907
2908
  wt as _3DSwym_buildDirectMessage,
2908
2909
  bt as _3DSwym_deleteIdea,
2909
2910
  $t as _3DSwym_editIdea,
2910
- ye as _3DSwym_findCommunityToInstantMSG,
2911
- _t as _3DSwym_getAllCommunities,
2911
+ _e as _3DSwym_findCommunityToInstantMSG,
2912
+ yt as _3DSwym_getAllCommunities,
2912
2913
  Nt as _3DSwym_getAllListIdeas,
2913
2914
  gt as _3DSwym_getAllNews,
2914
- yt as _3DSwym_getFamiliarPeople,
2915
+ _t as _3DSwym_getFamiliarPeople,
2915
2916
  St as _3DSwym_getIdeaStatusMaturity,
2916
2917
  ge as _3DSwym_getMembersCommunity,
2917
2918
  Ot as _3DSwym_getOneIdea,
@@ -2931,17 +2932,17 @@ export {
2931
2932
  qt as _Iterop_PutDependencyTable,
2932
2933
  Lt as _Iterop_businessTableSearchInRows,
2933
2934
  Jt as _Iterop_createBusinessTable,
2934
- vt as _Iterop_getAllBusinessTables,
2935
- At as _Iterop_getOneBusinessTable,
2936
- Dt as _Iterop_getOneBusinessTableRows,
2935
+ Dt as _Iterop_getAllBusinessTables,
2936
+ vt as _Iterop_getOneBusinessTable,
2937
+ At as _Iterop_getOneBusinessTableRows,
2937
2938
  kt as _Iterop_jwtUser,
2938
2939
  Gt as _Iterop_runProcess,
2939
2940
  Mt as _Iterop_updateBusinessTable,
2940
- ve as _getMe,
2941
+ De as _getMe,
2941
2942
  Z as _getPlateformInfos,
2942
2943
  ke as _getPlatformServices,
2943
2944
  M as _getServiceUrl,
2944
- Ae as _getServiceUrl_3DPassport,
2945
+ ve as _getServiceUrl_3DPassport,
2945
2946
  Rt as _getServiceUrl_Iterop,
2946
2947
  m as _httpCallAuthenticated,
2947
2948
  Ue as _setDraggable,
@@ -2949,7 +2950,7 @@ export {
2949
2950
  Re as _setupTagger,
2950
2951
  ft as addTagToDoc,
2951
2952
  z as chunkArray,
2952
- De as compass_getListAdditionalApps,
2953
+ Ae as compass_getListAdditionalApps,
2953
2954
  H as couleurs,
2954
2955
  Me as createUserGroups,
2955
2956
  pe as dataMixing,