@beam3_dev/api_module 0.0.218 → 0.0.220

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 I } from "luxon";
2
+ import { DateTime as N } from "luxon";
3
3
  import { requirejs as $, 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 = I.now().year;
69
+ let s = N.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 === I.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
92
+ (p) => p.start === N.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: I.fromISO(c.date).toISODate(),
96
- end: I.fromISO(c.date).toISODate(),
95
+ start: N.fromISO(c.date).toISODate(),
96
+ end: N.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -271,7 +271,7 @@ function $e(e, t = void 0, s = void 0) {
271
271
  }
272
272
  });
273
273
  }
274
- function ve(e, t, s = void 0, n = void 0) {
274
+ function Ie(e, t, s = void 0, n = void 0) {
275
275
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
276
276
  m(i, {
277
277
  onComplete(r, o, a) {
@@ -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 ve(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: {
@@ -478,7 +478,7 @@ var Q = function(e, t, s, n) {
478
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;
479
479
  }
480
480
  return i;
481
- }, N = function(e) {
481
+ }, v = function(e) {
482
482
  switch (typeof e) {
483
483
  case "string":
484
484
  return e;
@@ -491,11 +491,11 @@ var Q = function(e, t, s, n) {
491
491
  }
492
492
  }, Z = function(e, t, s, n) {
493
493
  return t = t || "&", s = s || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
494
- var r = encodeURIComponent(N(i)) + s;
494
+ var r = encodeURIComponent(v(i)) + s;
495
495
  return Array.isArray(e[i]) ? e[i].map(function(o) {
496
- return r + encodeURIComponent(N(o));
497
- }).join(t) : r + encodeURIComponent(N(e[i]));
498
- }).filter(Boolean).join(t) : n ? encodeURIComponent(N(n)) + s + encodeURIComponent(N(e)) : "";
496
+ return r + encodeURIComponent(v(o));
497
+ }).join(t) : r + encodeURIComponent(v(e[i]));
498
+ }).filter(Boolean).join(t) : n ? encodeURIComponent(v(n)) + s + encodeURIComponent(v(e)) : "";
499
499
  };
500
500
  k.decode = k.parse = Q;
501
501
  k.encode = k.stringify = Z;
@@ -780,11 +780,11 @@ async function De(e, t, s, n, i = void 0, r = void 0) {
780
780
  ]
781
781
  }),
782
782
  type: "json",
