@beam3_dev/api_module 0.0.334 → 0.0.337

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
@@ -65,7 +65,7 @@ async function xe(e, n = void 0, t = void 0) {
65
65
  t && t(i), console.error("Erreur : " + i);
66
66
  });
67
67
  }
68
- async function Ie(e, n = z) {
68
+ async function Ne(e, n = z) {
69
69
  let t = T.now().year;
70
70
  const i = e, s = [], r = (a) => {
71
71
  for (let c in a)
@@ -134,7 +134,7 @@ function Q(e, n, t) {
134
134
  };
135
135
  a(r);
136
136
  }
137
- async function Ne(e, n, t = !0) {
137
+ async function Ie(e, n, t = !0) {
138
138
  const i = e.events.findIndex((s) => s.uuid === n.uuid);
139
139
  return i === -1 ? e.events.push(n) : t ? e.events[i] = n : e.events.splice(i, 1), e.length > 0 && e.sort((s, r) => s.start - r.start), e;
140
140
  }
@@ -160,14 +160,14 @@ function Fe(e, n = void 0) {
160
160
  }), n !== void 0 && i.addEvent("onFilterSubjectsChange", n)), i.setSubjectsTags(e);
161
161
  });
162
162
  }
163
- function ve(e, n) {
163
+ function je(e, n) {
164
164
  $(["DS/DataDragAndDrop/DataDragAndDrop"], (t) => {
165
165
  t.droppable(e, {
166
166
  drop: n
167
167
  });
168
168
  });
169
169
  }
170
- async function je(e, n = void 0, t = void 0) {
170
+ async function ve(e, n = void 0, t = void 0) {
171
171
  await $(
172
172
  ["DS/i3DXCompassServices/i3DXCompassServices"],
173
173
  (i) => {
@@ -193,7 +193,7 @@ function Z() {
193
193
  appsConfiguration: s,
194
194
  appConf: r
195
195
  };
196
- }), console.log("%cRETOUR API :", "color:blue", e), e;
196
+ }), e;
197
197
  }
