@beam3_dev/api_module 0.0.165 → 0.0.167
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 +508 -465
- 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,10 +1,10 @@
|
|
|
1
|
-
import { v4 as
|
|
1
|
+
import { v4 as G } from "uuid";
|
|
2
2
|
import { DateTime as v } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as P } from "@widget-lab/3ddashboard-utils";
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function D() {
|
|
5
|
+
return G();
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const E = {
|
|
8
8
|
b3M3Yellow: "#FFB300",
|
|
9
9
|
b3AboutageBlue: "#42A5F5",
|
|
10
10
|
b3UsinageGreen: "#689F38",
|
|
@@ -44,10 +44,10 @@ async function fe(e, t = void 0, n = void 0) {
|
|
|
44
44
|
Accept: "application/json"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
).then((
|
|
48
|
-
t && t(
|
|
49
|
-
}).catch((
|
|
50
|
-
n && n(
|
|
47
|
+
).then((i) => i.json()).then((i) => {
|
|
48
|
+
t && t(i);
|
|
49
|
+
}).catch((i) => {
|
|
50
|
+
n && n(i), console.error("Erreur : " + i);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
async function me(e, t = void 0, n = void 0) {
|
|
@@ -65,15 +65,15 @@ async function me(e, t = void 0, n = void 0) {
|
|
|
65
65
|
n && n(s), console.error("Erreur : " + s);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function ge(e, t =
|
|
68
|
+
async function ge(e, t = E) {
|
|
69
69
|
let n = v.now().year;
|
|
70
|
-
const s = e,
|
|
71
|
-
for (let r in
|
|
72
|
-
|
|
70
|
+
const s = e, i = [], c = (a) => {
|
|
71
|
+
for (let r in a)
|
|
72
|
+
i.push({ date: r, comment: a[r] });
|
|
73
73
|
};
|
|
74
|
-
for (let
|
|
74
|
+
for (let a = n; a <= n + 1; a++)
|
|
75
75
|
await fetch(
|
|
76
|
-
"https://calendrier.api.gouv.fr/jours-feries/metropole/" +
|
|
76
|
+
"https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
|
|
77
77
|
{
|
|
78
78
|
method: "GET",
|
|
79
79
|
headers: {
|
|
@@ -84,25 +84,25 @@ async function ge(e, t = G) {
|
|
|
84
84
|
c(r);
|
|
85
85
|
}).catch((r) => console.error("Erreur : " + r));
|
|
86
86
|
return (() => {
|
|
87
|
-
const
|
|
87
|
+
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : s;
|
|
90
|
-
for (let r of
|
|
91
|
-
|
|
92
|
-
(
|
|
93
|
-
) === -1 &&
|
|
90
|
+
for (let r of i)
|
|
91
|
+
a.events.findIndex(
|
|
92
|
+
(p) => p.start === v.fromISO(r.date).toISODate() && p.name === "Férié : " + r.comment
|
|
93
|
+
) === -1 && a.events.push({
|
|
94
94
|
name: "Férié : " + r.comment,
|
|
95
95
|
start: v.fromISO(r.date).toISODate(),
|
|
96
96
|
end: v.fromISO(r.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
|
-
return
|
|
100
|
+
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
103
|
async function he(e, t, n = !0) {
|
|
104
|
-
const s = e.events.findIndex((
|
|
105
|
-
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((
|
|
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, c) => i.start - c.start), e;
|
|
106
106
|
}
|
|
107
107
|
function m(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (n) => {
|
|
@@ -150,33 +150,33 @@ async function we(e, t = void 0, n = void 0) {
|
|
|
150
150
|
function K() {
|
|
151
151
|
let e = {};
|
|
152
152
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
153
|
-
const n = t.getTenant(), s = t.getUser(),
|
|
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
|
-
appsConfiguration:
|
|
159
|
+
appsConfiguration: i,
|
|
160
160
|
appConf: c
|
|
161
161
|
};
|
|
162
162
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function b(e, t = void 0, n = void 0) {
|
|
165
165
|
if (e.tenant) {
|
|
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
|
m(s, {
|
|
168
|
-
onComplete(
|
|
169
|
-
const c = typeof
|
|
168
|
+
onComplete(i) {
|
|
169
|
+
const c = typeof i == "string" ? JSON.parse(i) : i;
|
|
170
170
|
if (c && "platforms" in c) {
|
|
171
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");
|
|
175
175
|
} else
|
|
176
176
|
n && n("_getServiceUrl return oResponse = undefined");
|
|
177
177
|
},
|
|
178
|
-
onFailure(
|
|
179
|
-
n && n(
|
|
178
|
+
onFailure(i) {
|
|
179
|
+
n && n(i);
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
}
|
|
@@ -185,15 +185,15 @@ function Ce(e, t = void 0, n = void 0) {
|
|
|
185
185
|
if (e.tenant) {
|
|
186
186
|
const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
|
|
187
187
|
m(s, {
|
|
188
|
-
onComplete(
|
|
189
|
-
const c = JSON.parse(
|
|
188
|
+
onComplete(i) {
|
|
189
|
+
const c = JSON.parse(i);
|
|
190
190
|
if (console.log("serviceId=3dpassport", c), Array.isArray(c) && c.length > 0) {
|
|
191
191
|
const o = `${c[0].services[0].url}`;
|
|
192
192
|
t && t(o);
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
onFailure(
|
|
196
|
-
n && n(
|
|
195
|
+
onFailure(i) {
|
|
196
|
+
n && n(i);
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
}
|
|
@@ -204,49 +204,49 @@ function Te(e, t, n) {
|
|
|
204
204
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
205
205
|
option: `?filter=${e.tenant}`
|
|
206
206
|
// facultatif
|
|
207
|
-
},
|
|
208
|
-
m(
|
|
207
|
+
}, i = `${s.base}${s.uri}${s.option}`;
|
|
208
|
+
m(i, {
|
|
209
209
|
method: "GET",
|
|
210
210
|
headers: {
|
|
211
211
|
"Content-Type": "application/json",
|
|
212
212
|
Accept: "application/json"
|
|
213
213
|
},
|
|
214
|
-
onComplete(c, o,
|
|
215
|
-
const r = JSON.parse(c), d = r.data.map((
|
|
216
|
-
const
|
|
217
|
-
return { name:
|
|
214
|
+
onComplete(c, o, a) {
|
|
215
|
+
const r = JSON.parse(c), d = r.data.map((p) => {
|
|
216
|
+
const l = p.attributes.name, f = p.id;
|
|
217
|
+
return { name: l, id: f };
|
|
218
218
|
});
|
|
219
219
|
t && t(d, r);
|
|
220
220
|
},
|
|
221
221
|
onFailure(c, o) {
|
|
222
|
-
const
|
|
223
|
-
|
|
222
|
+
const a = c;
|
|
223
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
function Oe(e, t = void 0, n = void 0) {
|
|
228
228
|
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
229
229
|
m(s, {
|
|
230
|
-
onComplete(
|
|
231
|
-
const
|
|
232
|
-
console.log("_AppMngt_get_users => ",
|
|
230
|
+
onComplete(i, c, o) {
|
|
231
|
+
const a = JSON.parse(i);
|
|
232
|
+
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
233
233
|
},
|
|
234
|
-
onFailure(
|
|
235
|
-
const o =
|
|
234
|
+
onFailure(i, c) {
|
|
235
|
+
const o = i;
|
|
236
236
|
o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
240
|
function be(e, t, n = void 0, s = void 0) {
|
|
241
|
-
let
|
|
242
|
-
m(
|
|
243
|
-
onComplete(c, o,
|
|
241
|
+
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
242
|
+
m(i, {
|
|
243
|
+
onComplete(c, o, a) {
|
|
244
244
|
const r = JSON.parse(c);
|
|
245
245
|
n && n(r);
|
|
246
246
|
},
|
|
247
247
|
onFailure(c, o) {
|
|
248
|
-
const
|
|
249
|
-
|
|
248
|
+
const a = c;
|
|
249
|
+
a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
252
|
}
|
|
@@ -255,7 +255,7 @@ const F = {
|
|
|
255
255
|
Accept: "application/json,text/javascript,*/*"
|
|
256
256
|
};
|
|
257
257
|
function Ne(e, t, n = void 0, s = void 0) {
|
|
258
|
-
const { space:
|
|
258
|
+
const { space: i, currentUser: c } = e, a = `${i}${{
|
|
259
259
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
260
260
|
}.URIUGr}`, r = {
|
|
261
261
|
groups: [
|
|
@@ -269,22 +269,22 @@ function Ne(e, t, n = void 0, s = void 0) {
|
|
|
269
269
|
}
|
|
270
270
|
]
|
|
271
271
|
};
|
|
272
|
-
m(
|
|
272
|
+
m(a, {
|
|
273
273
|
method: "POST",
|
|
274
274
|
headers: F,
|
|
275
275
|
data: JSON.stringify(r),
|
|
276
276
|
onComplete(d) {
|
|
277
277
|
n && n(JSON.parse(d));
|
|
278
278
|
},
|
|
279
|
-
onFailure(d,
|
|
279
|
+
onFailure(d, p) {
|
|
280
280
|
console.log(d);
|
|
281
|
-
const
|
|
282
|
-
|
|
281
|
+
const l = d;
|
|
282
|
+
l.msg = p.errormsg, l.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
|
|
283
283
|
}
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
const { space:
|
|
286
|
+
function $e(e, t, n = void 0, s = void 0) {
|
|
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
|
m(d, {
|
|
289
289
|
opts: {
|
|
290
290
|
method: "GET",
|
|
@@ -303,33 +303,33 @@ function ve(e, t, n = void 0, s = void 0) {
|
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
305
|
function V(e, t = void 0, n = void 0) {
|
|
306
|
-
const { space: s, tenant:
|
|
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 = `${c}${o}${
|
|
309
|
+
}, d = `${c}${o}${a}`;
|
|
310
310
|
m(d, {
|
|
311
311
|
OPTsH: r,
|
|
312
|
-
onComplete(
|
|
313
|
-
t && t(JSON.parse(
|
|
312
|
+
onComplete(p) {
|
|
313
|
+
t && t(JSON.parse(p));
|
|
314
314
|
},
|
|
315
|
-
onFailure(
|
|
316
|
-
const f =
|
|
317
|
-
f.msg =
|
|
315
|
+
onFailure(p, l) {
|
|
316
|
+
const f = p;
|
|
317
|
+
f.msg = l.errormsg, f.errCode = l.errorcode, n && n(f);
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
const { space: s, currentUser:
|
|
321
|
+
function ve(e, t = void 0, n = void 0) {
|
|
322
|
+
const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
323
323
|
"Content-Type": "application/json",
|
|
324
324
|
Accept: "application/json,text/javascript,*/*"
|
|
325
325
|
} };
|
|
326
326
|
try {
|
|
327
|
-
m(
|
|
327
|
+
m(a, {
|
|
328
328
|
opts: d,
|
|
329
|
-
onComplete(
|
|
330
|
-
const
|
|
331
|
-
if (
|
|
332
|
-
const g = u.filter((_) => _.owner ===
|
|
329
|
+
onComplete(p) {
|
|
330
|
+
const l = JSON.parse(p), f = {}, u = l.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
331
|
+
if (i && Object.keys(i).length > 0) {
|
|
332
|
+
const g = u.filter((_) => _.owner === i.email), h = u.filter((_) => _.members.includes(i.email)), S = g.concat(h);
|
|
333
333
|
f.iam = S, f.UG = u, f.iamMember = h, V(
|
|
334
334
|
e,
|
|
335
335
|
(_) => {
|
|
@@ -341,22 +341,22 @@ function Ie(e, t = void 0, n = void 0) {
|
|
|
341
341
|
);
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
|
-
onFailure(
|
|
345
|
-
n && n(
|
|
344
|
+
onFailure(p) {
|
|
345
|
+
n && n(p);
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
|
-
} catch (
|
|
349
|
-
console.log(
|
|
348
|
+
} catch (p) {
|
|
349
|
+
console.log(p);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
const { space: n } = e,
|
|
354
|
-
m(
|
|
352
|
+
function Ie(e, t) {
|
|
353
|
+
const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
354
|
+
m(i, {
|
|
355
355
|
method: "DELETE"
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
function Ae(e, t, n, s = void 0,
|
|
359
|
-
const { space: c, tenant: o } = e,
|
|
358
|
+
function Ae(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,23 +364,23 @@ function Ae(e, t, n, s = void 0, a = void 0) {
|
|
|
364
364
|
nexURImem: "/members",
|
|
365
365
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
366
366
|
OPTsTenant: `tenant=dstenant:${o}`
|
|
367
|
-
}, r = n, d = `${c}${
|
|
367
|
+
}, r = n, d = `${c}${a.URIUGr}/${t}`, p = JSON.stringify(r);
|
|
368
368
|
m(d, {
|
|
369
369
|
headers: F,
|
|
370
370
|
method: "PATCH",
|
|
371
|
-
data:
|
|
371
|
+
data: p,
|
|
372
372
|
type: "json",
|
|
373
|
-
onComplete(
|
|
374
|
-
s && s(
|
|
373
|
+
onComplete(l) {
|
|
374
|
+
s && s(l);
|
|
375
375
|
},
|
|
376
|
-
onFailure(
|
|
377
|
-
|
|
376
|
+
onFailure(l) {
|
|
377
|
+
i && i(l);
|
|
378
378
|
}
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function ke(e, t, n, s = void 0,
|
|
382
|
-
const { space: c } = e,
|
|
383
|
-
m(
|
|
381
|
+
function ke(e, t, n, s = void 0, i = void 0) {
|
|
382
|
+
const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
383
|
+
m(a, {
|
|
384
384
|
method: "PATCH",
|
|
385
385
|
headers: F,
|
|
386
386
|
data: JSON.stringify(n),
|
|
@@ -389,12 +389,12 @@ function ke(e, t, n, s = void 0, a = void 0) {
|
|
|
389
389
|
s && s(d);
|
|
390
390
|
},
|
|
391
391
|
onFailure(d) {
|
|
392
|
-
|
|
392
|
+
i && i(d);
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
function Fe(e, t, n = void 0, s = void 0) {
|
|
397
|
-
const { space:
|
|
397
|
+
const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
398
398
|
m(o, {
|
|
399
399
|
opts: {
|
|
400
400
|
method: "GET",
|
|
@@ -411,40 +411,40 @@ function Fe(e, t, n = void 0, s = void 0) {
|
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
async function
|
|
414
|
+
async function B(e, t, n) {
|
|
415
415
|
if (e.space) {
|
|
416
416
|
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
417
417
|
m(s, {
|
|
418
|
-
onComplete(
|
|
419
|
-
|
|
418
|
+
onComplete(i) {
|
|
419
|
+
i = JSON.parse(i), t && t(i.csrf);
|
|
420
420
|
},
|
|
421
|
-
onFailure(
|
|
422
|
-
n && n({ error:
|
|
421
|
+
onFailure(i, c, o) {
|
|
422
|
+
n && n({ error: i, headers: c, xhr: o });
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
var I = {};
|
|
428
|
-
function
|
|
428
|
+
function W(e, t) {
|
|
429
429
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
430
430
|
}
|
|
431
431
|
var X = function(e, t, n, s) {
|
|
432
432
|
t = t || "&", n = n || "=";
|
|
433
|
-
var
|
|
433
|
+
var i = {};
|
|
434
434
|
if (typeof e != "string" || e.length === 0)
|
|
435
|
-
return
|
|
435
|
+
return i;
|
|
436
436
|
var c = /\+/g;
|
|
437
437
|
e = e.split(t);
|
|
438
438
|
var o = 1e3;
|
|
439
439
|
s && typeof s.maxKeys == "number" && (o = s.maxKeys);
|
|
440
|
-
var
|
|
441
|
-
o > 0 &&
|
|
442
|
-
for (var r = 0; r <
|
|
443
|
-
var d = e[r].replace(c, "%20"),
|
|
444
|
-
|
|
440
|
+
var a = e.length;
|
|
441
|
+
o > 0 && a > o && (a = o);
|
|
442
|
+
for (var r = 0; r < a; ++r) {
|
|
443
|
+
var d = e[r].replace(c, "%20"), p = d.indexOf(n), l, f, u, g;
|
|
444
|
+
p >= 0 ? (l = d.substr(0, p), f = d.substr(p + 1)) : (l = d, f = ""), u = decodeURIComponent(l), g = decodeURIComponent(f), W(i, u) ? Array.isArray(i[u]) ? i[u].push(g) : i[u] = [i[u], g] : i[u] = g;
|
|
445
445
|
}
|
|
446
|
-
return
|
|
447
|
-
},
|
|
446
|
+
return i;
|
|
447
|
+
}, $ = function(e) {
|
|
448
448
|
switch (typeof e) {
|
|
449
449
|
case "string":
|
|
450
450
|
return e;
|
|
@@ -456,24 +456,24 @@ var X = function(e, t, n, s) {
|
|
|
456
456
|
return "";
|
|
457
457
|
}
|
|
458
458
|
}, Y = function(e, t, n, s) {
|
|
459
|
-
return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(
|
|
460
|
-
var c = encodeURIComponent(
|
|
461
|
-
return Array.isArray(e[
|
|
462
|
-
return c + encodeURIComponent(
|
|
463
|
-
}).join(t) : c + encodeURIComponent(
|
|
464
|
-
}).filter(Boolean).join(t) : s ? encodeURIComponent(
|
|
459
|
+
return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
|
|
460
|
+
var c = encodeURIComponent($(i)) + n;
|
|
461
|
+
return Array.isArray(e[i]) ? e[i].map(function(o) {
|
|
462
|
+
return c + encodeURIComponent($(o));
|
|
463
|
+
}).join(t) : c + encodeURIComponent($(e[i]));
|
|
464
|
+
}).filter(Boolean).join(t) : s ? encodeURIComponent($(s)) + n + encodeURIComponent($(e)) : "";
|
|
465
465
|
};
|
|
466
466
|
I.decode = I.parse = X;
|
|
467
467
|
I.encode = I.stringify = Y;
|
|
468
468
|
async function H(e, t = void 0, n = void 0, s = void 0) {
|
|
469
|
-
const
|
|
469
|
+
const i = e.space;
|
|
470
470
|
if (t === void 0) {
|
|
471
471
|
console.log("Le paramètre docid est obligatoire");
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
|
-
const c =
|
|
474
|
+
const c = i + `/resources/v1/modeler/documents/${t}`;
|
|
475
475
|
m(c, {
|
|
476
|
-
onComplete(o,
|
|
476
|
+
onComplete(o, a, r) {
|
|
477
477
|
const d = JSON.parse(o);
|
|
478
478
|
n && n(d);
|
|
479
479
|
},
|
|
@@ -483,12 +483,12 @@ async function H(e, t = void 0, n = void 0, s = void 0) {
|
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
async function Ue(e, t = void 0, n = void 0, s = void 0) {
|
|
486
|
-
const
|
|
486
|
+
const i = e.space;
|
|
487
487
|
if (t === void 0) {
|
|
488
488
|
console.log("Le paramètre docids est obligatoire");
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
|
-
let c = `${
|
|
491
|
+
let c = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
|
|
492
492
|
$ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
|
|
493
493
|
});
|
|
494
494
|
m(c, {
|
|
@@ -497,12 +497,12 @@ async function Ue(e, t = void 0, n = void 0, s = void 0) {
|
|
|
497
497
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
498
498
|
},
|
|
499
499
|
data: o,
|
|
500
|
-
onComplete(
|
|
501
|
-
const
|
|
502
|
-
n && n(
|
|
500
|
+
onComplete(a, r, d) {
|
|
501
|
+
const p = JSON.parse(a);
|
|
502
|
+
n && n(p);
|
|
503
503
|
},
|
|
504
|
-
onFailure(
|
|
505
|
-
s && s(
|
|
504
|
+
onFailure(a) {
|
|
505
|
+
s && s(a);
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
508
|
}
|
|
@@ -510,12 +510,12 @@ function A(e, t = void 0, n = void 0) {
|
|
|
510
510
|
if (e.objID && e.objID !== "") {
|
|
511
511
|
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
512
512
|
m(s, {
|
|
513
|
-
onComplete(
|
|
514
|
-
const
|
|
515
|
-
e.token =
|
|
513
|
+
onComplete(i, c, o) {
|
|
514
|
+
const a = JSON.parse(i);
|
|
515
|
+
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
516
516
|
},
|
|
517
|
-
onFailure(
|
|
518
|
-
n && n(
|
|
517
|
+
onFailure(i) {
|
|
518
|
+
n && n(i);
|
|
519
519
|
}
|
|
520
520
|
});
|
|
521
521
|
} else
|
|
@@ -533,13 +533,13 @@ function T(e, t = void 0, n = void 0) {
|
|
|
533
533
|
if (e.space) {
|
|
534
534
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
535
535
|
m(s, {
|
|
536
|
-
onComplete(
|
|
537
|
-
const
|
|
538
|
-
t && t(
|
|
536
|
+
onComplete(i, c, o) {
|
|
537
|
+
const a = JSON.parse(i);
|
|
538
|
+
t && t(a.csrf.value);
|
|
539
539
|
},
|
|
540
|
-
onFailure(
|
|
540
|
+
onFailure(i, c, o) {
|
|
541
541
|
n && n({
|
|
542
|
-
response:
|
|
542
|
+
response: i,
|
|
543
543
|
headers: c,
|
|
544
544
|
xhr: o
|
|
545
545
|
});
|
|
@@ -552,7 +552,7 @@ function U(e, t = void 0, n = void 0) {
|
|
|
552
552
|
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
553
553
|
A(
|
|
554
554
|
e,
|
|
555
|
-
(
|
|
555
|
+
(i) => {
|
|
556
556
|
m(s, {
|
|
557
557
|
method: "PUT",
|
|
558
558
|
headers: {
|
|
@@ -567,12 +567,12 @@ function U(e, t = void 0, n = void 0) {
|
|
|
567
567
|
}
|
|
568
568
|
});
|
|
569
569
|
},
|
|
570
|
-
(
|
|
571
|
-
console.warn("_3DSpace_get_ticket / error => ",
|
|
570
|
+
(i) => {
|
|
571
|
+
console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
|
|
572
572
|
}
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
|
-
function je(e, t, n, s = void 0,
|
|
575
|
+
function je(e, t, n, s = void 0, i = void 0) {
|
|
576
576
|
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
577
577
|
n || (n = e.token), m(c, {
|
|
578
578
|
method: "PUT",
|
|
@@ -580,49 +580,49 @@ function je(e, t, n, s = void 0, a = void 0) {
|
|
|
580
580
|
ENO_CSRF_TOKEN: n
|
|
581
581
|
},
|
|
582
582
|
onComplete(o) {
|
|
583
|
-
let
|
|
584
|
-
if (console.log("☠️ info => ",
|
|
583
|
+
let a = JSON.parse(o);
|
|
584
|
+
if (console.log("☠️ info => ", a), a.success === !0)
|
|
585
585
|
try {
|
|
586
|
-
const r =
|
|
586
|
+
const r = a.data[0].dataelements.ticketURL;
|
|
587
587
|
s && s(r);
|
|
588
588
|
} catch (r) {
|
|
589
|
-
|
|
589
|
+
i && i(r);
|
|
590
590
|
}
|
|
591
591
|
},
|
|
592
592
|
onFailure(o) {
|
|
593
|
-
|
|
593
|
+
i && i(o);
|
|
594
594
|
}
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
|
-
function z(e, t, n, s,
|
|
598
|
-
const
|
|
597
|
+
function z(e, t, n, s, i, c = void 0, o = void 0) {
|
|
598
|
+
const a = () => q(
|
|
599
599
|
e,
|
|
600
600
|
t,
|
|
601
601
|
n,
|
|
602
602
|
s,
|
|
603
|
-
|
|
603
|
+
i,
|
|
604
604
|
e.token,
|
|
605
605
|
c,
|
|
606
606
|
o
|
|
607
607
|
);
|
|
608
|
-
e.token ?
|
|
608
|
+
e.token ? a() : A(
|
|
609
609
|
e,
|
|
610
610
|
t,
|
|
611
611
|
(r) => {
|
|
612
|
-
e.token = r.csrf.value,
|
|
612
|
+
e.token = r.csrf.value, a();
|
|
613
613
|
}
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
|
-
function q(e, t, n, s,
|
|
616
|
+
function q(e, t, n, s, i, c, o = void 0, a = void 0) {
|
|
617
617
|
const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
618
618
|
m(r, {
|
|
619
619
|
method: "PUT",
|
|
620
620
|
headers: {
|
|
621
621
|
ENO_CSRF_TOKEN: c
|
|
622
622
|
},
|
|
623
|
-
onComplete(d,
|
|
623
|
+
onComplete(d, p, l) {
|
|
624
624
|
const f = JSON.parse(d).data[0].dataelements, u = new FormData();
|
|
625
|
-
u.append("__fcs__jobTicket", f.ticket), u.append("file_0", s,
|
|
625
|
+
u.append("__fcs__jobTicket", f.ticket), u.append("file_0", s, i);
|
|
626
626
|
const g = {};
|
|
627
627
|
g.method = "POST", g.data = u, g.onComplete = function(h) {
|
|
628
628
|
let S = "temp_" + Date.now(), _ = {
|
|
@@ -637,7 +637,7 @@ function q(e, t, n, s, a, c, o = void 0, i = void 0) {
|
|
|
637
637
|
files: [{
|
|
638
638
|
id: n,
|
|
639
639
|
dataelements: {
|
|
640
|
-
title:
|
|
640
|
+
title: i,
|
|
641
641
|
receipt: h
|
|
642
642
|
},
|
|
643
643
|
updateAction: "REVISE"
|
|
@@ -651,23 +651,23 @@ function q(e, t, n, s, a, c, o = void 0, i = void 0) {
|
|
|
651
651
|
o && o(y);
|
|
652
652
|
},
|
|
653
653
|
onFailure(y) {
|
|
654
|
-
|
|
654
|
+
a && a(y);
|
|
655
655
|
}
|
|
656
656
|
};
|
|
657
657
|
m(
|
|
658
|
-
e.space +
|
|
658
|
+
e.space + `/resources/v1/modeler/documents/${t}`,
|
|
659
659
|
_
|
|
660
660
|
);
|
|
661
661
|
}, g.onFailure = function(h) {
|
|
662
|
-
|
|
662
|
+
a && a(h);
|
|
663
663
|
}, g.timeout = 0, m(f.ticketURL, g);
|
|
664
664
|
}
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
|
-
async function
|
|
668
|
-
const o = e.space,
|
|
667
|
+
async function Re(e, t, n, s, i = void 0, c = void 0) {
|
|
668
|
+
const o = e.space, a = e.token, r = e.ctx, d = new FormData(), p = new Blob([JSON.stringify(t)], {
|
|
669
669
|
type: "text/plain"
|
|
670
|
-
}),
|
|
670
|
+
}), l = {
|
|
671
671
|
url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
672
672
|
url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
|
|
673
673
|
};
|
|
@@ -675,23 +675,23 @@ async function De(e, t, n, s, a = void 0, c = void 0) {
|
|
|
675
675
|
console.log("le store._3DSpace est vide");
|
|
676
676
|
return;
|
|
677
677
|
}
|
|
678
|
-
m(
|
|
678
|
+
m(l.url_Ticket, {
|
|
679
679
|
method: "PUT",
|
|
680
680
|
headers: {
|
|
681
|
-
ENO_CSRF_TOKEN:
|
|
681
|
+
ENO_CSRF_TOKEN: a.value
|
|
682
682
|
},
|
|
683
683
|
onComplete(f, u, g) {
|
|
684
684
|
const h = JSON.parse(f).data[0].dataelements;
|
|
685
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename",
|
|
685
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", p, n);
|
|
686
686
|
const S = {
|
|
687
687
|
method: "POST",
|
|
688
688
|
data: d,
|
|
689
689
|
onComplete(C) {
|
|
690
|
-
if (r !== "" &&
|
|
690
|
+
if (r !== "" && a !== "") {
|
|
691
691
|
const k = {
|
|
692
692
|
method: "POST",
|
|
693
693
|
headers: {
|
|
694
|
-
ENO_CSRF_TOKEN:
|
|
694
|
+
ENO_CSRF_TOKEN: a,
|
|
695
695
|
Accept: "application/json",
|
|
696
696
|
"Content-Type": "application/json"
|
|
697
697
|
},
|
|
@@ -711,7 +711,7 @@ async function De(e, t, n, s, a = void 0, c = void 0) {
|
|
|
711
711
|
}
|
|
712
712
|
}]
|
|
713
713
|
},
|
|
714
|
-
tempId:
|
|
714
|
+
tempId: D()
|
|
715
715
|
}]
|
|
716
716
|
}),
|
|
717
717
|
type: "json",
|
|
@@ -719,14 +719,14 @@ async function De(e, t, n, s, a = void 0, c = void 0) {
|
|
|
719
719
|
onComplete: _,
|
|
720
720
|
onFailure: y
|
|
721
721
|
};
|
|
722
|
-
r !== "" && m(
|
|
722
|
+
r !== "" && m(l.url_Post, k);
|
|
723
723
|
} else
|
|
724
724
|
console.warn("le store est vide");
|
|
725
725
|
},
|
|
726
726
|
onFailure: y
|
|
727
727
|
};
|
|
728
728
|
function _(C) {
|
|
729
|
-
console.log("Success -- response ", C.data[0]),
|
|
729
|
+
console.log("Success -- response ", C.data[0]), i && i(C);
|
|
730
730
|
}
|
|
731
731
|
function y(C, k) {
|
|
732
732
|
console.log("Erreur -- response ", C, `
|
|
@@ -736,17 +736,17 @@ async function De(e, t, n, s, a = void 0, c = void 0) {
|
|
|
736
736
|
}
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
const
|
|
741
|
-
m(
|
|
739
|
+
function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1) {
|
|
740
|
+
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
741
|
+
m(a, {
|
|
742
742
|
method: "GET",
|
|
743
743
|
onComplete(r) {
|
|
744
744
|
const d = JSON.parse(r);
|
|
745
|
-
let
|
|
745
|
+
let p = "", l, f, u;
|
|
746
746
|
if (t) {
|
|
747
747
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
748
748
|
if (g) {
|
|
749
|
-
|
|
749
|
+
l = t;
|
|
750
750
|
let h = g.couples;
|
|
751
751
|
h = h.filter(
|
|
752
752
|
(S, _, y) => _ === y.findIndex(
|
|
@@ -775,7 +775,7 @@ function b(e, t = void 0, n = void 0, s = void 0, a = void 0, c = void 0, o = !1
|
|
|
775
775
|
}));
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
|
|
778
|
+
l && f && u ? (p = u + "." + f + "." + l, i(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) : c && (p = u + "." + f + "." + l, c(p));
|
|
779
779
|
},
|
|
780
780
|
onFailure(r, d) {
|
|
781
781
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
@@ -790,7 +790,7 @@ async function x(e, t = void 0, n = void 0) {
|
|
|
790
790
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
791
791
|
), n && n("_3DSpace_download_doc() / Le paramètre objectId est obligatoire")), (e.space === "" || !e.space) && (console.warn(
|
|
792
792
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
793
|
-
), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) &&
|
|
793
|
+
), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && B(
|
|
794
794
|
e,
|
|
795
795
|
(s) => {
|
|
796
796
|
e.token = s;
|
|
@@ -798,7 +798,7 @@ async function x(e, t = void 0, n = void 0) {
|
|
|
798
798
|
(s) => {
|
|
799
799
|
console.log("☠️ error => ", s);
|
|
800
800
|
}
|
|
801
|
-
), new Promise((s,
|
|
801
|
+
), new Promise((s, i) => {
|
|
802
802
|
U(
|
|
803
803
|
e,
|
|
804
804
|
(c) => {
|
|
@@ -808,46 +808,46 @@ async function x(e, t = void 0, n = void 0) {
|
|
|
808
808
|
n && n(o);
|
|
809
809
|
})) : m(c, {
|
|
810
810
|
onComplete(o) {
|
|
811
|
-
let
|
|
811
|
+
let a;
|
|
812
812
|
try {
|
|
813
|
-
|
|
813
|
+
a = JSON.parse(o);
|
|
814
814
|
} catch {
|
|
815
|
-
|
|
815
|
+
a = o;
|
|
816
816
|
}
|
|
817
|
-
t && typeof t == "function" && t(
|
|
817
|
+
t && typeof t == "function" && t(a), s(a);
|
|
818
818
|
},
|
|
819
|
-
onFailure(o,
|
|
819
|
+
onFailure(o, a, r) {
|
|
820
820
|
n && (console.log("error http", o), n({
|
|
821
821
|
msg: JSON.parse(o),
|
|
822
|
-
headers:
|
|
822
|
+
headers: a,
|
|
823
823
|
xhr: r
|
|
824
|
-
}),
|
|
824
|
+
}), i({
|
|
825
825
|
msg: JSON.parse(o),
|
|
826
|
-
headers:
|
|
826
|
+
headers: a,
|
|
827
827
|
xhr: r
|
|
828
828
|
}));
|
|
829
829
|
}
|
|
830
830
|
});
|
|
831
831
|
},
|
|
832
832
|
(c) => {
|
|
833
|
-
n && n(c), console.log("*_3dspace_download_doc / error file URL *", c),
|
|
833
|
+
n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
|
|
834
834
|
}
|
|
835
835
|
);
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
838
|
async function Q(e, t, n = void 0, s = void 0) {
|
|
839
|
-
let
|
|
839
|
+
let i = [];
|
|
840
840
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
841
|
-
for (let
|
|
842
|
-
const r = t.slice(
|
|
843
|
-
|
|
841
|
+
for (let a = 0; a < t.length; a += 80) {
|
|
842
|
+
const r = t.slice(a, a + 80);
|
|
843
|
+
i.push(r);
|
|
844
844
|
}
|
|
845
|
-
const o = (
|
|
845
|
+
const o = (a) => {
|
|
846
846
|
Z(
|
|
847
847
|
e,
|
|
848
|
-
a
|
|
848
|
+
i[a],
|
|
849
849
|
() => {
|
|
850
|
-
|
|
850
|
+
a++, a < i.length && o(a);
|
|
851
851
|
},
|
|
852
852
|
(r) => {
|
|
853
853
|
n && n(r);
|
|
@@ -862,7 +862,7 @@ async function Q(e, t, n = void 0, s = void 0) {
|
|
|
862
862
|
"La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
|
|
863
863
|
);
|
|
864
864
|
}
|
|
865
|
-
function Z(e, t, n = void 0, s = void 0,
|
|
865
|
+
function Z(e, t, n = void 0, s = void 0, i = void 0) {
|
|
866
866
|
const c = [];
|
|
867
867
|
t.forEach((r) => {
|
|
868
868
|
c.push({
|
|
@@ -876,16 +876,16 @@ function Z(e, t, n = void 0, s = void 0, a = void 0) {
|
|
|
876
876
|
},
|
|
877
877
|
data: c
|
|
878
878
|
});
|
|
879
|
-
const
|
|
880
|
-
m(
|
|
879
|
+
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
880
|
+
m(a, {
|
|
881
881
|
method: "PUT",
|
|
882
882
|
data: o,
|
|
883
883
|
type: "json",
|
|
884
884
|
onComplete(r) {
|
|
885
885
|
const d = r.data;
|
|
886
|
-
r.success === !0 && (n && n(), d.forEach((
|
|
886
|
+
r.success === !0 && (n && n(), d.forEach((p) => {
|
|
887
887
|
try {
|
|
888
|
-
const
|
|
888
|
+
const l = p.dataelements.fileName, f = p.dataelements.ticketURL;
|
|
889
889
|
m(f, {
|
|
890
890
|
onComplete: (u, g) => {
|
|
891
891
|
let h;
|
|
@@ -895,9 +895,9 @@ function Z(e, t, n = void 0, s = void 0, a = void 0) {
|
|
|
895
895
|
h = u.blob();
|
|
896
896
|
}
|
|
897
897
|
s && s({
|
|
898
|
-
objectId:
|
|
898
|
+
objectId: p.id,
|
|
899
899
|
headers: g,
|
|
900
|
-
fileName:
|
|
900
|
+
fileName: l,
|
|
901
901
|
data: h
|
|
902
902
|
});
|
|
903
903
|
},
|
|
@@ -905,28 +905,28 @@ function Z(e, t, n = void 0, s = void 0, a = void 0) {
|
|
|
905
905
|
console.log("error http", u);
|
|
906
906
|
}
|
|
907
907
|
});
|
|
908
|
-
} catch (
|
|
909
|
-
console.log(
|
|
908
|
+
} catch (l) {
|
|
909
|
+
console.log(l), i && i(l);
|
|
910
910
|
}
|
|
911
911
|
}));
|
|
912
912
|
},
|
|
913
913
|
onFailure(r) {
|
|
914
|
-
console.log(r),
|
|
914
|
+
console.log(r), i && i(r);
|
|
915
915
|
}
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
918
|
function Pe(e, t, n = void 0, s = void 0) {
|
|
919
|
-
return new Promise((
|
|
919
|
+
return new Promise((i) => {
|
|
920
920
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
921
921
|
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
922
|
-
|
|
922
|
+
N(
|
|
923
923
|
e.space,
|
|
924
924
|
"ESPACE COMMUN",
|
|
925
925
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
926
926
|
void 0,
|
|
927
|
-
(
|
|
928
|
-
(
|
|
929
|
-
console.log("onError =>",
|
|
927
|
+
(a) => e.ctx = a,
|
|
928
|
+
(a) => {
|
|
929
|
+
console.log("onError =>", a);
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
932
|
let o = {
|
|
@@ -943,22 +943,22 @@ function Pe(e, t, n = void 0, s = void 0) {
|
|
|
943
943
|
}]
|
|
944
944
|
}),
|
|
945
945
|
type: "json",
|
|
946
|
-
onComplete(
|
|
947
|
-
n && n(
|
|
946
|
+
onComplete(a) {
|
|
947
|
+
n && n(a);
|
|
948
948
|
},
|
|
949
|
-
onFailure(
|
|
950
|
-
s && s(
|
|
949
|
+
onFailure(a) {
|
|
950
|
+
s && s(a);
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
953
|
m(c, o);
|
|
954
954
|
}
|
|
955
955
|
});
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function De(e, t, n, s = void 0, i = void 0) {
|
|
958
958
|
return new Promise((c) => {
|
|
959
959
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
960
960
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
961
|
-
|
|
961
|
+
N(
|
|
962
962
|
e.space,
|
|
963
963
|
"ESPACE COMMUN",
|
|
964
964
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -968,7 +968,7 @@ function Re(e, t, n, s = void 0, a = void 0) {
|
|
|
968
968
|
console.log("onError =>", r);
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
|
-
let
|
|
971
|
+
let a = {
|
|
972
972
|
method: "POST",
|
|
973
973
|
headers: {
|
|
974
974
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -987,25 +987,25 @@ function Re(e, t, n, s = void 0, a = void 0) {
|
|
|
987
987
|
s && s(r);
|
|
988
988
|
},
|
|
989
989
|
onFailure(r) {
|
|
990
|
-
|
|
990
|
+
i && i(r);
|
|
991
991
|
}
|
|
992
992
|
};
|
|
993
|
-
m(o,
|
|
993
|
+
m(o, a);
|
|
994
994
|
}
|
|
995
995
|
});
|
|
996
996
|
}
|
|
997
997
|
function xe(e, t, n = void 0, s = void 0) {
|
|
998
|
-
return new Promise((
|
|
998
|
+
return new Promise((i) => {
|
|
999
999
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1000
1000
|
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
1001
|
-
|
|
1001
|
+
N(
|
|
1002
1002
|
e.space,
|
|
1003
1003
|
"ESPACE COMMUN",
|
|
1004
1004
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
1005
1005
|
void 0,
|
|
1006
|
-
(
|
|
1007
|
-
(
|
|
1008
|
-
console.log("onError =>",
|
|
1006
|
+
(a) => e.ctx = a,
|
|
1007
|
+
(a) => {
|
|
1008
|
+
console.log("onError =>", a);
|
|
1009
1009
|
}
|
|
1010
1010
|
);
|
|
1011
1011
|
let o = {
|
|
@@ -1022,29 +1022,29 @@ function xe(e, t, n = void 0, s = void 0) {
|
|
|
1022
1022
|
}]
|
|
1023
1023
|
}),
|
|
1024
1024
|
type: "json",
|
|
1025
|
-
onComplete(
|
|
1026
|
-
n && n(
|
|
1025
|
+
onComplete(a) {
|
|
1026
|
+
n && n(a);
|
|
1027
1027
|
},
|
|
1028
|
-
onFailure(
|
|
1029
|
-
s && s(
|
|
1028
|
+
onFailure(a) {
|
|
1029
|
+
s && s(a);
|
|
1030
1030
|
}
|
|
1031
1031
|
};
|
|
1032
1032
|
m(c, o);
|
|
1033
1033
|
}
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1037
|
-
return new Promise((
|
|
1036
|
+
function Le(e, t, n = void 0, s = void 0) {
|
|
1037
|
+
return new Promise((i) => {
|
|
1038
1038
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1039
1039
|
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
1040
|
-
|
|
1040
|
+
N(
|
|
1041
1041
|
e.space,
|
|
1042
1042
|
"ESPACE COMMUN",
|
|
1043
1043
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
1044
1044
|
void 0,
|
|
1045
|
-
(
|
|
1046
|
-
(
|
|
1047
|
-
console.log("onError =>",
|
|
1045
|
+
(a) => e.ctx = a,
|
|
1046
|
+
(a) => {
|
|
1047
|
+
console.log("onError =>", a);
|
|
1048
1048
|
}
|
|
1049
1049
|
);
|
|
1050
1050
|
let o = {
|
|
@@ -1067,22 +1067,22 @@ function Me(e, t, n = void 0, s = void 0) {
|
|
|
1067
1067
|
}]
|
|
1068
1068
|
}),
|
|
1069
1069
|
type: "json",
|
|
1070
|
-
onComplete(
|
|
1071
|
-
n && n(
|
|
1070
|
+
onComplete(a) {
|
|
1071
|
+
n && n(a);
|
|
1072
1072
|
},
|
|
1073
|
-
onFailure(
|
|
1074
|
-
s && s(
|
|
1073
|
+
onFailure(a) {
|
|
1074
|
+
s && s(a);
|
|
1075
1075
|
}
|
|
1076
1076
|
};
|
|
1077
1077
|
m(c, o);
|
|
1078
1078
|
}
|
|
1079
1079
|
});
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Me(e, t, n, s = void 0, i = void 0) {
|
|
1082
1082
|
return new Promise((c) => {
|
|
1083
1083
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1084
1084
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
1085
|
-
|
|
1085
|
+
N(
|
|
1086
1086
|
e.space,
|
|
1087
1087
|
"ESPACE COMMUN",
|
|
1088
1088
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -1092,7 +1092,7 @@ function Le(e, t, n, s = void 0, a = void 0) {
|
|
|
1092
1092
|
console.log("onError =>", r);
|
|
1093
1093
|
}
|
|
1094
1094
|
);
|
|
1095
|
-
let
|
|
1095
|
+
let a = {
|
|
1096
1096
|
method: "POST",
|
|
1097
1097
|
headers: {
|
|
1098
1098
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -1116,16 +1116,16 @@ function Le(e, t, n, s = void 0, a = void 0) {
|
|
|
1116
1116
|
s && s(r);
|
|
1117
1117
|
},
|
|
1118
1118
|
onFailure(r) {
|
|
1119
|
-
|
|
1119
|
+
i && i(r);
|
|
1120
1120
|
}
|
|
1121
1121
|
};
|
|
1122
|
-
m(o,
|
|
1122
|
+
m(o, a);
|
|
1123
1123
|
}
|
|
1124
1124
|
});
|
|
1125
1125
|
}
|
|
1126
|
-
function Je(e, t, n, s,
|
|
1126
|
+
function Je(e, t, n, s, i = void 0, c = void 0) {
|
|
1127
1127
|
return new Promise((o) => {
|
|
1128
|
-
const
|
|
1128
|
+
const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
|
|
1129
1129
|
let r = {
|
|
1130
1130
|
attributes: {
|
|
1131
1131
|
title: n,
|
|
@@ -1136,7 +1136,7 @@ function Je(e, t, n, s, a = void 0, c = void 0) {
|
|
|
1136
1136
|
items: []
|
|
1137
1137
|
};
|
|
1138
1138
|
t && (d.parentId = t), d.items.push(r);
|
|
1139
|
-
let
|
|
1139
|
+
let p = {
|
|
1140
1140
|
method: "POST",
|
|
1141
1141
|
headers: {
|
|
1142
1142
|
Accept: "application/json",
|
|
@@ -1146,17 +1146,17 @@ function Je(e, t, n, s, a = void 0, c = void 0) {
|
|
|
1146
1146
|
},
|
|
1147
1147
|
data: JSON.stringify(d),
|
|
1148
1148
|
type: "json",
|
|
1149
|
-
onComplete(
|
|
1150
|
-
|
|
1149
|
+
onComplete(l) {
|
|
1150
|
+
i && i(l);
|
|
1151
1151
|
},
|
|
1152
|
-
onFailure(
|
|
1153
|
-
c && c(
|
|
1152
|
+
onFailure(l) {
|
|
1153
|
+
c && c(l);
|
|
1154
1154
|
}
|
|
1155
1155
|
};
|
|
1156
|
-
m(
|
|
1156
|
+
m(a, p);
|
|
1157
1157
|
});
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1159
|
+
function Ge(e, t, n, s, i = void 0, c = void 0) {
|
|
1160
1160
|
return console.log("credentials", e), new Promise((o) => {
|
|
1161
1161
|
`${e.space}`, JSON.stringify({
|
|
1162
1162
|
csrf: {
|
|
@@ -1178,24 +1178,24 @@ function Ee(e, t, n, s, a = void 0, c = void 0) {
|
|
|
1178
1178
|
});
|
|
1179
1179
|
}
|
|
1180
1180
|
//!SECTION
|
|
1181
|
-
function
|
|
1181
|
+
function Ee(e, t = void 0, n = void 0) {
|
|
1182
1182
|
const s = {
|
|
1183
1183
|
base: `${e.space}`,
|
|
1184
1184
|
uri: "/resources/bps/cspaces",
|
|
1185
1185
|
optTenant: `tenant=${e.tenant}`
|
|
1186
|
-
},
|
|
1187
|
-
m(
|
|
1186
|
+
}, i = `${s.base}${s.uri}?${s.optTenant}`;
|
|
1187
|
+
m(i, {
|
|
1188
1188
|
method: "GET",
|
|
1189
1189
|
headers: {
|
|
1190
1190
|
Accept: "application/json,text/javascript,*/*",
|
|
1191
1191
|
"Content-Type": "application/ds-json"
|
|
1192
1192
|
},
|
|
1193
1193
|
onComplete(c, o) {
|
|
1194
|
-
const
|
|
1195
|
-
t && t(
|
|
1194
|
+
const a = JSON.parse(c);
|
|
1195
|
+
t && t(a, o);
|
|
1196
1196
|
},
|
|
1197
|
-
onFailure(c, o,
|
|
1198
|
-
n && n({ response: c, headers: o, xhr:
|
|
1197
|
+
onFailure(c, o, a) {
|
|
1198
|
+
n && n({ response: c, headers: o, xhr: a });
|
|
1199
1199
|
}
|
|
1200
1200
|
});
|
|
1201
1201
|
}
|
|
@@ -1203,8 +1203,8 @@ function Ke(e, t, n, s) {
|
|
|
1203
1203
|
U(
|
|
1204
1204
|
e.space,
|
|
1205
1205
|
t,
|
|
1206
|
-
(
|
|
1207
|
-
m(
|
|
1206
|
+
(i) => {
|
|
1207
|
+
m(i, {
|
|
1208
1208
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1209
1209
|
onComplete: (c) => {
|
|
1210
1210
|
n && n(c);
|
|
@@ -1217,43 +1217,43 @@ function Ke(e, t, n, s) {
|
|
|
1217
1217
|
);
|
|
1218
1218
|
}
|
|
1219
1219
|
async function Ve(e, t, n = void 0, s = void 0) {
|
|
1220
|
-
return new Promise((
|
|
1220
|
+
return new Promise((i) => {
|
|
1221
1221
|
U(e, t, (c) => {
|
|
1222
1222
|
m(c, {
|
|
1223
|
-
onComplete: (o,
|
|
1224
|
-
onFailure: (o,
|
|
1225
|
-
s && s(o,
|
|
1223
|
+
onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
|
|
1224
|
+
onFailure: (o, a, r) => {
|
|
1225
|
+
s && s(o, a, r), console.log(o, a?.errormsg);
|
|
1226
1226
|
}
|
|
1227
1227
|
});
|
|
1228
1228
|
});
|
|
1229
1229
|
});
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function Be(e, t, n, s = void 0, i = void 0) {
|
|
1232
1232
|
const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1233
1233
|
A(
|
|
1234
1234
|
e,
|
|
1235
1235
|
n,
|
|
1236
1236
|
(o) => {
|
|
1237
|
-
const
|
|
1237
|
+
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;
|
|
1238
1238
|
z(
|
|
1239
1239
|
e,
|
|
1240
1240
|
n,
|
|
1241
|
-
|
|
1241
|
+
a,
|
|
1242
1242
|
c,
|
|
1243
1243
|
r,
|
|
1244
1244
|
(d) => {
|
|
1245
1245
|
s && s(d);
|
|
1246
1246
|
},
|
|
1247
1247
|
(d) => {
|
|
1248
|
-
|
|
1248
|
+
i && i(d);
|
|
1249
1249
|
}
|
|
1250
1250
|
);
|
|
1251
1251
|
}
|
|
1252
1252
|
);
|
|
1253
1253
|
}
|
|
1254
|
-
let
|
|
1254
|
+
let L, M;
|
|
1255
1255
|
const j = [];
|
|
1256
|
-
async function
|
|
1256
|
+
async function We(e, t = void 0, n = void 0) {
|
|
1257
1257
|
e.objID && e.objID !== "" ? A(
|
|
1258
1258
|
e,
|
|
1259
1259
|
(s) => {
|
|
@@ -1276,8 +1276,8 @@ async function Xe(e, t = void 0, n = void 0) {
|
|
|
1276
1276
|
console.log("getDatasByTenant (getDocuments)", e), await x(
|
|
1277
1277
|
e,
|
|
1278
1278
|
(s) => {
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1279
|
+
const i = {};
|
|
1280
|
+
i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
|
|
1281
1281
|
},
|
|
1282
1282
|
(s) => {
|
|
1283
1283
|
n && n?.(s);
|
|
@@ -1290,12 +1290,12 @@ function Ye(e, t = void 0, n = void 0) {
|
|
|
1290
1290
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1291
1291
|
return;
|
|
1292
1292
|
}
|
|
1293
|
-
e.objIds.forEach((
|
|
1293
|
+
e.objIds.forEach((i, c) => {
|
|
1294
1294
|
x(
|
|
1295
1295
|
e,
|
|
1296
|
-
|
|
1296
|
+
i.objID,
|
|
1297
1297
|
(o) => {
|
|
1298
|
-
s.push({ [
|
|
1298
|
+
s.push({ [i.name]: o }), i.name === "dbProjets" && (L = o.affaires.map((a) => a.objectID), ee(e, M)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1299
1299
|
}
|
|
1300
1300
|
);
|
|
1301
1301
|
});
|
|
@@ -1303,13 +1303,13 @@ function Ye(e, t = void 0, n = void 0) {
|
|
|
1303
1303
|
function ee(e, t, n = void 0, s = void 0) {
|
|
1304
1304
|
Q(
|
|
1305
1305
|
e,
|
|
1306
|
-
|
|
1307
|
-
(
|
|
1306
|
+
L,
|
|
1307
|
+
(i) => {
|
|
1308
1308
|
const c = [...t];
|
|
1309
|
-
c.find((o) => o.objectID ===
|
|
1309
|
+
c.find((o) => o.objectID === i.objectId).data = i.data, M = c, j.push(i.data), n && n(j);
|
|
1310
1310
|
},
|
|
1311
|
-
(
|
|
1312
|
-
s && (s(
|
|
1311
|
+
(i) => {
|
|
1312
|
+
s && (s(i), console.log(i));
|
|
1313
1313
|
}
|
|
1314
1314
|
);
|
|
1315
1315
|
}
|
|
@@ -1334,11 +1334,11 @@ const te = "FA35FB9B177A280065800EA0000F599C", ne = [
|
|
|
1334
1334
|
tag: "testTag"
|
|
1335
1335
|
};
|
|
1336
1336
|
function He(e, t, n = void 0, s = void 0) {
|
|
1337
|
-
const { space:
|
|
1337
|
+
const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
|
|
1338
1338
|
uri: "/resources/6w/tags",
|
|
1339
1339
|
otpCTX: "SecurityContext=preferred",
|
|
1340
1340
|
optTenant: `tenant=${c}`
|
|
1341
|
-
},
|
|
1341
|
+
}, p = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, l = {
|
|
1342
1342
|
tag: [
|
|
1343
1343
|
{
|
|
1344
1344
|
subject: [
|
|
@@ -1346,20 +1346,20 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1346
1346
|
uri: `pid://${o}`
|
|
1347
1347
|
}
|
|
1348
1348
|
],
|
|
1349
|
-
predicate: J[
|
|
1349
|
+
predicate: J[a],
|
|
1350
1350
|
object: {
|
|
1351
1351
|
literal: r
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
1354
|
]
|
|
1355
1355
|
};
|
|
1356
|
-
m(
|
|
1356
|
+
m(p, {
|
|
1357
1357
|
method: "PUT",
|
|
1358
1358
|
headers: {
|
|
1359
1359
|
"Content-Type": "application/json",
|
|
1360
1360
|
Accept: "application/json"
|
|
1361
1361
|
},
|
|
1362
|
-
data: JSON.stringify(
|
|
1362
|
+
data: JSON.stringify(l),
|
|
1363
1363
|
onComplete(f) {
|
|
1364
1364
|
JSON.parse(f);
|
|
1365
1365
|
const u = {};
|
|
@@ -1395,13 +1395,13 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
function ie(e, t, n = void 0, s = void 0) {
|
|
1397
1397
|
console.log("obj ", t);
|
|
1398
|
-
const
|
|
1398
|
+
const i = t.info.name, c = {
|
|
1399
1399
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1400
1400
|
uri: "/federated/search"
|
|
1401
|
-
}, o = `${c.baseUrl}${c.uri}`,
|
|
1401
|
+
}, o = `${c.baseUrl}${c.uri}`, a = {
|
|
1402
1402
|
"Content-Type": "application/json",
|
|
1403
1403
|
Accept: "application/json,text/javascript,*/*"
|
|
1404
|
-
}, r =
|
|
1404
|
+
}, r = D(), d = {
|
|
1405
1405
|
with_indexing_date: !0,
|
|
1406
1406
|
with_synthesis: !0,
|
|
1407
1407
|
with_nls: !1,
|
|
@@ -1433,7 +1433,7 @@ function ie(e, t, n = void 0, s = void 0) {
|
|
|
1433
1433
|
],
|
|
1434
1434
|
with_synthesis_hierarchical: !0,
|
|
1435
1435
|
select_file: ["icon", "thumbnail_2d"],
|
|
1436
|
-
query:
|
|
1436
|
+
query: i,
|
|
1437
1437
|
specific_source_parameter: {
|
|
1438
1438
|
"3dspace": {
|
|
1439
1439
|
additional_query: ' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'
|
|
@@ -1464,29 +1464,29 @@ function ie(e, t, n = void 0, s = void 0) {
|
|
|
1464
1464
|
};
|
|
1465
1465
|
console.log("dataPattern => ", d), m(o, {
|
|
1466
1466
|
method: "POST",
|
|
1467
|
-
headers:
|
|
1467
|
+
headers: a,
|
|
1468
1468
|
data: JSON.stringify(d),
|
|
1469
|
-
onComplete(
|
|
1470
|
-
const
|
|
1471
|
-
n(
|
|
1469
|
+
onComplete(p) {
|
|
1470
|
+
const l = JSON.parse(p);
|
|
1471
|
+
n(l);
|
|
1472
1472
|
},
|
|
1473
|
-
onFailure(
|
|
1474
|
-
const f =
|
|
1475
|
-
f.msg =
|
|
1473
|
+
onFailure(p, l) {
|
|
1474
|
+
const f = p;
|
|
1475
|
+
f.msg = l.errormsg, f.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", p);
|
|
1476
1476
|
}
|
|
1477
1477
|
});
|
|
1478
1478
|
}
|
|
1479
1479
|
function ze(e, t, n = void 0, s = void 0) {
|
|
1480
|
-
const { objId:
|
|
1480
|
+
const { objId: i, pred: c, tag: o } = t, a = {
|
|
1481
1481
|
uri: "/resources/6w/tags",
|
|
1482
1482
|
otpCTX: "SecurityContext=preferred",
|
|
1483
1483
|
optTenant: `tenant=${e.tenant}`
|
|
1484
|
-
}, r = `${e.space}${
|
|
1484
|
+
}, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1485
1485
|
tag: [
|
|
1486
1486
|
{
|
|
1487
1487
|
subject: [
|
|
1488
1488
|
{
|
|
1489
|
-
uri: `pid://${
|
|
1489
|
+
uri: `pid://${i}`
|
|
1490
1490
|
}
|
|
1491
1491
|
],
|
|
1492
1492
|
predicate: J[c],
|
|
@@ -1503,17 +1503,17 @@ function ze(e, t, n = void 0, s = void 0) {
|
|
|
1503
1503
|
"Content-Type": "application/json",
|
|
1504
1504
|
Accept: "application/json,text/javascript,*/*"
|
|
1505
1505
|
},
|
|
1506
|
-
onComplete(
|
|
1507
|
-
n && n(
|
|
1506
|
+
onComplete(p) {
|
|
1507
|
+
n && n(p);
|
|
1508
1508
|
},
|
|
1509
|
-
onFailure(
|
|
1510
|
-
const f =
|
|
1511
|
-
f.msg =
|
|
1509
|
+
onFailure(p, l) {
|
|
1510
|
+
const f = p;
|
|
1511
|
+
f.msg = l.errormsg, f.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
|
|
1512
1512
|
}
|
|
1513
1513
|
});
|
|
1514
1514
|
}
|
|
1515
1515
|
function qe(e, t = "", n = void 0, s = void 0) {
|
|
1516
|
-
const { space:
|
|
1516
|
+
const { space: i } = e;
|
|
1517
1517
|
if (t === "")
|
|
1518
1518
|
return;
|
|
1519
1519
|
const c = {
|
|
@@ -1521,35 +1521,35 @@ function qe(e, t = "", n = void 0, s = void 0) {
|
|
|
1521
1521
|
}, o = {
|
|
1522
1522
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1523
1523
|
Accept: "application/json,text/javascript,*/*"
|
|
1524
|
-
},
|
|
1525
|
-
m(
|
|
1524
|
+
}, 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}`;
|
|
1525
|
+
m(a, {
|
|
1526
1526
|
method: "POST",
|
|
1527
1527
|
headers: o,
|
|
1528
1528
|
data: r,
|
|
1529
1529
|
onComplete(d) {
|
|
1530
1530
|
n && n(JSON.parse(d));
|
|
1531
1531
|
},
|
|
1532
|
-
onFailure(d,
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1532
|
+
onFailure(d, p) {
|
|
1533
|
+
const l = d;
|
|
1534
|
+
l.msg = p.error, s && s(l);
|
|
1535
1535
|
}
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
1538
|
async function w(e, t = void 0, n = void 0) {
|
|
1539
1539
|
const s = e.space + "/api/index/tk";
|
|
1540
1540
|
return m(s, {
|
|
1541
|
-
onComplete(
|
|
1542
|
-
const
|
|
1541
|
+
onComplete(i, c, o) {
|
|
1542
|
+
const a = JSON.parse(i);
|
|
1543
1543
|
if (t)
|
|
1544
|
-
return t(
|
|
1544
|
+
return t(a), e.token = a?.result?.ServerToken;
|
|
1545
1545
|
},
|
|
1546
|
-
onFailure(
|
|
1547
|
-
n && n(
|
|
1546
|
+
onFailure(i) {
|
|
1547
|
+
n && n(i);
|
|
1548
1548
|
}
|
|
1549
1549
|
});
|
|
1550
1550
|
}
|
|
1551
1551
|
function Qe(e, t = void 0, n = void 0) {
|
|
1552
|
-
const s = `${e.space}/api/exalead/whatsnew`,
|
|
1552
|
+
const s = `${e.space}/api/exalead/whatsnew`, i = {
|
|
1553
1553
|
params: {
|
|
1554
1554
|
community_id: null,
|
|
1555
1555
|
hash_key: null,
|
|
@@ -1567,19 +1567,19 @@ function Qe(e, t = void 0, n = void 0) {
|
|
|
1567
1567
|
"Content-type": "application/json;charset=UTF-8",
|
|
1568
1568
|
Accept: "application/json"
|
|
1569
1569
|
},
|
|
1570
|
-
data: JSON.stringify(
|
|
1570
|
+
data: JSON.stringify(i),
|
|
1571
1571
|
type: "json",
|
|
1572
|
-
onComplete(o,
|
|
1573
|
-
t && t(o,
|
|
1572
|
+
onComplete(o, a) {
|
|
1573
|
+
t && t(o, a);
|
|
1574
1574
|
},
|
|
1575
|
-
onFailure(o,
|
|
1576
|
-
n && n(o,
|
|
1575
|
+
onFailure(o, a) {
|
|
1576
|
+
n && n(o, a);
|
|
1577
1577
|
}
|
|
1578
1578
|
});
|
|
1579
1579
|
});
|
|
1580
1580
|
}
|
|
1581
1581
|
function Ze(e, t = void 0, n = void 0) {
|
|
1582
|
-
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`,
|
|
1582
|
+
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
1583
1583
|
params: {
|
|
1584
1584
|
idsToFilterArr: [],
|
|
1585
1585
|
mode: "offline",
|
|
@@ -1596,14 +1596,14 @@ function Ze(e, t = void 0, n = void 0) {
|
|
|
1596
1596
|
"Content-type": "application/json;charset=UTF-8",
|
|
1597
1597
|
Accept: "application/json"
|
|
1598
1598
|
},
|
|
1599
|
-
data: JSON.stringify(
|
|
1599
|
+
data: JSON.stringify(i),
|
|
1600
1600
|
type: "json",
|
|
1601
|
-
onComplete(o,
|
|
1601
|
+
onComplete(o, a) {
|
|
1602
1602
|
const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1603
1603
|
t && t(r, o);
|
|
1604
1604
|
},
|
|
1605
|
-
onFailure(o,
|
|
1606
|
-
n && n(o,
|
|
1605
|
+
onFailure(o, a) {
|
|
1606
|
+
n && n(o, a);
|
|
1607
1607
|
}
|
|
1608
1608
|
});
|
|
1609
1609
|
});
|
|
@@ -1614,17 +1614,17 @@ function et(e, t = void 0, n = void 0) {
|
|
|
1614
1614
|
uri: "/api/community/listmycommunities",
|
|
1615
1615
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1616
1616
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1617
|
-
},
|
|
1617
|
+
}, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
|
|
1618
1618
|
w(e, (o) => {
|
|
1619
|
-
m(
|
|
1619
|
+
m(i, {
|
|
1620
1620
|
method: "GET",
|
|
1621
1621
|
headers: {
|
|
1622
1622
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1623
1623
|
},
|
|
1624
|
-
onComplete(
|
|
1625
|
-
const
|
|
1624
|
+
onComplete(a, r, d) {
|
|
1625
|
+
const l = JSON.parse(a).result;
|
|
1626
1626
|
let f = 0;
|
|
1627
|
-
|
|
1627
|
+
l.forEach((u) => {
|
|
1628
1628
|
const g = {
|
|
1629
1629
|
description: u.description,
|
|
1630
1630
|
id: u.id,
|
|
@@ -1637,21 +1637,21 @@ function et(e, t = void 0, n = void 0) {
|
|
|
1637
1637
|
e,
|
|
1638
1638
|
u.id,
|
|
1639
1639
|
(h) => {
|
|
1640
|
-
f++, g.members = h, c.push(g), f ===
|
|
1640
|
+
f++, g.members = h, c.push(g), f === l.length && t && t(c);
|
|
1641
1641
|
},
|
|
1642
1642
|
(h) => n(h)
|
|
1643
1643
|
);
|
|
1644
1644
|
});
|
|
1645
1645
|
},
|
|
1646
|
-
onFailure(
|
|
1647
|
-
const d =
|
|
1646
|
+
onFailure(a, r) {
|
|
1647
|
+
const d = a;
|
|
1648
1648
|
d.status = r.status, d.response = r.errormsg, n && n(d);
|
|
1649
1649
|
}
|
|
1650
1650
|
});
|
|
1651
1651
|
});
|
|
1652
1652
|
}
|
|
1653
1653
|
function ae(e, t, n, s) {
|
|
1654
|
-
const
|
|
1654
|
+
const i = `${e.space}/api/community/listmembers`, c = {
|
|
1655
1655
|
params: {
|
|
1656
1656
|
page: e.page ? e.page : 1,
|
|
1657
1657
|
limit: e.limit ? e.limit : 50,
|
|
@@ -1659,7 +1659,7 @@ function ae(e, t, n, s) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
};
|
|
1661
1661
|
w(e, (o) => {
|
|
1662
|
-
m(
|
|
1662
|
+
m(i, {
|
|
1663
1663
|
method: "POST",
|
|
1664
1664
|
headers: {
|
|
1665
1665
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1668,11 +1668,11 @@ function ae(e, t, n, s) {
|
|
|
1668
1668
|
},
|
|
1669
1669
|
data: JSON.stringify(c),
|
|
1670
1670
|
type: "json",
|
|
1671
|
-
onComplete(
|
|
1672
|
-
n && n(
|
|
1671
|
+
onComplete(a, r, d) {
|
|
1672
|
+
n && n(a);
|
|
1673
1673
|
},
|
|
1674
|
-
onFailure(
|
|
1675
|
-
const d =
|
|
1674
|
+
onFailure(a, r) {
|
|
1675
|
+
const d = a;
|
|
1676
1676
|
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1677
1677
|
}
|
|
1678
1678
|
});
|
|
@@ -1681,9 +1681,9 @@ function ae(e, t, n, s) {
|
|
|
1681
1681
|
function tt(e, t = void 0, n = void 0) {
|
|
1682
1682
|
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1683
1683
|
e.commu_id || (e.commu_id = s);
|
|
1684
|
-
const
|
|
1684
|
+
const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1685
1685
|
w(e, (c) => {
|
|
1686
|
-
m(
|
|
1686
|
+
m(i, {
|
|
1687
1687
|
method: "GET",
|
|
1688
1688
|
headers: {
|
|
1689
1689
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1691,20 +1691,20 @@ function tt(e, t = void 0, n = void 0) {
|
|
|
1691
1691
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1692
1692
|
},
|
|
1693
1693
|
onComplete(o) {
|
|
1694
|
-
const
|
|
1695
|
-
t && t(
|
|
1694
|
+
const a = JSON.parse(o);
|
|
1695
|
+
t && t(a);
|
|
1696
1696
|
},
|
|
1697
|
-
onFailure(o,
|
|
1697
|
+
onFailure(o, a) {
|
|
1698
1698
|
const r = o;
|
|
1699
|
-
r.status =
|
|
1699
|
+
r.status = a.status, r.response = a.errormsg, n && n(r);
|
|
1700
1700
|
}
|
|
1701
1701
|
});
|
|
1702
1702
|
});
|
|
1703
1703
|
}
|
|
1704
1704
|
function nt(e, t, n = void 0, s = void 0) {
|
|
1705
|
-
const { listAllContacts:
|
|
1706
|
-
console.log("__listAllContacts",
|
|
1707
|
-
const o = `${e.space}/api/directmessages`,
|
|
1705
|
+
const { listAllContacts: i, currentUser: c } = e;
|
|
1706
|
+
console.log("__listAllContacts", i.hits);
|
|
1707
|
+
const o = `${e.space}/api/directmessages`, a = {
|
|
1708
1708
|
users: [c.login].concat(t.receipt)
|
|
1709
1709
|
}, r = {
|
|
1710
1710
|
id_msg: "",
|
|
@@ -1714,30 +1714,30 @@ function nt(e, t, n = void 0, s = void 0) {
|
|
|
1714
1714
|
};
|
|
1715
1715
|
let d = !1;
|
|
1716
1716
|
oe(
|
|
1717
|
-
|
|
1718
|
-
(
|
|
1719
|
-
|
|
1717
|
+
a.users,
|
|
1718
|
+
(p) => {
|
|
1719
|
+
p !== void 0 && (r.id_msg = p.id, d = !0, R(e, r));
|
|
1720
1720
|
},
|
|
1721
|
-
(
|
|
1722
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback",
|
|
1721
|
+
(p) => {
|
|
1722
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), r.id_msg = "";
|
|
1723
1723
|
}
|
|
1724
1724
|
), d === !1 && setTimeout(() => {
|
|
1725
|
-
d === !1 && w(e, (
|
|
1725
|
+
d === !1 && w(e, (p) => {
|
|
1726
1726
|
m(o, {
|
|
1727
1727
|
method: "POST",
|
|
1728
1728
|
headers: {
|
|
1729
1729
|
"Content-Type": "application/json",
|
|
1730
1730
|
Accept: "application/json",
|
|
1731
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1731
|
+
"X-DS-SWYM-CSRFTOKEN": p.result.ServerToken
|
|
1732
1732
|
},
|
|
1733
|
-
data: JSON.stringify(
|
|
1733
|
+
data: JSON.stringify(a),
|
|
1734
1734
|
type: "json",
|
|
1735
|
-
onComplete(
|
|
1736
|
-
const g =
|
|
1737
|
-
g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), r.id_msg = g.result.id,
|
|
1735
|
+
onComplete(l, f, u) {
|
|
1736
|
+
const g = l;
|
|
1737
|
+
g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), r.id_msg = g.result.id, R(e, r);
|
|
1738
1738
|
},
|
|
1739
|
-
onFailure(
|
|
1740
|
-
const g =
|
|
1739
|
+
onFailure(l, f, u) {
|
|
1740
|
+
const g = l;
|
|
1741
1741
|
g.msg = f.errormsg, g.status = f.status, s && s(g);
|
|
1742
1742
|
}
|
|
1743
1743
|
});
|
|
@@ -1745,41 +1745,41 @@ function nt(e, t, n = void 0, s = void 0) {
|
|
|
1745
1745
|
}, 500);
|
|
1746
1746
|
}
|
|
1747
1747
|
function oe(e, t, n, s) {
|
|
1748
|
-
const
|
|
1748
|
+
const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1749
1749
|
w(e, (c) => {
|
|
1750
|
-
m(
|
|
1750
|
+
m(i, {
|
|
1751
1751
|
method: "GET",
|
|
1752
1752
|
headers: {
|
|
1753
1753
|
Accept: "application/json,text/javascript,*/*",
|
|
1754
1754
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1755
1755
|
},
|
|
1756
1756
|
onComplete(o) {
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1759
|
-
|
|
1757
|
+
const a = JSON.parse(o), r = [];
|
|
1758
|
+
a.result.forEach((l) => {
|
|
1759
|
+
l.users = l.users.sort((f, u) => f.login.localeCompare(u.login)), l.users.length === t.length && r.push(l);
|
|
1760
1760
|
});
|
|
1761
|
-
const d = t.sort(),
|
|
1761
|
+
const d = t.sort(), p = r.find((l) => {
|
|
1762
1762
|
const f = [];
|
|
1763
|
-
return
|
|
1763
|
+
return l.users.forEach((u) => {
|
|
1764
1764
|
f.push(u.login);
|
|
1765
1765
|
}), JSON.stringify(f) === JSON.stringify(d);
|
|
1766
1766
|
});
|
|
1767
|
-
n &&
|
|
1767
|
+
n && p !== void 0 ? n(p) : (s || p === void 0) && s(p);
|
|
1768
1768
|
},
|
|
1769
1769
|
onFailure(o) {
|
|
1770
|
-
const
|
|
1771
|
-
|
|
1770
|
+
const a = o;
|
|
1771
|
+
a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
|
|
1772
1772
|
}
|
|
1773
1773
|
});
|
|
1774
1774
|
});
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1777
|
-
const
|
|
1776
|
+
function R(e, t, n = void 0, s = void 0) {
|
|
1777
|
+
const i = {
|
|
1778
1778
|
base: e.space,
|
|
1779
1779
|
uri: "/api/community",
|
|
1780
1780
|
id_msg: `${t.id_msg}`,
|
|
1781
1781
|
endUri: "/instantmessages"
|
|
1782
|
-
}, c = `${
|
|
1782
|
+
}, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
|
|
1783
1783
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1784
1784
|
accessState: null,
|
|
1785
1785
|
commentUri: null,
|
|
@@ -1789,23 +1789,23 @@ function D(e, t, n = void 0, s = void 0) {
|
|
|
1789
1789
|
parentCommentUri: null,
|
|
1790
1790
|
richMessage: t.msg
|
|
1791
1791
|
};
|
|
1792
|
-
console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (
|
|
1792
|
+
console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
|
|
1793
1793
|
m(c, {
|
|
1794
1794
|
method: "POST",
|
|
1795
1795
|
headers: {
|
|
1796
1796
|
"Content-Type": "application/json",
|
|
1797
1797
|
Accept: "application/json",
|
|
1798
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1798
|
+
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1799
1799
|
},
|
|
1800
1800
|
data: JSON.stringify(o),
|
|
1801
1801
|
type: "json",
|
|
1802
|
-
onComplete(r, d,
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1802
|
+
onComplete(r, d, p) {
|
|
1803
|
+
const l = r;
|
|
1804
|
+
l.status = p.status, l.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", l), n && n(l);
|
|
1805
1805
|
},
|
|
1806
1806
|
onFailure(r, d) {
|
|
1807
|
-
const
|
|
1808
|
-
|
|
1807
|
+
const p = r;
|
|
1808
|
+
p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
|
|
1809
1809
|
}
|
|
1810
1810
|
});
|
|
1811
1811
|
});
|
|
@@ -1828,11 +1828,11 @@ const ce = {
|
|
|
1828
1828
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1829
1829
|
};
|
|
1830
1830
|
function st(e, t, n = void 0, s = void 0) {
|
|
1831
|
-
const
|
|
1831
|
+
const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
|
|
1832
1832
|
(r) => r.id === t.community_id
|
|
1833
1833
|
), o = e.swymCommunities.find(
|
|
1834
1834
|
(r) => r.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1835
|
-
),
|
|
1835
|
+
), a = {
|
|
1836
1836
|
params: {
|
|
1837
1837
|
title: t.title,
|
|
1838
1838
|
// String, le nom de l'affaire
|
|
@@ -1850,31 +1850,31 @@ function st(e, t, n = void 0, s = void 0) {
|
|
|
1850
1850
|
Accept: "application/json",
|
|
1851
1851
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1852
1852
|
};
|
|
1853
|
-
m(
|
|
1853
|
+
m(i, {
|
|
1854
1854
|
method: "POST",
|
|
1855
1855
|
headers: d,
|
|
1856
|
-
data: JSON.stringify(
|
|
1856
|
+
data: JSON.stringify(a),
|
|
1857
1857
|
type: "json",
|
|
1858
|
-
onComplete(
|
|
1859
|
-
const u = JSON.parse(
|
|
1858
|
+
onComplete(p, l, f) {
|
|
1859
|
+
const u = JSON.parse(p);
|
|
1860
1860
|
u.status = f.status, u.response = f.response, n && n(u);
|
|
1861
1861
|
},
|
|
1862
|
-
onFailure(
|
|
1863
|
-
const u =
|
|
1864
|
-
u.status =
|
|
1862
|
+
onFailure(p, l, f) {
|
|
1863
|
+
const u = p;
|
|
1864
|
+
u.status = l.status, u.response = l.errormsg, s && s(u);
|
|
1865
1865
|
}
|
|
1866
1866
|
});
|
|
1867
1867
|
});
|
|
1868
1868
|
}
|
|
1869
1869
|
function it(e, t, n = void 0, s = void 0) {
|
|
1870
|
-
const
|
|
1870
|
+
const i = `${e.space}/api/idea/delete`, c = {
|
|
1871
1871
|
params: {
|
|
1872
1872
|
community_id: t.community_id,
|
|
1873
1873
|
ideationIds: [t.idee_id]
|
|
1874
1874
|
}
|
|
1875
1875
|
};
|
|
1876
1876
|
w(e, (o) => {
|
|
1877
|
-
m(
|
|
1877
|
+
m(i, {
|
|
1878
1878
|
method: "POST",
|
|
1879
1879
|
headers: {
|
|
1880
1880
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1883,31 +1883,31 @@ function it(e, t, n = void 0, s = void 0) {
|
|
|
1883
1883
|
},
|
|
1884
1884
|
data: JSON.stringify(c),
|
|
1885
1885
|
type: "json",
|
|
1886
|
-
onComplete(
|
|
1887
|
-
n && n(
|
|
1886
|
+
onComplete(a, r, d) {
|
|
1887
|
+
n && n(a);
|
|
1888
1888
|
},
|
|
1889
|
-
onFailure(
|
|
1890
|
-
const
|
|
1891
|
-
|
|
1889
|
+
onFailure(a, r, d) {
|
|
1890
|
+
const p = a;
|
|
1891
|
+
p.status = r.status, p.response = r.errormsg, s && s(p);
|
|
1892
1892
|
}
|
|
1893
1893
|
});
|
|
1894
1894
|
});
|
|
1895
1895
|
}
|
|
1896
1896
|
function at(e, t = "", n = void 0, s = void 0) {
|
|
1897
|
-
const
|
|
1898
|
-
t === "" && (t =
|
|
1897
|
+
const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1898
|
+
t === "" && (t = i);
|
|
1899
1899
|
const c = `${e.space}/api/idea/get`, o = {
|
|
1900
1900
|
params: {
|
|
1901
1901
|
id: t
|
|
1902
1902
|
}
|
|
1903
1903
|
};
|
|
1904
|
-
w(e, (
|
|
1904
|
+
w(e, (a) => {
|
|
1905
1905
|
m(c, {
|
|
1906
1906
|
method: "POST",
|
|
1907
1907
|
headers: {
|
|
1908
1908
|
"Content-type": "application/json;charset=UTF-8",
|
|
1909
1909
|
Accept: "application/json",
|
|
1910
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1910
|
+
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1911
1911
|
},
|
|
1912
1912
|
data: JSON.stringify(o),
|
|
1913
1913
|
type: "json",
|
|
@@ -1923,23 +1923,23 @@ function at(e, t = "", n = void 0, s = void 0) {
|
|
|
1923
1923
|
});
|
|
1924
1924
|
}
|
|
1925
1925
|
function ot(e, t = ce, n = void 0, s = void 0) {
|
|
1926
|
-
const
|
|
1926
|
+
const i = {
|
|
1927
1927
|
uri: "/api/idea/list",
|
|
1928
1928
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1929
1929
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1930
|
-
}, c = `${e.space}${
|
|
1930
|
+
}, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
|
|
1931
1931
|
w(e, (o) => {
|
|
1932
1932
|
m(c, {
|
|
1933
1933
|
method: "GET",
|
|
1934
1934
|
headers: {
|
|
1935
1935
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1936
1936
|
},
|
|
1937
|
-
onComplete(
|
|
1938
|
-
const r = JSON.parse(
|
|
1937
|
+
onComplete(a) {
|
|
1938
|
+
const r = JSON.parse(a);
|
|
1939
1939
|
n && n(r);
|
|
1940
1940
|
},
|
|
1941
|
-
onFailure(
|
|
1942
|
-
const d =
|
|
1941
|
+
onFailure(a, r) {
|
|
1942
|
+
const d = a;
|
|
1943
1943
|
d.status = r.status, d.response = r.errormsg, s && s(d);
|
|
1944
1944
|
}
|
|
1945
1945
|
});
|
|
@@ -2022,32 +2022,32 @@ function de(e) {
|
|
|
2022
2022
|
}
|
|
2023
2023
|
function rt(e, t = void 0, n = void 0) {
|
|
2024
2024
|
const s = e.space + "/api/user/getcurrent/";
|
|
2025
|
-
w(e, (
|
|
2025
|
+
w(e, (i) => {
|
|
2026
2026
|
m(s, {
|
|
2027
2027
|
method: "GET",
|
|
2028
2028
|
headers: {
|
|
2029
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
2029
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
2030
2030
|
},
|
|
2031
|
-
onComplete(c, o,
|
|
2031
|
+
onComplete(c, o, a) {
|
|
2032
2032
|
const r = JSON.parse(c);
|
|
2033
2033
|
t && t(r.result);
|
|
2034
2034
|
},
|
|
2035
|
-
onFailure(c, o,
|
|
2036
|
-
const r = { erreur: JSON.parse(c), headers: o, xhr:
|
|
2035
|
+
onFailure(c, o, a) {
|
|
2036
|
+
const r = { erreur: JSON.parse(c), headers: o, xhr: a };
|
|
2037
2037
|
n && n(r);
|
|
2038
2038
|
}
|
|
2039
2039
|
});
|
|
2040
2040
|
});
|
|
2041
2041
|
}
|
|
2042
2042
|
function ct(e, t, n = void 0, s = void 0) {
|
|
2043
|
-
const
|
|
2043
|
+
const i = e.space + "/api/user/find/login/" + t;
|
|
2044
2044
|
w(
|
|
2045
2045
|
e,
|
|
2046
2046
|
(c) => {
|
|
2047
|
-
m(
|
|
2047
|
+
m(i, {
|
|
2048
2048
|
method: "GET",
|
|
2049
2049
|
headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
|
|
2050
|
-
onComplete(o,
|
|
2050
|
+
onComplete(o, a, r) {
|
|
2051
2051
|
const d = JSON.parse(o);
|
|
2052
2052
|
n && n(d);
|
|
2053
2053
|
},
|
|
@@ -2060,36 +2060,36 @@ function ct(e, t, n = void 0, s = void 0) {
|
|
|
2060
2060
|
);
|
|
2061
2061
|
}
|
|
2062
2062
|
function dt(e, t = void 0, n = void 0) {
|
|
2063
|
-
e.tenant &&
|
|
2063
|
+
e.tenant && b(e, (s) => {
|
|
2064
2064
|
console.log("serviceUrls", s);
|
|
2065
|
-
const
|
|
2066
|
-
return t && t(
|
|
2065
|
+
const i = s.services.find((c) => c.id === "businessprocess")?.url + "/api/v2";
|
|
2066
|
+
return t && t(i), i;
|
|
2067
2067
|
});
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2070
|
-
e.tenant &&
|
|
2069
|
+
function pt(e, t = void 0, n = void 0) {
|
|
2070
|
+
e.tenant && b(e, (s) => {
|
|
2071
2071
|
console.log("serviceUrls", s);
|
|
2072
|
-
const
|
|
2072
|
+
const i = s.services.find((a) => a.id === "3dpassport")?.url, c = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${c}/auth/cas`;
|
|
2073
2073
|
m(o, {
|
|
2074
|
-
async onComplete(
|
|
2075
|
-
console.log("response",
|
|
2076
|
-
const r = typeof
|
|
2074
|
+
async onComplete(a) {
|
|
2075
|
+
console.log("response", a);
|
|
2076
|
+
const r = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
|
|
2077
2077
|
await fetch(r, {
|
|
2078
2078
|
method: "POST"
|
|
2079
2079
|
}).then((d) => d.json()).then(async (d) => {
|
|
2080
2080
|
t && t(d?.token);
|
|
2081
2081
|
});
|
|
2082
2082
|
},
|
|
2083
|
-
onFailure(
|
|
2084
|
-
n && n(
|
|
2083
|
+
onFailure(a) {
|
|
2084
|
+
n && n(a);
|
|
2085
2085
|
}
|
|
2086
2086
|
});
|
|
2087
2087
|
});
|
|
2088
2088
|
}
|
|
2089
|
-
async function
|
|
2090
|
-
e.tenant &&
|
|
2091
|
-
const o = `${
|
|
2092
|
-
fetch(`https://api.uixhome.fr/${
|
|
2089
|
+
async function lt(e, t, n = void 0, s = void 0) {
|
|
2090
|
+
e.tenant && b(e, (i) => {
|
|
2091
|
+
const o = `${i.services.find((r) => r.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
|
|
2092
|
+
fetch(`https://api.uixhome.fr/${a}/iterop/listusers?t=${t}&s=${o}`, {
|
|
2093
2093
|
method: "POST"
|
|
2094
2094
|
}).then((r) => r.json()).then((r) => {
|
|
2095
2095
|
n && n(r);
|
|
@@ -2099,9 +2099,9 @@ async function pt(e, t, n = void 0, s = void 0) {
|
|
|
2099
2099
|
});
|
|
2100
2100
|
}
|
|
2101
2101
|
async function ut(e, t, n = void 0, s = void 0) {
|
|
2102
|
-
e.tenant &&
|
|
2103
|
-
const o = `${
|
|
2104
|
-
fetch(`https://api.uixhome.fr/${
|
|
2102
|
+
e.tenant && b(e, (i) => {
|
|
2103
|
+
const o = `${i.services.find((r) => r.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
|
|
2104
|
+
fetch(`https://api.uixhome.fr/${a}/iterop/repository/data/tables?t=${t}&s=${o}`, {
|
|
2105
2105
|
method: "GET"
|
|
2106
2106
|
}).then((r) => r.json()).then((r) => {
|
|
2107
2107
|
n && n(r);
|
|
@@ -2110,33 +2110,73 @@ async function ut(e, t, n = void 0, s = void 0) {
|
|
|
2110
2110
|
});
|
|
2111
2111
|
});
|
|
2112
2112
|
}
|
|
2113
|
-
async function ft(e, t, n, s
|
|
2114
|
-
e.tenant
|
|
2113
|
+
async function ft(e, t, n, s = void 0, i = void 0) {
|
|
2114
|
+
if (e.tenant) {
|
|
2115
|
+
const c = e.tenant.toLowerCase();
|
|
2116
|
+
fetch(`https://api.uixhome.fr/${c}/iterop//businesstable/${n}?t=${t}`, {
|
|
2117
|
+
method: "POST"
|
|
2118
|
+
}).then((o) => o.json()).then((o) => {
|
|
2119
|
+
s && s(o);
|
|
2120
|
+
}).catch((o) => {
|
|
2121
|
+
i && i(o);
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
async function mt(e, t, n, s = void 0, i = void 0) {
|
|
2126
|
+
if (e.tenant) {
|
|
2127
|
+
const c = e.tenant.toLowerCase();
|
|
2128
|
+
fetch(`https://api.uixhome.fr/${c}/iterop//businesstable/${n}/rows/?t=${t}`, {
|
|
2129
|
+
method: "POST"
|
|
2130
|
+
}).then((o) => o.json()).then((o) => {
|
|
2131
|
+
s && s(o);
|
|
2132
|
+
}).catch((o) => {
|
|
2133
|
+
i && i(o);
|
|
2134
|
+
});
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
async function gt(e, t, n, s, i = void 0, c = void 0) {
|
|
2138
|
+
e.tenant && b(e, (o) => {
|
|
2115
2139
|
o.services.find((r) => r.id === "businessprocess")?.url + "";
|
|
2116
|
-
const
|
|
2140
|
+
const a = e.tenant.toLowerCase();
|
|
2117
2141
|
fetch(
|
|
2118
|
-
`https://api.uixhome.fr/${
|
|
2142
|
+
`https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
|
|
2119
2143
|
{
|
|
2120
2144
|
method: "POST"
|
|
2121
2145
|
}
|
|
2122
2146
|
).then((r) => r.json()).then((r) => {
|
|
2123
|
-
|
|
2147
|
+
i && i(r);
|
|
2124
2148
|
}).catch((r) => {
|
|
2125
2149
|
c && c(r);
|
|
2126
2150
|
});
|
|
2127
2151
|
});
|
|
2128
2152
|
}
|
|
2129
|
-
function
|
|
2153
|
+
async function ht(e, t, n, s, i, c = void 0, o = void 0) {
|
|
2154
|
+
e.tenant && b(e, (a) => {
|
|
2155
|
+
a.services.find((d) => d.id === "businessprocess")?.url + "";
|
|
2156
|
+
const r = e.tenant.toLowerCase();
|
|
2157
|
+
fetch(
|
|
2158
|
+
`https://api.uixhome.fr/${r}/iterop/businesstable/patch/${n}/rows?t=${t}&rowsToAdd=${s}&rowsToRemove=${i}`,
|
|
2159
|
+
{
|
|
2160
|
+
method: "POST"
|
|
2161
|
+
}
|
|
2162
|
+
).then((d) => d.json()).then((d) => {
|
|
2163
|
+
c && c(d);
|
|
2164
|
+
}).catch((d) => {
|
|
2165
|
+
o && o(d);
|
|
2166
|
+
});
|
|
2167
|
+
});
|
|
2168
|
+
}
|
|
2169
|
+
function St(e) {
|
|
2130
2170
|
const t = "Hello " + e;
|
|
2131
2171
|
return console.log(t), t;
|
|
2132
2172
|
}
|
|
2133
|
-
function
|
|
2173
|
+
function _t(e, t = void 0, n = void 0) {
|
|
2134
2174
|
return console.log("credentials", e), new Promise((s) => {
|
|
2135
2175
|
if (e.token === "" && T(e), !e.space || e.space === "") {
|
|
2136
2176
|
const o = K();
|
|
2137
2177
|
console.log("platformeInfo", o);
|
|
2138
2178
|
}
|
|
2139
|
-
|
|
2179
|
+
N(
|
|
2140
2180
|
e,
|
|
2141
2181
|
"Common space",
|
|
2142
2182
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -2147,13 +2187,13 @@ function gt(e, t = void 0, n = void 0) {
|
|
|
2147
2187
|
},
|
|
2148
2188
|
!0
|
|
2149
2189
|
);
|
|
2150
|
-
const
|
|
2190
|
+
const i = v.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
2151
2191
|
m(c, {
|
|
2152
2192
|
onComplete(o) {
|
|
2153
2193
|
if (Array.isArray(JSON.parse(o))) {
|
|
2154
|
-
const
|
|
2155
|
-
console.log("serviceId=3dsearch",
|
|
2156
|
-
const r = `${
|
|
2194
|
+
const a = JSON.parse(o);
|
|
2195
|
+
console.log("serviceId=3dsearch", a);
|
|
2196
|
+
const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
|
|
2157
2197
|
m(r, {
|
|
2158
2198
|
method: "POST",
|
|
2159
2199
|
headers: {
|
|
@@ -2163,7 +2203,7 @@ function gt(e, t = void 0, n = void 0) {
|
|
|
2163
2203
|
data: JSON.stringify({
|
|
2164
2204
|
with_indexing_date: !0,
|
|
2165
2205
|
with_nls: !1,
|
|
2166
|
-
label: `3DSearch-${
|
|
2206
|
+
label: `3DSearch-${i}`,
|
|
2167
2207
|
locale: "en",
|
|
2168
2208
|
select_predicate: [
|
|
2169
2209
|
"ds6w:label",
|
|
@@ -2210,10 +2250,10 @@ function gt(e, t = void 0, n = void 0) {
|
|
|
2210
2250
|
});
|
|
2211
2251
|
}
|
|
2212
2252
|
export {
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2253
|
+
D as UUID,
|
|
2254
|
+
_t as _3DSearch_usersGroup,
|
|
2255
|
+
Re as _3DSpace_Create_Doc,
|
|
2256
|
+
Ge as _3DSpace_bookmark_addSubsciptions,
|
|
2217
2257
|
Je as _3DSpace_bookmark_newWorkspace,
|
|
2218
2258
|
T as _3DSpace_csrf,
|
|
2219
2259
|
x as _3DSpace_download_doc,
|
|
@@ -2225,12 +2265,12 @@ export {
|
|
|
2225
2265
|
H as _3DSpace_get_docInfo,
|
|
2226
2266
|
Z as _3DSpace_get_downloadTicket_multidoc,
|
|
2227
2267
|
Ue as _3DSpace_get_multiDocInfo,
|
|
2228
|
-
|
|
2268
|
+
N as _3DSpace_get_securityContexts,
|
|
2229
2269
|
U as _3DSpace_get_ticket,
|
|
2230
|
-
|
|
2231
|
-
|
|
2270
|
+
Me as _3DSpace_lifecycle_changeRevision,
|
|
2271
|
+
De as _3DSpace_lifecycle_changeState,
|
|
2232
2272
|
xe as _3DSpace_lifecycle_getGraph,
|
|
2233
|
-
|
|
2273
|
+
Le as _3DSpace_lifecycle_getNextRevision,
|
|
2234
2274
|
Pe as _3DSpace_lifecycle_getNextStates,
|
|
2235
2275
|
nt as _3DSwym_buildDirectMessage,
|
|
2236
2276
|
it as _3DSwym_deleteIdea,
|
|
@@ -2246,16 +2286,19 @@ export {
|
|
|
2246
2286
|
ct as _3DSwym_get_findUser,
|
|
2247
2287
|
w as _3DSwym_get_version,
|
|
2248
2288
|
st as _3DSwym_postIdea,
|
|
2249
|
-
|
|
2289
|
+
R as _3DSwym_sendMessageData,
|
|
2250
2290
|
be as _AppMngt_get_info_user,
|
|
2251
2291
|
Oe as _AppMngt_get_users,
|
|
2252
|
-
|
|
2253
|
-
pt as
|
|
2292
|
+
ht as _Iterop_AddOrRemoveRows,
|
|
2293
|
+
pt as _Iterop_Auth_CAS,
|
|
2294
|
+
lt as _Iterop_ListUsers,
|
|
2254
2295
|
ut as _Iterop_getAllBusinessTables,
|
|
2255
|
-
ft as
|
|
2296
|
+
ft as _Iterop_getOneBusinessTable,
|
|
2297
|
+
mt as _Iterop_getOneBusinessTableRows,
|
|
2298
|
+
gt as _Iterop_runProcess,
|
|
2256
2299
|
K as _getPlateformInfos,
|
|
2257
2300
|
we as _getPlatformServices,
|
|
2258
|
-
|
|
2301
|
+
b as _getServiceUrl,
|
|
2259
2302
|
Ce as _getServiceUrl_3DPassport,
|
|
2260
2303
|
dt as _getServiceUrl_Iterop,
|
|
2261
2304
|
m as _httpCallAuthenticated,
|
|
@@ -2264,30 +2307,30 @@ export {
|
|
|
2264
2307
|
_e as _setupTagger,
|
|
2265
2308
|
He as addTagToDoc,
|
|
2266
2309
|
Te as compass_getListAdditionalApps,
|
|
2267
|
-
|
|
2310
|
+
E as couleurs,
|
|
2268
2311
|
Ne as createUserGroups,
|
|
2269
2312
|
ee as dataMixing,
|
|
2270
|
-
|
|
2313
|
+
Ie as deleteUserGroups,
|
|
2271
2314
|
me as findAdresse,
|
|
2272
|
-
|
|
2273
|
-
|
|
2315
|
+
Ee as getAllContextSecurity,
|
|
2316
|
+
B as getCSRFToken,
|
|
2274
2317
|
fe as getCommunes,
|
|
2275
|
-
|
|
2318
|
+
$e as getComplementUG,
|
|
2276
2319
|
Ke as getDataFrom3DSpace,
|
|
2277
2320
|
ge as getDataFromGouvFr,
|
|
2278
2321
|
Xe as getDatasByTenant,
|
|
2279
2322
|
Ye as getDatasFrom3DSpace,
|
|
2280
2323
|
Ve as getDownloadDocument,
|
|
2281
2324
|
qe as getInfoDocTags,
|
|
2282
|
-
|
|
2325
|
+
ve as getUserGroupsList,
|
|
2283
2326
|
V as getUsersGroupRules,
|
|
2284
|
-
|
|
2327
|
+
We as get_3DSpace_csrf,
|
|
2285
2328
|
Ae as patchUserGroups,
|
|
2286
2329
|
ke as patchUserGroupsControl,
|
|
2287
|
-
|
|
2330
|
+
Be as pushDataIn3DSpace,
|
|
2288
2331
|
Fe as readUserGroupControl,
|
|
2289
2332
|
ze as removeTagToDoc,
|
|
2290
|
-
|
|
2333
|
+
St as sayHello,
|
|
2291
2334
|
he as updateEvent
|
|
2292
2335
|
};
|
|
2293
2336
|
//# sourceMappingURL=wb3Api.js.map
|