783
- onComplete(v) {
784
- i && i(v);
783
+ onComplete(I) {
784
+ i && i(I);
785
785
  },
786
- onFailure(v) {
787
- r && r(v);
786
+ onFailure(I) {
787
+ r && r(I);
788
788
  }
789
789
  };
790
790
  m(
@@ -2097,7 +2097,7 @@ function ut(e, t, s = void 0, n = void 0) {
2097
2097
  d.push(w.response.result);
2098
2098
  else {
2099
2099
  const b = w.response.result.find(
2100
- (v) => v.title.includes(c)
2100
+ (I) => I.title.includes(c)
2101
2101
  );
2102
2102
  if (b) {
2103
2103
  s(b);
@@ -2325,35 +2325,68 @@ async function Ct(e, t, s, n, i = void 0, r = void 0) {
2325
2325
  e.tenant && T(e, (o) => {
2326
2326
  o.services.find((c) => c.id === "businessprocess")?.url + "";
2327
2327
  const a = e.tenant.toLowerCase();
2328
- fetch(
2329
- `https://api.uixhome.fr/${a}/iterop/runtime/processes/${s}?t=${t}&b=${n}`,
2330
- {
2331
- method: "POST"
2332
- }
2333
- ).then((c) => c.json()).then((c) => {
2328
+ fetch(`https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${s}/?t=${t}&b=${n}`, {
2329
+ method: "POST"
2330
+ }).then((c) => c.json()).then((c) => {
2334
2331
  i && i(c);
2335
2332
  }).catch((c) => {
2336
- r && r(c);
2333
+ r && r(c, s, n);
2337
2334
  });
2338
2335
  });
2339
2336
  }
2340
- async function bt(e, t, s, n = [], i = [], r = void 0, o = void 0) {
2341
- e.tenant && T(e, (a) => {
2342
- a.services.find((p) => p.id === "businessprocess")?.url + "";
2343
- const c = encodeURIComponent(JSON.stringify({ rowsToRemove: i, rowsToAdd: n })), d = e.tenant.toLowerCase();
2337
+ async function bt(e, t, s, n, i, r = void 0, o = void 0) {
2338
+ if (e.tenant) {
2339
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${s}?t=${t}&c=${encodeURIComponent(
2340
+ n
2341
+ )}&b=${encodeURIComponent(i)}`;
2342
+ fetch(a, {
2343
+ method: "POST"
2344
+ }).then((c) => c.json()).then((c) => {
2345
+ c.url = a, r && r(c);
2346
+ }).catch((c) => {
2347
+ o && o({
2348
+ error: c,
2349
+ tableId: s,
2350
+ columns: n,
2351
+ body: i
2352
+ });
2353
+ });
2354
+ }
2355
+ }
2356
+ async function Tt(e, t, s, n, i = void 0, r = void 0) {
2357
+ if (e.tenant) {
2358
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${s}?t=${t}&b=${encodeURIComponent(
2359
+ n
2360
+ )}`;
2361
+ fetch(o, {
2362
+ method: "POST"
2363
+ }).then((a) => a.json()).then((a) => {
2364
+ console.log("_Iterop_updateBusinessTable | _Iterop_businessTableSearchInRows | fetch | onDone", n), i && i(a);
2365
+ }).catch((a) => {
2366
+ r && r({
2367
+ error: a,
2368
+ url: o
2369
+ });
2370
+ });
2371
+ }
2372
+ }
2373
+ async function Ot(e, t, s, n, i = void 0, r = void 0) {
2374
+ e.tenant && T(e, (o) => {
2375
+ o.services.find((c) => c.id === "businessprocess")?.url + "";
2376
+ const a = e.tenant.toLowerCase();
2344
2377
  fetch(
2345
- `https://api.uixhome.fr/${d}/iterop/businesstable/patch/rows/${s}/?t=${t}&b=${c}`,
2378
+ `https://api.uixhome.fr/${a}/iterop/runtime/processes/${s}?t=${t}&b=${n}`,
2346
2379
  {
2347
2380
  method: "POST"
2348
2381
  }
2349
- ).then((p) => p.json()).then((p) => {
2350
- r && r(p);
2351
- }).catch((p) => {
2352
- o && o(p);
2382
+ ).then((c) => c.json()).then((c) => {
2383
+ i && i(c);
2384
+ }).catch((c) => {
2385
+ r && r(c);
2353
2386
  });
2354
2387
  });
2355
2388
  }
2356
- async function Tt(e, t, s, n = void 0, i = void 0) {
2389
+ async function $t(e, t, s, n = void 0, i = void 0) {
2357
2390
  e.tenant && T(e, (r) => {
2358
2391
  r.services.find((a) => a.id === "businessprocess")?.url + "";
2359
2392
  const o = e.tenant.toLowerCase();
@@ -2369,7 +2402,7 @@ async function Tt(e, t, s, n = void 0, i = void 0) {
2369
2402
  });
2370
2403
  });
2371
2404
  }
2372
- async function Ot(e, t, s, n, i, r = void 0, o = void 0) {
2405
+ async function It(e, t, s, n, i, r = void 0, o = void 0) {
2373
2406
  e.tenant && T(e, (a) => {
2374
2407
  a.services.find((d) => d.id === "businessprocess")?.url + "";
2375
2408
  const c = e.tenant.toLowerCase();
@@ -2385,7 +2418,7 @@ async function Ot(e, t, s, n, i, r = void 0, o = void 0) {
2385
2418
  });
2386
2419
  });
2387
2420
  }
2388
- async function $t(e, t, s, n, i = void 0, r = void 0) {
2421
+ async function vt(e, t, s, n, i = void 0, r = void 0) {
2389
2422
  e.tenant && T(e, (o) => {
2390
2423
  o.services.find((c) => c.id === "businessprocess")?.url + "";
2391
2424
  const a = e.tenant.toLowerCase();
@@ -2401,11 +2434,11 @@ async function $t(e, t, s, n, i = void 0, r = void 0) {
2401
2434
  });
2402
2435
  });
2403
2436
  }
2404
- function vt(e) {
2437
+ function Nt(e) {
2405
2438
  const t = "Hello " + e;
2406
2439
  return console.log(t), t;
2407
2440
  }
2408
- function Nt(e, t = void 0, s = void 0) {
2441
+ function kt(e, t = void 0, s = void 0) {
2409
2442
  return console.log("credentials", e), new Promise((n) => {
2410
2443
  if (e.token === "" && O(e), !e.space || e.space === "") {
2411
2444
  const o = Y();
@@ -2422,7 +2455,7 @@ function Nt(e, t = void 0, s = void 0) {
2422
2455
  },
2423
2456
  !0
2424
2457
  );
2425
- const i = I.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2458
+ const i = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2426
2459
  m(r, {
2427
2460
  onComplete(o) {
2428
2461
  if (Array.isArray(JSON.parse(o))) {
@@ -2486,7 +2519,7 @@ function Nt(e, t = void 0, s = void 0) {
2486
2519
  }
2487
2520
  export {
2488
2521
  D as UUID,
2489
- Nt as _3DSearch_usersGroup,
2522
+ kt as _3DSearch_usersGroup,
2490
2523
  De as _3DSpace_Create_Doc,
2491
2524
  Re as _3DSpace_Update_Doc,
2492
2525
  Be as _3DSpace_bookmark_addSubsciptions,
@@ -2525,19 +2558,21 @@ export {
2525
2558
  rt as _3DSwym_postIdea,
2526
2559
  ot as _3DSwym_postIdeaTemplate,
2527
2560
  P as _3DSwym_sendMessageData,
2528
- ve as _AppMngt_get_info_user,
2561
+ Ie as _AppMngt_get_info_user,
2529
2562
  $e as _AppMngt_get_users,
2530
- bt as _Iterop_AddOrRemoveRows,
2563
+ Ct as _Iterop_AddOrRemoveRows,
2531
2564
  gt as _Iterop_Auth_CAS,
2532
- Tt as _Iterop_GetOneDependencyTable,
2565
+ $t as _Iterop_GetOneDependencyTable,
2533
2566
  yt as _Iterop_ListUsers,
2534
- Ot as _Iterop_PatchDependencyTable,
2535
- $t as _Iterop_PutDependencyTable,
2567
+ It as _Iterop_PatchDependencyTable,
2568
+ vt as _Iterop_PutDependencyTable,
2569
+ bt as _Iterop_businessTableSearchInRows,
2536
2570
  St as _Iterop_getAllBusinessTables,
2537
2571
  _t as _Iterop_getOneBusinessTable,
2538
2572
  wt as _Iterop_getOneBusinessTableRows,
2539
2573
  ht as _Iterop_jwtUser,
2540
- Ct as _Iterop_runProcess,
2574
+ Ot as _Iterop_runProcess,
2575
+ Tt as _Iterop_updateBusinessTable,
2541
2576
  Y as _getPlateformInfos,
2542
2577
  be as _getPlatformServices,
2543
2578
  T as _getServiceUrl,
@@ -2551,14 +2586,14 @@ export {
2551
2586
  W as chunkArray,
2552
2587
  Oe as compass_getListAdditionalApps,
2553
2588
  V as couleurs,
2554
- Ne as createUserGroups,
2589
+ ve as createUserGroups,
2555
2590
  se as dataMixing,
2556
2591
  Ae as deleteUserGroups,
2557
2592
  he as findAdresse,
2558
2593
  Ve as getAllContextSecurity,
2559
2594
  H as getCSRFToken,
2560
2595
  ge as getCommunes,
2561
- Ie as getComplementUG,
2596
+ Ne as getComplementUG,
2562
2597
  We as getDataFrom3DSpace,
2563
2598
  ye as getDataFromGouvFr,
2564
2599
  He as getDatasByTenant,
@@ -2573,7 +2608,7 @@ export {
2573
2608
  Ye as pushDataIn3DSpace,
2574
2609
  Ue as readUserGroupControl,
2575
2610
  Ze as removeTagToDoc,
2576
- vt as sayHello,
2611
+ Nt as sayHello,
2577
2612
  Se as updateEvent
2578
2613
  };
2579
2614
  //# sourceMappingURL=wb3Api.js.map