@beam3_dev/api_module 0.0.46 → 0.0.48

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,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as b } from "luxon";
3
- import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
- function j() {
3
+ import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
4
+ function A() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -118,7 +118,7 @@ function pe(e, t = void 0) {
118
118
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
119
  let s;
120
120
  s === void 0 && (s = n.createProxy({
121
- widgetId: A.id,
121
+ widgetId: j.id,
122
122
  filteringMode: "WithFilteringServices"
123
123
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
124
  });
@@ -132,7 +132,7 @@ async function fe(e, t = void 0, n = void 0) {
132
132
  O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
134
  (s) => {
135
- (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
135
+ (!e || e === "") && (e = j.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
136
  s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
@@ -260,7 +260,7 @@ function ye(e, t, n = void 0, s = void 0) {
260
260
  }
261
261
  });
262
262
  }
263
- function J(e, t = void 0, n = void 0) {
263
+ function E(e, t = void 0, n = void 0) {
264
264
  const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
@@ -288,7 +288,7 @@ function we(e, t = void 0, n = void 0) {
288
288
  const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
289
  if (i && Object.keys(i).length > 0) {
290
290
  const g = m.filter((_) => _.owner === i.email), h = m.filter((_) => _.members.includes(i.email)), S = g.concat(h);
291
- u.iam = S, u.UG = m, u.iamMember = h, J(
291
+ u.iam = S, u.UG = m, u.iamMember = h, E(
292
292
  e,
293
293
  (_) => {
294
294
  u.rules = _, t && t(u);
@@ -369,7 +369,7 @@ function Ne(e, t, n = void 0, s = void 0) {
369
369
  }
370
370
  });
371
371
  }
372
- async function E(e, t = void 0, n = void 0, s = void 0) {
372
+ async function J(e, t = void 0, n = void 0, s = void 0) {
373
373
  const i = e.space;
374
374
  if (t === void 0) {
375
375
  console.log("Le paramètre docid est obligatoire");
@@ -417,24 +417,20 @@ function C(e, t = void 0, n = void 0) {
417
417
  n && n("ERROR : url du 3DSpace non défini.");
418
418
  }
419
419
  function D(e, t, n = void 0, s = void 0) {
420
- let i = e.space + `/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
420
+ let i = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
421
421
  k(
422
422
  e,
423
423
  (c) => {
424
- f(i, {
424
+ console.log("onComplete / ☠️ info => ", c), f(i, {
425
425
  method: "PUT",
426
426
  headers: {
427
427
  ENO_CSRF_TOKEN: e.token
428
428
  },
429
429
  onComplete(o) {
430
430
  let a = JSON.parse(o);
431
- if (a.success === !0)
432
- try {
433
- const r = a.data[0].dataelements.ticketURL;
434
- n && n(r);
435
- } catch (r) {
436
- s && s(r);
437
- }
431
+ console.log("_3DSpace_file_url() / ☠️ info => ", a);
432
+ const r = a.data[0].dataelements.ticketURL;
433
+ n && n(r);
438
434
  },
439
435
  onFailure(o, a) {
440
436
  console.log("☠️ error => ", o, a), s && s(o, a);
@@ -453,7 +449,7 @@ function be(e, t, n, s = void 0, i = void 0) {
453
449
  },
454
450
  onComplete(o) {
455
451
  let a = JSON.parse(o);
456
- if (a.success === !0)
452
+ if (console.log("☠️ info => ", a), a.success === !0)
457
453
  try {
458
454
  const r = a.data[0].dataelements.ticketURL;
459
455
  s && s(r);
@@ -589,7 +585,7 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
589
585
  }
590
586
  ]
591
587
  },
592
- tempId: j()
588
+ tempId: A()
593
589
  }
594
590
  ]
595
591
  }),
@@ -979,7 +975,7 @@ function Re(e, t, n, s = void 0, i = void 0) {
979
975
  });
980
976
  }
981
977
  //!SECTION
982
- async function Ae(e, t, n) {
978
+ async function je(e, t, n) {
983
979
  const s = `${e.space}/resources/v1/application/CSRF`;
984
980
  f(s, {
985
981
  onComplete(i) {
@@ -990,7 +986,7 @@ async function Ae(e, t, n) {
990
986
  }
991
987
  });
992
988
  }
993
- function je(e, t = void 0, n = void 0) {
989
+ function Ae(e, t = void 0, n = void 0) {
994
990
  const s = {
995
991
  base: `${e.space}`,
996
992
  uri: "/resources/bps/cspaces",
@@ -1186,7 +1182,7 @@ function Le(e, t, n = void 0, s = void 0) {
1186
1182
  JSON.parse(u);
1187
1183
  const m = {};
1188
1184
  setTimeout(() => {
1189
- E(
1185
+ J(
1190
1186
  e,
1191
1187
  o,
1192
1188
  (g) => {
@@ -1223,7 +1219,7 @@ function q(e, t, n = void 0, s = void 0) {
1223
1219
  }, o = `${c.baseUrl}${c.uri}`, a = {
1224
1220
  "Content-Type": "application/json",
1225
1221
  Accept: "application/json,text/javascript,*/*"
1226
- }, r = j(), d = {
1222
+ }, r = A(), d = {
1227
1223
  with_indexing_date: !0,
1228
1224
  with_synthesis: !0,
1229
1225
  with_nls: !1,
@@ -1298,7 +1294,7 @@ function q(e, t, n = void 0, s = void 0) {
1298
1294
  }
1299
1295
  });
1300
1296
  }
1301
- function Je(e, t, n = void 0, s = void 0) {
1297
+ function Ee(e, t, n = void 0, s = void 0) {
1302
1298
  const { objId: i, pred: c, tag: o } = t, a = {
1303
1299
  uri: "/resources/6w/tags",
1304
1300
  otpCTX: "SecurityContext=preferred",
@@ -1334,7 +1330,7 @@ function Je(e, t, n = void 0, s = void 0) {
1334
1330
  }
1335
1331
  });
1336
1332
  }
1337
- function Ee(e, t = "", n = void 0, s = void 0) {
1333
+ function Je(e, t = "", n = void 0, s = void 0) {
1338
1334
  const { space: i } = e;
1339
1335
  if (t === "")
1340
1336
  return;
@@ -1887,7 +1883,7 @@ function Ze(e) {
1887
1883
  return console.log(t), t;
1888
1884
  }
1889
1885
  export {
1890
- j as UUID,
1886
+ A as UUID,
1891
1887
  ke as _3DSpace_Create_Doc,
1892
1888
  C as _3DSpace_csrf,
1893
1889
  I as _3DSpace_download_doc,
@@ -1897,7 +1893,7 @@ export {
1897
1893
  D as _3DSpace_file_url,
1898
1894
  be as _3DSpace_file_url_csr,
1899
1895
  k as _3DSpace_get_csrf,
1900
- E as _3DSpace_get_docInfo,
1896
+ J as _3DSpace_get_docInfo,
1901
1897
  X as _3DSpace_get_downloadTicket_multidoc,
1902
1898
  N as _3DSpace_get_securityContexts,
1903
1899
  Re as _3DSpace_lifecycle_changeRevision,
@@ -1935,8 +1931,8 @@ export {
1935
1931
  B as dataMixing,
1936
1932
  Te as deleteUserGroups,
1937
1933
  re as findAdresse,
1938
- je as getAllContextSecurity,
1939
- Ae as getCSRFToken,
1934
+ Ae as getAllContextSecurity,
1935
+ je as getCSRFToken,
1940
1936
  oe as getCommunes,
1941
1937
  ye as getComplementUG,
1942
1938
  Ie as getDataFrom3DSpace,
@@ -1944,15 +1940,15 @@ export {
1944
1940
  Me as getDatasByTenant,
1945
1941
  V as getDatasFrom3DSpace,
1946
1942
  ve as getDownloadDocument,
1947
- Ee as getInfoDocTags,
1943
+ Je as getInfoDocTags,
1948
1944
  we as getUserGroupsList,
1949
- J as getUsersGroupRules,
1945
+ E as getUsersGroupRules,
1950
1946
  Pe as get_3DSpace_csrf,
1951
1947
  Ce as patchUserGroups,
1952
1948
  Oe as patchUserGroupsControl,
1953
1949
  xe as pushDataIn3DSpace,
1954
1950
  Ne as readUserGroupControl,
1955
- Je as removeTagToDoc,
1951
+ Ee as removeTagToDoc,
1956
1952
  Ze as sayHello,
1957
1953
  de as updateEvent
1958
1954
  };