@beam3_dev/api_module 0.0.92 → 0.0.94

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
@@ -1,5 +1,5 @@
1
1
  import { v4 as M } from "uuid";
2
- import { DateTime as N } from "luxon";
2
+ import { DateTime as b } from "luxon";
3
3
  import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
4
4
  function R() {
5
5
  return M();
@@ -66,7 +66,7 @@ async function re(e, t = void 0, s = void 0) {
66
66
  });
67
67
  }
68
68
  async function ce(e, t = L) {
69
- let s = N.now().year;
69
+ let s = b.now().year;
70
70
  const n = e, i = [], r = (a) => {
71
71
  for (let o in a)
72
72
  i.push({ date: o, comment: a[o] });
@@ -89,11 +89,11 @@ async function ce(e, t = L) {
89
89
  } : n;
90
90
  for (let o of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(o.date).toISODate() && l.name === "Férié : " + o.comment
92
+ (l) => l.start === b.fromISO(o.date).toISODate() && l.name === "Férié : " + o.comment
93
93
  ) === -1 && a.events.push({
94
94
  name: "Férié : " + o.comment,
95
- start: N.fromISO(o.date).toISODate(),
96
- end: N.fromISO(o.date).toISODate(),
95
+ start: b.fromISO(o.date).toISODate(),
96
+ end: b.fromISO(o.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -628,7 +628,7 @@ async function ke(e, t, s, n, i = void 0, r = void 0) {
628
628
  }
629
629
  });
630
630
  }
631
- function b(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1) {
631
+ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1) {
632
632
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
633
  m(a, {
634
634
  method: "GET",
@@ -729,7 +729,7 @@ async function v(e, t = void 0, s = void 0) {
729
729
  );
730
730
  });
731
731
  }
732
- async function W(e, t, s = void 0, n = void 0) {
732
+ async function V(e, t, s = void 0, n = void 0) {
733
733
  let i = [];
734
734
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
735
735
  for (let a = 0; a < t.length; a += 80) {
@@ -737,7 +737,7 @@ async function W(e, t, s = void 0, n = void 0) {
737
737
  i.push(o);
738
738
  }
739
739
  const c = (a) => {
740
- V(
740
+ W(
741
741
  e,
742
742
  i[a],
743
743
  () => {
@@ -752,7 +752,7 @@ async function W(e, t, s = void 0, n = void 0) {
752
752
  } else
753
753
  console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
754
754
  }
755
- function V(e, t, s = void 0, n = void 0, i = void 0) {
755
+ function W(e, t, s = void 0, n = void 0, i = void 0) {
756
756
  const r = [];
757
757
  t.forEach((o) => {
758
758
  r.push({
@@ -802,7 +802,7 @@ function Fe(e, t, s = void 0, n = void 0) {
802
802
  return new Promise((i) => {
803
803
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
804
804
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
805
- b(
805
+ N(
806
806
  e.space,
807
807
  "ESPACE COMMUN",
808
808
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -841,7 +841,7 @@ function De(e, t, s, n = void 0, i = void 0) {
841
841
  return new Promise((r) => {
842
842
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
843
843
  const c = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
844
- b(
844
+ N(
845
845
  e.space,
846
846
  "ESPACE COMMUN",
847
847
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -881,7 +881,7 @@ function Ae(e, t, s = void 0, n = void 0) {
881
881
  return new Promise((i) => {
882
882
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
883
883
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
884
- b(
884
+ N(
885
885
  e.space,
886
886
  "ESPACE COMMUN",
887
887
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -920,7 +920,7 @@ function $e(e, t, s = void 0, n = void 0) {
920
920
  return new Promise((i) => {
921
921
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
922
922
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
923
- b(
923
+ N(
924
924
  e.space,
925
925
  "ESPACE COMMUN",
926
926
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -965,7 +965,7 @@ function Ue(e, t, s, n = void 0, i = void 0) {
965
965
  return new Promise((r) => {
966
966
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
967
967
  const c = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
968
- b(
968
+ N(
969
969
  e.space,
970
970
  "ESPACE COMMUN",
971
971
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1008,10 +1008,19 @@ function Ue(e, t, s, n = void 0, i = void 0) {
1008
1008
  }
1009
1009
  function je(e, t, s = void 0, n = void 0) {
1010
1010
  return new Promise((i) => {
1011
- if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1012
- const r = N.now().ts;
1011
+ if (e.token === "" && T(e), N(
1012
+ e.space,
1013
+ "ESPACE COMMUN",
1014
+ ["VPLMProjectLeader", "VPLMCreator"],
1015
+ void 0,
1016
+ (r) => e.ctx = r,
1017
+ (r) => {
1018
+ console.log("onError =>", r);
1019
+ }
1020
+ ), t !== void 0 && t !== "" && t !== null) {
1021
+ const r = b.now().ts;
1013
1022
  `${e.space}`;
1014
- const c = `https://eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1023
+ const c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1015
1024
  m(c, {
1016
1025
  onComplete(a) {
1017
1026
  if (Array.isArray(JSON.parse(a))) {
@@ -1021,13 +1030,15 @@ function je(e, t, s = void 0, n = void 0) {
1021
1030
  m(d, {
1022
1031
  method: "POST",
1023
1032
  headers: {
1033
+ securitycontext: "ctx::" + e.ctx,
1034
+ ENO_CSRF_TOKEN: e.token,
1024
1035
  Accept: "application/json",
1025
1036
  "Content-Type": "application/json"
1026
1037
  },
1027
1038
  data: JSON.stringify({
1028
1039
  with_indexing_date: !0,
1029
1040
  with_nls: !1,
1030
- label: `yus-${r}`,
1041
+ label: `3DSearch-${r}`,
1031
1042
  locale: "en",
1032
1043
  select_predicate: [
1033
1044
  "ds6w:label",
@@ -1050,7 +1061,12 @@ function je(e, t, s = void 0, n = void 0) {
1050
1061
  "3dspace",
1051
1062
  "usersgroup"
1052
1063
  ],
1053
- tenant: e._platformId
1064
+ tenant: e.tenant,
1065
+ login: {
1066
+ "3dspace": {
1067
+ SecurityContext: `ctx::${e.ctx}`
1068
+ }
1069
+ }
1054
1070
  }),
1055
1071
  type: "json",
1056
1072
  onComplete(l) {
@@ -1136,7 +1152,7 @@ async function Ie(e, t, s = void 0, n = void 0) {
1136
1152
  });
1137
1153
  });
1138
1154
  }
1139
- function Pe(e, t, s, n = void 0, i = void 0) {
1155
+ function xe(e, t, s, n = void 0, i = void 0) {
1140
1156
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1141
1157
  k(
1142
1158
  e,
@@ -1159,9 +1175,9 @@ function Pe(e, t, s, n = void 0, i = void 0) {
1159
1175
  }
1160
1176
  );
1161
1177
  }
1162
- let I, P;
1178
+ let I, x;
1163
1179
  const $ = [];
1164
- async function xe(e, t = void 0, s = void 0) {
1180
+ async function Pe(e, t = void 0, s = void 0) {
1165
1181
  e.objID && e.objID !== "" ? k(
1166
1182
  e,
1167
1183
  (n) => {
@@ -1203,18 +1219,18 @@ function Le(e, t = void 0, s = void 0) {
1203
1219
  e,
1204
1220
  i.objID,
1205
1221
  (c) => {
1206
- n.push({ [i.name]: c }), i.name === "dbProjets" && (I = c.affaires.map((a) => a.objectID), B(e, P)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1222
+ n.push({ [i.name]: c }), i.name === "dbProjets" && (I = c.affaires.map((a) => a.objectID), B(e, x)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1207
1223
  }
1208
1224
  );
1209
1225
  });
1210
1226
  }
1211
1227
  function B(e, t, s = void 0, n = void 0) {
1212
- W(
1228
+ V(
1213
1229
  e,
1214
1230
  I,
1215
1231
  (i) => {
1216
1232
  const r = [...t];
1217
- r.find((c) => c.objectID === i.objectId).data = i.data, P = r, $.push(i.data), s && s($);
1233
+ r.find((c) => c.objectID === i.objectId).data = i.data, x = r, $.push(i.data), s && s($);
1218
1234
  },
1219
1235
  (i) => {
1220
1236
  n && (n(i), console.log(i));
@@ -1228,7 +1244,7 @@ const Y = "FA35FB9B177A280065800EA0000F599C", q = [
1228
1244
  "usersgroup",
1229
1245
  "3dplan",
1230
1246
  "dashboard"
1231
- ], x = {
1247
+ ], P = {
1232
1248
  how: "ds6w:how",
1233
1249
  what: "ds6w:what",
1234
1250
  when: "ds6w:when",
@@ -1254,7 +1270,7 @@ function Je(e, t, s = void 0, n = void 0) {
1254
1270
  uri: `pid://${c}`
1255
1271
  }
1256
1272
  ],
1257
- predicate: x[a],
1273
+ predicate: P[a],
1258
1274
  object: {
1259
1275
  literal: o
1260
1276
  }
@@ -1397,7 +1413,7 @@ function Ee(e, t, s = void 0, n = void 0) {
1397
1413
  uri: `pid://${i}`
1398
1414
  }
1399
1415
  ],
1400
- predicate: x[r],
1416
+ predicate: P[r],
1401
1417
  object: {
1402
1418
  literal: c
1403
1419
  }
@@ -1516,7 +1532,7 @@ function Xe(e, t = void 0, s = void 0) {
1516
1532
  });
1517
1533
  });
1518
1534
  }
1519
- function We(e, t = void 0, s = void 0) {
1535
+ function Ve(e, t = void 0, s = void 0) {
1520
1536
  const n = {
1521
1537
  base: e.space,
1522
1538
  uri: "/api/community/listmycommunities",
@@ -1586,7 +1602,7 @@ function Q(e, t, s, n) {
1586
1602
  });
1587
1603
  });
1588
1604
  }
1589
- function Ve(e, t = void 0, s = void 0) {
1605
+ function We(e, t = void 0, s = void 0) {
1590
1606
  const n = "YXdA5x4DSUKtlAi2wmnyTA";
1591
1607
  e.commu_id || (e.commu_id = n);
1592
1608
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
@@ -1977,14 +1993,14 @@ export {
1977
1993
  je as _3DSpace_bookmark_addSubsciptions,
1978
1994
  T as _3DSpace_csrf,
1979
1995
  v as _3DSpace_download_doc,
1980
- W as _3DSpace_download_multidoc,
1996
+ V as _3DSpace_download_multidoc,
1981
1997
  K as _3DSpace_file_update,
1982
1998
  X as _3DSpace_file_update_csr,
1983
1999
  be as _3DSpace_file_url_csr,
1984
2000
  k as _3DSpace_get_csrf,
1985
2001
  G as _3DSpace_get_docInfo,
1986
- V as _3DSpace_get_downloadTicket_multidoc,
1987
- b as _3DSpace_get_securityContexts,
2002
+ W as _3DSpace_get_downloadTicket_multidoc,
2003
+ N as _3DSpace_get_securityContexts,
1988
2004
  A as _3DSpace_get_ticket,
1989
2005
  Ue as _3DSpace_lifecycle_changeRevision,
1990
2006
  De as _3DSpace_lifecycle_changeState,
@@ -1994,10 +2010,10 @@ export {
1994
2010
  Be as _3DSwym_buildDirectMessage,
1995
2011
  qe as _3DSwym_deleteIdea,
1996
2012
  Z as _3DSwym_findCommunityToInstantMSG,
1997
- We as _3DSwym_getAllCommunities,
2013
+ Ve as _3DSwym_getAllCommunities,
1998
2014
  Ke as _3DSwym_getAllNews,
1999
2015
  Xe as _3DSwym_getFamiliarPeople,
2000
- Ve as _3DSwym_getIdeaStatusMaturity,
2016
+ We as _3DSwym_getIdeaStatusMaturity,
2001
2017
  Q as _3DSwym_getMembersCommunity,
2002
2018
  He as _3DSwym_getSWYMIdea,
2003
2019
  ze as _3DSwym_get_AllSWYMIdeas,
@@ -2033,10 +2049,10 @@ export {
2033
2049
  Ge as getInfoDocTags,
2034
2050
  we as getUserGroupsList,
2035
2051
  J as getUsersGroupRules,
2036
- xe as get_3DSpace_csrf,
2052
+ Pe as get_3DSpace_csrf,
2037
2053
  Te as patchUserGroups,
2038
2054
  Oe as patchUserGroupsControl,
2039
- Pe as pushDataIn3DSpace,
2055
+ xe as pushDataIn3DSpace,
2040
2056
  Ne as readUserGroupControl,
2041
2057
  Ee as removeTagToDoc,
2042
2058
  et as sayHello,