@beam3_dev/api_module 0.0.110 → 0.0.112

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
@@ -167,11 +167,11 @@ function E(e, t = void 0, n = void 0) {
167
167
  f(s, {
168
168
  onComplete(i) {
169
169
  const r = typeof i == "string" ? JSON.parse(i) : i;
170
- if (console.log("_getServiceUrl", r), r && "platforms" in r) {
170
+ if (r && "platforms" in r) {
171
171
  const o = r.platforms.find(
172
172
  (a) => a.id === e.tenant.toUpperCase()
173
173
  );
174
- console.log("listServiceUrl", o), t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
174
+ t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
175
175
  } else
176
176
  n && n("_getServiceUrl return oResponse = undefined");
177
177
  },
@@ -393,7 +393,7 @@ function Ne(e, t, n, s = void 0, i = void 0) {
393
393
  }
394
394
  });
395
395
  }
396
- function ke(e, t, n = void 0, s = void 0) {
396
+ function ve(e, t, n = void 0, s = void 0) {
397
397
  const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
398
  f(o, {
399
399
  opts: {
@@ -441,7 +441,7 @@ async function X(e, t = void 0, n = void 0, s = void 0) {
441
441
  }
442
442
  });
443
443
  }
444
- function k(e, t = void 0, n = void 0) {
444
+ function v(e, t = void 0, n = void 0) {
445
445
  if (e.objID && e.objID !== "") {
446
446
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
447
447
  f(s, {
@@ -485,7 +485,7 @@ function T(e, t = void 0, n = void 0) {
485
485
  }
486
486
  function A(e, t = void 0, n = void 0) {
487
487
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
488
- k(
488
+ v(
489
489
  e,
490
490
  (i) => {
491
491
  f(s, {
@@ -507,7 +507,7 @@ function A(e, t = void 0, n = void 0) {
507
507
  }
508
508
  );
509
509
  }
510
- function ve(e, t, n, s = void 0, i = void 0) {
510
+ function ke(e, t, n, s = void 0, i = void 0) {
511
511
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
512
512
  n || (n = e.token), f(r, {
513
513
  method: "PUT",
@@ -530,7 +530,7 @@ function ve(e, t, n, s = void 0, i = void 0) {
530
530
  });
531
531
  }
532
532
  function V(e, t, n, s, i, r = void 0, o = void 0) {
533
- k(
533
+ v(
534
534
  e,
535
535
  t,
536
536
  (a) => {
@@ -622,7 +622,7 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
622
622
  data: d,
623
623
  onComplete(C) {
624
624
  if (c !== "" && a !== "") {
625
- const v = {
625
+ const k = {
626
626
  method: "POST",
627
627
  headers: {
628
628
  ENO_CSRF_TOKEN: a,
@@ -653,7 +653,7 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
653
653
  onComplete: _,
654
654
  onFailure: y
655
655
  };
656
- c !== "" && f(p.url_Post, v);
656
+ c !== "" && f(p.url_Post, k);
657
657
  } else
658
658
  console.warn("le store est vide");
659
659
  },
@@ -662,9 +662,9 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
662
662
  function _(C) {
663
663
  console.log("Success -- response ", C.data[0]), i && i(C);
664
664
  }
665
- function y(C, v) {
665
+ function y(C, k) {
666
666
  console.log("Erreur -- response ", C, `
667
- headers `, v), r && r(C);
667
+ headers `, k), r && r(C);
668
668
  }
669
669
  f(h.ticketURL, S);
670
670
  }
@@ -1091,7 +1091,7 @@ function Re(e, t = void 0, n = void 0) {
1091
1091
  }
1092
1092
  });
1093
1093
  }
1094
- function Pe(e, t, n, s) {
1094
+ function xe(e, t, n, s) {
1095
1095
  A(
1096
1096
  e.space,
1097
1097
  t,
@@ -1108,7 +1108,7 @@ function Pe(e, t, n, s) {
1108
1108
  }
1109
1109
  );
1110
1110
  }
1111
- async function xe(e, t, n = void 0, s = void 0) {
1111
+ async function Pe(e, t, n = void 0, s = void 0) {
1112
1112
  return new Promise((i) => {
1113
1113
  A(e, t, (r) => {
1114
1114
  f(r, {
@@ -1122,7 +1122,7 @@ async function xe(e, t, n = void 0, s = void 0) {
1122
1122
  }
1123
1123
  function Me(e, t, n, s = void 0, i = void 0) {
1124
1124
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1125
- k(
1125
+ v(
1126
1126
  e,
1127
1127
  n,
1128
1128
  (o) => {
@@ -1143,10 +1143,10 @@ function Me(e, t, n, s = void 0, i = void 0) {
1143
1143
  }
1144
1144
  );
1145
1145
  }
1146
- let R, P;
1146
+ let R, x;
1147
1147
  const $ = [];
1148
1148
  async function Le(e, t = void 0, n = void 0) {
1149
- e.objID && e.objID !== "" ? k(
1149
+ e.objID && e.objID !== "" ? v(
1150
1150
  e,
1151
1151
  (s) => {
1152
1152
  t && t(s);
@@ -1187,7 +1187,7 @@ function Ee(e, t = void 0, n = void 0) {
1187
1187
  e,
1188
1188
  i.objID,
1189
1189
  (o) => {
1190
- s.push({ [i.name]: o }), i.name === "dbProjets" && (R = o.affaires.map((a) => a.objectID), q(e, P)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1190
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (R = o.affaires.map((a) => a.objectID), q(e, x)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1191
1191
  }
1192
1192
  );
1193
1193
  });
@@ -1198,7 +1198,7 @@ function q(e, t, n = void 0, s = void 0) {
1198
1198
  R,
1199
1199
  (i) => {
1200
1200
  const r = [...t];
1201
- r.find((o) => o.objectID === i.objectId).data = i.data, P = r, $.push(i.data), n && n($);
1201
+ r.find((o) => o.objectID === i.objectId).data = i.data, x = r, $.push(i.data), n && n($);
1202
1202
  },
1203
1203
  (i) => {
1204
1204
  s && (s(i), console.log(i));
@@ -1212,7 +1212,7 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
1212
1212
  "usersgroup",
1213
1213
  "3dplan",
1214
1214
  "dashboard"
1215
- ], x = {
1215
+ ], P = {
1216
1216
  how: "ds6w:how",
1217
1217
  what: "ds6w:what",
1218
1218
  when: "ds6w:when",
@@ -1238,7 +1238,7 @@ function Ge(e, t, n = void 0, s = void 0) {
1238
1238
  uri: `pid://${o}`
1239
1239
  }
1240
1240
  ],
1241
- predicate: x[a],
1241
+ predicate: P[a],
1242
1242
  object: {
1243
1243
  literal: c
1244
1244
  }
@@ -1381,7 +1381,7 @@ function Ke(e, t, n = void 0, s = void 0) {
1381
1381
  uri: `pid://${i}`
1382
1382
  }
1383
1383
  ],
1384
- predicate: x[r],
1384
+ predicate: P[r],
1385
1385
  object: {
1386
1386
  literal: o
1387
1387
  }
@@ -1954,10 +1954,19 @@ function tt(e, t, n = void 0, s = void 0) {
1954
1954
  function nt(e, t = void 0, n = void 0) {
1955
1955
  e.tenant && E(e, (s) => {
1956
1956
  console.log("serviceUrls", s);
1957
- const i = s.find((a) => a.id === "3dpassport")?.url, r = s.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
1957
+ const i = s.services.find((a) => a.id === "3dpassport")?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
1958
1958
  f(o, {
1959
- onComplete(a, c) {
1960
- console.log("response", a), console.log("headers", c), t && t(c);
1959
+ onComplete(a) {
1960
+ console.log("response", a);
1961
+ const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
1962
+ c ? f(c, {
1963
+ onComplete(d) {
1964
+ t && t(d);
1965
+ },
1966
+ onFailure(d) {
1967
+ n && n(d);
1968
+ }
1969
+ }) : n && n("x3ds_service_redirect_url is undefined");
1961
1970
  },
1962
1971
  onFailure(a) {
1963
1972
  n && n(a);
@@ -2058,8 +2067,8 @@ export {
2058
2067
  B as _3DSpace_download_multidoc,
2059
2068
  V as _3DSpace_file_update,
2060
2069
  W as _3DSpace_file_update_csr,
2061
- ve as _3DSpace_file_url_csr,
2062
- k as _3DSpace_get_csrf,
2070
+ ke as _3DSpace_file_url_csr,
2071
+ v as _3DSpace_get_csrf,
2063
2072
  X as _3DSpace_get_docInfo,
2064
2073
  Y as _3DSpace_get_downloadTicket_multidoc,
2065
2074
  b as _3DSpace_get_securityContexts,
@@ -2106,11 +2115,11 @@ export {
2106
2115
  K as getCSRFToken,
2107
2116
  ce as getCommunes,
2108
2117
  Ce as getComplementUG,
2109
- Pe as getDataFrom3DSpace,
2118
+ xe as getDataFrom3DSpace,
2110
2119
  le as getDataFromGouvFr,
2111
2120
  Je as getDatasByTenant,
2112
2121
  Ee as getDatasFrom3DSpace,
2113
- xe as getDownloadDocument,
2122
+ Pe as getDownloadDocument,
2114
2123
  Xe as getInfoDocTags,
2115
2124
  Te as getUserGroupsList,
2116
2125
  G as getUsersGroupRules,
@@ -2118,7 +2127,7 @@ export {
2118
2127
  be as patchUserGroups,
2119
2128
  Ne as patchUserGroupsControl,
2120
2129
  Me as pushDataIn3DSpace,
2121
- ke as readUserGroupControl,
2130
+ ve as readUserGroupControl,
2122
2131
  Ke as removeTagToDoc,
2123
2132
  st as sayHello,
2124
2133
  pe as updateEvent