@beam3_dev/api_module 0.0.297 → 0.0.299

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
@@ -134,7 +134,7 @@ function Q(e, t, s) {
134
134
  };
135
135
  o(r);
136
136
  }
137
- async function Ie(e, t, s = !0) {
137
+ async function Ue(e, t, s = !0) {
138
138
  const n = e.events.findIndex((i) => i.uuid === t.uuid);
139
139
  return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
140
140
  }
@@ -143,7 +143,7 @@ function m(e, t) {
143
143
  s.authenticatedRequest(e, t);
144
144
  });
145
145
  }
146
- function Ue(e, t, s) {
146
+ function Ie(e, t, s) {
147
147
  $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
148
148
  n.draggable(e, {
149
149
  data: t,
@@ -552,7 +552,7 @@ async function Xe(e, t = void 0, s = void 0, n = void 0) {
552
552
  }
553
553
  });
554
554
  }
555
- function I(e, t = void 0, s = void 0) {
555
+ function U(e, t = void 0, s = void 0) {
556
556
  if (e.objID && e.objID !== "") {
557
557
  let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
558
558
  m(n, {
@@ -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, {
@@ -596,7 +596,7 @@ function b(e, t = void 0, s = void 0) {
596
596
  }
597
597
  function k(e, t = void 0, s = void 0) {
598
598
  let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
599
- I(
599
+ U(
600
600
  e,
601
601
  (i) => {
602
602
  m(n, {
@@ -651,11 +651,14 @@ function G(e, t, s, n, i, r = void 0, a = void 0) {
651
651
  r,
652
652
  a
653
653
  );
654
- e.token ? o() : I(
654
+ e.token ? o() : U(
655
655
  e,
656
656
  t,
657
657
  (c) => {
658
- console.log("_3DSpace_file_update | _3DSpace_get_csrf| onDone | result", c), e.token = c, o();
658
+ console.log(
659
+ "_3DSpace_file_update | _3DSpace_get_csrf| onDone | result",
660
+ c
661
+ ), e.token = c, o();
659
662
  }
660
663
  );
661
664
  }
@@ -674,7 +677,7 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
674
677
  }), h.append("__fcs__jobTicket", l.ticket), h.append("file_0", g, i);
675
678
  const _ = {};
676
679
  _.method = "POST", _.data = h, _.onComplete = function(y) {
677
- let S = {
680
+ let w = {
678
681
  method: "PUT",
679
682
  headers: {
680
683
  SecurityContext: "ctx::" + e.ctx
@@ -700,16 +703,16 @@ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
700
703
  ]
701
704
  }),
702
705
  type: "json",
703
- onComplete(T) {
704
- a && a(T);
706
+ onComplete(S) {
707
+ a && a(S);
705
708
  },
706
- onFailure(T) {
707
- o && o(T);
709
+ onFailure(S) {
710
+ o && o(S);
708
711
  }
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
712
+ };
713
+ e.tenant.toUpperCase(), m(
714
+ e.space + `/resources/v1/modeler/documents/${t}/files/${s}`,
715
+ w
713
716
  );
714
717
  }, _.onFailure = function(y) {
715
718
  o && o(y);
@@ -781,14 +784,14 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
781
784
  onComplete(l, h, g) {
782
785
  try {
783
786
  if (l = JSON.parse(l), l?.ticket) {
784
- const { ticket: _, actionurl: y, jobticket: S } = l;
787
+ const { ticket: _, actionurl: y, jobticket: w } = l;
785
788
  K(
786
789
  { dataelements: { ticket: _, ticketURL: y } },
787
790
  s,
788
791
  t,
789
- (w) => {
792
+ (S) => {
790
793
  const R = new DOMParser().parseFromString(
791
- w,
794
+ S,
792
795
  "text/html"
793
796
  ).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
797
  R
@@ -830,11 +833,11 @@ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0)
830
833
  }
831
834
  });
832
835
  },
833
- (w) => {
834
- console.warn("pushFileInFcs", w), i && i(w);
836
+ (S) => {
837
+ console.warn("pushFileInFcs", S), i && i(S);
835
838
  },
836
- (w) => {
837
- r && r({ fileName: t, progress: w });
839
+ (S) => {
840
+ r && r({ fileName: t, progress: S });
838
841
  }
839
842
  );
840
843
  }
@@ -1002,7 +1005,7 @@ function re(e, t, s, n = void 0, i = void 0, r = void 0) {
1002
1005
  }
1003
1006
  });
1004
1007
  }
1005
- function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1) {
1008
+ function I(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1) {
1006
1009
  const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
1007
1010
  m(o, {
1008
1011
  method: "GET",
@@ -1015,18 +1018,18 @@ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1
1015
1018
  p = t;
1016
1019
  let g = h.couples;
1017
1020
  g = g.filter(
1018
- (_, y, S) => y === S.findIndex(
1019
- (w) => w.organization.pid === _.organization.pid && w.role.pid === _.role.pid
1021
+ (_, y, w) => y === w.findIndex(
1022
+ (S) => S.organization.pid === _.organization.pid && S.role.pid === _.role.pid
1020
1023
  )
1021
1024
  ), s && (Array.isArray(s) ? s.forEach((_) => {
1022
1025
  l || g.forEach((y) => {
1023
1026
  if (_ === y.role.name && n === y.organization.title)
1024
1027
  l = _, f = n;
1025
1028
  else if (_ === y.role.name) {
1026
- let S = g.filter(
1027
- (w) => w.role.name === _
1029
+ let w = g.filter(
1030
+ (S) => S.role.name === _
1028
1031
  );
1029
- S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
1032
+ w.length === 1 ? (l = w[0].role.name, f = w[0].organization.title) : r(w);
1030
1033
  }
1031
1034
  });
1032
1035
  }) : g.forEach((_) => {
@@ -1034,7 +1037,7 @@ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1
1034
1037
  l = s, f = n;
1035
1038
  else if (s === _.role.name) {
1036
1039
  let y = g.filter(
1037
- (S) => S.role.name === s
1040
+ (w) => w.role.name === s
1038
1041
  );
1039
1042
  y.length === 1 ? (l = y[0].role.name, f = y[0].organization.title) : r(y);
1040
1043
  }
@@ -1172,7 +1175,7 @@ function de(e, t, s = void 0, n = void 0, i = void 0) {
1172
1175
  }
1173
1176
  function Qe(e, t, s = void 0, n = void 0) {
1174
1177
  return new Promise((i) => {
1175
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1178
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1176
1179
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
1177
1180
  let a = {
1178
1181
  method: "POST",
@@ -1203,7 +1206,7 @@ function Qe(e, t, s = void 0, n = void 0) {
1203
1206
  }
1204
1207
  function Ze(e, t, s, n = void 0, i = void 0) {
1205
1208
  return new Promise((r) => {
1206
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1209
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1207
1210
  const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1208
1211
  let o = {
1209
1212
  method: "POST",
@@ -1235,9 +1238,9 @@ function Ze(e, t, s, n = void 0, i = void 0) {
1235
1238
  }
1236
1239
  function et(e, t, s = void 0, n = void 0) {
1237
1240
  return new Promise((i) => {
1238
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1241
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1239
1242
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1240
- U(
1243
+ I(
1241
1244
  e.space,
1242
1245
  "ESPACE COMMUN",
1243
1246
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1276,9 +1279,9 @@ function et(e, t, s = void 0, n = void 0) {
1276
1279
  }
1277
1280
  function tt(e, t, s = void 0, n = void 0) {
1278
1281
  return new Promise((i) => {
1279
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1282
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1280
1283
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1281
- U(
1284
+ I(
1282
1285
  e.space,
1283
1286
  "ESPACE COMMUN",
1284
1287
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1323,9 +1326,9 @@ function tt(e, t, s = void 0, n = void 0) {
1323
1326
  }
1324
1327
  function nt(e, t, s, n = void 0, i = void 0) {
1325
1328
  return new Promise((r) => {
1326
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1329
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1327
1330
  const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1328
- U(
1331
+ I(
1329
1332
  e.space,
1330
1333
  "ESPACE COMMUN",
1331
1334
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1526,7 +1529,7 @@ async function ct(e, t, s = void 0, n = void 0) {
1526
1529
  }
1527
1530
  function dt(e, t, s, n = void 0, i = void 0) {
1528
1531
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1529
- e = { ...e, objID: s }, I(
1532
+ e = { ...e, objID: s }, U(
1530
1533
  e,
1531
1534
  (a) => {
1532
1535
  console.log("_3DSpace_get_csrf | onDone | data", a);
@@ -1553,7 +1556,7 @@ function dt(e, t, s, n = void 0, i = void 0) {
1553
1556
  let q, E;
1554
1557
  const A = [];
1555
1558
  async function ut(e, t = void 0, s = void 0) {
1556
- e.objID && e.objID !== "" ? I(
1559
+ e.objID && e.objID !== "" ? U(
1557
1560
  e,
1558
1561
  (n) => {
1559
1562
  t && t(n);
@@ -1561,7 +1564,7 @@ async function ut(e, t = void 0, s = void 0) {
1561
1564
  (n) => {
1562
1565
  s && s(n);
1563
1566
  }
1564
- ) : (e.objID === null || e.objID === "") && b(
1567
+ ) : (e.objID === null || e.objID === "") && T(
1565
1568
  e,
1566
1569
  (n) => {
1567
1570
  t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
@@ -1671,11 +1674,11 @@ function ft(e, t, s = void 0, n = void 0) {
1671
1674
  l.name = g, l.ext = _, l.createBy = y, t.info = { ...l }, he(
1672
1675
  e,
1673
1676
  t,
1674
- (S) => {
1675
- s && s(S);
1677
+ (w) => {
1678
+ s && s(w);
1676
1679
  },
1677
- (S) => {
1678
- n && n(S);
1680
+ (w) => {
1681
+ n && n(w);
1679
1682
  }
1680
1683
  );
1681
1684
  },
@@ -2348,17 +2351,17 @@ function Nt(e, t, s = void 0, n = void 0) {
2348
2351
  headers: {
2349
2352
  "X-DS-SWYM-CSRFTOKEN": g.result.ServerToken
2350
2353
  },
2351
- onComplete(S) {
2352
- const w = { response: JSON.parse(S) };
2353
- if (f = Math.ceil(Number(w.response.nb_result) / 100), S && f >= o) {
2354
+ onComplete(w) {
2355
+ const S = { response: JSON.parse(w) };
2356
+ if (f = Math.ceil(Number(S.response.nb_result) / 100), w && f >= o) {
2354
2357
  if (o++, l.page = `/page/${o}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2355
- d.push(w.response.result);
2358
+ d.push(S.response.result);
2356
2359
  else {
2357
- const T = w.response.result.find(
2360
+ const b = S.response.result.find(
2358
2361
  (R) => R.title.includes(c)
2359
2362
  );
2360
- if (T) {
2361
- s(T);
2363
+ if (b) {
2364
+ s(b);
2362
2365
  return;
2363
2366
  }
2364
2367
  }
@@ -2369,9 +2372,9 @@ function Nt(e, t, s = void 0, n = void 0) {
2369
2372
  _(y);
2370
2373
  }
2371
2374
  },
2372
- onFailure(S, w) {
2373
- const T = S;
2374
- T.status = w.status, T.response = w.errormsg, n && n(T);
2375
+ onFailure(w, S) {
2376
+ const b = w;
2377
+ b.status = S.status, b.response = S.errormsg, n && n(b);
2375
2378
  }
2376
2379
  });
2377
2380
  };
@@ -2516,7 +2519,7 @@ function Ft(e, t = void 0, s = void 0) {
2516
2519
  }
2517
2520
  });
2518
2521
  }
2519
- function It(e, t, s = void 0, n = void 0) {
2522
+ function Ut(e, t, s = void 0, n = void 0) {
2520
2523
  const i = e.space + "/api/user/find/login/" + t;
2521
2524
  C(
2522
2525
  e,
@@ -2536,7 +2539,7 @@ function It(e, t, s = void 0, n = void 0) {
2536
2539
  n
2537
2540
  );
2538
2541
  }
2539
- function Ut(e, t = void 0, s = void 0) {
2542
+ function It(e, t = void 0, s = void 0) {
2540
2543
  const {
2541
2544
  _3DSwym: n,
2542
2545
  _3DSwym_token: i,
@@ -2799,11 +2802,11 @@ function Xt(e) {
2799
2802
  }
2800
2803
  function Wt(e, t = void 0, s = void 0) {
2801
2804
  return console.log("credentials", e), new Promise((n) => {
2802
- if (e.token === "" && b(e), !e.space || e.space === "") {
2805
+ if (e.token === "" && T(e), !e.space || e.space === "") {
2803
2806
  const a = Z();
2804
2807
  console.log("platformeInfo", a);
2805
2808
  }
2806
- U(
2809
+ I(
2807
2810
  e,
2808
2811
  "Common space",
2809
2812
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -2884,17 +2887,17 @@ export {
2884
2887
  Ye as _3DSpace_Upload_File,
2885
2888
  at as _3DSpace_bookmark_addSubsciptions,
2886
2889
  it as _3DSpace_bookmark_newWorkspace,
2887
- b as _3DSpace_csrf,
2890
+ T as _3DSpace_csrf,
2888
2891
  B as _3DSpace_download_doc,
2889
2892
  ce as _3DSpace_download_multidoc,
2890
2893
  G as _3DSpace_file_update,
2891
2894
  ae as _3DSpace_file_update_csr,
2892
2895
  We as _3DSpace_file_url_csr,
2893
- I as _3DSpace_get_csrf,
2896
+ U as _3DSpace_get_csrf,
2894
2897
  J as _3DSpace_get_docInfo,
2895
2898
  de as _3DSpace_get_downloadTicket_multidoc,
2896
2899
  Xe as _3DSpace_get_multiDocInfo,
2897
- U as _3DSpace_get_securityContexts,
2900
+ I as _3DSpace_get_securityContexts,
2898
2901
  k as _3DSpace_get_ticket,
2899
2902
  nt as _3DSpace_lifecycle_changeRevision,
2900
2903
  Ze as _3DSpace_lifecycle_changeState,
@@ -2904,7 +2907,7 @@ export {
2904
2907
  st as _3DSpace_lifecycle_getRevisions,
2905
2908
  Ve as _3DSpace_put_docInfo,
2906
2909
  xt as _3DSwym_ForwardIdea,
2907
- Ut as _3DSwym_addComment,
2910
+ It as _3DSwym_addComment,
2908
2911
  wt as _3DSwym_buildDirectMessage,
2909
2912
  bt as _3DSwym_deleteIdea,
2910
2913
  $t as _3DSwym_editIdea,
@@ -2918,7 +2921,7 @@ export {
2918
2921
  Ot as _3DSwym_getOneIdea,
2919
2922
  C as _3DSwym_get_Token,
2920
2923
  Ft as _3DSwym_get_currentUser,
2921
- It as _3DSwym_get_findUser,
2924
+ Ut as _3DSwym_get_findUser,
2922
2925
  Tt as _3DSwym_postIdea,
2923
2926
  Ct as _3DSwym_postIdeaTemplate,
2924
2927
  P as _3DSwym_sendMessageData,
@@ -2945,7 +2948,7 @@ export {
2945
2948
  ve as _getServiceUrl_3DPassport,
2946
2949
  Rt as _getServiceUrl_Iterop,
2947
2950
  m as _httpCallAuthenticated,
2948
- Ue as _setDraggable,
2951
+ Ie as _setDraggable,
2949
2952
  je as _setDroppable,
2950
2953
  Re as _setupTagger,
2951
2954
  ft as addTagToDoc,
@@ -2975,6 +2978,6 @@ export {
2975
2978
  Ee as readUserGroupControl,
2976
2979
  mt as removeTagToDoc,
2977
2980
  Xt as sayHello,
2978
- Ie as updateEvent
2981
+ Ue as updateEvent
2979
2982
  };
2980
2983
  //# sourceMappingURL=wb3Api.js.map