@beam3_dev/api_module 0.0.181 → 0.0.182

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/README.md CHANGED
@@ -18,7 +18,7 @@ yarn add -D wb3_module_api
18
18
  ## Mise a jour
19
19
 
20
20
  ```sh
21
- npm run build && npm run b3:publish
21
+ npm run build && npm run b3:publish
22
22
  # faire les commits (add, commit, push)
23
23
  npm run b3:publish
24
24
  ```
package/dist/wb3Api.js CHANGED
@@ -250,7 +250,7 @@ function $e(e, t, n = void 0, s = void 0) {
250
250
  }
251
251
  });
252
252
  }
253
- const j = {
253
+ const P = {
254
254
  "Content-Type": "application/json",
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
@@ -271,7 +271,7 @@ function ve(e, t, n = void 0, s = void 0) {
271
271
  };
272
272
  m(a, {
273
273
  method: "POST",
274
- headers: j,
274
+ headers: P,
275
275
  data: JSON.stringify(c),
276
276
  onComplete(d) {
277
277
  n && n(JSON.parse(d));
@@ -355,7 +355,7 @@ function Ae(e, t) {
355
355
  method: "DELETE"
356
356
  });
357
357
  }
358
- function Ue(e, t, n, s = void 0, i = void 0) {
358
+ function ke(e, t, n, s = void 0, i = void 0) {
359
359
  const { space: r, tenant: o } = e, a = {
360
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
361
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -366,7 +366,7 @@ function Ue(e, t, n, s = void 0, i = void 0) {
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
367
  }, c = n, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
368
368
  m(d, {
369
- headers: j,
369
+ headers: P,
370
370
  method: "PATCH",
371
371
  data: p,
372
372
  type: "json",
@@ -378,11 +378,11 @@ function Ue(e, t, n, s = void 0, i = void 0) {
378
378
  }
379
379
  });
380
380
  }
381
- function ke(e, t, n, s = void 0, i = void 0) {
381
+ function Ue(e, t, n, s = void 0, i = void 0) {
382
382
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
383
  m(a, {
384
384
  method: "PATCH",
385
- headers: j,
385
+ headers: P,
386
386
  data: JSON.stringify(n),
387
387
  type: "json",
388
388
  onComplete(d) {
@@ -393,7 +393,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
393
393
  }
394
394
  });
395
395
  }
396
- function je(e, t, n = void 0, s = void 0) {
396
+ function Pe(e, t, n = void 0, s = void 0) {
397
397
  const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
398
  m(o, {
399
399
  opts: {
@@ -425,10 +425,10 @@ async function Y(e, t, n) {
425
425
  }
426
426
  }
427
427
  var A = {};
428
- function H(e, t) {
428
+ function z(e, t) {
429
429
  return Object.prototype.hasOwnProperty.call(e, t);
430
430
  }
431
- var z = function(e, t, n, s) {
431
+ var H = function(e, t, n, s) {
432
432
  t = t || "&", n = n || "=";
433
433
  var i = {};
434
434
  if (typeof e != "string" || e.length === 0)
@@ -441,7 +441,7 @@ var z = function(e, t, n, s) {
441
441
  o > 0 && a > o && (a = o);
442
442
  for (var c = 0; c < a; ++c) {
443
443
  var d = e[c].replace(r, "%20"), p = d.indexOf(n), l, f, u, g;
444
- p >= 0 ? (l = d.substr(0, p), f = d.substr(p + 1)) : (l = d, f = ""), u = decodeURIComponent(l), g = decodeURIComponent(f), H(i, u) ? Array.isArray(i[u]) ? i[u].push(g) : i[u] = [i[u], g] : i[u] = g;
444
+ p >= 0 ? (l = d.substr(0, p), f = d.substr(p + 1)) : (l = d, f = ""), u = decodeURIComponent(l), g = decodeURIComponent(f), z(i, u) ? Array.isArray(i[u]) ? i[u].push(g) : i[u] = [i[u], g] : i[u] = g;
445
445
  }
446
446
  return i;
447
447
  }, N = function(e) {
@@ -463,7 +463,7 @@ var z = function(e, t, n, s) {
463
463
  }).join(t) : r + encodeURIComponent(N(e[i]));
464
464
  }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
465
465
  };
466
- A.decode = A.parse = z;
466
+ A.decode = A.parse = H;
467
467
  A.encode = A.stringify = q;
468
468
  async function L(e, t = void 0, n = void 0, s = void 0) {
469
469
  const i = e.space;
@@ -482,7 +482,7 @@ async function L(e, t = void 0, n = void 0, s = void 0) {
482
482
  }
483
483
  });
484
484
  }
485
- async function Fe(e, t = void 0, n = void 0, s = void 0) {
485
+ async function je(e, t = void 0, n = void 0, s = void 0) {
486
486
  const i = e.space;
487
487
  if (t === void 0) {
488
488
  console.log("Le paramètre docids est obligatoire");
@@ -506,7 +506,7 @@ async function Fe(e, t = void 0, n = void 0, s = void 0) {
506
506
  }
507
507
  });
508
508
  }
509
- function U(e, t = void 0, n = void 0) {
509
+ function k(e, t = void 0, n = void 0) {
510
510
  if (e.objID && e.objID !== "") {
511
511
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
512
512
  m(s, {
@@ -548,9 +548,9 @@ function b(e, t = void 0, n = void 0) {
548
548
  } else
549
549
  n && n("ERROR : url du 3DSpace non défini.");
550
550
  }
551
- function F(e, t = void 0, n = void 0) {
551
+ function j(e, t = void 0, n = void 0) {
552
552
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
553
- U(
553
+ k(
554
554
  e,
555
555
  (i) => {
556
556
  m(s, {
@@ -572,7 +572,7 @@ function F(e, t = void 0, n = void 0) {
572
572
  }
573
573
  );
574
574
  }
575
- function xe(e, t, n, s = void 0, i = void 0) {
575
+ function Fe(e, t, n, s = void 0, i = void 0) {
576
576
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
577
577
  n || (n = e.token), m(r, {
578
578
  method: "PUT",
@@ -605,7 +605,7 @@ function M(e, t, n, s, i, r = void 0, o = void 0) {
605
605
  r,
606
606
  o
607
607
  );
608
- e.token ? a() : U(
608
+ e.token ? a() : k(
609
609
  e,
610
610
  t,
611
611
  (c) => {
@@ -649,6 +649,8 @@ function Q(e, t, n, s, i, r, o = void 0, a = void 0) {
649
649
  ]
650
650
  },
651
651
  id: t,
652
+ updateAction: "NONE",
653
+ id: t,
652
654
  updateAction: "NONE"
653
655
  }
654
656
  ]
@@ -671,7 +673,7 @@ function Q(e, t, n, s, i, r, o = void 0, a = void 0) {
671
673
  }
672
674
  });
673
675
  }
674
- async function Pe(e, t, n, s = void 0, i = void 0) {
676
+ async function xe(e, t, n, s = void 0, i = void 0) {
675
677
  e.space, e.token, e.ctx, L(
676
678
  e,
677
679
  t,
@@ -746,11 +748,11 @@ async function Re(e, t, n, s, i = void 0, r = void 0) {
746
748
  ]
747
749
  }),
748
750
  type: "json",
749
- onComplete(k) {
750
- i && i(k);
751
+ onComplete(U) {
752
+ i && i(U);
751
753
  },
752
- onFailure(k) {
753
- r && r(k);
754
+ onFailure(U) {
755
+ r && r(U);
754
756
  }
755
757
  };
756
758
  m(
@@ -833,7 +835,7 @@ async function J(e, t = void 0, n = void 0) {
833
835
  console.log("☠️ error => ", s);
834
836
  }
835
837
  ), new Promise((s, i) => {
836
- F(
838
+ j(
837
839
  e,
838
840
  (r) => {
839
841
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
@@ -1246,7 +1248,7 @@ function Ve(e, t = void 0, n = void 0) {
1246
1248
  });
1247
1249
  }
1248
1250
  function Be(e, t, n, s) {
1249
- F(
1251
+ j(
1250
1252
  e.space,
1251
1253
  t,
1252
1254
  (i) => {
@@ -1264,7 +1266,7 @@ function Be(e, t, n, s) {
1264
1266
  }
1265
1267
  async function We(e, t, n = void 0, s = void 0) {
1266
1268
  return new Promise((i) => {
1267
- F(e, t, (r) => {
1269
+ j(e, t, (r) => {
1268
1270
  m(r, {
1269
1271
  onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1270
1272
  onFailure: (o, a, c) => {
@@ -1276,7 +1278,7 @@ async function We(e, t, n = void 0, s = void 0) {
1276
1278
  }
1277
1279
  function Xe(e, t, n, s = void 0, i = void 0) {
1278
1280
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1279
- U(
1281
+ k(
1280
1282
  e,
1281
1283
  n,
1282
1284
  (o) => {
@@ -1298,9 +1300,9 @@ function Xe(e, t, n, s = void 0, i = void 0) {
1298
1300
  );
1299
1301
  }
1300
1302
  let G, E;
1301
- const x = [];
1303
+ const F = [];
1302
1304
  async function Ye(e, t = void 0, n = void 0) {
1303
- e.objID && e.objID !== "" ? U(
1305
+ e.objID && e.objID !== "" ? k(
1304
1306
  e,
1305
1307
  (s) => {
1306
1308
  t && t(s);
@@ -1318,7 +1320,7 @@ async function Ye(e, t = void 0, n = void 0) {
1318
1320
  }
1319
1321
  );
1320
1322
  }
1321
- async function He(e, t = void 0, n = void 0) {
1323
+ async function ze(e, t = void 0, n = void 0) {
1322
1324
  console.log("getDatasByTenant (getDocuments)", e), await J(
1323
1325
  e,
1324
1326
  (s) => {
@@ -1330,7 +1332,7 @@ async function He(e, t = void 0, n = void 0) {
1330
1332
  }
1331
1333
  );
1332
1334
  }
1333
- function ze(e, t = void 0, n = void 0) {
1335
+ function He(e, t = void 0, n = void 0) {
1334
1336
  const s = [];
1335
1337
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1336
1338
  console.warn("la liste est vide ou n'est pas un tableau");
@@ -1352,7 +1354,7 @@ function te(e, t, n = void 0, s = void 0) {
1352
1354
  G,
1353
1355
  (i) => {
1354
1356
  const r = [...t];
1355
- r.find((o) => o.objectID === i.objectId).data = i.data, E = r, x.push(i.data), n && n(x);
1357
+ r.find((o) => o.objectID === i.objectId).data = i.data, E = r, F.push(i.data), n && n(F);
1356
1358
  },
1357
1359
  (i) => {
1358
1360
  s && (s(i), console.log(i));
@@ -1582,7 +1584,7 @@ function Ze(e, t = "", n = void 0, s = void 0) {
1582
1584
  });
1583
1585
  }
1584
1586
  async function w(e, t = void 0, n = void 0) {
1585
- const s = e._3DSwym + "/api/index/tk";
1587
+ const s = e.space + "/api/index/tk";
1586
1588
  return m(s, {
1587
1589
  onComplete(i, r, o) {
1588
1590
  const a = JSON.parse(i);
@@ -1762,7 +1764,7 @@ function it(e, t, n = void 0, s = void 0) {
1762
1764
  re(
1763
1765
  a.users,
1764
1766
  (p) => {
1765
- p !== void 0 && (c.id_msg = p.id, d = !0, P(e, c));
1767
+ p !== void 0 && (c.id_msg = p.id, d = !0, x(e, c));
1766
1768
  },
1767
1769
  (p) => {
1768
1770
  d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), c.id_msg = "";
@@ -1780,7 +1782,7 @@ function it(e, t, n = void 0, s = void 0) {
1780
1782
  type: "json",
1781
1783
  onComplete(l, f, u) {
1782
1784
  const g = l;
1783
- g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), c.id_msg = g.result.id, P(e, c);
1785
+ g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), c.id_msg = g.result.id, x(e, c);
1784
1786
  },
1785
1787
  onFailure(l, f, u) {
1786
1788
  const g = l;
@@ -1819,7 +1821,7 @@ function re(e, t, n, s) {
1819
1821
  });
1820
1822
  });
1821
1823
  }
1822
- function P(e, t, n = void 0, s = void 0) {
1824
+ function x(e, t, n = void 0, s = void 0) {
1823
1825
  const i = {
1824
1826
  base: e.space,
1825
1827
  uri: "/api/community",
@@ -1939,31 +1941,33 @@ function ot(e, t, n = void 0, s = void 0) {
1939
1941
  });
1940
1942
  });
1941
1943
  }
1942
- function rt(e, t = "", n = void 0, s = void 0) {
1943
- const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1944
- t === "" && (t = i);
1945
- const r = `${e.space}/api/idea/get`, o = {
1944
+ function rt(e, t = void 0, n = void 0) {
1945
+ const s = `${e.space}/api/idea/get`;
1946
+ if (e.idPost === "") {
1947
+ const r = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
1948
+ throw new Error(`Erreur sur cette requête : ${s}`, { cause: r });
1949
+ }
1950
+ const i = {
1946
1951
  params: {
1947
- id: t
1952
+ id: e.idPost
1948
1953
  }
1949
1954
  };
1950
- w(e, (a) => {
1951
- m(r, {
1955
+ w(e, (r) => {
1956
+ m(s, {
1952
1957
  method: "POST",
1953
1958
  headers: {
1954
1959
  "Content-type": "application/json;charset=UTF-8",
1955
1960
  Accept: "application/json",
1956
- "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1961
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1957
1962
  },
1958
- data: JSON.stringify(o),
1959
- type: "json",
1960
- onComplete(c) {
1961
- const d = c;
1962
- d.msg = d.result.message, n && n(d);
1963
+ data: JSON.stringify(i),
1964
+ onComplete(o) {
1965
+ const a = { response: o };
1966
+ a.msg = a.result.message, t && t(a);
1963
1967
  },
1964
- onFailure(c) {
1965
- const d = c;
1966
- d.status = headers.status, d.response = headers.errormsg, s && s(d);
1968
+ onFailure(o) {
1969
+ const a = o;
1970
+ a.status = headers.status, a.response = headers.errormsg, n && n(a);
1967
1971
  }
1968
1972
  });
1969
1973
  });
@@ -2359,7 +2363,7 @@ export {
2359
2363
  D as UUID,
2360
2364
  Ot as _3DSearch_usersGroup,
2361
2365
  Re as _3DSpace_Create_Doc,
2362
- Pe as _3DSpace_Update_Doc,
2366
+ xe as _3DSpace_Update_Doc,
2363
2367
  Ke as _3DSpace_bookmark_addSubsciptions,
2364
2368
  Ee as _3DSpace_bookmark_newWorkspace,
2365
2369
  b as _3DSpace_csrf,
@@ -2367,13 +2371,13 @@ export {
2367
2371
  Z as _3DSpace_download_multidoc,
2368
2372
  M as _3DSpace_file_update,
2369
2373
  Q as _3DSpace_file_update_csr,
2370
- xe as _3DSpace_file_url_csr,
2371
- U as _3DSpace_get_csrf,
2374
+ Fe as _3DSpace_file_url_csr,
2375
+ k as _3DSpace_get_csrf,
2372
2376
  L as _3DSpace_get_docInfo,
2373
2377
  ee as _3DSpace_get_downloadTicket_multidoc,
2374
- Fe as _3DSpace_get_multiDocInfo,
2378
+ je as _3DSpace_get_multiDocInfo,
2375
2379
  $ as _3DSpace_get_securityContexts,
2376
- F as _3DSpace_get_ticket,
2380
+ j as _3DSpace_get_ticket,
2377
2381
  Ge as _3DSpace_lifecycle_changeRevision,
2378
2382
  Le as _3DSpace_lifecycle_changeState,
2379
2383
  Me as _3DSpace_lifecycle_getGraph,
@@ -2387,13 +2391,13 @@ export {
2387
2391
  tt as _3DSwym_getFamiliarPeople,
2388
2392
  st as _3DSwym_getIdeaStatusMaturity,
2389
2393
  oe as _3DSwym_getMembersCommunity,
2390
- rt as _3DSwym_getSWYMIdea,
2394
+ rt as _3DSwym_getOneIdea,
2391
2395
  ct as _3DSwym_get_AllSWYMIdeas,
2396
+ w as _3DSwym_get_Token,
2392
2397
  dt as _3DSwym_get_currentUser,
2393
2398
  pt as _3DSwym_get_findUser,
2394
- w as _3DSwym_get_version,
2395
- at as _3DSwym_postIdea,
2396
- P as _3DSwym_sendMessageData,
2399
+ at as _3DSwym_postIdeaTemplate,
2400
+ x as _3DSwym_sendMessageData,
2397
2401
  $e as _AppMngt_get_info_user,
2398
2402
  Oe as _AppMngt_get_users,
2399
2403
  _t as _Iterop_AddOrRemoveRows,
@@ -2429,17 +2433,17 @@ export {
2429
2433
  Ne as getComplementUG,
2430
2434
  Be as getDataFrom3DSpace,
2431
2435
  he as getDataFromGouvFr,
2432
- He as getDatasByTenant,
2433
- ze as getDatasFrom3DSpace,
2436
+ ze as getDatasByTenant,
2437
+ He as getDatasFrom3DSpace,
2434
2438
  We as getDownloadDocument,
2435
2439
  Ze as getInfoDocTags,
2436
2440
  Ie as getUserGroupsList,
2437
2441
  X as getUsersGroupRules,
2438
2442
  Ye as get_3DSpace_csrf,
2439
- Ue as patchUserGroups,
2440
- ke as patchUserGroupsControl,
2443
+ ke as patchUserGroups,
2444
+ Ue as patchUserGroupsControl,
2441
2445
  Xe as pushDataIn3DSpace,
2442
- je as readUserGroupControl,
2446
+ Pe as readUserGroupControl,
2443
2447
  Qe as removeTagToDoc,
2444
2448
  bt as sayHello,
2445
2449
  Se as updateEvent