198
198
  function ke(e, n = void 0, t = void 0) {
199
199
  if (e.tenant) {
@@ -210,7 +210,7 @@ function ke(e, n = void 0, t = void 0) {
210
210
  }
211
211
  }
212
212
  function J(e, n = void 0, t = void 0) {
213
- if (console.log("_getServiceUrl"), e.tenant) {
213
+ if (e.tenant) {
214
214
  const i = `https://${e.tenant.toLowerCase()}-eu1-compass.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?platform=${e.tenant.toUpperCase()}&cors=true&xrequestedwith=xmlhttprequest`;
215
215
  m(i, {
216
216
  onComplete(s) {
@@ -227,13 +227,13 @@ function J(e, n = void 0, t = void 0) {
227
227
  });
228
228
  }
229
229
  }
230
- function De(e, n = void 0, t = void 0) {
230
+ function Ae(e, n = void 0, t = void 0) {
231
231
  if (e.tenant) {
232
232
  const i = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
233
  m(i, {
234
234
  onComplete(s) {
235
235
  const r = JSON.parse(s);
236
- if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
236
+ if (Array.isArray(r) && r.length > 0) {
237
237
  const o = `${r[0].services[0].url}`;
238
238
  n && n(o);
239
239
  }
@@ -244,7 +244,7 @@ function De(e, n = void 0, t = void 0) {
244
244
  });
245
245
  }
246
246
  }
247
- function Ae(e, n = void 0, t = void 0) {
247
+ function De(e, n = void 0, t = void 0) {
248
248
  if (e.tenant) {
249
249
  const i = `https://eu1-registry.3dexperience.3ds.com/api/v1/platform/instance?id=${e.tenant.toLowerCase()}`;
250
250
  m(i, {
@@ -310,7 +310,7 @@ function Je(e, n, t = void 0, i = void 0) {
310
310
  }
311
311
  });
312
312
  }
313
- const I = {
313
+ const N = {
314
314
  "Content-Type": "application/json",
315
315
  Accept: "application/json,text/javascript,*/*"
316
316
  };
@@ -331,7 +331,7 @@ function Me(e, n, t = void 0, i = void 0) {
331
331
  };
332
332
  m(a, {
333
333
  method: "POST",
334
- headers: I,
334
+ headers: N,
335
335
  data: JSON.stringify(c),
336
336
  onComplete(d) {
337
337
  t && t(JSON.parse(d));
@@ -432,7 +432,7 @@ function Ee(e, n, t) {
432
432
  opt: "?select=uri,title,owner,members"
433
433
  }, o = `${r.baseUrl}${r.uri}${r.opt}`, a = {
434
434
  method: "POST",
435
- headers: I,
435
+ headers: N,
436
436
  data: JSON.stringify({ groups: s })
437
437
  };
438
438
  try {
@@ -479,7 +479,7 @@ function Ke(e, n, t) {
479
479
  opt: "?person_ident=email"
480
480
  }, o = `${r.baseUrl}${r.uri}${r.opt}`, a = {
481
481
  method: "POST",
482
- headers: I,
482
+ headers: N,
483
483
  data: JSON.stringify({ users: s })
484
484
  };
485
485
  try {
@@ -535,7 +535,7 @@ function Xe(e, n, t, i = void 0, s = void 0) {
535
535
  OPTsTenant: `tenant=dstenant:${o}`
536
536
  }, c = t, d = `${r}${a.URIUGr}/${n}`, u = JSON.stringify(c);
537
537
  m(d, {
538
- headers: I,
538
+ headers: N,
539
539
  method: "PATCH",
540
540
  data: u,
541
541
  type: "json",
@@ -551,7 +551,7 @@ function We(e, n, t, i = void 0, s = void 0) {
551
551
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${n}/sharing`;
552
552
  m(a, {
553
553
  method: "PATCH",
554
- headers: I,
554
+ headers: N,
555
555
  data: JSON.stringify(t),
556
556
  type: "json",
557
557
  onComplete(d) {
@@ -717,7 +717,7 @@ function O(e, n = void 0, t = void 0) {
717
717
  } else
718
718
  t && t("ERROR : url du 3DSpace non défini.");
719
719
  }
720
- function j(e, n = void 0, t = void 0) {
720
+ function v(e, n = void 0, t = void 0) {
721
721
  let i = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
722
722
  R(
723
723
  e,
@@ -921,12 +921,12 @@ async function Qe(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0)
921
921
  t,
922
922
  n,
923
923
  (_) => {
924
- const v = new DOMParser().parseFromString(
924
+ const j = new DOMParser().parseFromString(
925
925
  _,
926
926
  "text/html"
927
- ).body.firstChild.querySelector("input").getAttributeNode("value").value, k = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(a)}/contents?receipt=${encodeURIComponent(v)}`;
927
+ ).body.firstChild.querySelector("input").getAttributeNode("value").value, k = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(a)}/contents?receipt=${encodeURIComponent(j)}`;
928
928
  let W = /(?:\.([^.]+))?$/.exec(n)[1];
929
- const D = JSON.stringify({
929
+ const A = JSON.stringify({
930
930
  actions: [],
931
931
  businessobj: {
932
932
  description: e?.description ? e?.description : "",
@@ -949,16 +949,16 @@ async function Qe(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0)
949
949
  "Content-Type": "application/json;charset=UTF-8",
950
950
  "X-DS-CSRFTOKEN": p
951
951
  },
952
- data: D,
952
+ data: A,
953
953
  type: "json",
954
- onComplete(N, Ce, Oe) {
955
- i && i(N);
954
+ onComplete(I, Ce, Oe) {
955
+ i && i(I);
956
956
  },
957
- onFailure(N) {
957
+ onFailure(I) {
958
958
  console.warn(
959
959
  "_3DSpace_Upload_Doc | pushFileInFcs | onFailure",
960
- { url: k, bodyRequest: D, err: N }
961
- ), s && s(N);
960
+ { url: k, bodyRequest: A, err: I }
961
+ ), s && s(I);
962
962
  }
963
963
  });
964
964
  },
@@ -1200,7 +1200,7 @@ async function E(e, n = void 0, t = void 0) {
1200
1200
  console.log("☠️ error => ", i);
1201
1201
  }
1202
1202
  ), new Promise((i, s) => {
1203
- j(
1203
+ v(
1204
1204
  e,
1205
1205
  (r) => {
1206
1206
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
@@ -1629,7 +1629,7 @@ function dt(e, n = void 0, t = void 0) {
1629
1629
  });
1630
1630
  }
1631
1631
  function ut(e, n, t, i) {
1632
- j(
1632
+ v(
1633
1633
  e.space,
1634
1634
  n,
1635
1635
  (s) => {
@@ -1647,7 +1647,7 @@ function ut(e, n, t, i) {
1647
1647
  }
1648
1648
  async function pt(e, n, t = void 0, i = void 0) {
1649
1649
  return new Promise((s) => {
1650
- j(e, n, (r) => {
1650
+ v(e, n, (r) => {
1651
1651
  m(r, {
1652
1652
  onComplete: (o, a, c) => (s(JSON.parse(o)), t && t(JSON.parse(o), a, c), s),
1653
1653
  onFailure: (o, a, c) => {
@@ -1684,7 +1684,7 @@ function lt(e, n, t, i = void 0, s = void 0) {
1684
1684
  );
1685
1685
  }
1686
1686
  let K, q;
1687
- const A = [];
1687
+ const D = [];
1688
1688
  async function ft(e, n = void 0, t = void 0) {
1689
1689
  e.objID && e.objID !== "" ? R(
1690
1690
  e,
@@ -1738,7 +1738,7 @@ function pe(e, n, t = void 0, i = void 0) {
1738
1738
  K,
1739
1739
  (s) => {
1740
1740
  const r = [...n];
1741
- r.find((o) => o.objectID === s.objectId).data = s.data, q = r, A.push(s.data), t && t(A);
1741
+ r.find((o) => o.objectID === s.objectId).data = s.data, q = r, D.push(s.data), t && t(D);
1742
1742
  },
1743
1743
  (s) => {
1744
1744
  i && (i(s), console.log(s));
@@ -2416,7 +2416,7 @@ function xt(e, n = void 0, t = void 0) {
2416
2416
  }
2417
2417
  });
2418
2418
  }
2419
- function It(e, n, t) {
2419
+ function Nt(e, n, t) {
2420
2420
  const {
2421
2421
  _3DSwym: i,
2422
2422
  _3DSwym_token: s,
@@ -2461,7 +2461,7 @@ function It(e, n, t) {
2461
2461
  };
2462
2462
  m(p.base + p.uri, l);
2463
2463
  }
2464
- function Nt(e, n, t = void 0, i = void 0) {
2464
+ function It(e, n, t = void 0, i = void 0) {
2465
2465
  const { _3DSwym: s } = e;
2466
2466
  let { community_id: r, limit: o, page: a, search: c } = n;
2467
2467
  const d = [], u = 1;
@@ -2488,7 +2488,7 @@ function Nt(e, n, t = void 0, i = void 0) {
2488
2488
  d.push(_.response.result);
2489
2489
  else {
2490
2490
  const b = _.response.result.find(
2491
- (v) => v.title.includes(c)
2491
+ (j) => j.title.includes(c)
2492
2492
  );
2493
2493
  if (b) {
2494
2494
  t(b);
@@ -2649,7 +2649,7 @@ function Ft(e, n = void 0, t = void 0) {
2649
2649
  }
2650
2650
  });
2651
2651
  }
2652
- function vt(e, n, t = void 0, i = void 0) {
2652
+ function jt(e, n, t = void 0, i = void 0) {
2653
2653
  const s = e.space + "/api/user/find/login/" + n;
2654
2654
  C(
2655
2655
  e,
@@ -2669,7 +2669,7 @@ function vt(e, n, t = void 0, i = void 0) {
2669
2669
  i
2670
2670
  );
2671
2671
  }
2672
- function jt(e, n = void 0, t = void 0) {
2672
+ function vt(e, n = void 0, t = void 0) {
2673
2673
  const {
2674
2674
  _3DSwym: i,
2675
2675
  _3DSwym_token: s,
@@ -2702,7 +2702,7 @@ function kt(e, n = void 0, t = void 0) {
2702
2702
  return n && n(s), s;
2703
2703
  });
2704
2704
  }
2705
- function Dt(e, n = void 0, t = void 0) {
2705
+ function At(e, n = void 0, t = void 0) {
2706
2706
  e.tenant ? J(e, (i) => {
2707
2707
  const s = i.services.find(
2708
2708
  (a) => a.id === "3dpassport"
@@ -2722,11 +2722,14 @@ function Dt(e, n = void 0, t = void 0) {
2722
2722
  });
2723
2723
  }) : t && t("No tenant");
2724
2724
  }
2725
- function At(e, n = void 0, t = void 0) {
2725
+ function Dt(e, n = void 0, t = void 0) {
2726
2726
  if (e.tenant) {
2727
2727
  const i = e.tenant.toLowerCase();
2728
2728
  fetch(`https://api.uixhome.fr/${i}/iterop/jwtuser`, {
2729
- method: "POST"
2729
+ method: "POST",
2730
+ headers: {
2731
+ "Access-Control-Allow-Origin": "*"
2732
+ }
2730
2733
  }).then((s) => s.json()).then((s) => {
2731
2734
  n && n(s);
2732
2735
  }).catch((s) => {
@@ -3026,7 +3029,7 @@ export {
3026
3029
  de as _3DSpace_get_downloadTicket_multidoc,
3027
3030
  Ye as _3DSpace_get_multiDocInfo,
3028
3031
  F as _3DSpace_get_securityContexts,
3029
- j as _3DSpace_get_ticket,
3032
+ v as _3DSpace_get_ticket,
3030
3033
  ot as _3DSpace_lifecycle_changeRevision,
3031
3034
  nt as _3DSpace_lifecycle_changeState,
3032
3035
  st as _3DSpace_lifecycle_getGraph,
@@ -3035,13 +3038,13 @@ export {
3035
3038
  at as _3DSpace_lifecycle_getRevisions,
3036
3039
  He as _3DSpace_put_docInfo,
3037
3040
  Rt as _3DSwym_ForwardIdea,
3038
- jt as _3DSwym_addComment,
3041
+ vt as _3DSwym_addComment,
3039
3042
  bt as _3DSwym_buildDirectMessage,
3040
3043
  Ut as _3DSwym_deleteIdea,
3041
- It as _3DSwym_editIdea,
3044
+ Nt as _3DSwym_editIdea,
3042
3045
  ye as _3DSwym_findCommunityToInstantMSG,
3043
3046
  Ct as _3DSwym_getAllCommunities,
3044
- Nt as _3DSwym_getAllListIdeas,
3047
+ It as _3DSwym_getAllListIdeas,
3045
3048
  St as _3DSwym_getAllNews,
3046
3049
  wt as _3DSwym_getFamiliarPeople,
3047
3050
  Ot as _3DSwym_getIdeaStatusMaturity,
@@ -3049,14 +3052,14 @@ export {
3049
3052
  xt as _3DSwym_getOneIdea,
3050
3053
  C as _3DSwym_get_Token,
3051
3054
  Ft as _3DSwym_get_currentUser,
3052
- vt as _3DSwym_get_findUser,
3055
+ jt as _3DSwym_get_findUser,
3053
3056
  $t as _3DSwym_postIdea,
3054
3057
  Tt as _3DSwym_postIdeaTemplate,
3055
3058
  P as _3DSwym_sendMessageData,
3056
3059
  Je as _AppMngt_get_info_user,
3057
3060
  Le as _AppMngt_get_users,
3058
3061
  Mt as _Iterop_AddOrRemoveRows,
3059
- Dt as _Iterop_Auth_CAS,
3062
+ At as _Iterop_Auth_CAS,
3060
3063
  qt as _Iterop_GetOneDependencyTable,
3061
3064
  Vt as _Iterop_GetOneList,
3062
3065
  Xt as _Iterop_PatchDependencyTable,
@@ -3066,19 +3069,19 @@ export {
3066
3069
  Pt as _Iterop_getAllBusinessTables,
3067
3070
  Lt as _Iterop_getOneBusinessTable,
3068
3071
  Jt as _Iterop_getOneBusinessTableRows,
3069
- At as _Iterop_jwtUser,
3072
+ Dt as _Iterop_jwtUser,
3070
3073
  Kt as _Iterop_runProcess,
3071
3074
  Bt as _Iterop_updateBusinessTable,
3072
- Ae as _Registry_getServicesUrl,
3075
+ De as _Registry_getServicesUrl,
3073
3076
  ke as _getMe,
3074
3077
  Z as _getPlateformInfos,
3075
- je as _getPlatformServices,
3078
+ ve as _getPlatformServices,
3076
3079
  J as _getServiceUrl,
3077
- De as _getServiceUrl_3DPassport,
3080
+ Ae as _getServiceUrl_3DPassport,
3078
3081
  kt as _getServiceUrl_Iterop,
3079
3082
  m as _httpCallAuthenticated,
3080
3083
  Re as _setDraggable,
3081
- ve as _setDroppable,
3084
+ je as _setDroppable,
3082
3085
  Fe as _setupTagger,
3083
3086
  ht as addTagToDoc,
3084
3087
  H as chunkArray,
@@ -3093,7 +3096,7 @@ export {
3093
3096
  Ue as getCommunes,
3094
3097
  Ge as getComplementUG,
3095
3098
  ut as getDataFrom3DSpace,
3096
- Ie as getDataFromGouvFr,
3099
+ Ne as getDataFromGouvFr,
3097
3100
  mt as getDatasByTenant,
3098
3101
  gt as getDatasFrom3DSpace,
3099
3102
  pt as getDownloadDocument,
@@ -3109,6 +3112,6 @@ export {
3109
3112
  Ve as readUserGroupControl,
3110
3113
  yt as removeTagToDoc,
3111
3114
  Yt as sayHello,
3112
- Ne as updateEvent
3115
+ Ie as updateEvent
3113
3116
  };
3114
3117
  //# sourceMappingURL=wb3Api.js.map