@beam3_dev/api_module 0.0.202 → 0.0.204

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
@@ -34,7 +34,7 @@ const V = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function ge(e, t = void 0, s = void 0) {
37
+ async function he(e, t = void 0, s = void 0) {
38
38
  const n = parseInt(e);
39
39
  await fetch(
40
40
  "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
@@ -50,7 +50,7 @@ async function ge(e, t = void 0, s = void 0) {
50
50
  s && s(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function he(e, t = void 0, s = void 0) {
53
+ async function ye(e, t = void 0, s = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -65,7 +65,7 @@ async function he(e, t = void 0, s = void 0) {
65
65
  s && s(n), console.error("Erreur : " + n);
66
66
  });
67
67
  }
68
- async function ye(e, t = V) {
68
+ async function Se(e, t = V) {
69
69
  let s = N.now().year;
70
70
  const n = e, i = [], r = (a) => {
71
71
  for (let c in a)
@@ -100,38 +100,39 @@ async function ye(e, t = V) {
100
100
  return a;
101
101
  })();
102
102
  }
103
- function Se(e, t, s) {
104
- const { myArray: n, chunk: i, fn_to_call: r } = e, o = [];
105
- for (let a = 0; a < n.length; a += i) {
106
- const c = n.slice(a, a + i);
107
- o.push(c);
103
+ function X(e, t, s) {
104
+ const { credentials: n, myArray: i, chunk: r, fn_to_call: o } = e, a = [];
105
+ for (let c = 0; c < i.length; c += r) {
106
+ const d = i.slice(c, c + r);
107
+ a.push(d);
108
108
  }
109
- X(
110
- { chunks: o, initLoop: 0, fn: r },
111
- (a) => {
112
- t && t(a);
109
+ W(
110
+ { credentials: n, chunks: a, initLoop: 0, fn: o },
111
+ (c) => {
112
+ t && t(c);
113
113
  },
114
- (a) => {
115
- s && s(a);
114
+ (c) => {
115
+ s && s(c);
116
116
  }
117
117
  );
118
118
  }
119
- function X(e, t, s) {
120
- const { chunks: n, initLoop: i, fn: r } = e, o = (a) => {
121
- r(
122
- n[a],
119
+ function W(e, t, s) {
120
+ const { credentials: n, chunks: i, initLoop: r, fn: o } = e, a = (c) => {
121
+ o(
122
+ n,
123
+ i[c],
123
124
  () => {
124
- a++, a < n.length && o(a);
125
+ c++, c < i.length && a(c);
125
126
  },
126
- (c) => {
127
- t && t(c);
127
+ (d) => {
128
+ t && t(d);
128
129
  },
129
- (c) => {
130
- s && s(c);
130
+ (d) => {
131
+ s && s(d);
131
132
  }
132
133
  );
133
134
  };
134
- o(i);
135
+ a(r);
135
136
  }
136
137
  async function _e(e, t, s = !0) {
137
138
  const n = e.events.findIndex((i) => i.uuid === t.uuid);
@@ -180,7 +181,7 @@ async function be(e, t = void 0, s = void 0) {
180
181
  }
181
182
  );
182
183
  }
183
- function W() {
184
+ function Y() {
184
185
  let e = {};
185
186
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
186
187
  const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
@@ -335,7 +336,7 @@ function Ae(e, t, s = void 0, n = void 0) {
335
336
  }
336
337
  });
337
338
  }
338
- function Y(e, t = void 0, s = void 0) {
339
+ function q(e, t = void 0, s = void 0) {
339
340
  const { space: n, tenant: i } = e, r = n, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
340
341
  method: "GET",
341
342
  Accept: "application/json,*/*,test/javascript"
@@ -363,7 +364,7 @@ function ke(e, t = void 0, s = void 0) {
363
364
  const u = JSON.parse(p), f = {}, l = u.groups.filter((g) => g.uri.startsWith("uuid:"));
364
365
  if (i && Object.keys(i).length > 0) {
365
366
  const g = l.filter((S) => S.owner === i.email), h = l.filter((S) => S.members.includes(i.email)), y = g.concat(h);
366
- f.iam = y, f.UG = l, f.iamMember = h, Y(
367
+ f.iam = y, f.UG = l, f.iamMember = h, q(
367
368
  e,
368
369
  (S) => {
369
370
  f.rules = S, t && t(f);
@@ -444,7 +445,7 @@ function xe(e, t, s = void 0, n = void 0) {
444
445
  }
445
446
  });
446
447
  }
447
- async function q(e, t, s) {
448
+ async function H(e, t, s) {
448
449
  if (e.space) {
449
450
  const n = `${e.space}/resources/v1/application/CSRF`;
450
451
  m(n, {
@@ -458,10 +459,10 @@ async function q(e, t, s) {
458
459
  }
459
460
  }
460
461
  var I = {};
461
- function H(e, t) {
462
+ function z(e, t) {
462
463
  return Object.prototype.hasOwnProperty.call(e, t);
463
464
  }
464
- var z = function(e, t, s, n) {
465
+ var Q = function(e, t, s, n) {
465
466
  t = t || "&", s = s || "=";
466
467
  var i = {};
467
468
  if (typeof e != "string" || e.length === 0)
@@ -474,7 +475,7 @@ var z = function(e, t, s, n) {
474
475
  o > 0 && a > o && (a = o);
475
476
  for (var c = 0; c < a; ++c) {
476
477
  var d = e[c].replace(r, "%20"), p = d.indexOf(s), u, f, l, g;
477
- p >= 0 ? (u = d.substr(0, p), f = d.substr(p + 1)) : (u = d, f = ""), l = decodeURIComponent(u), g = decodeURIComponent(f), H(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
478
+ p >= 0 ? (u = d.substr(0, p), f = d.substr(p + 1)) : (u = d, f = ""), l = decodeURIComponent(u), g = decodeURIComponent(f), z(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
478
479
  }
479
480
  return i;
480
481
  }, v = function(e) {
@@ -488,7 +489,7 @@ var z = function(e, t, s, n) {
488
489
  default:
489
490
  return "";
490
491
  }
491
- }, Q = function(e, t, s, n) {
492
+ }, Z = function(e, t, s, n) {
492
493
  return t = t || "&", s = s || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
493
494
  var r = encodeURIComponent(v(i)) + s;
494
495
  return Array.isArray(e[i]) ? e[i].map(function(o) {
@@ -496,8 +497,8 @@ var z = function(e, t, s, n) {
496
497
  }).join(t) : r + encodeURIComponent(v(e[i]));
497
498
  }).filter(Boolean).join(t) : n ? encodeURIComponent(v(n)) + s + encodeURIComponent(v(e)) : "";
498
499
  };
499
- I.decode = I.parse = z;
500
- I.encode = I.stringify = Q;
500
+ I.decode = I.parse = Q;
501
+ I.encode = I.stringify = Z;
501
502
  async function L(e, t = void 0, s = void 0, n = void 0) {
502
503
  const i = e.space;
503
504
  if (t === void 0) {
@@ -628,7 +629,7 @@ function Pe(e, t, s, n = void 0, i = void 0) {
628
629
  });
629
630
  }
630
631
  function M(e, t, s, n, i, r = void 0, o = void 0) {
631
- const a = () => Z(
632
+ const a = () => ee(
632
633
  e,
633
634
  t,
634
635
  s,
@@ -646,7 +647,7 @@ function M(e, t, s, n, i, r = void 0, o = void 0) {
646
647
  }
647
648
  );
648
649
  }
649
- function Z(e, t, s, n, i, r, o = void 0, a = void 0) {
650
+ function ee(e, t, s, n, i, r, o = void 0, a = void 0) {
650
651
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
651
652
  m(c, {
652
653
  method: "PUT",
@@ -857,7 +858,7 @@ async function J(e, t = void 0, s = void 0) {
857
858
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
858
859
  )), (e.space === "" || !e.space) && (console.warn(
859
860
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
860
- ), s && s("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && q(
861
+ ), s && s("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && H(
861
862
  e,
862
863
  (n) => {
863
864
  e.token = n;
@@ -902,24 +903,21 @@ async function J(e, t = void 0, s = void 0) {
902
903
  );
903
904
  });
904
905
  }
905
- async function ee(e, t, s = void 0, n = void 0) {
906
- if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
907
- const i = {
908
- myArray: t,
909
- chunk: 80,
910
- fn_to_call: te
911
- };
912
- chunkArray(i, (r) => {
913
- s && s(r);
914
- });
915
- } else
916
- console.warn(
917
- "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
918
- ), n && n(
919
- "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
920
- );
921
- }
922
- function te(e, t, s = void 0, n = void 0, i = void 0) {
906
+ async function te(e, t, s = void 0, n = void 0) {
907
+ typeof t < "u" && Array.isArray(t) && t?.length > 0 ? X({
908
+ credentials: e,
909
+ myArray: t,
910
+ chunk: 80,
911
+ fn_to_call: ne
912
+ }, (r) => {
913
+ s && s(r);
914
+ }) : (console.warn(
915
+ "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
916
+ ), n && n(
917
+ "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
918
+ ));
919
+ }
920
+ function ne(e, t, s = void 0, n = void 0, i = void 0) {
923
921
  const r = [];
924
922
  t.forEach((c) => {
925
923
  r.push({
@@ -1344,13 +1342,13 @@ function Qe(e, t = void 0, s = void 0) {
1344
1342
  e,
1345
1343
  i.objID,
1346
1344
  (o) => {
1347
- n.push({ [i.name]: o }), i.name === "dbProjets" && (G = o.affaires.map((a) => a.objectID), ne(e, E)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1345
+ n.push({ [i.name]: o }), i.name === "dbProjets" && (G = o.affaires.map((a) => a.objectID), se(e, E)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1348
1346
  }
1349
1347
  );
1350
1348
  });
1351
1349
  }
1352
- function ne(e, t, s = void 0, n = void 0) {
1353
- ee(
1350
+ function se(e, t, s = void 0, n = void 0) {
1351
+ te(
1354
1352
  e,
1355
1353
  G,
1356
1354
  (i) => {
@@ -1362,7 +1360,7 @@ function ne(e, t, s = void 0, n = void 0) {
1362
1360
  }
1363
1361
  );
1364
1362
  }
1365
- const se = "FA35FB9B177A280065800EA0000F599C", ie = [
1363
+ const ie = "FA35FB9B177A280065800EA0000F599C", ae = [
1366
1364
  "swym",
1367
1365
  "3dspace",
1368
1366
  "drive",
@@ -1376,8 +1374,8 @@ const se = "FA35FB9B177A280065800EA0000F599C", ie = [
1376
1374
  where: "ds6w:where",
1377
1375
  who: "ds6w:who",
1378
1376
  why: "ds6w:why"
1379
- }, ae = {
1380
- objId: se,
1377
+ }, oe = {
1378
+ objId: ie,
1381
1379
  pred: "who",
1382
1380
  order_by: "desc",
1383
1381
  tag: "testTag"
@@ -1418,7 +1416,7 @@ function Ze(e, t, s = void 0, n = void 0) {
1418
1416
  o,
1419
1417
  (g) => {
1420
1418
  const h = g.data[0].dataelements.title, y = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", S = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1421
- l.name = h, l.ext = y, l.createBy = S, t.info = { ...l }, oe(
1419
+ l.name = h, l.ext = y, l.createBy = S, t.info = { ...l }, re(
1422
1420
  e,
1423
1421
  t,
1424
1422
  (_) => {
@@ -1442,7 +1440,7 @@ function Ze(e, t, s = void 0, n = void 0) {
1442
1440
  }
1443
1441
  });
1444
1442
  }
1445
- function oe(e, t, s = void 0, n = void 0) {
1443
+ function re(e, t, s = void 0, n = void 0) {
1446
1444
  console.log("obj ", t);
1447
1445
  const i = t.info.name, r = {
1448
1446
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1492,7 +1490,7 @@ function oe(e, t, s = void 0, n = void 0) {
1492
1490
  }
1493
1491
  },
1494
1492
  select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
1495
- order_by: ae.order_by,
1493
+ order_by: oe.order_by,
1496
1494
  order_field: "relevance",
1497
1495
  select_snippets: [
1498
1496
  "ds6w:snippet",
@@ -1503,7 +1501,7 @@ function oe(e, t, s = void 0, n = void 0) {
1503
1501
  ],
1504
1502
  nresults: 40,
1505
1503
  start: "0",
1506
- source: ie,
1504
+ source: ae,
1507
1505
  tenant: e.tenant,
1508
1506
  login: {
1509
1507
  "3dspace": {
@@ -1682,7 +1680,7 @@ function it(e, t = void 0, s = void 0) {
1682
1680
  role: l.role,
1683
1681
  access: l.access
1684
1682
  };
1685
- re(
1683
+ ce(
1686
1684
  e,
1687
1685
  l.id,
1688
1686
  (h) => {
@@ -1699,7 +1697,7 @@ function it(e, t = void 0, s = void 0) {
1699
1697
  });
1700
1698
  });
1701
1699
  }
1702
- function re(e, t, s, n) {
1700
+ function ce(e, t, s, n) {
1703
1701
  const i = `${e.space}/api/community/listmembers`, r = {
1704
1702
  params: {
1705
1703
  page: e.page ? e.page : 1,
@@ -1759,10 +1757,10 @@ function ot(e, t, s = void 0, n = void 0) {
1759
1757
  id_msg: "",
1760
1758
  senderId: e.currentUser.login,
1761
1759
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
1762
- msg: de(t.msg)
1760
+ msg: pe(t.msg)
1763
1761
  };
1764
1762
  let d = !1;
1765
- ce(
1763
+ de(
1766
1764
  a.users,
1767
1765
  (p) => {
1768
1766
  p !== void 0 && (c.id_msg = p.id, d = !0, R(e, c));
@@ -1793,7 +1791,7 @@ function ot(e, t, s = void 0, n = void 0) {
1793
1791
  });
1794
1792
  }, 500);
1795
1793
  }
1796
- function ce(e, t, s, n) {
1794
+ function de(e, t, s, n) {
1797
1795
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1798
1796
  w(e, (r) => {
1799
1797
  m(i, {
@@ -1859,14 +1857,14 @@ function R(e, t, s = void 0, n = void 0) {
1859
1857
  });
1860
1858
  });
1861
1859
  }
1862
- function de(e) {
1860
+ function pe(e) {
1863
1861
  const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1864
1862
  return `<p>${e} </p>
1865
1863
  <br/>
1866
1864
  <hr/>
1867
1865
  <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
1868
1866
  }
1869
- const pe = {
1867
+ const ue = {
1870
1868
  title: "TEST DEV COMMUNITY IDEA",
1871
1869
  // titre du post
1872
1870
  community_id: "YXdA5x4DSUKtlAi2wmnyTA",
@@ -1887,7 +1885,7 @@ function rt(e, t, s = void 0, n = void 0) {
1887
1885
  // String, le nom de l'affaire
1888
1886
  community_id: r?.id !== void 0 ? r.id : o.id,
1889
1887
  // String, l'id de la communauté
1890
- message: ue(t.text_html),
1888
+ message: le(t.text_html),
1891
1889
  // STRING => le contenue du message doit être au format HTML
1892
1890
  published: 1
1893
1891
  // 1 publier, 0 non publier
@@ -2082,7 +2080,7 @@ function ut(e, t, s) {
2082
2080
  m(n.base + n.uri, o);
2083
2081
  });
2084
2082
  }
2085
- function lt(e, t = pe, s = void 0, n = void 0) {
2083
+ function lt(e, t = ue, s = void 0, n = void 0) {
2086
2084
  const i = {
2087
2085
  uri: "/api/idea/list",
2088
2086
  comId: `/community_id/${t.community_id}`,
@@ -2106,7 +2104,7 @@ function lt(e, t = pe, s = void 0, n = void 0) {
2106
2104
  });
2107
2105
  });
2108
2106
  }
2109
- function ue(e) {
2107
+ function le(e) {
2110
2108
  return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
2111
2109
  <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
2112
2110
  <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
@@ -2394,7 +2392,7 @@ function Nt(e) {
2394
2392
  function It(e, t = void 0, s = void 0) {
2395
2393
  return console.log("credentials", e), new Promise((n) => {
2396
2394
  if (e.token === "" && b(e), !e.space || e.space === "") {
2397
- const o = W();
2395
+ const o = Y();
2398
2396
  console.log("platformeInfo", o);
2399
2397
  }
2400
2398
  k(
@@ -2479,13 +2477,13 @@ export {
2479
2477
  Be as _3DSpace_bookmark_newWorkspace,
2480
2478
  b as _3DSpace_csrf,
2481
2479
  J as _3DSpace_download_doc,
2482
- ee as _3DSpace_download_multidoc,
2480
+ te as _3DSpace_download_multidoc,
2483
2481
  M as _3DSpace_file_update,
2484
- Z as _3DSpace_file_update_csr,
2482
+ ee as _3DSpace_file_update_csr,
2485
2483
  Pe as _3DSpace_file_url_csr,
2486
2484
  A as _3DSpace_get_csrf,
2487
2485
  L as _3DSpace_get_docInfo,
2488
- te as _3DSpace_get_downloadTicket_multidoc,
2486
+ ne as _3DSpace_get_downloadTicket_multidoc,
2489
2487
  Re as _3DSpace_get_multiDocInfo,
2490
2488
  k as _3DSpace_get_securityContexts,
2491
2489
  j as _3DSpace_get_ticket,
@@ -2497,13 +2495,13 @@ export {
2497
2495
  ot as _3DSwym_buildDirectMessage,
2498
2496
  dt as _3DSwym_deleteIdea,
2499
2497
  ut as _3DSwym_editIdea,
2500
- ce as _3DSwym_findCommunityToInstantMSG,
2498
+ de as _3DSwym_findCommunityToInstantMSG,
2501
2499
  it as _3DSwym_getAllCommunities,
2502
2500
  lt as _3DSwym_getAllListIdeas,
2503
2501
  nt as _3DSwym_getAllNews,
2504
2502
  st as _3DSwym_getFamiliarPeople,
2505
2503
  at as _3DSwym_getIdeaStatusMaturity,
2506
- re as _3DSwym_getMembersCommunity,
2504
+ ce as _3DSwym_getMembersCommunity,
2507
2505
  pt as _3DSwym_getOneIdea,
2508
2506
  w as _3DSwym_get_Token,
2509
2507
  ft as _3DSwym_get_currentUser,
@@ -2524,7 +2522,7 @@ export {
2524
2522
  Tt as _Iterop_getOneBusinessTableRows,
2525
2523
  yt as _Iterop_jwtUser,
2526
2524
  Ct as _Iterop_runProcess,
2527
- W as _getPlateformInfos,
2525
+ Y as _getPlateformInfos,
2528
2526
  be as _getPlatformServices,
2529
2527
  T as _getServiceUrl,
2530
2528
  Oe as _getServiceUrl_3DPassport,
@@ -2534,25 +2532,25 @@ export {
2534
2532
  Ce as _setDroppable,
2535
2533
  Te as _setupTagger,
2536
2534
  Ze as addTagToDoc,
2537
- Se as chunkArray,
2535
+ X as chunkArray,
2538
2536
  $e as compass_getListAdditionalApps,
2539
2537
  V as couleurs,
2540
2538
  Ie as createUserGroups,
2541
- ne as dataMixing,
2539
+ se as dataMixing,
2542
2540
  Fe as deleteUserGroups,
2543
- he as findAdresse,
2541
+ ye as findAdresse,
2544
2542
  Xe as getAllContextSecurity,
2545
- q as getCSRFToken,
2546
- ge as getCommunes,
2543
+ H as getCSRFToken,
2544
+ he as getCommunes,
2547
2545
  Ae as getComplementUG,
2548
2546
  We as getDataFrom3DSpace,
2549
- ye as getDataFromGouvFr,
2547
+ Se as getDataFromGouvFr,
2550
2548
  ze as getDatasByTenant,
2551
2549
  Qe as getDatasFrom3DSpace,
2552
2550
  Ye as getDownloadDocument,
2553
2551
  tt as getInfoDocTags,
2554
2552
  ke as getUserGroupsList,
2555
- Y as getUsersGroupRules,
2553
+ q as getUsersGroupRules,
2556
2554
  He as get_3DSpace_csrf,
2557
2555
  Ue as patchUserGroups,
2558
2556
  je as patchUserGroupsControl,