@beam3_dev/api_module 0.0.62 → 0.0.63
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 +214 -214
- 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
|
@@ -67,7 +67,7 @@ async function re(e, t = void 0, n = void 0) {
|
|
|
67
67
|
}
|
|
68
68
|
async function ce(e, t = L) {
|
|
69
69
|
let n = N.now().year;
|
|
70
|
-
const s = e, o = [],
|
|
70
|
+
const s = e, o = [], i = (a) => {
|
|
71
71
|
for (let c in a)
|
|
72
72
|
o.push({ date: c, comment: a[c] });
|
|
73
73
|
};
|
|
@@ -81,7 +81,7 @@ async function ce(e, t = L) {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
).then((c) => c.json()).then((c) => {
|
|
84
|
-
|
|
84
|
+
i(c);
|
|
85
85
|
}).catch((c) => console.error("Erreur : " + c));
|
|
86
86
|
return (() => {
|
|
87
87
|
const a = s.length === 0 ? {
|
|
@@ -102,7 +102,7 @@ async function ce(e, t = L) {
|
|
|
102
102
|
}
|
|
103
103
|
async function de(e, t, n = !0) {
|
|
104
104
|
const s = e.events.findIndex((o) => o.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((o,
|
|
105
|
+
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, i) => o.start - i.start), e;
|
|
106
106
|
}
|
|
107
107
|
function f(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (n) => {
|
|
@@ -145,14 +145,14 @@ async function fe(e, t = void 0, n = void 0) {
|
|
|
145
145
|
function me() {
|
|
146
146
|
let e = {};
|
|
147
147
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
148
|
-
const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(),
|
|
148
|
+
const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), i = t.getApplicationConfiguration(
|
|
149
149
|
"com.3ds.wp.passport.cors"
|
|
150
150
|
);
|
|
151
151
|
e = {
|
|
152
152
|
tenant: n,
|
|
153
153
|
user: s,
|
|
154
154
|
appsConfiguration: o,
|
|
155
|
-
appConf:
|
|
155
|
+
appConf: i
|
|
156
156
|
};
|
|
157
157
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
158
158
|
}
|
|
@@ -169,42 +169,42 @@ function ge(e, t, n) {
|
|
|
169
169
|
"Content-Type": "application/json",
|
|
170
170
|
Accept: "application/json"
|
|
171
171
|
},
|
|
172
|
-
onComplete(
|
|
173
|
-
const c = JSON.parse(
|
|
172
|
+
onComplete(i, r, a) {
|
|
173
|
+
const c = JSON.parse(i), d = c.data.map((l) => {
|
|
174
174
|
const p = l.attributes.name, u = l.id;
|
|
175
175
|
return { name: p, id: u };
|
|
176
176
|
});
|
|
177
177
|
t && t(d, c);
|
|
178
178
|
},
|
|
179
|
-
onFailure(
|
|
180
|
-
const a =
|
|
181
|
-
a.msg =
|
|
179
|
+
onFailure(i, r) {
|
|
180
|
+
const a = i;
|
|
181
|
+
a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
function he(e, t = void 0, n = void 0) {
|
|
186
186
|
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
187
|
f(s, {
|
|
188
|
-
onComplete(o,
|
|
188
|
+
onComplete(o, i, r) {
|
|
189
189
|
const a = JSON.parse(o);
|
|
190
190
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
191
|
},
|
|
192
|
-
onFailure(o,
|
|
193
|
-
const
|
|
194
|
-
|
|
192
|
+
onFailure(o, i) {
|
|
193
|
+
const r = o;
|
|
194
|
+
r.msg = i.errormsg, r.errCode = i.errorcode, n && n(r);
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
function Se(e, t, n = void 0, s = void 0) {
|
|
199
199
|
let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
200
|
f(o, {
|
|
201
|
-
onComplete(
|
|
202
|
-
const c = JSON.parse(
|
|
201
|
+
onComplete(i, r, a) {
|
|
202
|
+
const c = JSON.parse(i);
|
|
203
203
|
n && n(c);
|
|
204
204
|
},
|
|
205
|
-
onFailure(
|
|
206
|
-
const a =
|
|
207
|
-
a.msg =
|
|
205
|
+
onFailure(i, r) {
|
|
206
|
+
const a = i;
|
|
207
|
+
a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
@@ -213,14 +213,14 @@ const F = {
|
|
|
213
213
|
Accept: "application/json,text/javascript,*/*"
|
|
214
214
|
};
|
|
215
215
|
function _e(e, t, n = void 0, s = void 0) {
|
|
216
|
-
const { space: o, currentUser:
|
|
216
|
+
const { space: o, currentUser: i } = e, a = `${o}${{
|
|
217
217
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
218
|
}.URIUGr}`, c = {
|
|
219
219
|
groups: [
|
|
220
220
|
{
|
|
221
221
|
title: t.title,
|
|
222
222
|
description: t.description,
|
|
223
|
-
members: t.members || [
|
|
223
|
+
members: t.members || [i.email, "samuel.mureau@beam3.fr"],
|
|
224
224
|
pending_members: [],
|
|
225
225
|
sharing: t.sharing,
|
|
226
226
|
visibility: t.visibility
|
|
@@ -242,7 +242,7 @@ function _e(e, t, n = void 0, s = void 0) {
|
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
function ye(e, t, n = void 0, s = void 0) {
|
|
245
|
-
const { space: o, tenant:
|
|
245
|
+
const { space: o, tenant: i } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${i}`, d = `${r}${a}${c}`;
|
|
246
246
|
f(d, {
|
|
247
247
|
opts: {
|
|
248
248
|
method: "GET",
|
|
@@ -261,10 +261,10 @@ function ye(e, t, n = void 0, s = void 0) {
|
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
function E(e, t = void 0, n = void 0) {
|
|
264
|
-
const { space: s, tenant: o } = e,
|
|
264
|
+
const { space: s, tenant: o } = e, i = s, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
|
|
265
265
|
method: "GET",
|
|
266
266
|
Accept: "application/json,*/*,test/javascript"
|
|
267
|
-
}, d = `${
|
|
267
|
+
}, d = `${i}${r}${a}`;
|
|
268
268
|
f(d, {
|
|
269
269
|
OPTsH: c,
|
|
270
270
|
onComplete(l) {
|
|
@@ -314,15 +314,15 @@ function Te(e, t) {
|
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
function Ce(e, t, n, s = void 0, o = void 0) {
|
|
317
|
-
const { space:
|
|
317
|
+
const { space: i, tenant: r } = e, a = {
|
|
318
318
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
319
319
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
320
320
|
nextURICh: "/characteristics",
|
|
321
321
|
nextURIGr: "/group",
|
|
322
322
|
nexURImem: "/members",
|
|
323
323
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
324
|
-
OPTsTenant: `tenant=dstenant:${
|
|
325
|
-
}, c = n, d = `${
|
|
324
|
+
OPTsTenant: `tenant=dstenant:${r}`
|
|
325
|
+
}, c = n, d = `${i}${a.URIUGr}/${t}`, l = JSON.stringify(c);
|
|
326
326
|
f(d, {
|
|
327
327
|
headers: F,
|
|
328
328
|
method: "PATCH",
|
|
@@ -337,7 +337,7 @@ function Ce(e, t, n, s = void 0, o = void 0) {
|
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
function Oe(e, t, n, s = void 0, o = void 0) {
|
|
340
|
-
const { space:
|
|
340
|
+
const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
341
341
|
f(a, {
|
|
342
342
|
method: "PATCH",
|
|
343
343
|
headers: F,
|
|
@@ -352,8 +352,8 @@ function Oe(e, t, n, s = void 0, o = void 0) {
|
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
function be(e, t, n = void 0, s = void 0) {
|
|
355
|
-
const { space: o } = e,
|
|
356
|
-
f(
|
|
355
|
+
const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
|
+
f(r, {
|
|
357
357
|
opts: {
|
|
358
358
|
method: "GET",
|
|
359
359
|
headers: {
|
|
@@ -374,13 +374,13 @@ const J = async (e, t, n) => {
|
|
|
374
374
|
return;
|
|
375
375
|
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
376
376
|
try {
|
|
377
|
-
|
|
377
|
+
return response = await f(
|
|
378
378
|
s,
|
|
379
|
-
(
|
|
379
|
+
(o) => {
|
|
380
380
|
const i = JSON.parse(o);
|
|
381
|
-
console.log("getCSRFToken() / response => ", i), t?.(i.csrf);
|
|
381
|
+
return console.log("getCSRFToken() / response => ", i), t?.(i.csrf), i;
|
|
382
382
|
},
|
|
383
|
-
(
|
|
383
|
+
(o) => {
|
|
384
384
|
n?.({ error, headers, xhr });
|
|
385
385
|
}
|
|
386
386
|
);
|
|
@@ -394,14 +394,14 @@ async function G(e, t = void 0, n = void 0, s = void 0) {
|
|
|
394
394
|
console.log("Le paramètre docid est obligatoire");
|
|
395
395
|
return;
|
|
396
396
|
}
|
|
397
|
-
const
|
|
398
|
-
f(
|
|
399
|
-
onComplete(
|
|
400
|
-
const d = JSON.parse(
|
|
397
|
+
const i = o + `/resources/v1/modeler/documents/${t}`;
|
|
398
|
+
f(i, {
|
|
399
|
+
onComplete(r, a, c) {
|
|
400
|
+
const d = JSON.parse(r);
|
|
401
401
|
n && n(d);
|
|
402
402
|
},
|
|
403
|
-
onFailure(
|
|
404
|
-
s && s(
|
|
403
|
+
onFailure(r) {
|
|
404
|
+
s && s(r);
|
|
405
405
|
}
|
|
406
406
|
});
|
|
407
407
|
}
|
|
@@ -409,7 +409,7 @@ function k(e, t = void 0, n = void 0) {
|
|
|
409
409
|
if (e.objID && e.objID !== "") {
|
|
410
410
|
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
411
411
|
console.log("_3DSpace_get_csrf / url", s), f(s, {
|
|
412
|
-
onComplete(o,
|
|
412
|
+
onComplete(o, i, r) {
|
|
413
413
|
const a = JSON.parse(o);
|
|
414
414
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
415
415
|
},
|
|
@@ -432,12 +432,12 @@ function C(e, t = void 0, n = void 0) {
|
|
|
432
432
|
if (e.space) {
|
|
433
433
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
434
434
|
f(s, {
|
|
435
|
-
onComplete(o,
|
|
435
|
+
onComplete(o, i, r) {
|
|
436
436
|
const a = JSON.parse(o);
|
|
437
437
|
console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
|
|
438
438
|
},
|
|
439
|
-
onFailure(o,
|
|
440
|
-
n && n({ response: o, headers:
|
|
439
|
+
onFailure(o, i, r) {
|
|
440
|
+
n && n({ response: o, headers: i, xhr: r });
|
|
441
441
|
}
|
|
442
442
|
});
|
|
443
443
|
} else
|
|
@@ -457,12 +457,12 @@ function U(e, t = void 0, n = void 0) {
|
|
|
457
457
|
headers: {
|
|
458
458
|
ENO_CSRF_TOKEN: e.token
|
|
459
459
|
},
|
|
460
|
-
onComplete(
|
|
461
|
-
const a = JSON.parse(
|
|
460
|
+
onComplete(i) {
|
|
461
|
+
const a = JSON.parse(i).data[0].dataelements.ticketURL;
|
|
462
462
|
console.log("le ticket est dans la callback"), t && t(a);
|
|
463
463
|
},
|
|
464
|
-
onFailure(
|
|
465
|
-
console.warn("☠️ error => ",
|
|
464
|
+
onFailure(i, r) {
|
|
465
|
+
console.warn("☠️ error => ", i, r), n && n(i, r);
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
468
|
},
|
|
@@ -472,14 +472,14 @@ function U(e, t = void 0, n = void 0) {
|
|
|
472
472
|
);
|
|
473
473
|
}
|
|
474
474
|
function Ne(e, t, n, s = void 0, o = void 0) {
|
|
475
|
-
const
|
|
476
|
-
n || (n = e.token), f(
|
|
475
|
+
const i = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
476
|
+
n || (n = e.token), f(i, {
|
|
477
477
|
method: "PUT",
|
|
478
478
|
headers: {
|
|
479
479
|
ENO_CSRF_TOKEN: n
|
|
480
480
|
},
|
|
481
|
-
onComplete(
|
|
482
|
-
let a = JSON.parse(
|
|
481
|
+
onComplete(r) {
|
|
482
|
+
let a = JSON.parse(r);
|
|
483
483
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
484
484
|
try {
|
|
485
485
|
const c = a.data[0].dataelements.ticketURL;
|
|
@@ -488,12 +488,12 @@ function Ne(e, t, n, s = void 0, o = void 0) {
|
|
|
488
488
|
o && o(c);
|
|
489
489
|
}
|
|
490
490
|
},
|
|
491
|
-
onFailure(
|
|
492
|
-
o && o(
|
|
491
|
+
onFailure(r) {
|
|
492
|
+
o && o(r);
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
|
-
function K(e, t, n, s, o,
|
|
496
|
+
function K(e, t, n, s, o, i = void 0, r = void 0) {
|
|
497
497
|
k(
|
|
498
498
|
e,
|
|
499
499
|
t,
|
|
@@ -505,18 +505,18 @@ function K(e, t, n, s, o, r = void 0, i = void 0) {
|
|
|
505
505
|
s,
|
|
506
506
|
o,
|
|
507
507
|
a.csrf.value,
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
i,
|
|
509
|
+
r
|
|
510
510
|
);
|
|
511
511
|
}
|
|
512
512
|
);
|
|
513
513
|
}
|
|
514
|
-
function W(e, t, n, s, o,
|
|
514
|
+
function W(e, t, n, s, o, i, r = void 0, a = void 0) {
|
|
515
515
|
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
516
516
|
f(c, {
|
|
517
517
|
method: "PUT",
|
|
518
518
|
headers: {
|
|
519
|
-
ENO_CSRF_TOKEN:
|
|
519
|
+
ENO_CSRF_TOKEN: i
|
|
520
520
|
},
|
|
521
521
|
onComplete(d, l, p) {
|
|
522
522
|
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
@@ -526,7 +526,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
|
526
526
|
let S = "temp_" + Date.now(), _ = {
|
|
527
527
|
method: "PUT",
|
|
528
528
|
headers: {
|
|
529
|
-
ENO_CSRF_TOKEN:
|
|
529
|
+
ENO_CSRF_TOKEN: i
|
|
530
530
|
},
|
|
531
531
|
data: JSON.stringify({
|
|
532
532
|
data: [
|
|
@@ -550,7 +550,7 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
|
550
550
|
}),
|
|
551
551
|
type: "json",
|
|
552
552
|
onComplete(y) {
|
|
553
|
-
|
|
553
|
+
r && r(y);
|
|
554
554
|
},
|
|
555
555
|
onFailure(y) {
|
|
556
556
|
a && a(y);
|
|
@@ -566,14 +566,14 @@ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
|
566
566
|
}
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
|
-
async function ke(e, t, n, s, o = void 0,
|
|
570
|
-
const
|
|
569
|
+
async function ke(e, t, n, s, o = void 0, i = void 0) {
|
|
570
|
+
const r = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
571
571
|
type: "text/plain"
|
|
572
572
|
}), p = {
|
|
573
|
-
url_Ticket: `${
|
|
574
|
-
url_Post: `${
|
|
573
|
+
url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
574
|
+
url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
|
|
575
575
|
};
|
|
576
|
-
if (!
|
|
576
|
+
if (!r && r !== "") {
|
|
577
577
|
console.log("le store._3DSpace est vide");
|
|
578
578
|
return;
|
|
579
579
|
}
|
|
@@ -636,15 +636,15 @@ async function ke(e, t, n, s, o = void 0, r = void 0) {
|
|
|
636
636
|
}
|
|
637
637
|
function y(T, D) {
|
|
638
638
|
console.log("Erreur -- response ", T, `
|
|
639
|
-
headers `, D),
|
|
639
|
+
headers `, D), i && i(T);
|
|
640
640
|
}
|
|
641
641
|
f(h.ticketURL, S);
|
|
642
642
|
}
|
|
643
643
|
});
|
|
644
644
|
}
|
|
645
|
-
function b(e, t = void 0, n = void 0, s = void 0, o = void 0,
|
|
646
|
-
const
|
|
647
|
-
f(
|
|
645
|
+
function b(e, t = void 0, n = void 0, s = void 0, o = void 0, i = void 0) {
|
|
646
|
+
const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
647
|
+
f(r, {
|
|
648
648
|
method: "GET",
|
|
649
649
|
onComplete(a) {
|
|
650
650
|
const c = JSON.parse(a);
|
|
@@ -666,7 +666,7 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
|
|
|
666
666
|
let _ = g.filter(
|
|
667
667
|
(y) => y.role.name === h
|
|
668
668
|
);
|
|
669
|
-
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) :
|
|
669
|
+
_.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : i(_);
|
|
670
670
|
}
|
|
671
671
|
});
|
|
672
672
|
}) : g.forEach((h) => {
|
|
@@ -676,12 +676,12 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
|
|
|
676
676
|
let S = g.filter(
|
|
677
677
|
(_) => _.role.name === n
|
|
678
678
|
);
|
|
679
|
-
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) :
|
|
679
|
+
S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : i(S);
|
|
680
680
|
}
|
|
681
681
|
}));
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
l && p && u ? (d = u + "." + p + "." + l, o(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, o(d)) :
|
|
684
|
+
l && p && u ? (d = u + "." + p + "." + l, o(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, o(d)) : i && (d = u + "." + p + "." + l, i(d));
|
|
685
685
|
},
|
|
686
686
|
onFailure(a) {
|
|
687
687
|
console.log("Erreur de récupération du contexte de sécurité. => ", a);
|
|
@@ -694,34 +694,34 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
|
|
|
694
694
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
695
695
|
), (e.space === "" || !e.space) && console.warn(
|
|
696
696
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
697
|
-
), (e.token === "" || !e.token) && (J(
|
|
697
|
+
), (e.token === "" || !e.token) && (console.log("je récupère un nouveau token"), J(
|
|
698
698
|
e,
|
|
699
|
-
(
|
|
700
|
-
e.token =
|
|
699
|
+
(i) => {
|
|
700
|
+
e.token = i;
|
|
701
701
|
},
|
|
702
|
-
(
|
|
703
|
-
console.log("☠️ error => ",
|
|
702
|
+
(i) => {
|
|
703
|
+
console.log("☠️ error => ", i);
|
|
704
704
|
}
|
|
705
705
|
), console.warn(
|
|
706
706
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
707
707
|
)), console.log("_3DSpace_download_doc / credentials", e), U(
|
|
708
708
|
e,
|
|
709
|
-
(
|
|
710
|
-
f(
|
|
709
|
+
(i) => {
|
|
710
|
+
f(i, {
|
|
711
711
|
headers: {
|
|
712
712
|
ENO_CSRF_TOKEN: e.token
|
|
713
713
|
},
|
|
714
|
-
onComplete(
|
|
715
|
-
const a = JSON.parse(
|
|
714
|
+
onComplete(r) {
|
|
715
|
+
const a = JSON.parse(r);
|
|
716
716
|
console.log("_3DSpace_download_doc / reponse ", a), t && t(a);
|
|
717
717
|
},
|
|
718
|
-
onFailure(
|
|
719
|
-
n && (console.log("error http",
|
|
718
|
+
onFailure(r, a, c) {
|
|
719
|
+
n && (console.log("error http", r), n({ error: r, headers: a, xhr: c }));
|
|
720
720
|
}
|
|
721
721
|
});
|
|
722
722
|
},
|
|
723
|
-
(
|
|
724
|
-
n && n(
|
|
723
|
+
(i) => {
|
|
724
|
+
n && n(i), console.log("*_3dspace_download_doc / error file URL *", i);
|
|
725
725
|
}
|
|
726
726
|
);
|
|
727
727
|
}
|
|
@@ -731,38 +731,38 @@ async function X(e, t, n = void 0, s = void 0) {
|
|
|
731
731
|
const c = t.slice(a, a + 80);
|
|
732
732
|
o.push(c);
|
|
733
733
|
}
|
|
734
|
-
const
|
|
734
|
+
const r = (a) => {
|
|
735
735
|
V(
|
|
736
736
|
e,
|
|
737
737
|
o[a],
|
|
738
738
|
() => {
|
|
739
|
-
a++, a < o.length &&
|
|
739
|
+
a++, a < o.length && r(a);
|
|
740
740
|
},
|
|
741
741
|
(c) => {
|
|
742
742
|
n && n(c);
|
|
743
743
|
}
|
|
744
744
|
);
|
|
745
745
|
};
|
|
746
|
-
|
|
746
|
+
r(0);
|
|
747
747
|
}
|
|
748
748
|
function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
749
|
-
const
|
|
749
|
+
const i = [];
|
|
750
750
|
t.forEach((c) => {
|
|
751
|
-
|
|
751
|
+
i.push({
|
|
752
752
|
id: c
|
|
753
753
|
});
|
|
754
754
|
});
|
|
755
|
-
let
|
|
755
|
+
let r = JSON.stringify({
|
|
756
756
|
csrf: {
|
|
757
757
|
name: "ENO_CSRF_TOKEN",
|
|
758
758
|
value: e.token
|
|
759
759
|
},
|
|
760
|
-
data:
|
|
760
|
+
data: i
|
|
761
761
|
});
|
|
762
762
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
763
763
|
f(a, {
|
|
764
764
|
method: "PUT",
|
|
765
|
-
data:
|
|
765
|
+
data: r,
|
|
766
766
|
type: "json",
|
|
767
767
|
onComplete(c) {
|
|
768
768
|
const d = c.data;
|
|
@@ -794,7 +794,7 @@ function V(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
794
794
|
function De(e, t, n = void 0, s = void 0) {
|
|
795
795
|
return new Promise((o) => {
|
|
796
796
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
797
|
-
const
|
|
797
|
+
const i = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
798
798
|
b(
|
|
799
799
|
e.space,
|
|
800
800
|
"ESPACE COMMUN",
|
|
@@ -805,7 +805,7 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
805
805
|
console.log("onError =>", a);
|
|
806
806
|
}
|
|
807
807
|
);
|
|
808
|
-
let
|
|
808
|
+
let r = {
|
|
809
809
|
method: "POST",
|
|
810
810
|
headers: {
|
|
811
811
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -828,14 +828,14 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
828
828
|
s && s(a);
|
|
829
829
|
}
|
|
830
830
|
};
|
|
831
|
-
f(
|
|
831
|
+
f(i, r);
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
835
|
function Fe(e, t, n, s = void 0, o = void 0) {
|
|
836
|
-
return new Promise((
|
|
836
|
+
return new Promise((i) => {
|
|
837
837
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
838
|
-
const
|
|
838
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
839
839
|
b(
|
|
840
840
|
e.space,
|
|
841
841
|
"ESPACE COMMUN",
|
|
@@ -870,14 +870,14 @@ function Fe(e, t, n, s = void 0, o = void 0) {
|
|
|
870
870
|
o && o(c);
|
|
871
871
|
}
|
|
872
872
|
};
|
|
873
|
-
f(
|
|
873
|
+
f(r, a);
|
|
874
874
|
}
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
877
|
function Ue(e, t, n = void 0, s = void 0) {
|
|
878
878
|
return new Promise((o) => {
|
|
879
879
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
880
|
-
const
|
|
880
|
+
const i = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
881
881
|
b(
|
|
882
882
|
e.space,
|
|
883
883
|
"ESPACE COMMUN",
|
|
@@ -888,7 +888,7 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
888
888
|
console.log("onError =>", a);
|
|
889
889
|
}
|
|
890
890
|
);
|
|
891
|
-
let
|
|
891
|
+
let r = {
|
|
892
892
|
method: "POST",
|
|
893
893
|
headers: {
|
|
894
894
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -911,14 +911,14 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
911
911
|
s && s(a);
|
|
912
912
|
}
|
|
913
913
|
};
|
|
914
|
-
f(
|
|
914
|
+
f(i, r);
|
|
915
915
|
}
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
918
|
function $e(e, t, n = void 0, s = void 0) {
|
|
919
919
|
return new Promise((o) => {
|
|
920
920
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
921
|
-
const
|
|
921
|
+
const i = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
922
922
|
b(
|
|
923
923
|
e.space,
|
|
924
924
|
"ESPACE COMMUN",
|
|
@@ -929,7 +929,7 @@ function $e(e, t, n = void 0, s = void 0) {
|
|
|
929
929
|
console.log("onError =>", a);
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
|
-
let
|
|
932
|
+
let r = {
|
|
933
933
|
method: "POST",
|
|
934
934
|
headers: {
|
|
935
935
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -958,14 +958,14 @@ function $e(e, t, n = void 0, s = void 0) {
|
|
|
958
958
|
s && s(a);
|
|
959
959
|
}
|
|
960
960
|
};
|
|
961
|
-
f(
|
|
961
|
+
f(i, r);
|
|
962
962
|
}
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
965
|
function je(e, t, n, s = void 0, o = void 0) {
|
|
966
|
-
return new Promise((
|
|
966
|
+
return new Promise((i) => {
|
|
967
967
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
968
|
-
const
|
|
968
|
+
const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
969
969
|
b(
|
|
970
970
|
e.space,
|
|
971
971
|
"ESPACE COMMUN",
|
|
@@ -1005,7 +1005,7 @@ function je(e, t, n, s = void 0, o = void 0) {
|
|
|
1005
1005
|
o && o(c);
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
|
-
f(
|
|
1008
|
+
f(r, a);
|
|
1009
1009
|
}
|
|
1010
1010
|
});
|
|
1011
1011
|
}
|
|
@@ -1022,12 +1022,12 @@ function Re(e, t = void 0, n = void 0) {
|
|
|
1022
1022
|
Accept: "application/json,text/javascript,*/*",
|
|
1023
1023
|
"Content-Type": "application/ds-json"
|
|
1024
1024
|
},
|
|
1025
|
-
onComplete(
|
|
1026
|
-
const a = JSON.parse(
|
|
1027
|
-
t && t(a,
|
|
1025
|
+
onComplete(i, r) {
|
|
1026
|
+
const a = JSON.parse(i);
|
|
1027
|
+
t && t(a, r);
|
|
1028
1028
|
},
|
|
1029
|
-
onFailure(
|
|
1030
|
-
n && n({ response:
|
|
1029
|
+
onFailure(i, r, a) {
|
|
1030
|
+
n && n({ response: i, headers: r, xhr: a });
|
|
1031
1031
|
}
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
@@ -1038,11 +1038,11 @@ function Ae(e, t, n, s) {
|
|
|
1038
1038
|
(o) => {
|
|
1039
1039
|
f(o, {
|
|
1040
1040
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1041
|
-
onComplete: (
|
|
1042
|
-
n && n(
|
|
1041
|
+
onComplete: (i) => {
|
|
1042
|
+
n && n(i);
|
|
1043
1043
|
},
|
|
1044
|
-
onFailure: (
|
|
1045
|
-
console.log("error http",
|
|
1044
|
+
onFailure: (i) => {
|
|
1045
|
+
console.log("error http", i), s && s(i);
|
|
1046
1046
|
}
|
|
1047
1047
|
});
|
|
1048
1048
|
}
|
|
@@ -1050,28 +1050,28 @@ function Ae(e, t, n, s) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
async function Ie(e, t, n = void 0, s = void 0) {
|
|
1052
1052
|
return new Promise((o) => {
|
|
1053
|
-
U(e, t, (
|
|
1054
|
-
f(
|
|
1055
|
-
onComplete: (
|
|
1056
|
-
onFailure: (
|
|
1057
|
-
s && s(
|
|
1053
|
+
U(e, t, (i) => {
|
|
1054
|
+
f(i, {
|
|
1055
|
+
onComplete: (r, a, c) => (o(JSON.parse(r)), n && n(JSON.parse(r), a, c), o),
|
|
1056
|
+
onFailure: (r, a, c) => {
|
|
1057
|
+
s && s(r, a, c), console.log(r, a?.errormsg);
|
|
1058
1058
|
}
|
|
1059
1059
|
});
|
|
1060
1060
|
});
|
|
1061
1061
|
});
|
|
1062
1062
|
}
|
|
1063
1063
|
function ve(e, t, n, s = void 0, o = void 0) {
|
|
1064
|
-
const
|
|
1064
|
+
const i = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1065
1065
|
k(
|
|
1066
1066
|
e,
|
|
1067
1067
|
n,
|
|
1068
|
-
(
|
|
1069
|
-
const a =
|
|
1068
|
+
(r) => {
|
|
1069
|
+
const a = r.data[0].relateddata.files[0].id, c = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
|
|
1070
1070
|
K(
|
|
1071
1071
|
e,
|
|
1072
1072
|
n,
|
|
1073
1073
|
a,
|
|
1074
|
-
|
|
1074
|
+
i,
|
|
1075
1075
|
c,
|
|
1076
1076
|
(d) => {
|
|
1077
1077
|
s && s(d);
|
|
@@ -1118,15 +1118,15 @@ async function Pe(e, t = void 0, n = void 0) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
function Me(e, t = void 0, n = void 0) {
|
|
1120
1120
|
const s = [];
|
|
1121
|
-
e.objIds.forEach((o,
|
|
1121
|
+
e.objIds.forEach((o, i) => {
|
|
1122
1122
|
I(
|
|
1123
1123
|
e,
|
|
1124
1124
|
o.objId,
|
|
1125
|
-
(
|
|
1126
|
-
s.push({ [o.name]:
|
|
1125
|
+
(r) => {
|
|
1126
|
+
s.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, x)), i === e.objIds.length - 1 && t && t(s);
|
|
1127
1127
|
},
|
|
1128
|
-
(
|
|
1129
|
-
n && n(
|
|
1128
|
+
(r) => {
|
|
1129
|
+
n && n(r);
|
|
1130
1130
|
}
|
|
1131
1131
|
);
|
|
1132
1132
|
});
|
|
@@ -1136,8 +1136,8 @@ function B(e, t, n = void 0, s = void 0) {
|
|
|
1136
1136
|
e,
|
|
1137
1137
|
v,
|
|
1138
1138
|
(o) => {
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1139
|
+
const i = [...t];
|
|
1140
|
+
i.find((r) => r.objectID === o.objectId).data = o.data, x = i, $.push(o.data), n && n($);
|
|
1141
1141
|
},
|
|
1142
1142
|
(o) => {
|
|
1143
1143
|
s && (s(o), console.log(o));
|
|
@@ -1165,16 +1165,16 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1165
1165
|
tag: "testTag"
|
|
1166
1166
|
};
|
|
1167
1167
|
function Le(e, t, n = void 0, s = void 0) {
|
|
1168
|
-
const { space: o, tenant:
|
|
1168
|
+
const { space: o, tenant: i } = e, { objId: r, pred: a, tag: c } = t, d = {
|
|
1169
1169
|
uri: "/resources/6w/tags",
|
|
1170
1170
|
otpCTX: "SecurityContext=preferred",
|
|
1171
|
-
optTenant: `tenant=${
|
|
1171
|
+
optTenant: `tenant=${i}`
|
|
1172
1172
|
}, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1173
1173
|
tag: [
|
|
1174
1174
|
{
|
|
1175
1175
|
subject: [
|
|
1176
1176
|
{
|
|
1177
|
-
uri: `pid://${
|
|
1177
|
+
uri: `pid://${r}`
|
|
1178
1178
|
}
|
|
1179
1179
|
],
|
|
1180
1180
|
predicate: P[a],
|
|
@@ -1197,7 +1197,7 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1197
1197
|
setTimeout(() => {
|
|
1198
1198
|
G(
|
|
1199
1199
|
e,
|
|
1200
|
-
|
|
1200
|
+
r,
|
|
1201
1201
|
(g) => {
|
|
1202
1202
|
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1203
1203
|
m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, q(
|
|
@@ -1226,10 +1226,10 @@ function Le(e, t, n = void 0, s = void 0) {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
function q(e, t, n = void 0, s = void 0) {
|
|
1228
1228
|
console.log("obj ", t);
|
|
1229
|
-
const o = t.info.name,
|
|
1229
|
+
const o = t.info.name, i = {
|
|
1230
1230
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1231
1231
|
uri: "/federated/search"
|
|
1232
|
-
},
|
|
1232
|
+
}, r = `${i.baseUrl}${i.uri}`, a = {
|
|
1233
1233
|
"Content-Type": "application/json",
|
|
1234
1234
|
Accept: "application/json,text/javascript,*/*"
|
|
1235
1235
|
}, c = A(), d = {
|
|
@@ -1293,7 +1293,7 @@ function q(e, t, n = void 0, s = void 0) {
|
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
1295
|
};
|
|
1296
|
-
console.log("dataPattern => ", d), f(
|
|
1296
|
+
console.log("dataPattern => ", d), f(r, {
|
|
1297
1297
|
method: "POST",
|
|
1298
1298
|
headers: a,
|
|
1299
1299
|
data: JSON.stringify(d),
|
|
@@ -1308,7 +1308,7 @@ function q(e, t, n = void 0, s = void 0) {
|
|
|
1308
1308
|
});
|
|
1309
1309
|
}
|
|
1310
1310
|
function Ee(e, t, n = void 0, s = void 0) {
|
|
1311
|
-
const { objId: o, pred:
|
|
1311
|
+
const { objId: o, pred: i, tag: r } = t, a = {
|
|
1312
1312
|
uri: "/resources/6w/tags",
|
|
1313
1313
|
otpCTX: "SecurityContext=preferred",
|
|
1314
1314
|
optTenant: `tenant=${e.tenant}`
|
|
@@ -1320,9 +1320,9 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1320
1320
|
uri: `pid://${o}`
|
|
1321
1321
|
}
|
|
1322
1322
|
],
|
|
1323
|
-
predicate: P[
|
|
1323
|
+
predicate: P[i],
|
|
1324
1324
|
object: {
|
|
1325
|
-
literal:
|
|
1325
|
+
literal: r
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
]
|
|
@@ -1347,15 +1347,15 @@ function Je(e, t = "", n = void 0, s = void 0) {
|
|
|
1347
1347
|
const { space: o } = e;
|
|
1348
1348
|
if (t === "")
|
|
1349
1349
|
return;
|
|
1350
|
-
const
|
|
1350
|
+
const i = {
|
|
1351
1351
|
uri: "/resources/v1/modeler/documents"
|
|
1352
|
-
},
|
|
1352
|
+
}, r = {
|
|
1353
1353
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1354
1354
|
Accept: "application/json,text/javascript,*/*"
|
|
1355
|
-
}, a = `${o}${
|
|
1355
|
+
}, a = `${o}${i.uri}`, c = `$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}`;
|
|
1356
1356
|
f(a, {
|
|
1357
1357
|
method: "POST",
|
|
1358
|
-
headers:
|
|
1358
|
+
headers: r,
|
|
1359
1359
|
data: c,
|
|
1360
1360
|
onComplete(d) {
|
|
1361
1361
|
n && n(JSON.parse(d));
|
|
@@ -1369,7 +1369,7 @@ function Je(e, t = "", n = void 0, s = void 0) {
|
|
|
1369
1369
|
async function w(e, t = void 0, n = void 0) {
|
|
1370
1370
|
const s = e.space + "/api/index/tk";
|
|
1371
1371
|
return f(s, {
|
|
1372
|
-
onComplete(o,
|
|
1372
|
+
onComplete(o, i, r) {
|
|
1373
1373
|
const a = JSON.parse(o);
|
|
1374
1374
|
if (t)
|
|
1375
1375
|
return t(a), e.token = a?.result?.ServerToken;
|
|
@@ -1390,21 +1390,21 @@ function Ge(e, t = void 0, n = void 0) {
|
|
|
1390
1390
|
start: 0
|
|
1391
1391
|
}
|
|
1392
1392
|
};
|
|
1393
|
-
w(e, (
|
|
1393
|
+
w(e, (i) => {
|
|
1394
1394
|
f(s, {
|
|
1395
1395
|
method: "POST",
|
|
1396
1396
|
headers: {
|
|
1397
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1397
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken,
|
|
1398
1398
|
"Content-type": "application/json;charset=UTF-8",
|
|
1399
1399
|
Accept: "application/json"
|
|
1400
1400
|
},
|
|
1401
1401
|
data: JSON.stringify(o),
|
|
1402
1402
|
type: "json",
|
|
1403
|
-
onComplete(
|
|
1404
|
-
t && t(
|
|
1403
|
+
onComplete(r, a) {
|
|
1404
|
+
t && t(r, a);
|
|
1405
1405
|
},
|
|
1406
|
-
onFailure(
|
|
1407
|
-
n && n(
|
|
1406
|
+
onFailure(r, a) {
|
|
1407
|
+
n && n(r, a);
|
|
1408
1408
|
}
|
|
1409
1409
|
});
|
|
1410
1410
|
});
|
|
@@ -1419,22 +1419,22 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1419
1419
|
maxNbOfCommonElements: "5"
|
|
1420
1420
|
}
|
|
1421
1421
|
};
|
|
1422
|
-
w(e, (
|
|
1422
|
+
w(e, (i) => {
|
|
1423
1423
|
f(s, {
|
|
1424
1424
|
method: "POST",
|
|
1425
1425
|
headers: {
|
|
1426
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1426
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken,
|
|
1427
1427
|
"Content-type": "application/json;charset=UTF-8",
|
|
1428
1428
|
Accept: "application/json"
|
|
1429
1429
|
},
|
|
1430
1430
|
data: JSON.stringify(o),
|
|
1431
1431
|
type: "json",
|
|
1432
|
-
onComplete(
|
|
1433
|
-
const c =
|
|
1434
|
-
t && t(c,
|
|
1432
|
+
onComplete(r, a) {
|
|
1433
|
+
const c = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1434
|
+
t && t(c, r);
|
|
1435
1435
|
},
|
|
1436
|
-
onFailure(
|
|
1437
|
-
n && n(
|
|
1436
|
+
onFailure(r, a) {
|
|
1437
|
+
n && n(r, a);
|
|
1438
1438
|
}
|
|
1439
1439
|
});
|
|
1440
1440
|
});
|
|
@@ -1445,12 +1445,12 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1445
1445
|
uri: "/api/community/listmycommunities",
|
|
1446
1446
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1447
1447
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1448
|
-
}, o = `${s.base}${s.uri}${s.limit}${s.page}`,
|
|
1449
|
-
w(e, (
|
|
1448
|
+
}, o = `${s.base}${s.uri}${s.limit}${s.page}`, i = [];
|
|
1449
|
+
w(e, (r) => {
|
|
1450
1450
|
f(o, {
|
|
1451
1451
|
method: "GET",
|
|
1452
1452
|
headers: {
|
|
1453
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1453
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1454
1454
|
},
|
|
1455
1455
|
onComplete(a, c, d) {
|
|
1456
1456
|
const p = JSON.parse(a).result;
|
|
@@ -1468,7 +1468,7 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1468
1468
|
e,
|
|
1469
1469
|
m.id,
|
|
1470
1470
|
(h) => {
|
|
1471
|
-
u++, g.members = h,
|
|
1471
|
+
u++, g.members = h, i.push(g), u === p.length && t && t(i);
|
|
1472
1472
|
},
|
|
1473
1473
|
(h) => n(h)
|
|
1474
1474
|
);
|
|
@@ -1482,22 +1482,22 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1482
1482
|
});
|
|
1483
1483
|
}
|
|
1484
1484
|
function Q(e, t, n, s) {
|
|
1485
|
-
const o = `${e.space}/api/community/listmembers`,
|
|
1485
|
+
const o = `${e.space}/api/community/listmembers`, i = {
|
|
1486
1486
|
params: {
|
|
1487
1487
|
page: e.page ? e.page : 1,
|
|
1488
1488
|
limit: e.limit ? e.limit : 50,
|
|
1489
1489
|
community_id: t
|
|
1490
1490
|
}
|
|
1491
1491
|
};
|
|
1492
|
-
w(e, (
|
|
1492
|
+
w(e, (r) => {
|
|
1493
1493
|
f(o, {
|
|
1494
1494
|
method: "POST",
|
|
1495
1495
|
headers: {
|
|
1496
1496
|
"Content-type": "application/json;charset=UTF-8",
|
|
1497
1497
|
Accept: "application/json",
|
|
1498
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1498
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1499
1499
|
},
|
|
1500
|
-
data: JSON.stringify(
|
|
1500
|
+
data: JSON.stringify(i),
|
|
1501
1501
|
type: "json",
|
|
1502
1502
|
onComplete(a, c, d) {
|
|
1503
1503
|
n && n(a);
|
|
@@ -1513,30 +1513,30 @@ function Xe(e, t = void 0, n = void 0) {
|
|
|
1513
1513
|
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1514
1514
|
e.commu_id || (e.commu_id = s);
|
|
1515
1515
|
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1516
|
-
w(e, (
|
|
1516
|
+
w(e, (i) => {
|
|
1517
1517
|
f(o, {
|
|
1518
1518
|
method: "GET",
|
|
1519
1519
|
headers: {
|
|
1520
1520
|
"Content-type": "application/json;charset=UTF-8",
|
|
1521
1521
|
Accept: "application/json",
|
|
1522
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1522
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1523
1523
|
},
|
|
1524
|
-
onComplete(
|
|
1525
|
-
const a = JSON.parse(
|
|
1524
|
+
onComplete(r) {
|
|
1525
|
+
const a = JSON.parse(r);
|
|
1526
1526
|
t && t(a);
|
|
1527
1527
|
},
|
|
1528
|
-
onFailure(
|
|
1529
|
-
const c =
|
|
1528
|
+
onFailure(r, a) {
|
|
1529
|
+
const c = r;
|
|
1530
1530
|
c.status = a.status, c.response = a.errormsg, n && n(c);
|
|
1531
1531
|
}
|
|
1532
1532
|
});
|
|
1533
1533
|
});
|
|
1534
1534
|
}
|
|
1535
1535
|
function Ve(e, t, n = void 0, s = void 0) {
|
|
1536
|
-
const { listAllContacts: o, currentUser:
|
|
1536
|
+
const { listAllContacts: o, currentUser: i } = e;
|
|
1537
1537
|
console.log("__listAllContacts", o.hits);
|
|
1538
|
-
const
|
|
1539
|
-
users: [
|
|
1538
|
+
const r = `${e.space}/api/directmessages`, a = {
|
|
1539
|
+
users: [i.login].concat(t.receipt)
|
|
1540
1540
|
}, c = {
|
|
1541
1541
|
id_msg: "",
|
|
1542
1542
|
senderId: e.currentUser.login,
|
|
@@ -1554,7 +1554,7 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1554
1554
|
}
|
|
1555
1555
|
), d === !1 && setTimeout(() => {
|
|
1556
1556
|
d === !1 && w(e, (l) => {
|
|
1557
|
-
f(
|
|
1557
|
+
f(r, {
|
|
1558
1558
|
method: "POST",
|
|
1559
1559
|
headers: {
|
|
1560
1560
|
"Content-Type": "application/json",
|
|
@@ -1577,15 +1577,15 @@ function Ve(e, t, n = void 0, s = void 0) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
function Z(e, t, n, s) {
|
|
1579
1579
|
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1580
|
-
w(e, (
|
|
1580
|
+
w(e, (i) => {
|
|
1581
1581
|
f(o, {
|
|
1582
1582
|
method: "GET",
|
|
1583
1583
|
headers: {
|
|
1584
1584
|
Accept: "application/json,text/javascript,*/*",
|
|
1585
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1585
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1586
1586
|
},
|
|
1587
|
-
onComplete(
|
|
1588
|
-
const a = JSON.parse(
|
|
1587
|
+
onComplete(r) {
|
|
1588
|
+
const a = JSON.parse(r), c = [];
|
|
1589
1589
|
a.result.forEach((p) => {
|
|
1590
1590
|
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
|
|
1591
1591
|
});
|
|
@@ -1597,8 +1597,8 @@ function Z(e, t, n, s) {
|
|
|
1597
1597
|
});
|
|
1598
1598
|
n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
|
|
1599
1599
|
},
|
|
1600
|
-
onFailure(
|
|
1601
|
-
const a =
|
|
1600
|
+
onFailure(r) {
|
|
1601
|
+
const a = r;
|
|
1602
1602
|
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
|
|
1603
1603
|
}
|
|
1604
1604
|
});
|
|
@@ -1610,7 +1610,7 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1610
1610
|
uri: "/api/community",
|
|
1611
1611
|
id_msg: `${t.id_msg}`,
|
|
1612
1612
|
endUri: "/instantmessages"
|
|
1613
|
-
},
|
|
1613
|
+
}, i = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, r = {
|
|
1614
1614
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1615
1615
|
accessState: null,
|
|
1616
1616
|
commentUri: null,
|
|
@@ -1620,15 +1620,15 @@ function j(e, t, n = void 0, s = void 0) {
|
|
|
1620
1620
|
parentCommentUri: null,
|
|
1621
1621
|
richMessage: t.msg
|
|
1622
1622
|
};
|
|
1623
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1624
|
-
f(
|
|
1623
|
+
console.log("_3dSwym_sendDirectMessageData url ", i), w(e, (a) => {
|
|
1624
|
+
f(i, {
|
|
1625
1625
|
method: "POST",
|
|
1626
1626
|
headers: {
|
|
1627
1627
|
"Content-Type": "application/json",
|
|
1628
1628
|
Accept: "application/json",
|
|
1629
1629
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1630
1630
|
},
|
|
1631
|
-
data: JSON.stringify(
|
|
1631
|
+
data: JSON.stringify(r),
|
|
1632
1632
|
type: "json",
|
|
1633
1633
|
onComplete(c, d, l) {
|
|
1634
1634
|
const p = c;
|
|
@@ -1659,15 +1659,15 @@ const te = {
|
|
|
1659
1659
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1660
1660
|
};
|
|
1661
1661
|
function Be(e, t, n = void 0, s = void 0) {
|
|
1662
|
-
const o = `${e.space}/api/idea/add`,
|
|
1662
|
+
const o = `${e.space}/api/idea/add`, i = e.swymCommunities.find(
|
|
1663
1663
|
(c) => c.id === t.community_id
|
|
1664
|
-
),
|
|
1664
|
+
), r = e.swymCommunities.find(
|
|
1665
1665
|
(c) => c.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1666
1666
|
), a = {
|
|
1667
1667
|
params: {
|
|
1668
1668
|
title: t.title,
|
|
1669
1669
|
// String, le nom de l'affaire
|
|
1670
|
-
community_id:
|
|
1670
|
+
community_id: i?.id !== void 0 ? i.id : r.id,
|
|
1671
1671
|
// String, l'id de la communauté
|
|
1672
1672
|
message: ne(t.text_html),
|
|
1673
1673
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1698,21 +1698,21 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
function Ye(e, t, n = void 0, s = void 0) {
|
|
1701
|
-
const o = `${e.space}/api/idea/delete`,
|
|
1701
|
+
const o = `${e.space}/api/idea/delete`, i = {
|
|
1702
1702
|
params: {
|
|
1703
1703
|
community_id: t.community_id,
|
|
1704
1704
|
ideationIds: [t.idee_id]
|
|
1705
1705
|
}
|
|
1706
1706
|
};
|
|
1707
|
-
w(e, (
|
|
1707
|
+
w(e, (r) => {
|
|
1708
1708
|
f(o, {
|
|
1709
1709
|
method: "POST",
|
|
1710
1710
|
headers: {
|
|
1711
1711
|
"Content-type": "application/json;charset=UTF-8",
|
|
1712
1712
|
Accept: "application/json",
|
|
1713
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1713
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1714
1714
|
},
|
|
1715
|
-
data: JSON.stringify(
|
|
1715
|
+
data: JSON.stringify(i),
|
|
1716
1716
|
type: "json",
|
|
1717
1717
|
onComplete(a, c, d) {
|
|
1718
1718
|
n && n(a);
|
|
@@ -1727,20 +1727,20 @@ function Ye(e, t, n = void 0, s = void 0) {
|
|
|
1727
1727
|
function He(e, t = "", n = void 0, s = void 0) {
|
|
1728
1728
|
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1729
1729
|
t === "" && (t = o);
|
|
1730
|
-
const
|
|
1730
|
+
const i = `${e.space}/api/idea/get`, r = {
|
|
1731
1731
|
params: {
|
|
1732
1732
|
id: t
|
|
1733
1733
|
}
|
|
1734
1734
|
};
|
|
1735
1735
|
w(e, (a) => {
|
|
1736
|
-
f(
|
|
1736
|
+
f(i, {
|
|
1737
1737
|
method: "POST",
|
|
1738
1738
|
headers: {
|
|
1739
1739
|
"Content-type": "application/json;charset=UTF-8",
|
|
1740
1740
|
Accept: "application/json",
|
|
1741
1741
|
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1742
1742
|
},
|
|
1743
|
-
data: JSON.stringify(
|
|
1743
|
+
data: JSON.stringify(r),
|
|
1744
1744
|
type: "json",
|
|
1745
1745
|
onComplete(c) {
|
|
1746
1746
|
const d = c;
|
|
@@ -1758,12 +1758,12 @@ function ze(e, t = te, n = void 0, s = void 0) {
|
|
|
1758
1758
|
uri: "/api/idea/list",
|
|
1759
1759
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1760
1760
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1761
|
-
},
|
|
1762
|
-
w(e, (
|
|
1763
|
-
f(
|
|
1761
|
+
}, i = `${e.space}${o.uri}${o.comId}${o.limit}`;
|
|
1762
|
+
w(e, (r) => {
|
|
1763
|
+
f(i, {
|
|
1764
1764
|
method: "GET",
|
|
1765
1765
|
headers: {
|
|
1766
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1766
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1767
1767
|
},
|
|
1768
1768
|
onComplete(a) {
|
|
1769
1769
|
const c = JSON.parse(a);
|
|
@@ -1859,12 +1859,12 @@ function qe(e, t = void 0, n = void 0) {
|
|
|
1859
1859
|
headers: {
|
|
1860
1860
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1861
1861
|
},
|
|
1862
|
-
onComplete(
|
|
1863
|
-
const c = JSON.parse(
|
|
1862
|
+
onComplete(i, r, a) {
|
|
1863
|
+
const c = JSON.parse(i);
|
|
1864
1864
|
t && t(c.result);
|
|
1865
1865
|
},
|
|
1866
|
-
onFailure(
|
|
1867
|
-
const c = { erreur: JSON.parse(
|
|
1866
|
+
onFailure(i, r, a) {
|
|
1867
|
+
const c = { erreur: JSON.parse(i), headers: r, xhr: a };
|
|
1868
1868
|
n && n(c);
|
|
1869
1869
|
}
|
|
1870
1870
|
});
|
|
@@ -1874,16 +1874,16 @@ function Qe(e, t, n = void 0, s = void 0) {
|
|
|
1874
1874
|
const o = e.space + "/api/user/find/login/" + t;
|
|
1875
1875
|
w(
|
|
1876
1876
|
e,
|
|
1877
|
-
(
|
|
1877
|
+
(i) => {
|
|
1878
1878
|
f(o, {
|
|
1879
1879
|
method: "GET",
|
|
1880
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1881
|
-
onComplete(
|
|
1882
|
-
const d = JSON.parse(
|
|
1880
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
|
|
1881
|
+
onComplete(r, a, c) {
|
|
1882
|
+
const d = JSON.parse(r);
|
|
1883
1883
|
n && n(d);
|
|
1884
1884
|
},
|
|
1885
|
-
onFailure(
|
|
1886
|
-
s && s(
|
|
1885
|
+
onFailure(r) {
|
|
1886
|
+
s && s(r);
|
|
1887
1887
|
}
|
|
1888
1888
|
});
|
|
1889
1889
|
},
|