@beam3_dev/api_module 0.0.212 → 0.0.214

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,5 +1,5 @@
1
1
  import { v4 as B } from "uuid";
2
- import { DateTime as N } from "luxon";
2
+ import { DateTime as I } from "luxon";
3
3
  import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
4
4
  function D() {
5
5
  return B();
@@ -66,7 +66,7 @@ async function he(e, t = void 0, s = void 0) {
66
66
  });
67
67
  }
68
68
  async function ye(e, t = V) {
69
- let s = N.now().year;
69
+ let s = I.now().year;
70
70
  const n = e, i = [], r = (a) => {
71
71
  for (let c in a)
72
72
  i.push({ date: c, comment: a[c] });
@@ -89,11 +89,11 @@ async function ye(e, t = V) {
89
89
  } : n;
90
90
  for (let c of i)
91
91
  a.events.findIndex(
92
- (p) => p.start === N.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
92
+ (p) => p.start === I.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
94
94
  name: "Férié : " + c.comment,
95
- start: N.fromISO(c.date).toISODate(),
96
- end: N.fromISO(c.date).toISODate(),
95
+ start: I.fromISO(c.date).toISODate(),
96
+ end: I.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -181,7 +181,7 @@ async function Te(e, t = void 0, s = void 0) {
181
181
  }
182
182
  );
183
183
  }
184
- function q() {
184
+ function Y() {
185
185
  let e = {};
186
186
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
187
187
  const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
@@ -288,7 +288,7 @@ const j = {
288
288
  "Content-Type": "application/json",
289
289
  Accept: "application/json,text/javascript,*/*"
290
290
  };
291
- function Ne(e, t, s = void 0, n = void 0) {
291
+ function Ie(e, t, s = void 0, n = void 0) {
292
292
  const { space: i, currentUser: r } = e, a = `${i}${{
293
293
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
294
294
  }.URIUGr}`, c = {
@@ -317,7 +317,7 @@ function Ne(e, t, s = void 0, n = void 0) {
317
317
  }
318
318
  });
319
319
  }
320
- function Ie(e, t, s = void 0, n = void 0) {
320
+ function Ne(e, t, s = void 0, n = void 0) {
321
321
  const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
322
322
  m(d, {
323
323
  opts: {
@@ -336,7 +336,7 @@ function Ie(e, t, s = void 0, n = void 0) {
336
336
  }
337
337
  });
338
338
  }
339
- function Y(e, t = void 0, s = void 0) {
339
+ function q(e, t = void 0, s = void 0) {
340
340
  const { space: n, tenant: i } = e, r = n, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
341
341
  method: "GET",
342
342
  Accept: "application/json,*/*,test/javascript"
@@ -352,7 +352,7 @@ function Y(e, t = void 0, s = void 0) {
352
352
  }
353
353
  });
354
354
  }
355
- function ke(e, t = void 0, s = void 0) {
355
+ function Ae(e, t = void 0, s = void 0) {
356
356
  const { space: n, currentUser: i } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
357
357
  "Content-Type": "application/json",
358
358
  Accept: "application/json,text/javascript,*/*"
@@ -364,7 +364,7 @@ function ke(e, t = void 0, s = void 0) {
364
364
  const u = JSON.parse(p), f = {}, l = u.groups.filter((g) => g.uri.startsWith("uuid:"));
365
365
  if (i && Object.keys(i).length > 0) {
366
366
  const g = l.filter((S) => S.owner === i.email), h = l.filter((S) => S.members.includes(i.email)), y = g.concat(h);
367
- f.iam = y, f.UG = l, f.iamMember = h, Y(
367
+ f.iam = y, f.UG = l, f.iamMember = h, q(
368
368
  e,
369
369
  (S) => {
370
370
  f.rules = S, t && t(f);
@@ -383,7 +383,7 @@ function ke(e, t = void 0, s = void 0) {
383
383
  console.log(p);
384
384
  }
385
385
  }
386
- function Ae(e, t) {
386
+ function ke(e, t) {
387
387
  const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
388
388
  m(i, {
389
389
  method: "DELETE"
@@ -458,7 +458,7 @@ async function H(e, t, s) {
458
458
  });
459
459
  }
460
460
  }
461
- var I = {};
461
+ var N = {};
462
462
  function z(e, t) {
463
463
  return Object.prototype.hasOwnProperty.call(e, t);
464
464
  }
@@ -497,8 +497,8 @@ var Q = function(e, t, s, n) {
497
497
  }).join(t) : r + encodeURIComponent(v(e[i]));
498
498
  }).filter(Boolean).join(t) : n ? encodeURIComponent(v(n)) + s + encodeURIComponent(v(e)) : "";
499
499
  };
500
- I.decode = I.parse = Q;
501
- I.encode = I.stringify = Z;
500
+ N.decode = N.parse = Q;
501
+ N.encode = N.stringify = Z;
502
502
  async function L(e, t = void 0, s = void 0, n = void 0) {
503
503
  const i = e.space;
504
504
  if (t === void 0) {
@@ -522,7 +522,7 @@ async function xe(e, t = void 0, s = void 0, n = void 0) {
522
522
  console.log("Le paramètre docids est obligatoire");
523
523
  return;
524
524
  }
525
- let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
525
+ let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = N.stringify({
526
526
  $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
527
527
  });
528
528
  m(r, {
@@ -540,7 +540,7 @@ async function xe(e, t = void 0, s = void 0, n = void 0) {
540
540
  }
541
541
  });
542
542
  }
543
- function k(e, t = void 0, s = void 0) {
543
+ function A(e, t = void 0, s = void 0) {
544
544
  if (e.objID && e.objID !== "") {
545
545
  let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
546
546
  m(n, {
@@ -584,7 +584,7 @@ function b(e, t = void 0, s = void 0) {
584
584
  }
585
585
  function U(e, t = void 0, s = void 0) {
586
586
  let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
587
- k(
587
+ A(
588
588
  e,
589
589
  (i) => {
590
590
  m(n, {
@@ -639,7 +639,7 @@ function M(e, t, s, n, i, r = void 0, o = void 0) {
639
639
  r,
640
640
  o
641
641
  );
642
- e.token ? a() : k(
642
+ e.token ? a() : A(
643
643
  e,
644
644
  t,
645
645
  (c) => {
@@ -802,7 +802,7 @@ async function De(e, t, s, n, i = void 0, r = void 0) {
802
802
  });
803
803
  }
804
804
  }
805
- function A(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1) {
805
+ function k(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1) {
806
806
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
807
807
  m(a, {
808
808
  method: "GET",
@@ -1037,7 +1037,7 @@ function Je(e, t, s = void 0, n = void 0) {
1037
1037
  return new Promise((i) => {
1038
1038
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1039
1039
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1040
- A(
1040
+ k(
1041
1041
  e.space,
1042
1042
  "ESPACE COMMUN",
1043
1043
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1078,7 +1078,7 @@ function Ge(e, t, s = void 0, n = void 0) {
1078
1078
  return new Promise((i) => {
1079
1079
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1080
1080
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1081
- A(
1081
+ k(
1082
1082
  e.space,
1083
1083
  "ESPACE COMMUN",
1084
1084
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1125,7 +1125,7 @@ function Ee(e, t, s, n = void 0, i = void 0) {
1125
1125
  return new Promise((r) => {
1126
1126
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1127
1127
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1128
- A(
1128
+ k(
1129
1129
  e.space,
1130
1130
  "ESPACE COMMUN",
1131
1131
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -1275,9 +1275,9 @@ async function Xe(e, t, s = void 0, n = void 0) {
1275
1275
  });
1276
1276
  });
1277
1277
  }
1278
- function qe(e, t, s, n = void 0, i = void 0) {
1278
+ function Ye(e, t, s, n = void 0, i = void 0) {
1279
1279
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1280
- k(
1280
+ A(
1281
1281
  e,
1282
1282
  s,
1283
1283
  (o) => {
@@ -1300,8 +1300,8 @@ function qe(e, t, s, n = void 0, i = void 0) {
1300
1300
  }
1301
1301
  let G, E;
1302
1302
  const x = [];
1303
- async function Ye(e, t = void 0, s = void 0) {
1304
- e.objID && e.objID !== "" ? k(
1303
+ async function qe(e, t = void 0, s = void 0) {
1304
+ e.objID && e.objID !== "" ? A(
1305
1305
  e,
1306
1306
  (n) => {
1307
1307
  t && t(n);
@@ -2071,7 +2071,44 @@ function pt(e, t, s) {
2071
2071
  });
2072
2072
  }
2073
2073
  function ut(e, t, s = void 0, n = void 0) {
2074
- w(e, (i) => {
2074
+ const { space: i } = e;
2075
+ let { community_id: r, limit: o, page: a } = t;
2076
+ const c = [], d = 1;
2077
+ let p = 2;
2078
+ a || (a = d), o || (o = 100);
2079
+ const u = {
2080
+ uri: "/api/idea/list",
2081
+ comId: `/community_id/${r}`,
2082
+ limit: `/limit/${o}`,
2083
+ page: `/page/${a}`
2084
+ };
2085
+ let f = `${i}${u.uri}${u.comId}${u.limit}${u.page}`;
2086
+ w(e, (l) => {
2087
+ const g = (h) => {
2088
+ m(h, {
2089
+ method: "GET",
2090
+ headers: {
2091
+ "X-DS-SWYM-CSRFTOKEN": l.result.ServerToken
2092
+ },
2093
+ onComplete(y) {
2094
+ const S = { response: JSON.parse(y) };
2095
+ if (p = Math.ceil(Number(S.response.nb_result) / 100), y && p >= a) {
2096
+ if (a++, c.push(S.response.result), p < a)
2097
+ return;
2098
+ u.page = `/page/${a}`, h = `${i}${u.uri}${u.comId}${u.limit}${u.page}`, g(h);
2099
+ }
2100
+ if (s && p <= a) {
2101
+ thisIsTheEnd = !0, s(c);
2102
+ return;
2103
+ }
2104
+ },
2105
+ onFailure(y, S) {
2106
+ const _ = y;
2107
+ _.status = S.status, _.response = S.errormsg, n && n(_);
2108
+ }
2109
+ });
2110
+ };
2111
+ g(f);
2075
2112
  });
2076
2113
  }
2077
2114
  function ue(e) {
@@ -2359,13 +2396,13 @@ function vt(e) {
2359
2396
  const t = "Hello " + e;
2360
2397
  return console.log(t), t;
2361
2398
  }
2362
- function Nt(e, t = void 0, s = void 0) {
2399
+ function It(e, t = void 0, s = void 0) {
2363
2400
  return console.log("credentials", e), new Promise((n) => {
2364
2401
  if (e.token === "" && b(e), !e.space || e.space === "") {
2365
- const o = q();
2402
+ const o = Y();
2366
2403
  console.log("platformeInfo", o);
2367
2404
  }
2368
- A(
2405
+ k(
2369
2406
  e,
2370
2407
  "Common space",
2371
2408
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -2376,7 +2413,7 @@ function Nt(e, t = void 0, s = void 0) {
2376
2413
  },
2377
2414
  !0
2378
2415
  );
2379
- const i = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2416
+ const i = I.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2380
2417
  m(r, {
2381
2418
  onComplete(o) {
2382
2419
  if (Array.isArray(JSON.parse(o))) {
@@ -2440,7 +2477,7 @@ function Nt(e, t = void 0, s = void 0) {
2440
2477
  }
2441
2478
  export {
2442
2479
  D as UUID,
2443
- Nt as _3DSearch_usersGroup,
2480
+ It as _3DSearch_usersGroup,
2444
2481
  De as _3DSpace_Create_Doc,
2445
2482
  Re as _3DSpace_Update_Doc,
2446
2483
  Be as _3DSpace_bookmark_addSubsciptions,
@@ -2451,11 +2488,11 @@ export {
2451
2488
  M as _3DSpace_file_update,
2452
2489
  ee as _3DSpace_file_update_csr,
2453
2490
  Pe as _3DSpace_file_url_csr,
2454
- k as _3DSpace_get_csrf,
2491
+ A as _3DSpace_get_csrf,
2455
2492
  L as _3DSpace_get_docInfo,
2456
2493
  ne as _3DSpace_get_downloadTicket_multidoc,
2457
2494
  xe as _3DSpace_get_multiDocInfo,
2458
- A as _3DSpace_get_securityContexts,
2495
+ k as _3DSpace_get_securityContexts,
2459
2496
  U as _3DSpace_get_ticket,
2460
2497
  Ee as _3DSpace_lifecycle_changeRevision,
2461
2498
  Me as _3DSpace_lifecycle_changeState,
@@ -2492,7 +2529,7 @@ export {
2492
2529
  wt as _Iterop_getOneBusinessTableRows,
2493
2530
  ht as _Iterop_jwtUser,
2494
2531
  Ct as _Iterop_runProcess,
2495
- q as _getPlateformInfos,
2532
+ Y as _getPlateformInfos,
2496
2533
  Te as _getPlatformServices,
2497
2534
  C as _getServiceUrl,
2498
2535
  be as _getServiceUrl_3DPassport,
@@ -2505,26 +2542,26 @@ export {
2505
2542
  W as chunkArray,
2506
2543
  Oe as compass_getListAdditionalApps,
2507
2544
  V as couleurs,
2508
- Ne as createUserGroups,
2545
+ Ie as createUserGroups,
2509
2546
  se as dataMixing,
2510
- Ae as deleteUserGroups,
2547
+ ke as deleteUserGroups,
2511
2548
  he as findAdresse,
2512
2549
  Ve as getAllContextSecurity,
2513
2550
  H as getCSRFToken,
2514
2551
  ge as getCommunes,
2515
- Ie as getComplementUG,
2552
+ Ne as getComplementUG,
2516
2553
  We as getDataFrom3DSpace,
2517
2554
  ye as getDataFromGouvFr,
2518
2555
  He as getDatasByTenant,
2519
2556
  ze as getDatasFrom3DSpace,
2520
2557
  Xe as getDownloadDocument,
2521
2558
  et as getInfoDocTags,
2522
- ke as getUserGroupsList,
2523
- Y as getUsersGroupRules,
2524
- Ye as get_3DSpace_csrf,
2559
+ Ae as getUserGroupsList,
2560
+ q as getUsersGroupRules,
2561
+ qe as get_3DSpace_csrf,
2525
2562
  Fe as patchUserGroups,
2526
2563
  je as patchUserGroupsControl,
2527
- qe as pushDataIn3DSpace,
2564
+ Ye as pushDataIn3DSpace,
2528
2565
  Ue as readUserGroupControl,
2529
2566
  Ze as removeTagToDoc,
2530
2567
  vt as sayHello,