@beam3_dev/api_module 0.0.114 → 0.0.115
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 +276 -271
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +5 -5
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v4 as M } from "uuid";
|
|
2
|
-
import { DateTime as
|
|
2
|
+
import { DateTime as b } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as U } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function j() {
|
|
5
5
|
return M();
|
|
@@ -66,10 +66,10 @@ async function de(e, t = void 0, n = void 0) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async function le(e, t = L) {
|
|
69
|
-
let n =
|
|
70
|
-
const s = e, i = [],
|
|
71
|
-
for (let
|
|
72
|
-
i.push({ date:
|
|
69
|
+
let n = b.now().year;
|
|
70
|
+
const s = e, i = [], c = (a) => {
|
|
71
|
+
for (let r in a)
|
|
72
|
+
i.push({ date: r, comment: a[r] });
|
|
73
73
|
};
|
|
74
74
|
for (let a = n; a <= n + 1; a++)
|
|
75
75
|
await fetch(
|
|
@@ -80,20 +80,20 @@ async function le(e, t = L) {
|
|
|
80
80
|
Accept: "application/json"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
).then((
|
|
84
|
-
r
|
|
85
|
-
}).catch((
|
|
83
|
+
).then((r) => r.json()).then((r) => {
|
|
84
|
+
c(r);
|
|
85
|
+
}).catch((r) => console.error("Erreur : " + r));
|
|
86
86
|
return (() => {
|
|
87
87
|
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : s;
|
|
90
|
-
for (let
|
|
90
|
+
for (let r of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start ===
|
|
92
|
+
(l) => l.start === b.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
94
|
+
name: "Férié : " + r.comment,
|
|
95
|
+
start: b.fromISO(r.date).toISODate(),
|
|
96
|
+
end: b.fromISO(r.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
@@ -102,7 +102,7 @@ async function le(e, t = L) {
|
|
|
102
102
|
}
|
|
103
103
|
async function pe(e, t, n = !0) {
|
|
104
104
|
const s = e.events.findIndex((i) => i.uuid === t.uuid);
|
|
105
|
-
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i,
|
|
105
|
+
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
|
|
106
106
|
}
|
|
107
107
|
function f(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (n) => {
|
|
@@ -150,14 +150,14 @@ async function ge(e, t = void 0, n = void 0) {
|
|
|
150
150
|
function J() {
|
|
151
151
|
let e = {};
|
|
152
152
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
153
|
-
const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(),
|
|
153
|
+
const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
|
|
154
154
|
"com.3ds.wp.passport.cors"
|
|
155
155
|
);
|
|
156
156
|
e = {
|
|
157
157
|
tenant: n,
|
|
158
158
|
user: s,
|
|
159
159
|
appsConfiguration: i,
|
|
160
|
-
appConf:
|
|
160
|
+
appConf: c
|
|
161
161
|
};
|
|
162
162
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
163
163
|
}
|
|
@@ -166,9 +166,9 @@ function E(e, t = void 0, n = void 0) {
|
|
|
166
166
|
const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
|
|
167
167
|
f(s, {
|
|
168
168
|
onComplete(i) {
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
171
|
-
const o =
|
|
169
|
+
const c = typeof i == "string" ? JSON.parse(i) : i;
|
|
170
|
+
if (c && "platforms" in c) {
|
|
171
|
+
const o = c.platforms.find(
|
|
172
172
|
(a) => a.id === e.tenant.toUpperCase()
|
|
173
173
|
);
|
|
174
174
|
t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
|
|
@@ -186,9 +186,9 @@ function he(e, t = void 0, n = void 0) {
|
|
|
186
186
|
const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
|
|
187
187
|
f(s, {
|
|
188
188
|
onComplete(i) {
|
|
189
|
-
const
|
|
190
|
-
if (console.log("serviceId=3dpassport",
|
|
191
|
-
const o = `${
|
|
189
|
+
const c = JSON.parse(i);
|
|
190
|
+
if (console.log("serviceId=3dpassport", c), Array.isArray(c) && c.length > 0) {
|
|
191
|
+
const o = `${c[0].services[0].url}`;
|
|
192
192
|
t && t(o);
|
|
193
193
|
}
|
|
194
194
|
},
|
|
@@ -211,15 +211,15 @@ function Se(e, t, n) {
|
|
|
211
211
|
"Content-Type": "application/json",
|
|
212
212
|
Accept: "application/json"
|
|
213
213
|
},
|
|
214
|
-
onComplete(
|
|
215
|
-
const
|
|
214
|
+
onComplete(c, o, a) {
|
|
215
|
+
const r = JSON.parse(c), d = r.data.map((l) => {
|
|
216
216
|
const p = l.attributes.name, u = l.id;
|
|
217
217
|
return { name: p, id: u };
|
|
218
218
|
});
|
|
219
|
-
t && t(d,
|
|
219
|
+
t && t(d, r);
|
|
220
220
|
},
|
|
221
|
-
onFailure(
|
|
222
|
-
const a =
|
|
221
|
+
onFailure(c, o) {
|
|
222
|
+
const a = c;
|
|
223
223
|
a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
|
|
224
224
|
}
|
|
225
225
|
});
|
|
@@ -227,25 +227,25 @@ function Se(e, t, n) {
|
|
|
227
227
|
function _e(e, t = void 0, n = void 0) {
|
|
228
228
|
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
229
229
|
f(s, {
|
|
230
|
-
onComplete(i,
|
|
230
|
+
onComplete(i, c, o) {
|
|
231
231
|
const a = JSON.parse(i);
|
|
232
232
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
233
233
|
},
|
|
234
|
-
onFailure(i,
|
|
234
|
+
onFailure(i, c) {
|
|
235
235
|
const o = i;
|
|
236
|
-
o.msg =
|
|
236
|
+
o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
240
|
function ye(e, t, n = void 0, s = void 0) {
|
|
241
241
|
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
242
242
|
f(i, {
|
|
243
|
-
onComplete(
|
|
244
|
-
const
|
|
245
|
-
n && n(
|
|
243
|
+
onComplete(c, o, a) {
|
|
244
|
+
const r = JSON.parse(c);
|
|
245
|
+
n && n(r);
|
|
246
246
|
},
|
|
247
|
-
onFailure(
|
|
248
|
-
const a =
|
|
247
|
+
onFailure(c, o) {
|
|
248
|
+
const a = c;
|
|
249
249
|
a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
|
|
250
250
|
}
|
|
251
251
|
});
|
|
@@ -255,14 +255,14 @@ const F = {
|
|
|
255
255
|
Accept: "application/json,text/javascript,*/*"
|
|
256
256
|
};
|
|
257
257
|
function we(e, t, n = void 0, s = void 0) {
|
|
258
|
-
const { space: i, currentUser:
|
|
258
|
+
const { space: i, currentUser: c } = e, a = `${i}${{
|
|
259
259
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
260
|
-
}.URIUGr}`,
|
|
260
|
+
}.URIUGr}`, r = {
|
|
261
261
|
groups: [
|
|
262
262
|
{
|
|
263
263
|
title: t.title,
|
|
264
264
|
description: t.description,
|
|
265
|
-
members: t.members || [
|
|
265
|
+
members: t.members || [c.email, "samuel.mureau@beam3.fr"],
|
|
266
266
|
pending_members: [],
|
|
267
267
|
sharing: t.sharing,
|
|
268
268
|
visibility: t.visibility
|
|
@@ -272,7 +272,7 @@ function we(e, t, n = void 0, s = void 0) {
|
|
|
272
272
|
f(a, {
|
|
273
273
|
method: "POST",
|
|
274
274
|
headers: F,
|
|
275
|
-
data: JSON.stringify(
|
|
275
|
+
data: JSON.stringify(r),
|
|
276
276
|
onComplete(d) {
|
|
277
277
|
n && n(JSON.parse(d));
|
|
278
278
|
},
|
|
@@ -284,7 +284,7 @@ function we(e, t, n = void 0, s = void 0) {
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
function Ce(e, t, n = void 0, s = void 0) {
|
|
287
|
-
const { space: i, tenant:
|
|
287
|
+
const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
|
|
288
288
|
f(d, {
|
|
289
289
|
opts: {
|
|
290
290
|
method: "GET",
|
|
@@ -303,12 +303,12 @@ function Ce(e, t, n = void 0, s = void 0) {
|
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
305
|
function G(e, t = void 0, n = void 0) {
|
|
306
|
-
const { space: s, tenant: i } = e,
|
|
306
|
+
const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
|
|
307
307
|
method: "GET",
|
|
308
308
|
Accept: "application/json,*/*,test/javascript"
|
|
309
|
-
}, d = `${
|
|
309
|
+
}, d = `${c}${o}${a}`;
|
|
310
310
|
f(d, {
|
|
311
|
-
OPTsH:
|
|
311
|
+
OPTsH: r,
|
|
312
312
|
onComplete(l) {
|
|
313
313
|
t && t(JSON.parse(l));
|
|
314
314
|
},
|
|
@@ -355,8 +355,8 @@ function Oe(e, t) {
|
|
|
355
355
|
method: "DELETE"
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
const { space:
|
|
358
|
+
function Ne(e, t, n, s = void 0, i = void 0) {
|
|
359
|
+
const { space: c, tenant: o } = e, a = {
|
|
360
360
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
361
361
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
362
362
|
nextURICh: "/characteristics",
|
|
@@ -364,7 +364,7 @@ function be(e, t, n, s = void 0, i = void 0) {
|
|
|
364
364
|
nexURImem: "/members",
|
|
365
365
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
366
366
|
OPTsTenant: `tenant=dstenant:${o}`
|
|
367
|
-
},
|
|
367
|
+
}, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
|
|
368
368
|
f(d, {
|
|
369
369
|
headers: F,
|
|
370
370
|
method: "PATCH",
|
|
@@ -378,8 +378,8 @@ function be(e, t, n, s = void 0, i = void 0) {
|
|
|
378
378
|
}
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
const { space:
|
|
381
|
+
function be(e, t, n, s = void 0, i = void 0) {
|
|
382
|
+
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
383
383
|
f(a, {
|
|
384
384
|
method: "PATCH",
|
|
385
385
|
headers: F,
|
|
@@ -418,8 +418,8 @@ async function K(e, t, n) {
|
|
|
418
418
|
onComplete(i) {
|
|
419
419
|
i = JSON.parse(i), t && t(i.csrf);
|
|
420
420
|
},
|
|
421
|
-
onFailure(i,
|
|
422
|
-
n && n({ error: i, headers:
|
|
421
|
+
onFailure(i, c, o) {
|
|
422
|
+
n && n({ error: i, headers: c, xhr: o });
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
}
|
|
@@ -430,9 +430,9 @@ async function X(e, t = void 0, n = void 0, s = void 0) {
|
|
|
430
430
|
console.log("Le paramètre docid est obligatoire");
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
|
-
const
|
|
434
|
-
f(
|
|
435
|
-
onComplete(o, a,
|
|
433
|
+
const c = i + `/resources/v1/modeler/documents/${t}`;
|
|
434
|
+
f(c, {
|
|
435
|
+
onComplete(o, a, r) {
|
|
436
436
|
const d = JSON.parse(o);
|
|
437
437
|
n && n(d);
|
|
438
438
|
},
|
|
@@ -445,7 +445,7 @@ 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, {
|
|
448
|
-
onComplete(i,
|
|
448
|
+
onComplete(i, c, o) {
|
|
449
449
|
const a = JSON.parse(i);
|
|
450
450
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
451
451
|
},
|
|
@@ -468,14 +468,14 @@ function T(e, t = void 0, n = void 0) {
|
|
|
468
468
|
if (e.space) {
|
|
469
469
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
470
470
|
f(s, {
|
|
471
|
-
onComplete(i,
|
|
471
|
+
onComplete(i, c, o) {
|
|
472
472
|
const a = JSON.parse(i);
|
|
473
473
|
t && t(a.csrf.value);
|
|
474
474
|
},
|
|
475
|
-
onFailure(i,
|
|
475
|
+
onFailure(i, c, o) {
|
|
476
476
|
n && n({
|
|
477
477
|
response: i,
|
|
478
|
-
headers:
|
|
478
|
+
headers: c,
|
|
479
479
|
xhr: o
|
|
480
480
|
});
|
|
481
481
|
}
|
|
@@ -483,7 +483,7 @@ function T(e, t = void 0, n = void 0) {
|
|
|
483
483
|
} else
|
|
484
484
|
n && n("ERROR : url du 3DSpace non défini.");
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function $(e, t = void 0, n = void 0) {
|
|
487
487
|
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
488
488
|
v(
|
|
489
489
|
e,
|
|
@@ -493,12 +493,12 @@ function A(e, t = void 0, n = void 0) {
|
|
|
493
493
|
headers: {
|
|
494
494
|
ENO_CSRF_TOKEN: e.token
|
|
495
495
|
},
|
|
496
|
-
onComplete(
|
|
497
|
-
const a = JSON.parse(
|
|
496
|
+
onComplete(c) {
|
|
497
|
+
const a = JSON.parse(c).data[0].dataelements.ticketURL;
|
|
498
498
|
t && t(a);
|
|
499
499
|
},
|
|
500
|
-
onFailure(
|
|
501
|
-
console.warn("☠️ error => ",
|
|
500
|
+
onFailure(c, o) {
|
|
501
|
+
console.warn("☠️ error => ", c, o), n && n(c, o);
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
},
|
|
@@ -508,8 +508,8 @@ function A(e, t = void 0, n = void 0) {
|
|
|
508
508
|
);
|
|
509
509
|
}
|
|
510
510
|
function ke(e, t, n, s = void 0, i = void 0) {
|
|
511
|
-
const
|
|
512
|
-
n || (n = e.token), f(
|
|
511
|
+
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
512
|
+
n || (n = e.token), f(c, {
|
|
513
513
|
method: "PUT",
|
|
514
514
|
headers: {
|
|
515
515
|
ENO_CSRF_TOKEN: n
|
|
@@ -518,10 +518,10 @@ function ke(e, t, n, s = void 0, i = void 0) {
|
|
|
518
518
|
let a = JSON.parse(o);
|
|
519
519
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
520
520
|
try {
|
|
521
|
-
const
|
|
522
|
-
s && s(
|
|
523
|
-
} catch (
|
|
524
|
-
i && i(
|
|
521
|
+
const r = a.data[0].dataelements.ticketURL;
|
|
522
|
+
s && s(r);
|
|
523
|
+
} catch (r) {
|
|
524
|
+
i && i(r);
|
|
525
525
|
}
|
|
526
526
|
},
|
|
527
527
|
onFailure(o) {
|
|
@@ -529,7 +529,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
|
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
-
function V(e, t, n, s, i,
|
|
532
|
+
function V(e, t, n, s, i, c = void 0, o = void 0) {
|
|
533
533
|
v(
|
|
534
534
|
e,
|
|
535
535
|
t,
|
|
@@ -541,18 +541,18 @@ function V(e, t, n, s, i, r = void 0, o = void 0) {
|
|
|
541
541
|
s,
|
|
542
542
|
i,
|
|
543
543
|
a.csrf.value,
|
|
544
|
-
|
|
544
|
+
c,
|
|
545
545
|
o
|
|
546
546
|
);
|
|
547
547
|
}
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
|
-
function W(e, t, n, s, i,
|
|
551
|
-
const
|
|
552
|
-
f(
|
|
550
|
+
function W(e, t, n, s, i, c, o = void 0, a = void 0) {
|
|
551
|
+
const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
552
|
+
f(r, {
|
|
553
553
|
method: "PUT",
|
|
554
554
|
headers: {
|
|
555
|
-
ENO_CSRF_TOKEN:
|
|
555
|
+
ENO_CSRF_TOKEN: c
|
|
556
556
|
},
|
|
557
557
|
onComplete(d, l, p) {
|
|
558
558
|
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
@@ -562,7 +562,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
562
562
|
let S = "temp_" + Date.now(), _ = {
|
|
563
563
|
method: "PUT",
|
|
564
564
|
headers: {
|
|
565
|
-
ENO_CSRF_TOKEN:
|
|
565
|
+
ENO_CSRF_TOKEN: c
|
|
566
566
|
},
|
|
567
567
|
data: JSON.stringify({
|
|
568
568
|
data: [{
|
|
@@ -598,12 +598,12 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
|
-
async function Fe(e, t, n, s, i = void 0,
|
|
602
|
-
const o = e.space, a = e.token,
|
|
601
|
+
async function Fe(e, t, n, s, i = void 0, c = void 0) {
|
|
602
|
+
const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
603
603
|
type: "text/plain"
|
|
604
604
|
}), p = {
|
|
605
605
|
url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
606
|
-
url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${
|
|
606
|
+
url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
|
|
607
607
|
};
|
|
608
608
|
if (!o && o !== "") {
|
|
609
609
|
console.log("le store._3DSpace est vide");
|
|
@@ -621,7 +621,7 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
|
|
|
621
621
|
method: "POST",
|
|
622
622
|
data: d,
|
|
623
623
|
onComplete(C) {
|
|
624
|
-
if (
|
|
624
|
+
if (r !== "" && a !== "") {
|
|
625
625
|
const k = {
|
|
626
626
|
method: "POST",
|
|
627
627
|
headers: {
|
|
@@ -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
|
-
|
|
656
|
+
r !== "" && f(p.url_Post, k);
|
|
657
657
|
} else
|
|
658
658
|
console.warn("le store est vide");
|
|
659
659
|
},
|
|
@@ -664,18 +664,18 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
|
|
|
664
664
|
}
|
|
665
665
|
function y(C, k) {
|
|
666
666
|
console.log("Erreur -- response ", C, `
|
|
667
|
-
headers `, k),
|
|
667
|
+
headers `, k), c && c(C);
|
|
668
668
|
}
|
|
669
669
|
f(h.ticketURL, S);
|
|
670
670
|
}
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1) {
|
|
674
674
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
675
675
|
f(a, {
|
|
676
676
|
method: "GET",
|
|
677
|
-
onComplete(
|
|
678
|
-
const d = JSON.parse(
|
|
677
|
+
onComplete(r) {
|
|
678
|
+
const d = JSON.parse(r);
|
|
679
679
|
let l = "", p, u, m;
|
|
680
680
|
if (t) {
|
|
681
681
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
@@ -694,7 +694,7 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
694
694
|
let y = h.filter(
|
|
695
695
|
(C) => C.role.name === S
|
|
696
696
|
);
|
|
697
|
-
y.length === 1 ? (m = y[0].role.name, u = y[0].organization.title) :
|
|
697
|
+
y.length === 1 ? (m = y[0].role.name, u = y[0].organization.title) : c(y);
|
|
698
698
|
}
|
|
699
699
|
});
|
|
700
700
|
}) : h.forEach((S) => {
|
|
@@ -704,16 +704,16 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
704
704
|
let _ = h.filter(
|
|
705
705
|
(y) => y.role.name === n
|
|
706
706
|
);
|
|
707
|
-
_.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) :
|
|
707
|
+
_.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) : c(_);
|
|
708
708
|
}
|
|
709
709
|
}));
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
p && u && m ? (l = m + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) :
|
|
712
|
+
p && u && m ? (l = m + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : c && (l = m + "." + u + "." + p, c(l));
|
|
713
713
|
},
|
|
714
|
-
onFailure(
|
|
714
|
+
onFailure(r, d) {
|
|
715
715
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
716
|
-
err:
|
|
716
|
+
err: r,
|
|
717
717
|
headers: d
|
|
718
718
|
});
|
|
719
719
|
}
|
|
@@ -735,38 +735,38 @@ async function I(e, t = void 0, n = void 0) {
|
|
|
735
735
|
), console.warn(
|
|
736
736
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
737
737
|
)), new Promise((s, i) => {
|
|
738
|
-
|
|
738
|
+
$(
|
|
739
739
|
e,
|
|
740
|
-
(
|
|
741
|
-
f(
|
|
740
|
+
(c) => {
|
|
741
|
+
f(c, {
|
|
742
742
|
headers: {
|
|
743
743
|
"Content-Type": "application/json",
|
|
744
744
|
Accept: "application/json"
|
|
745
745
|
},
|
|
746
746
|
onComplete(a) {
|
|
747
|
-
let
|
|
747
|
+
let r;
|
|
748
748
|
try {
|
|
749
|
-
|
|
749
|
+
r = JSON.parse(a);
|
|
750
750
|
} catch {
|
|
751
|
-
|
|
751
|
+
r = a;
|
|
752
752
|
}
|
|
753
|
-
t && typeof t == "function" && t(
|
|
753
|
+
t && typeof t == "function" && t(r), s(r);
|
|
754
754
|
},
|
|
755
|
-
onFailure(a,
|
|
755
|
+
onFailure(a, r, d) {
|
|
756
756
|
n && (console.log("error http", a), n({
|
|
757
757
|
msg: JSON.parse(a),
|
|
758
|
-
headers:
|
|
758
|
+
headers: r,
|
|
759
759
|
xhr: d
|
|
760
760
|
}), i({
|
|
761
761
|
msg: JSON.parse(a),
|
|
762
|
-
headers:
|
|
762
|
+
headers: r,
|
|
763
763
|
xhr: d
|
|
764
764
|
}));
|
|
765
765
|
}
|
|
766
766
|
});
|
|
767
767
|
},
|
|
768
|
-
(
|
|
769
|
-
n && n(
|
|
768
|
+
(c) => {
|
|
769
|
+
n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
772
|
});
|
|
@@ -775,8 +775,8 @@ async function B(e, t, n = void 0, s = void 0) {
|
|
|
775
775
|
let i = [];
|
|
776
776
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
777
777
|
for (let a = 0; a < t.length; a += 80) {
|
|
778
|
-
const
|
|
779
|
-
i.push(
|
|
778
|
+
const r = t.slice(a, a + 80);
|
|
779
|
+
i.push(r);
|
|
780
780
|
}
|
|
781
781
|
const o = (a) => {
|
|
782
782
|
Y(
|
|
@@ -785,8 +785,8 @@ async function B(e, t, n = void 0, s = void 0) {
|
|
|
785
785
|
() => {
|
|
786
786
|
a++, a < i.length && o(a);
|
|
787
787
|
},
|
|
788
|
-
(
|
|
789
|
-
n && n(
|
|
788
|
+
(r) => {
|
|
789
|
+
n && n(r);
|
|
790
790
|
}
|
|
791
791
|
);
|
|
792
792
|
};
|
|
@@ -795,10 +795,10 @@ async function B(e, t, n = void 0, s = void 0) {
|
|
|
795
795
|
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), s && s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
|
|
796
796
|
}
|
|
797
797
|
function Y(e, t, n = void 0, s = void 0, i = void 0) {
|
|
798
|
-
const
|
|
799
|
-
t.forEach((
|
|
800
|
-
|
|
801
|
-
id:
|
|
798
|
+
const c = [];
|
|
799
|
+
t.forEach((r) => {
|
|
800
|
+
c.push({
|
|
801
|
+
id: r
|
|
802
802
|
});
|
|
803
803
|
});
|
|
804
804
|
let o = JSON.stringify({
|
|
@@ -806,16 +806,16 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
806
806
|
name: "ENO_CSRF_TOKEN",
|
|
807
807
|
value: e.token
|
|
808
808
|
},
|
|
809
|
-
data:
|
|
809
|
+
data: c
|
|
810
810
|
});
|
|
811
811
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
812
812
|
f(a, {
|
|
813
813
|
method: "PUT",
|
|
814
814
|
data: o,
|
|
815
815
|
type: "json",
|
|
816
|
-
onComplete(
|
|
817
|
-
const d =
|
|
818
|
-
|
|
816
|
+
onComplete(r) {
|
|
817
|
+
const d = r.data;
|
|
818
|
+
r.success === !0 && (n && n(), d.forEach((l) => {
|
|
819
819
|
try {
|
|
820
820
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
821
821
|
f(u, {
|
|
@@ -835,16 +835,16 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
835
835
|
}
|
|
836
836
|
}));
|
|
837
837
|
},
|
|
838
|
-
onFailure(
|
|
839
|
-
console.log(
|
|
838
|
+
onFailure(r) {
|
|
839
|
+
console.log(r), i && i(r);
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function $e(e, t, n = void 0, s = void 0) {
|
|
844
844
|
return new Promise((i) => {
|
|
845
845
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
846
|
-
const
|
|
847
|
-
|
|
846
|
+
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
847
|
+
N(
|
|
848
848
|
e.space,
|
|
849
849
|
"ESPACE COMMUN",
|
|
850
850
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -875,22 +875,22 @@ function Ae(e, t, n = void 0, s = void 0) {
|
|
|
875
875
|
s && s(a);
|
|
876
876
|
}
|
|
877
877
|
};
|
|
878
|
-
f(
|
|
878
|
+
f(c, o);
|
|
879
879
|
}
|
|
880
880
|
});
|
|
881
881
|
}
|
|
882
|
-
function
|
|
883
|
-
return new Promise((
|
|
882
|
+
function Ae(e, t, n, s = void 0, i = void 0) {
|
|
883
|
+
return new Promise((c) => {
|
|
884
884
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
885
885
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
886
|
-
|
|
886
|
+
N(
|
|
887
887
|
e.space,
|
|
888
888
|
"ESPACE COMMUN",
|
|
889
889
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
890
890
|
void 0,
|
|
891
|
-
(
|
|
892
|
-
(
|
|
893
|
-
console.log("onError =>",
|
|
891
|
+
(r) => e.ctx = r,
|
|
892
|
+
(r) => {
|
|
893
|
+
console.log("onError =>", r);
|
|
894
894
|
}
|
|
895
895
|
);
|
|
896
896
|
let a = {
|
|
@@ -908,11 +908,11 @@ function $e(e, t, n, s = void 0, i = void 0) {
|
|
|
908
908
|
}]
|
|
909
909
|
}),
|
|
910
910
|
type: "json",
|
|
911
|
-
onComplete(
|
|
912
|
-
s && s(
|
|
911
|
+
onComplete(r) {
|
|
912
|
+
s && s(r);
|
|
913
913
|
},
|
|
914
|
-
onFailure(
|
|
915
|
-
i && i(
|
|
914
|
+
onFailure(r) {
|
|
915
|
+
i && i(r);
|
|
916
916
|
}
|
|
917
917
|
};
|
|
918
918
|
f(o, a);
|
|
@@ -922,8 +922,8 @@ function $e(e, t, n, s = void 0, i = void 0) {
|
|
|
922
922
|
function De(e, t, n = void 0, s = void 0) {
|
|
923
923
|
return new Promise((i) => {
|
|
924
924
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
925
|
-
const
|
|
926
|
-
|
|
925
|
+
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
926
|
+
N(
|
|
927
927
|
e.space,
|
|
928
928
|
"ESPACE COMMUN",
|
|
929
929
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -954,15 +954,15 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
954
954
|
s && s(a);
|
|
955
955
|
}
|
|
956
956
|
};
|
|
957
|
-
f(
|
|
957
|
+
f(c, o);
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
961
|
function Ue(e, t, n = void 0, s = void 0) {
|
|
962
962
|
return new Promise((i) => {
|
|
963
963
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
964
|
-
const
|
|
965
|
-
|
|
964
|
+
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
965
|
+
N(
|
|
966
966
|
e.space,
|
|
967
967
|
"ESPACE COMMUN",
|
|
968
968
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -999,22 +999,22 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
999
999
|
s && s(a);
|
|
1000
1000
|
}
|
|
1001
1001
|
};
|
|
1002
|
-
f(
|
|
1002
|
+
f(c, o);
|
|
1003
1003
|
}
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
1006
1006
|
function je(e, t, n, s = void 0, i = void 0) {
|
|
1007
|
-
return new Promise((
|
|
1007
|
+
return new Promise((c) => {
|
|
1008
1008
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1009
1009
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
1010
|
-
|
|
1010
|
+
N(
|
|
1011
1011
|
e.space,
|
|
1012
1012
|
"ESPACE COMMUN",
|
|
1013
1013
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
1014
1014
|
void 0,
|
|
1015
|
-
(
|
|
1016
|
-
(
|
|
1017
|
-
console.log("onError =>",
|
|
1015
|
+
(r) => e.ctx = r,
|
|
1016
|
+
(r) => {
|
|
1017
|
+
console.log("onError =>", r);
|
|
1018
1018
|
}
|
|
1019
1019
|
);
|
|
1020
1020
|
let a = {
|
|
@@ -1037,18 +1037,18 @@ function je(e, t, n, s = void 0, i = void 0) {
|
|
|
1037
1037
|
notificationTimeout: 600
|
|
1038
1038
|
}),
|
|
1039
1039
|
type: "json",
|
|
1040
|
-
onComplete(
|
|
1041
|
-
s && s(
|
|
1040
|
+
onComplete(r) {
|
|
1041
|
+
s && s(r);
|
|
1042
1042
|
},
|
|
1043
|
-
onFailure(
|
|
1044
|
-
i && i(
|
|
1043
|
+
onFailure(r) {
|
|
1044
|
+
i && i(r);
|
|
1045
1045
|
}
|
|
1046
1046
|
};
|
|
1047
1047
|
f(o, a);
|
|
1048
1048
|
}
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
|
-
function Ie(e, t, n, s, i = void 0,
|
|
1051
|
+
function Ie(e, t, n, s, i = void 0, c = void 0) {
|
|
1052
1052
|
return console.log("credentials", e), new Promise((o) => {
|
|
1053
1053
|
`${e.space}`, JSON.stringify({
|
|
1054
1054
|
csrf: {
|
|
@@ -1082,27 +1082,27 @@ function Re(e, t = void 0, n = void 0) {
|
|
|
1082
1082
|
Accept: "application/json,text/javascript,*/*",
|
|
1083
1083
|
"Content-Type": "application/ds-json"
|
|
1084
1084
|
},
|
|
1085
|
-
onComplete(
|
|
1086
|
-
const a = JSON.parse(
|
|
1085
|
+
onComplete(c, o) {
|
|
1086
|
+
const a = JSON.parse(c);
|
|
1087
1087
|
t && t(a, o);
|
|
1088
1088
|
},
|
|
1089
|
-
onFailure(
|
|
1090
|
-
n && n({ response:
|
|
1089
|
+
onFailure(c, o, a) {
|
|
1090
|
+
n && n({ response: c, headers: o, xhr: a });
|
|
1091
1091
|
}
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
1094
|
function xe(e, t, n, s) {
|
|
1095
|
-
|
|
1095
|
+
$(
|
|
1096
1096
|
e.space,
|
|
1097
1097
|
t,
|
|
1098
1098
|
(i) => {
|
|
1099
1099
|
f(i, {
|
|
1100
1100
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1101
|
-
onComplete: (
|
|
1102
|
-
n && n(
|
|
1101
|
+
onComplete: (c) => {
|
|
1102
|
+
n && n(c);
|
|
1103
1103
|
},
|
|
1104
|
-
onFailure: (
|
|
1105
|
-
console.log("error http",
|
|
1104
|
+
onFailure: (c) => {
|
|
1105
|
+
console.log("error http", c), s && s(c);
|
|
1106
1106
|
}
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
@@ -1110,29 +1110,29 @@ function xe(e, t, n, s) {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
async function Pe(e, t, n = void 0, s = void 0) {
|
|
1112
1112
|
return new Promise((i) => {
|
|
1113
|
-
|
|
1114
|
-
f(
|
|
1115
|
-
onComplete: (o, a,
|
|
1116
|
-
onFailure: (o, a,
|
|
1117
|
-
s && s(o, a,
|
|
1113
|
+
$(e, t, (c) => {
|
|
1114
|
+
f(c, {
|
|
1115
|
+
onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
|
|
1116
|
+
onFailure: (o, a, r) => {
|
|
1117
|
+
s && s(o, a, r), console.log(o, a?.errormsg);
|
|
1118
1118
|
}
|
|
1119
1119
|
});
|
|
1120
1120
|
});
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
1123
1123
|
function Me(e, t, n, s = void 0, i = void 0) {
|
|
1124
|
-
const
|
|
1124
|
+
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1125
1125
|
v(
|
|
1126
1126
|
e,
|
|
1127
1127
|
n,
|
|
1128
1128
|
(o) => {
|
|
1129
|
-
const a = o.data[0].relateddata.files[0].id,
|
|
1129
|
+
const a = o.data[0].relateddata.files[0].id, r = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
|
|
1130
1130
|
V(
|
|
1131
1131
|
e,
|
|
1132
1132
|
n,
|
|
1133
1133
|
a,
|
|
1134
|
-
r,
|
|
1135
1134
|
c,
|
|
1135
|
+
r,
|
|
1136
1136
|
(d) => {
|
|
1137
1137
|
s && s(d);
|
|
1138
1138
|
},
|
|
@@ -1144,7 +1144,7 @@ function Me(e, t, n, s = void 0, i = void 0) {
|
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
1146
|
let R, x;
|
|
1147
|
-
const
|
|
1147
|
+
const A = [];
|
|
1148
1148
|
async function Le(e, t = void 0, n = void 0) {
|
|
1149
1149
|
e.objID && e.objID !== "" ? v(
|
|
1150
1150
|
e,
|
|
@@ -1182,12 +1182,12 @@ function Ee(e, t = void 0, n = void 0) {
|
|
|
1182
1182
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1183
1183
|
return;
|
|
1184
1184
|
}
|
|
1185
|
-
e.objIds.forEach((i,
|
|
1185
|
+
e.objIds.forEach((i, c) => {
|
|
1186
1186
|
I(
|
|
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, x)),
|
|
1190
|
+
s.push({ [i.name]: o }), i.name === "dbProjets" && (R = o.affaires.map((a) => a.objectID), q(e, x)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1191
1191
|
}
|
|
1192
1192
|
);
|
|
1193
1193
|
});
|
|
@@ -1197,8 +1197,8 @@ function q(e, t, n = void 0, s = void 0) {
|
|
|
1197
1197
|
e,
|
|
1198
1198
|
R,
|
|
1199
1199
|
(i) => {
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1200
|
+
const c = [...t];
|
|
1201
|
+
c.find((o) => o.objectID === i.objectId).data = i.data, x = c, A.push(i.data), n && n(A);
|
|
1202
1202
|
},
|
|
1203
1203
|
(i) => {
|
|
1204
1204
|
s && (s(i), console.log(i));
|
|
@@ -1226,10 +1226,10 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
|
|
|
1226
1226
|
tag: "testTag"
|
|
1227
1227
|
};
|
|
1228
1228
|
function Ge(e, t, n = void 0, s = void 0) {
|
|
1229
|
-
const { space: i, tenant:
|
|
1229
|
+
const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
|
|
1230
1230
|
uri: "/resources/6w/tags",
|
|
1231
1231
|
otpCTX: "SecurityContext=preferred",
|
|
1232
|
-
optTenant: `tenant=${
|
|
1232
|
+
optTenant: `tenant=${c}`
|
|
1233
1233
|
}, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1234
1234
|
tag: [
|
|
1235
1235
|
{
|
|
@@ -1240,7 +1240,7 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1240
1240
|
],
|
|
1241
1241
|
predicate: P[a],
|
|
1242
1242
|
object: {
|
|
1243
|
-
literal:
|
|
1243
|
+
literal: r
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
1246
|
]
|
|
@@ -1287,17 +1287,17 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
function Z(e, t, n = void 0, s = void 0) {
|
|
1289
1289
|
console.log("obj ", t);
|
|
1290
|
-
const i = t.info.name,
|
|
1290
|
+
const i = t.info.name, c = {
|
|
1291
1291
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1292
1292
|
uri: "/federated/search"
|
|
1293
|
-
}, o = `${
|
|
1293
|
+
}, o = `${c.baseUrl}${c.uri}`, a = {
|
|
1294
1294
|
"Content-Type": "application/json",
|
|
1295
1295
|
Accept: "application/json,text/javascript,*/*"
|
|
1296
|
-
},
|
|
1296
|
+
}, r = j(), d = {
|
|
1297
1297
|
with_indexing_date: !0,
|
|
1298
1298
|
with_synthesis: !0,
|
|
1299
1299
|
with_nls: !1,
|
|
1300
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1300
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
|
|
1301
1301
|
locale: "fr",
|
|
1302
1302
|
select_predicate: [
|
|
1303
1303
|
"ds6w:label",
|
|
@@ -1369,11 +1369,11 @@ function Z(e, t, n = void 0, s = void 0) {
|
|
|
1369
1369
|
});
|
|
1370
1370
|
}
|
|
1371
1371
|
function Ke(e, t, n = void 0, s = void 0) {
|
|
1372
|
-
const { objId: i, pred:
|
|
1372
|
+
const { objId: i, pred: c, tag: o } = t, a = {
|
|
1373
1373
|
uri: "/resources/6w/tags",
|
|
1374
1374
|
otpCTX: "SecurityContext=preferred",
|
|
1375
1375
|
optTenant: `tenant=${e.tenant}`
|
|
1376
|
-
},
|
|
1376
|
+
}, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1377
1377
|
tag: [
|
|
1378
1378
|
{
|
|
1379
1379
|
subject: [
|
|
@@ -1381,14 +1381,14 @@ function Ke(e, t, n = void 0, s = void 0) {
|
|
|
1381
1381
|
uri: `pid://${i}`
|
|
1382
1382
|
}
|
|
1383
1383
|
],
|
|
1384
|
-
predicate: P[
|
|
1384
|
+
predicate: P[c],
|
|
1385
1385
|
object: {
|
|
1386
1386
|
literal: o
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
]
|
|
1390
1390
|
};
|
|
1391
|
-
f(
|
|
1391
|
+
f(r, {
|
|
1392
1392
|
method: "DELETE",
|
|
1393
1393
|
data: JSON.stringify(d),
|
|
1394
1394
|
headers: {
|
|
@@ -1408,16 +1408,16 @@ function Xe(e, t = "", n = void 0, s = void 0) {
|
|
|
1408
1408
|
const { space: i } = e;
|
|
1409
1409
|
if (t === "")
|
|
1410
1410
|
return;
|
|
1411
|
-
const
|
|
1411
|
+
const c = {
|
|
1412
1412
|
uri: "/resources/v1/modeler/documents"
|
|
1413
1413
|
}, o = {
|
|
1414
1414
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1415
1415
|
Accept: "application/json,text/javascript,*/*"
|
|
1416
|
-
}, a = `${i}${
|
|
1416
|
+
}, a = `${i}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
|
|
1417
1417
|
f(a, {
|
|
1418
1418
|
method: "POST",
|
|
1419
1419
|
headers: o,
|
|
1420
|
-
data:
|
|
1420
|
+
data: r,
|
|
1421
1421
|
onComplete(d) {
|
|
1422
1422
|
n && n(JSON.parse(d));
|
|
1423
1423
|
},
|
|
@@ -1430,7 +1430,7 @@ function Xe(e, t = "", n = void 0, s = void 0) {
|
|
|
1430
1430
|
async function w(e, t = void 0, n = void 0) {
|
|
1431
1431
|
const s = e.space + "/api/index/tk";
|
|
1432
1432
|
return f(s, {
|
|
1433
|
-
onComplete(i,
|
|
1433
|
+
onComplete(i, c, o) {
|
|
1434
1434
|
const a = JSON.parse(i);
|
|
1435
1435
|
if (t)
|
|
1436
1436
|
return t(a), e.token = a?.result?.ServerToken;
|
|
@@ -1451,11 +1451,11 @@ function Ve(e, t = void 0, n = void 0) {
|
|
|
1451
1451
|
start: 0
|
|
1452
1452
|
}
|
|
1453
1453
|
};
|
|
1454
|
-
w(e, (
|
|
1454
|
+
w(e, (c) => {
|
|
1455
1455
|
f(s, {
|
|
1456
1456
|
method: "POST",
|
|
1457
1457
|
headers: {
|
|
1458
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1458
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1459
1459
|
"Content-type": "application/json;charset=UTF-8",
|
|
1460
1460
|
Accept: "application/json"
|
|
1461
1461
|
},
|
|
@@ -1480,19 +1480,19 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1480
1480
|
maxNbOfCommonElements: "5"
|
|
1481
1481
|
}
|
|
1482
1482
|
};
|
|
1483
|
-
w(e, (
|
|
1483
|
+
w(e, (c) => {
|
|
1484
1484
|
f(s, {
|
|
1485
1485
|
method: "POST",
|
|
1486
1486
|
headers: {
|
|
1487
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1487
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
|
|
1488
1488
|
"Content-type": "application/json;charset=UTF-8",
|
|
1489
1489
|
Accept: "application/json"
|
|
1490
1490
|
},
|
|
1491
1491
|
data: JSON.stringify(i),
|
|
1492
1492
|
type: "json",
|
|
1493
1493
|
onComplete(o, a) {
|
|
1494
|
-
const
|
|
1495
|
-
t && t(
|
|
1494
|
+
const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1495
|
+
t && t(r, o);
|
|
1496
1496
|
},
|
|
1497
1497
|
onFailure(o, a) {
|
|
1498
1498
|
n && n(o, a);
|
|
@@ -1506,14 +1506,14 @@ function Be(e, t = void 0, n = void 0) {
|
|
|
1506
1506
|
uri: "/api/community/listmycommunities",
|
|
1507
1507
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1508
1508
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1509
|
-
}, i = `${s.base}${s.uri}${s.limit}${s.page}`,
|
|
1509
|
+
}, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
|
|
1510
1510
|
w(e, (o) => {
|
|
1511
1511
|
f(i, {
|
|
1512
1512
|
method: "GET",
|
|
1513
1513
|
headers: {
|
|
1514
1514
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1515
1515
|
},
|
|
1516
|
-
onComplete(a,
|
|
1516
|
+
onComplete(a, r, d) {
|
|
1517
1517
|
const p = JSON.parse(a).result;
|
|
1518
1518
|
let u = 0;
|
|
1519
1519
|
p.forEach((m) => {
|
|
@@ -1529,21 +1529,21 @@ function Be(e, t = void 0, n = void 0) {
|
|
|
1529
1529
|
e,
|
|
1530
1530
|
m.id,
|
|
1531
1531
|
(h) => {
|
|
1532
|
-
u++, g.members = h,
|
|
1532
|
+
u++, g.members = h, c.push(g), u === p.length && t && t(c);
|
|
1533
1533
|
},
|
|
1534
1534
|
(h) => n(h)
|
|
1535
1535
|
);
|
|
1536
1536
|
});
|
|
1537
1537
|
},
|
|
1538
|
-
onFailure(a,
|
|
1538
|
+
onFailure(a, r) {
|
|
1539
1539
|
const d = a;
|
|
1540
|
-
d.status =
|
|
1540
|
+
d.status = r.status, d.response = r.errormsg, n && n(d);
|
|
1541
1541
|
}
|
|
1542
1542
|
});
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
1545
|
function ee(e, t, n, s) {
|
|
1546
|
-
const i = `${e.space}/api/community/listmembers`,
|
|
1546
|
+
const i = `${e.space}/api/community/listmembers`, c = {
|
|
1547
1547
|
params: {
|
|
1548
1548
|
page: e.page ? e.page : 1,
|
|
1549
1549
|
limit: e.limit ? e.limit : 50,
|
|
@@ -1558,14 +1558,14 @@ function ee(e, t, n, s) {
|
|
|
1558
1558
|
Accept: "application/json",
|
|
1559
1559
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1560
1560
|
},
|
|
1561
|
-
data: JSON.stringify(
|
|
1561
|
+
data: JSON.stringify(c),
|
|
1562
1562
|
type: "json",
|
|
1563
|
-
onComplete(a,
|
|
1563
|
+
onComplete(a, r, d) {
|
|
1564
1564
|
n && n(a);
|
|
1565
1565
|
},
|
|
1566
|
-
onFailure(a,
|
|
1566
|
+
onFailure(a, r) {
|
|
1567
1567
|
const d = a;
|
|
1568
|
-
d.status =
|
|
1568
|
+
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1569
1569
|
}
|
|
1570
1570
|
});
|
|
1571
1571
|
});
|
|
@@ -1574,31 +1574,31 @@ function Ye(e, t = void 0, n = void 0) {
|
|
|
1574
1574
|
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1575
1575
|
e.commu_id || (e.commu_id = s);
|
|
1576
1576
|
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1577
|
-
w(e, (
|
|
1577
|
+
w(e, (c) => {
|
|
1578
1578
|
f(i, {
|
|
1579
1579
|
method: "GET",
|
|
1580
1580
|
headers: {
|
|
1581
1581
|
"Content-type": "application/json;charset=UTF-8",
|
|
1582
1582
|
Accept: "application/json",
|
|
1583
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1583
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1584
1584
|
},
|
|
1585
1585
|
onComplete(o) {
|
|
1586
1586
|
const a = JSON.parse(o);
|
|
1587
1587
|
t && t(a);
|
|
1588
1588
|
},
|
|
1589
1589
|
onFailure(o, a) {
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1590
|
+
const r = o;
|
|
1591
|
+
r.status = a.status, r.response = a.errormsg, n && n(r);
|
|
1592
1592
|
}
|
|
1593
1593
|
});
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
1596
|
function qe(e, t, n = void 0, s = void 0) {
|
|
1597
|
-
const { listAllContacts: i, currentUser:
|
|
1597
|
+
const { listAllContacts: i, currentUser: c } = e;
|
|
1598
1598
|
console.log("__listAllContacts", i.hits);
|
|
1599
1599
|
const o = `${e.space}/api/directmessages`, a = {
|
|
1600
|
-
users: [
|
|
1601
|
-
},
|
|
1600
|
+
users: [c.login].concat(t.receipt)
|
|
1601
|
+
}, r = {
|
|
1602
1602
|
id_msg: "",
|
|
1603
1603
|
senderId: e.currentUser.login,
|
|
1604
1604
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
@@ -1608,10 +1608,10 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1608
1608
|
te(
|
|
1609
1609
|
a.users,
|
|
1610
1610
|
(l) => {
|
|
1611
|
-
l !== void 0 && (
|
|
1611
|
+
l !== void 0 && (r.id_msg = l.id, d = !0, D(e, r));
|
|
1612
1612
|
},
|
|
1613
1613
|
(l) => {
|
|
1614
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l),
|
|
1614
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
|
|
1615
1615
|
}
|
|
1616
1616
|
), d === !1 && setTimeout(() => {
|
|
1617
1617
|
d === !1 && w(e, (l) => {
|
|
@@ -1626,7 +1626,7 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1626
1626
|
type: "json",
|
|
1627
1627
|
onComplete(p, u, m) {
|
|
1628
1628
|
const g = p;
|
|
1629
|
-
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g),
|
|
1629
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), r.id_msg = g.result.id, D(e, r);
|
|
1630
1630
|
},
|
|
1631
1631
|
onFailure(p, u, m) {
|
|
1632
1632
|
const g = p;
|
|
@@ -1638,19 +1638,19 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1638
1638
|
}
|
|
1639
1639
|
function te(e, t, n, s) {
|
|
1640
1640
|
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1641
|
-
w(e, (
|
|
1641
|
+
w(e, (c) => {
|
|
1642
1642
|
f(i, {
|
|
1643
1643
|
method: "GET",
|
|
1644
1644
|
headers: {
|
|
1645
1645
|
Accept: "application/json,text/javascript,*/*",
|
|
1646
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1646
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1647
1647
|
},
|
|
1648
1648
|
onComplete(o) {
|
|
1649
|
-
const a = JSON.parse(o),
|
|
1649
|
+
const a = JSON.parse(o), r = [];
|
|
1650
1650
|
a.result.forEach((p) => {
|
|
1651
|
-
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length &&
|
|
1651
|
+
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && r.push(p);
|
|
1652
1652
|
});
|
|
1653
|
-
const d = t.sort(), l =
|
|
1653
|
+
const d = t.sort(), l = r.find((p) => {
|
|
1654
1654
|
const u = [];
|
|
1655
1655
|
return p.users.forEach((m) => {
|
|
1656
1656
|
u.push(m.login);
|
|
@@ -1671,7 +1671,7 @@ function D(e, t, n = void 0, s = void 0) {
|
|
|
1671
1671
|
uri: "/api/community",
|
|
1672
1672
|
id_msg: `${t.id_msg}`,
|
|
1673
1673
|
endUri: "/instantmessages"
|
|
1674
|
-
},
|
|
1674
|
+
}, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
|
|
1675
1675
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1676
1676
|
accessState: null,
|
|
1677
1677
|
commentUri: null,
|
|
@@ -1681,8 +1681,8 @@ function D(e, t, n = void 0, s = void 0) {
|
|
|
1681
1681
|
parentCommentUri: null,
|
|
1682
1682
|
richMessage: t.msg
|
|
1683
1683
|
};
|
|
1684
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1685
|
-
f(
|
|
1684
|
+
console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
|
|
1685
|
+
f(c, {
|
|
1686
1686
|
method: "POST",
|
|
1687
1687
|
headers: {
|
|
1688
1688
|
"Content-Type": "application/json",
|
|
@@ -1691,12 +1691,12 @@ function D(e, t, n = void 0, s = void 0) {
|
|
|
1691
1691
|
},
|
|
1692
1692
|
data: JSON.stringify(o),
|
|
1693
1693
|
type: "json",
|
|
1694
|
-
onComplete(
|
|
1695
|
-
const p =
|
|
1694
|
+
onComplete(r, d, l) {
|
|
1695
|
+
const p = r;
|
|
1696
1696
|
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
|
|
1697
1697
|
},
|
|
1698
|
-
onFailure(
|
|
1699
|
-
const l =
|
|
1698
|
+
onFailure(r, d) {
|
|
1699
|
+
const l = r;
|
|
1700
1700
|
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
|
|
1701
1701
|
}
|
|
1702
1702
|
});
|
|
@@ -1720,15 +1720,15 @@ const se = {
|
|
|
1720
1720
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1721
1721
|
};
|
|
1722
1722
|
function He(e, t, n = void 0, s = void 0) {
|
|
1723
|
-
const i = `${e.space}/api/idea/add`,
|
|
1724
|
-
(
|
|
1723
|
+
const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1724
|
+
(r) => r.id === t.community_id
|
|
1725
1725
|
), o = e.swymCommunities.find(
|
|
1726
|
-
(
|
|
1726
|
+
(r) => r.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1727
1727
|
), a = {
|
|
1728
1728
|
params: {
|
|
1729
1729
|
title: t.title,
|
|
1730
1730
|
// String, le nom de l'affaire
|
|
1731
|
-
community_id:
|
|
1731
|
+
community_id: c?.id !== void 0 ? c.id : o.id,
|
|
1732
1732
|
// String, l'id de la communauté
|
|
1733
1733
|
message: ae(t.text_html),
|
|
1734
1734
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1736,11 +1736,11 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1736
1736
|
// 1 publier, 0 non publier
|
|
1737
1737
|
}
|
|
1738
1738
|
};
|
|
1739
|
-
w(e, (
|
|
1739
|
+
w(e, (r) => {
|
|
1740
1740
|
const d = {
|
|
1741
1741
|
"Content-type": "application/json;charset=UTF-8",
|
|
1742
1742
|
Accept: "application/json",
|
|
1743
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1743
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1744
1744
|
};
|
|
1745
1745
|
f(i, {
|
|
1746
1746
|
method: "POST",
|
|
@@ -1759,7 +1759,7 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1759
1759
|
});
|
|
1760
1760
|
}
|
|
1761
1761
|
function ze(e, t, n = void 0, s = void 0) {
|
|
1762
|
-
const i = `${e.space}/api/idea/delete`,
|
|
1762
|
+
const i = `${e.space}/api/idea/delete`, c = {
|
|
1763
1763
|
params: {
|
|
1764
1764
|
community_id: t.community_id,
|
|
1765
1765
|
ideationIds: [t.idee_id]
|
|
@@ -1773,14 +1773,14 @@ function ze(e, t, n = void 0, s = void 0) {
|
|
|
1773
1773
|
Accept: "application/json",
|
|
1774
1774
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1775
1775
|
},
|
|
1776
|
-
data: JSON.stringify(
|
|
1776
|
+
data: JSON.stringify(c),
|
|
1777
1777
|
type: "json",
|
|
1778
|
-
onComplete(a,
|
|
1778
|
+
onComplete(a, r, d) {
|
|
1779
1779
|
n && n(a);
|
|
1780
1780
|
},
|
|
1781
|
-
onFailure(a,
|
|
1781
|
+
onFailure(a, r, d) {
|
|
1782
1782
|
const l = a;
|
|
1783
|
-
l.status =
|
|
1783
|
+
l.status = r.status, l.response = r.errormsg, s && s(l);
|
|
1784
1784
|
}
|
|
1785
1785
|
});
|
|
1786
1786
|
});
|
|
@@ -1788,13 +1788,13 @@ function ze(e, t, n = void 0, s = void 0) {
|
|
|
1788
1788
|
function Qe(e, t = "", n = void 0, s = void 0) {
|
|
1789
1789
|
const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1790
1790
|
t === "" && (t = i);
|
|
1791
|
-
const
|
|
1791
|
+
const c = `${e.space}/api/idea/get`, o = {
|
|
1792
1792
|
params: {
|
|
1793
1793
|
id: t
|
|
1794
1794
|
}
|
|
1795
1795
|
};
|
|
1796
1796
|
w(e, (a) => {
|
|
1797
|
-
f(
|
|
1797
|
+
f(c, {
|
|
1798
1798
|
method: "POST",
|
|
1799
1799
|
headers: {
|
|
1800
1800
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1803,12 +1803,12 @@ function Qe(e, t = "", n = void 0, s = void 0) {
|
|
|
1803
1803
|
},
|
|
1804
1804
|
data: JSON.stringify(o),
|
|
1805
1805
|
type: "json",
|
|
1806
|
-
onComplete(
|
|
1807
|
-
const d =
|
|
1806
|
+
onComplete(r) {
|
|
1807
|
+
const d = r;
|
|
1808
1808
|
d.msg = d.result.message, n && n(d);
|
|
1809
1809
|
},
|
|
1810
|
-
onFailure(
|
|
1811
|
-
const d =
|
|
1810
|
+
onFailure(r) {
|
|
1811
|
+
const d = r;
|
|
1812
1812
|
d.status = headers.status, d.response = headers.errormsg, s && s(d);
|
|
1813
1813
|
}
|
|
1814
1814
|
});
|
|
@@ -1819,20 +1819,20 @@ function Ze(e, t = se, n = void 0, s = void 0) {
|
|
|
1819
1819
|
uri: "/api/idea/list",
|
|
1820
1820
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1821
1821
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1822
|
-
},
|
|
1822
|
+
}, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
|
|
1823
1823
|
w(e, (o) => {
|
|
1824
|
-
f(
|
|
1824
|
+
f(c, {
|
|
1825
1825
|
method: "GET",
|
|
1826
1826
|
headers: {
|
|
1827
1827
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1828
1828
|
},
|
|
1829
1829
|
onComplete(a) {
|
|
1830
|
-
const
|
|
1831
|
-
n && n(
|
|
1830
|
+
const r = JSON.parse(a);
|
|
1831
|
+
n && n(r);
|
|
1832
1832
|
},
|
|
1833
|
-
onFailure(a,
|
|
1833
|
+
onFailure(a, r) {
|
|
1834
1834
|
const d = a;
|
|
1835
|
-
d.status =
|
|
1835
|
+
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1836
1836
|
}
|
|
1837
1837
|
});
|
|
1838
1838
|
});
|
|
@@ -1920,13 +1920,13 @@ function et(e, t = void 0, n = void 0) {
|
|
|
1920
1920
|
headers: {
|
|
1921
1921
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1922
1922
|
},
|
|
1923
|
-
onComplete(
|
|
1924
|
-
const
|
|
1925
|
-
t && t(
|
|
1923
|
+
onComplete(c, o, a) {
|
|
1924
|
+
const r = JSON.parse(c);
|
|
1925
|
+
t && t(r.result);
|
|
1926
1926
|
},
|
|
1927
|
-
onFailure(
|
|
1928
|
-
const
|
|
1929
|
-
n && n(
|
|
1927
|
+
onFailure(c, o, a) {
|
|
1928
|
+
const r = { erreur: JSON.parse(c), headers: o, xhr: a };
|
|
1929
|
+
n && n(r);
|
|
1930
1930
|
}
|
|
1931
1931
|
});
|
|
1932
1932
|
});
|
|
@@ -1935,11 +1935,11 @@ function tt(e, t, n = void 0, s = void 0) {
|
|
|
1935
1935
|
const i = e.space + "/api/user/find/login/" + t;
|
|
1936
1936
|
w(
|
|
1937
1937
|
e,
|
|
1938
|
-
(
|
|
1938
|
+
(c) => {
|
|
1939
1939
|
f(i, {
|
|
1940
1940
|
method: "GET",
|
|
1941
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1942
|
-
onComplete(o, a,
|
|
1941
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
1942
|
+
onComplete(o, a, r) {
|
|
1943
1943
|
const d = JSON.parse(o);
|
|
1944
1944
|
n && n(d);
|
|
1945
1945
|
},
|
|
@@ -1954,16 +1954,24 @@ 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.services.find((
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1957
|
+
const i = s.services.find((r) => r.id === "3dpassport")?.url;
|
|
1958
|
+
s.services.find((r) => r.id === "3dcompass")?.url;
|
|
1959
|
+
const c = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2", o = `${i}/login?action=get_auth_params`, a = `${i}/login/?service=${c}/auth/cas`;
|
|
1960
|
+
f(o, {
|
|
1961
|
+
onComplete(r) {
|
|
1962
|
+
const d = r.lt;
|
|
1963
|
+
f(a, {
|
|
1962
1964
|
onComplete(l) {
|
|
1963
1965
|
console.log("response", l);
|
|
1964
1966
|
const p = typeof l == "string" ? JSON.parse(l)?.x3ds_service_redirect_url : l?.x3ds_service_redirect_url;
|
|
1965
1967
|
p ? f(p, {
|
|
1966
1968
|
method: "POST",
|
|
1969
|
+
headers: {
|
|
1970
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
1971
|
+
},
|
|
1972
|
+
data: JSON.stringify({
|
|
1973
|
+
lt: d
|
|
1974
|
+
}),
|
|
1967
1975
|
onComplete(u) {
|
|
1968
1976
|
t && t(u);
|
|
1969
1977
|
},
|
|
@@ -1976,9 +1984,6 @@ function nt(e, t = void 0, n = void 0) {
|
|
|
1976
1984
|
n && n(l);
|
|
1977
1985
|
}
|
|
1978
1986
|
});
|
|
1979
|
-
},
|
|
1980
|
-
onFailure(d) {
|
|
1981
|
-
n && n(d);
|
|
1982
1987
|
}
|
|
1983
1988
|
});
|
|
1984
1989
|
});
|
|
@@ -1993,7 +1998,7 @@ function at(e, t = void 0, n = void 0) {
|
|
|
1993
1998
|
const o = J();
|
|
1994
1999
|
console.log("platformeInfo", o);
|
|
1995
2000
|
}
|
|
1996
|
-
|
|
2001
|
+
N(
|
|
1997
2002
|
e,
|
|
1998
2003
|
"Common space",
|
|
1999
2004
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -2004,14 +2009,14 @@ function at(e, t = void 0, n = void 0) {
|
|
|
2004
2009
|
},
|
|
2005
2010
|
!0
|
|
2006
2011
|
);
|
|
2007
|
-
const i =
|
|
2008
|
-
f(
|
|
2012
|
+
const i = b.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
2013
|
+
f(c, {
|
|
2009
2014
|
onComplete(o) {
|
|
2010
2015
|
if (Array.isArray(JSON.parse(o))) {
|
|
2011
2016
|
const a = JSON.parse(o);
|
|
2012
2017
|
console.log("serviceId=3dsearch", a);
|
|
2013
|
-
const
|
|
2014
|
-
f(
|
|
2018
|
+
const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
|
|
2019
|
+
f(r, {
|
|
2015
2020
|
method: "POST",
|
|
2016
2021
|
headers: {
|
|
2017
2022
|
Accept: "application/json",
|
|
@@ -2080,13 +2085,13 @@ export {
|
|
|
2080
2085
|
v as _3DSpace_get_csrf,
|
|
2081
2086
|
X as _3DSpace_get_docInfo,
|
|
2082
2087
|
Y as _3DSpace_get_downloadTicket_multidoc,
|
|
2083
|
-
|
|
2084
|
-
|
|
2088
|
+
N as _3DSpace_get_securityContexts,
|
|
2089
|
+
$ as _3DSpace_get_ticket,
|
|
2085
2090
|
je as _3DSpace_lifecycle_changeRevision,
|
|
2086
|
-
|
|
2091
|
+
Ae as _3DSpace_lifecycle_changeState,
|
|
2087
2092
|
De as _3DSpace_lifecycle_getGraph,
|
|
2088
2093
|
Ue as _3DSpace_lifecycle_getNextRevision,
|
|
2089
|
-
|
|
2094
|
+
$e as _3DSpace_lifecycle_getNextStates,
|
|
2090
2095
|
qe as _3DSwym_buildDirectMessage,
|
|
2091
2096
|
ze as _3DSwym_deleteIdea,
|
|
2092
2097
|
te as _3DSwym_findCommunityToInstantMSG,
|
|
@@ -2133,8 +2138,8 @@ export {
|
|
|
2133
2138
|
Te as getUserGroupsList,
|
|
2134
2139
|
G as getUsersGroupRules,
|
|
2135
2140
|
Le as get_3DSpace_csrf,
|
|
2136
|
-
|
|
2137
|
-
|
|
2141
|
+
Ne as patchUserGroups,
|
|
2142
|
+
be as patchUserGroupsControl,
|
|
2138
2143
|
Me as pushDataIn3DSpace,
|
|
2139
2144
|
ve as readUserGroupControl,
|
|
2140
2145
|
Ke as removeTagToDoc,
|