@beam3_dev/api_module 0.0.248 → 0.0.253
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 +389 -387
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +7 -7
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +2 -2
package/dist/wb3Api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v4 as E } from "uuid";
|
|
2
|
-
import { DateTime as
|
|
3
|
-
import { requirejs as
|
|
2
|
+
import { DateTime as O } from "luxon";
|
|
3
|
+
import { requirejs as $, widget as P } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function B() {
|
|
5
5
|
return E();
|
|
6
6
|
}
|
|
@@ -66,14 +66,14 @@ async function _e(e, t = void 0, n = void 0) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async function we(e, t = W) {
|
|
69
|
-
let n =
|
|
70
|
-
const s = e, i = [], r = (
|
|
71
|
-
for (let c in
|
|
72
|
-
i.push({ date: c, comment:
|
|
69
|
+
let n = O.now().year;
|
|
70
|
+
const s = e, i = [], r = (o) => {
|
|
71
|
+
for (let c in o)
|
|
72
|
+
i.push({ date: c, comment: o[c] });
|
|
73
73
|
};
|
|
74
|
-
for (let
|
|
74
|
+
for (let o = n; o <= n + 1; o++)
|
|
75
75
|
await fetch(
|
|
76
|
-
"https://calendrier.api.gouv.fr/jours-feries/metropole/" +
|
|
76
|
+
"https://calendrier.api.gouv.fr/jours-feries/metropole/" + o + ".json",
|
|
77
77
|
{
|
|
78
78
|
method: "GET",
|
|
79
79
|
headers: {
|
|
@@ -84,30 +84,30 @@ async function we(e, t = W) {
|
|
|
84
84
|
r(c);
|
|
85
85
|
}).catch((c) => console.error("Erreur : " + c));
|
|
86
86
|
return (() => {
|
|
87
|
-
const
|
|
87
|
+
const o = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : s;
|
|
90
90
|
for (let c of i)
|
|
91
|
-
|
|
92
|
-
(u) => u.start ===
|
|
93
|
-
) === -1 &&
|
|
91
|
+
o.events.findIndex(
|
|
92
|
+
(u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
|
|
93
|
+
) === -1 && o.events.push({
|
|
94
94
|
name: "Férié : " + c.comment,
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
95
|
+
start: O.fromISO(c.date).toISODate(),
|
|
96
|
+
end: O.fromISO(c.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
|
-
return
|
|
100
|
+
return o;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
103
|
function X(e, t, n) {
|
|
104
|
-
const { credentials: s, myArray: i, chunk: r, fn_to_call:
|
|
104
|
+
const { credentials: s, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
|
|
105
105
|
for (let c = 0; c < i.length; c += r) {
|
|
106
106
|
const d = i.slice(c, c + r);
|
|
107
|
-
|
|
107
|
+
o.push(d);
|
|
108
108
|
}
|
|
109
109
|
V(
|
|
110
|
-
{ credentials: s, chunks:
|
|
110
|
+
{ credentials: s, chunks: o, initLoop: 0, fn: a },
|
|
111
111
|
(c) => {
|
|
112
112
|
t && t(c);
|
|
113
113
|
},
|
|
@@ -117,12 +117,12 @@ function X(e, t, n) {
|
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
119
|
function V(e, t, n) {
|
|
120
|
-
const { credentials: s, chunks: i, initLoop: r, fn:
|
|
121
|
-
|
|
120
|
+
const { credentials: s, chunks: i, initLoop: r, fn: a } = e, o = (c) => {
|
|
121
|
+
a(
|
|
122
122
|
s,
|
|
123
123
|
i[c],
|
|
124
124
|
() => {
|
|
125
|
-
c++, c < i.length &&
|
|
125
|
+
c++, c < i.length && o(c);
|
|
126
126
|
},
|
|
127
127
|
(d) => {
|
|
128
128
|
t && t(d);
|
|
@@ -132,19 +132,19 @@ function V(e, t, n) {
|
|
|
132
132
|
}
|
|
133
133
|
);
|
|
134
134
|
};
|
|
135
|
-
|
|
135
|
+
o(r);
|
|
136
136
|
}
|
|
137
137
|
async function Ce(e, t, n = !0) {
|
|
138
138
|
const s = e.events.findIndex((i) => i.uuid === t.uuid);
|
|
139
139
|
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
|
|
140
140
|
}
|
|
141
141
|
function m(e, t) {
|
|
142
|
-
|
|
142
|
+
$(["DS/WAFData/WAFData"], (n) => {
|
|
143
143
|
n.authenticatedRequest(e, t);
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
function Te(e, t, n) {
|
|
147
|
-
|
|
147
|
+
$(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
148
148
|
s.draggable(e, {
|
|
149
149
|
data: t,
|
|
150
150
|
start: n
|
|
@@ -152,7 +152,7 @@ function Te(e, t, n) {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
function be(e, t = void 0) {
|
|
155
|
-
|
|
155
|
+
$(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
|
|
156
156
|
let s;
|
|
157
157
|
s === void 0 && (s = n.createProxy({
|
|
158
158
|
widgetId: P.id,
|
|
@@ -161,14 +161,14 @@ function be(e, t = void 0) {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
function Oe(e, t) {
|
|
164
|
-
|
|
164
|
+
$(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
165
165
|
n.droppable(e, {
|
|
166
166
|
drop: t
|
|
167
167
|
});
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
async function $e(e, t = void 0, n = void 0) {
|
|
171
|
-
await
|
|
171
|
+
await $(
|
|
172
172
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
173
173
|
(s) => {
|
|
174
174
|
(!e || e === "") && (e = P.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
@@ -183,7 +183,7 @@ async function $e(e, t = void 0, n = void 0) {
|
|
|
183
183
|
}
|
|
184
184
|
function Y() {
|
|
185
185
|
let e = {};
|
|
186
|
-
return
|
|
186
|
+
return $(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
187
187
|
const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
|
|
188
188
|
"com.3ds.wp.passport.cors"
|
|
189
189
|
);
|
|
@@ -195,17 +195,17 @@ function Y() {
|
|
|
195
195
|
};
|
|
196
196
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function N(e, t = void 0, n = void 0) {
|
|
199
199
|
if (e.tenant) {
|
|
200
200
|
const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
|
|
201
201
|
m(s, {
|
|
202
202
|
onComplete(i) {
|
|
203
203
|
const r = typeof i == "string" ? JSON.parse(i) : i;
|
|
204
204
|
if (r && "platforms" in r) {
|
|
205
|
-
const
|
|
206
|
-
(
|
|
205
|
+
const a = r.platforms.find(
|
|
206
|
+
(o) => o.id === e.tenant.toUpperCase()
|
|
207
207
|
);
|
|
208
|
-
t &&
|
|
208
|
+
t && a ? t(a) : n && n("_getServiceUrl return listServiceUrl = undefined");
|
|
209
209
|
} else
|
|
210
210
|
n && n("_getServiceUrl return oResponse = undefined");
|
|
211
211
|
},
|
|
@@ -222,8 +222,8 @@ function Ne(e, t = void 0, n = void 0) {
|
|
|
222
222
|
onComplete(i) {
|
|
223
223
|
const r = JSON.parse(i);
|
|
224
224
|
if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
|
|
225
|
-
const
|
|
226
|
-
t && t(
|
|
225
|
+
const a = `${r[0].services[0].url}`;
|
|
226
|
+
t && t(a);
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
229
|
onFailure(i) {
|
|
@@ -245,42 +245,42 @@ function Ie(e, t, n) {
|
|
|
245
245
|
"Content-Type": "application/json",
|
|
246
246
|
Accept: "application/json"
|
|
247
247
|
},
|
|
248
|
-
onComplete(r,
|
|
248
|
+
onComplete(r, a, o) {
|
|
249
249
|
const c = JSON.parse(r), d = c.data.map((u) => {
|
|
250
250
|
const p = u.attributes.name, f = u.id;
|
|
251
251
|
return { name: p, id: f };
|
|
252
252
|
});
|
|
253
253
|
t && t(d, c);
|
|
254
254
|
},
|
|
255
|
-
onFailure(r,
|
|
256
|
-
const
|
|
257
|
-
|
|
255
|
+
onFailure(r, a) {
|
|
256
|
+
const o = r;
|
|
257
|
+
o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
function ve(e, t = void 0, n = void 0) {
|
|
262
262
|
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
263
263
|
m(s, {
|
|
264
|
-
onComplete(i, r,
|
|
265
|
-
const
|
|
266
|
-
console.log("_AppMngt_get_users => ",
|
|
264
|
+
onComplete(i, r, a) {
|
|
265
|
+
const o = JSON.parse(i);
|
|
266
|
+
console.log("_AppMngt_get_users => ", o), t && t(o);
|
|
267
267
|
},
|
|
268
268
|
onFailure(i, r) {
|
|
269
|
-
const
|
|
270
|
-
|
|
269
|
+
const a = i;
|
|
270
|
+
a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
|
|
271
271
|
}
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
function Fe(e, t, n = void 0, s = void 0) {
|
|
275
275
|
let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
276
276
|
m(i, {
|
|
277
|
-
onComplete(r,
|
|
277
|
+
onComplete(r, a, o) {
|
|
278
278
|
const c = JSON.parse(r);
|
|
279
279
|
n && n(c);
|
|
280
280
|
},
|
|
281
|
-
onFailure(r,
|
|
282
|
-
const
|
|
283
|
-
|
|
281
|
+
onFailure(r, a) {
|
|
282
|
+
const o = r;
|
|
283
|
+
o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
|
|
284
284
|
}
|
|
285
285
|
});
|
|
286
286
|
}
|
|
@@ -289,7 +289,7 @@ const k = {
|
|
|
289
289
|
Accept: "application/json,text/javascript,*/*"
|
|
290
290
|
};
|
|
291
291
|
function je(e, t, n = void 0, s = void 0) {
|
|
292
|
-
const { space: i, currentUser: r } = e,
|
|
292
|
+
const { space: i, currentUser: r } = e, o = `${i}${{
|
|
293
293
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
294
294
|
}.URIUGr}`, c = {
|
|
295
295
|
groups: [
|
|
@@ -303,7 +303,7 @@ function je(e, t, n = void 0, s = void 0) {
|
|
|
303
303
|
}
|
|
304
304
|
]
|
|
305
305
|
};
|
|
306
|
-
m(
|
|
306
|
+
m(o, {
|
|
307
307
|
method: "POST",
|
|
308
308
|
headers: k,
|
|
309
309
|
data: JSON.stringify(c),
|
|
@@ -318,7 +318,7 @@ function je(e, t, n = void 0, s = void 0) {
|
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
320
|
function ke(e, t, n = void 0, s = void 0) {
|
|
321
|
-
const { space: i, tenant: r } = e,
|
|
321
|
+
const { space: i, tenant: r } = e, a = i, o = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${a}${o}${c}`;
|
|
322
322
|
m(d, {
|
|
323
323
|
opts: {
|
|
324
324
|
method: "GET",
|
|
@@ -337,10 +337,10 @@ function ke(e, t, n = void 0, s = void 0) {
|
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
function q(e, t = void 0, n = void 0) {
|
|
340
|
-
const { space: s, tenant: i } = e, r = s,
|
|
340
|
+
const { space: s, tenant: i } = e, r = s, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
|
|
341
341
|
method: "GET",
|
|
342
342
|
Accept: "application/json,*/*,test/javascript"
|
|
343
|
-
}, d = `${r}${
|
|
343
|
+
}, d = `${r}${a}${o}`;
|
|
344
344
|
m(d, {
|
|
345
345
|
OPTsH: c,
|
|
346
346
|
onComplete(u) {
|
|
@@ -353,12 +353,12 @@ function q(e, t = void 0, n = void 0) {
|
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
function Ae(e, t = void 0, n = void 0) {
|
|
356
|
-
const { space: s, currentUser: i } = e,
|
|
356
|
+
const { space: s, currentUser: i } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
357
357
|
"Content-Type": "application/json",
|
|
358
358
|
Accept: "application/json,text/javascript,*/*"
|
|
359
359
|
} };
|
|
360
360
|
try {
|
|
361
|
-
m(
|
|
361
|
+
m(o, {
|
|
362
362
|
opts: d,
|
|
363
363
|
onComplete(u) {
|
|
364
364
|
const p = JSON.parse(u), f = {}, l = p.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
@@ -390,15 +390,15 @@ function Ue(e, t) {
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
function xe(e, t, n, s = void 0, i = void 0) {
|
|
393
|
-
const { space: r, tenant:
|
|
393
|
+
const { space: r, tenant: a } = e, o = {
|
|
394
394
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
395
395
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
396
396
|
nextURICh: "/characteristics",
|
|
397
397
|
nextURIGr: "/group",
|
|
398
398
|
nexURImem: "/members",
|
|
399
399
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
400
|
-
OPTsTenant: `tenant=dstenant:${
|
|
401
|
-
}, c = n, d = `${r}${
|
|
400
|
+
OPTsTenant: `tenant=dstenant:${a}`
|
|
401
|
+
}, c = n, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
|
|
402
402
|
m(d, {
|
|
403
403
|
headers: k,
|
|
404
404
|
method: "PATCH",
|
|
@@ -413,8 +413,8 @@ function xe(e, t, n, s = void 0, i = void 0) {
|
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
function Pe(e, t, n, s = void 0, i = void 0) {
|
|
416
|
-
const { space: r } = e,
|
|
417
|
-
m(
|
|
416
|
+
const { space: r } = e, o = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
417
|
+
m(o, {
|
|
418
418
|
method: "PATCH",
|
|
419
419
|
headers: k,
|
|
420
420
|
data: JSON.stringify(n),
|
|
@@ -428,8 +428,8 @@ function Pe(e, t, n, s = void 0, i = void 0) {
|
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
430
|
function Re(e, t, n = void 0, s = void 0) {
|
|
431
|
-
const { space: i } = e,
|
|
432
|
-
m(
|
|
431
|
+
const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
432
|
+
m(a, {
|
|
433
433
|
opts: {
|
|
434
434
|
method: "GET",
|
|
435
435
|
headers: {
|
|
@@ -452,8 +452,8 @@ async function H(e, t, n) {
|
|
|
452
452
|
onComplete(i) {
|
|
453
453
|
i = JSON.parse(i), t && t(i.csrf);
|
|
454
454
|
},
|
|
455
|
-
onFailure(i, r,
|
|
456
|
-
n && n({ error: i, headers: r, xhr:
|
|
455
|
+
onFailure(i, r, a) {
|
|
456
|
+
n && n({ error: i, headers: r, xhr: a });
|
|
457
457
|
}
|
|
458
458
|
});
|
|
459
459
|
}
|
|
@@ -469,11 +469,11 @@ var Q = function(e, t, n, s) {
|
|
|
469
469
|
return i;
|
|
470
470
|
var r = /\+/g;
|
|
471
471
|
e = e.split(t);
|
|
472
|
-
var
|
|
473
|
-
s && typeof s.maxKeys == "number" && (
|
|
474
|
-
var
|
|
475
|
-
|
|
476
|
-
for (var c = 0; c <
|
|
472
|
+
var a = 1e3;
|
|
473
|
+
s && typeof s.maxKeys == "number" && (a = s.maxKeys);
|
|
474
|
+
var o = e.length;
|
|
475
|
+
a > 0 && o > a && (o = a);
|
|
476
|
+
for (var c = 0; c < o; ++c) {
|
|
477
477
|
var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, g;
|
|
478
478
|
u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), z(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
|
|
479
479
|
}
|
|
@@ -492,8 +492,8 @@ var Q = function(e, t, n, s) {
|
|
|
492
492
|
}, Z = function(e, t, n, s) {
|
|
493
493
|
return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
|
|
494
494
|
var r = encodeURIComponent(I(i)) + n;
|
|
495
|
-
return Array.isArray(e[i]) ? e[i].map(function(
|
|
496
|
-
return r + encodeURIComponent(I(
|
|
495
|
+
return Array.isArray(e[i]) ? e[i].map(function(a) {
|
|
496
|
+
return r + encodeURIComponent(I(a));
|
|
497
497
|
}).join(t) : r + encodeURIComponent(I(e[i]));
|
|
498
498
|
}).filter(Boolean).join(t) : s ? encodeURIComponent(I(s)) + n + encodeURIComponent(I(e)) : "";
|
|
499
499
|
};
|
|
@@ -507,12 +507,12 @@ async function R(e, t = void 0, n = void 0, s = void 0) {
|
|
|
507
507
|
}
|
|
508
508
|
const r = i + `/resources/v1/modeler/documents/${t}`;
|
|
509
509
|
m(r, {
|
|
510
|
-
onComplete(
|
|
511
|
-
const d = JSON.parse(
|
|
510
|
+
onComplete(a, o, c) {
|
|
511
|
+
const d = JSON.parse(a);
|
|
512
512
|
n && n(d);
|
|
513
513
|
},
|
|
514
|
-
onFailure(
|
|
515
|
-
s && s(
|
|
514
|
+
onFailure(a) {
|
|
515
|
+
s && s(a);
|
|
516
516
|
}
|
|
517
517
|
});
|
|
518
518
|
}
|
|
@@ -522,7 +522,7 @@ async function De(e, t = void 0, n = void 0, s = void 0) {
|
|
|
522
522
|
console.log("Le paramètre docids est obligatoire");
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
|
-
let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`,
|
|
525
|
+
let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, a = v.stringify({
|
|
526
526
|
$ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
|
|
527
527
|
});
|
|
528
528
|
m(r, {
|
|
@@ -530,13 +530,13 @@ async function De(e, t = void 0, n = void 0, s = void 0) {
|
|
|
530
530
|
headers: {
|
|
531
531
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
532
532
|
},
|
|
533
|
-
data:
|
|
534
|
-
onComplete(
|
|
535
|
-
const u = JSON.parse(
|
|
533
|
+
data: a,
|
|
534
|
+
onComplete(o, c, d) {
|
|
535
|
+
const u = JSON.parse(o);
|
|
536
536
|
n && n(u);
|
|
537
537
|
},
|
|
538
|
-
onFailure(
|
|
539
|
-
s && s(
|
|
538
|
+
onFailure(o) {
|
|
539
|
+
s && s(o);
|
|
540
540
|
}
|
|
541
541
|
});
|
|
542
542
|
}
|
|
@@ -544,9 +544,9 @@ function F(e, t = void 0, n = void 0) {
|
|
|
544
544
|
if (e.objID && e.objID !== "") {
|
|
545
545
|
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
546
546
|
m(s, {
|
|
547
|
-
onComplete(i, r,
|
|
548
|
-
const
|
|
549
|
-
e.success = !0, e.token =
|
|
547
|
+
onComplete(i, r, a) {
|
|
548
|
+
const o = JSON.parse(i);
|
|
549
|
+
e.success = !0, e.token = o?.csrf?.value, e.datas = o?.data[0], t && t(e);
|
|
550
550
|
},
|
|
551
551
|
onFailure(i) {
|
|
552
552
|
n && n(i);
|
|
@@ -567,15 +567,15 @@ function b(e, t = void 0, n = void 0) {
|
|
|
567
567
|
if (e.space) {
|
|
568
568
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
569
569
|
m(s, {
|
|
570
|
-
onComplete(i, r,
|
|
571
|
-
const
|
|
572
|
-
t && t(
|
|
570
|
+
onComplete(i, r, a) {
|
|
571
|
+
const o = JSON.parse(i);
|
|
572
|
+
t && t(o.csrf.value);
|
|
573
573
|
},
|
|
574
|
-
onFailure(i, r,
|
|
574
|
+
onFailure(i, r, a) {
|
|
575
575
|
n && n({
|
|
576
576
|
response: i,
|
|
577
577
|
headers: r,
|
|
578
|
-
xhr:
|
|
578
|
+
xhr: a
|
|
579
579
|
});
|
|
580
580
|
}
|
|
581
581
|
});
|
|
@@ -592,12 +592,12 @@ function A(e, t = void 0, n = void 0) {
|
|
|
592
592
|
headers: {
|
|
593
593
|
ENO_CSRF_TOKEN: e.token
|
|
594
594
|
},
|
|
595
|
-
onComplete(r,
|
|
595
|
+
onComplete(r, a) {
|
|
596
596
|
const c = JSON.parse(r).data[0].dataelements.ticketURL;
|
|
597
|
-
t && t(c,
|
|
597
|
+
t && t(c, a);
|
|
598
598
|
},
|
|
599
|
-
onFailure(r,
|
|
600
|
-
console.warn("☠️ error => ", r,
|
|
599
|
+
onFailure(r, a) {
|
|
600
|
+
console.warn("☠️ error => ", r, a), n && n(r, a);
|
|
601
601
|
}
|
|
602
602
|
});
|
|
603
603
|
},
|
|
@@ -606,30 +606,30 @@ function A(e, t = void 0, n = void 0) {
|
|
|
606
606
|
}
|
|
607
607
|
);
|
|
608
608
|
}
|
|
609
|
-
function Le(e, t, n, s = void 0, i = void 0) {
|
|
609
|
+
function Le(e, t, n = void 0, s = void 0, i = void 0) {
|
|
610
610
|
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
611
611
|
n || (n = e.token), m(r, {
|
|
612
612
|
method: "PUT",
|
|
613
613
|
headers: {
|
|
614
614
|
ENO_CSRF_TOKEN: n
|
|
615
615
|
},
|
|
616
|
-
onComplete(
|
|
617
|
-
let
|
|
618
|
-
if (console.log("☠️ info => ",
|
|
616
|
+
onComplete(a) {
|
|
617
|
+
let o = JSON.parse(a);
|
|
618
|
+
if (console.log("☠️ info => ", o), o.success === !0)
|
|
619
619
|
try {
|
|
620
|
-
const c =
|
|
620
|
+
const c = o.data[0].dataelements.ticketURL;
|
|
621
621
|
s && s(c);
|
|
622
622
|
} catch (c) {
|
|
623
623
|
i && i(c);
|
|
624
624
|
}
|
|
625
625
|
},
|
|
626
|
-
onFailure(
|
|
627
|
-
i && i(
|
|
626
|
+
onFailure(a) {
|
|
627
|
+
i && i(a);
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function D(e, t, n, s, i, r = void 0,
|
|
632
|
-
const
|
|
631
|
+
function D(e, t, n, s, i, r = void 0, a = void 0) {
|
|
632
|
+
const o = () => ee(
|
|
633
633
|
e,
|
|
634
634
|
t,
|
|
635
635
|
n,
|
|
@@ -637,17 +637,17 @@ function D(e, t, n, s, i, r = void 0, o = void 0) {
|
|
|
637
637
|
i,
|
|
638
638
|
e.token,
|
|
639
639
|
r,
|
|
640
|
-
|
|
640
|
+
a
|
|
641
641
|
);
|
|
642
|
-
e.token ?
|
|
642
|
+
e.token ? o() : F(
|
|
643
643
|
e,
|
|
644
644
|
t,
|
|
645
645
|
(c) => {
|
|
646
|
-
e.token = c.csrf.value,
|
|
646
|
+
e.token = c.csrf.value, o();
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
|
-
function ee(e, t, n, s, i, r,
|
|
650
|
+
function ee(e, t, n, s, i, r, a = void 0, o = void 0) {
|
|
651
651
|
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
652
652
|
m(c, {
|
|
653
653
|
method: "PUT",
|
|
@@ -689,10 +689,10 @@ function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
689
689
|
}),
|
|
690
690
|
type: "json",
|
|
691
691
|
onComplete(T) {
|
|
692
|
-
|
|
692
|
+
a && a(T);
|
|
693
693
|
},
|
|
694
694
|
onFailure(T) {
|
|
695
|
-
|
|
695
|
+
o && o(T);
|
|
696
696
|
}
|
|
697
697
|
}, C = e.tenant.toUpperCase();
|
|
698
698
|
m(
|
|
@@ -700,7 +700,7 @@ function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
700
700
|
_
|
|
701
701
|
);
|
|
702
702
|
}, y.onFailure = function(S) {
|
|
703
|
-
|
|
703
|
+
o && o(S);
|
|
704
704
|
}, y.timeout = 0, m(l.ticketURL, y);
|
|
705
705
|
}
|
|
706
706
|
});
|
|
@@ -710,13 +710,13 @@ async function Me(e, t, n, s = void 0, i = void 0) {
|
|
|
710
710
|
e,
|
|
711
711
|
t,
|
|
712
712
|
(r) => {
|
|
713
|
-
const
|
|
713
|
+
const a = r.data[0].relateddata.files[0].id, o = r.data[0].dataelements.secondaryTitle && r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
|
|
714
714
|
D(
|
|
715
715
|
e,
|
|
716
716
|
t,
|
|
717
|
-
o,
|
|
718
|
-
n,
|
|
719
717
|
a,
|
|
718
|
+
n,
|
|
719
|
+
o,
|
|
720
720
|
(c) => {
|
|
721
721
|
s && s(c);
|
|
722
722
|
},
|
|
@@ -733,10 +733,10 @@ async function Me(e, t, n, s = void 0, i = void 0) {
|
|
|
733
733
|
async function Je(e, t, n, s, i = void 0, r = void 0) {
|
|
734
734
|
te(
|
|
735
735
|
e,
|
|
736
|
-
(
|
|
737
|
-
console.log("resultCheckinTicket", n,
|
|
736
|
+
(a) => {
|
|
737
|
+
console.log("resultCheckinTicket", n, a), a?.items >= 1 && a.data.forEach((o) => {
|
|
738
738
|
ne(
|
|
739
|
-
|
|
739
|
+
o,
|
|
740
740
|
t,
|
|
741
741
|
n,
|
|
742
742
|
(c) => {
|
|
@@ -746,7 +746,10 @@ async function Je(e, t, n, s, i = void 0, r = void 0) {
|
|
|
746
746
|
n,
|
|
747
747
|
s,
|
|
748
748
|
(d) => {
|
|
749
|
-
d?.data.length ? i && i(d) : r && r({
|
|
749
|
+
d?.data.length ? i && i(d) : r && r({
|
|
750
|
+
success: !1,
|
|
751
|
+
msg: "Erreur lors de la mise en ralation entre la document et le fichier"
|
|
752
|
+
});
|
|
750
753
|
},
|
|
751
754
|
(d) => console.warn(d)
|
|
752
755
|
);
|
|
@@ -755,7 +758,7 @@ async function Je(e, t, n, s, i = void 0, r = void 0) {
|
|
|
755
758
|
);
|
|
756
759
|
});
|
|
757
760
|
},
|
|
758
|
-
(
|
|
761
|
+
(a) => console.warn(a)
|
|
759
762
|
);
|
|
760
763
|
}
|
|
761
764
|
function te(e, t = void 0, n = void 0) {
|
|
@@ -769,7 +772,7 @@ function te(e, t = void 0, n = void 0) {
|
|
|
769
772
|
"Content-Type": "application/json",
|
|
770
773
|
SecurityContext: e.ctx
|
|
771
774
|
},
|
|
772
|
-
onComplete(i, r,
|
|
775
|
+
onComplete(i, r, a) {
|
|
773
776
|
try {
|
|
774
777
|
i = JSON.parse(i);
|
|
775
778
|
} catch {
|
|
@@ -788,22 +791,22 @@ function ne(e, t, n, s = void 0, i = void 0) {
|
|
|
788
791
|
t instanceof Blob || (t = new Blob([t], {
|
|
789
792
|
type: "text/plain"
|
|
790
793
|
})), r.append("__fcs__jobTicket", e.dataelements.ticket), r.append("file_0", t, n);
|
|
791
|
-
let
|
|
792
|
-
m(
|
|
794
|
+
let a = e.dataelements.ticketURL;
|
|
795
|
+
m(a, {
|
|
793
796
|
method: "POST",
|
|
794
797
|
data: r,
|
|
795
|
-
onComplete(
|
|
796
|
-
s && s(
|
|
798
|
+
onComplete(o) {
|
|
799
|
+
s && s(o.replace(/[\n\r]/g, ""));
|
|
797
800
|
},
|
|
798
|
-
onFailure(
|
|
799
|
-
i && i(
|
|
801
|
+
onFailure(o) {
|
|
802
|
+
i && i(o);
|
|
800
803
|
}
|
|
801
804
|
});
|
|
802
805
|
}
|
|
803
806
|
function se(e, t, n, s = void 0, i = void 0, r = void 0) {
|
|
804
807
|
console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
|
|
805
|
-
const
|
|
806
|
-
let
|
|
808
|
+
const a = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
|
|
809
|
+
let o = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
|
|
807
810
|
m(c, {
|
|
808
811
|
method: "POST",
|
|
809
812
|
headers: {
|
|
@@ -817,7 +820,7 @@ function se(e, t, n, s = void 0, i = void 0, r = void 0) {
|
|
|
817
820
|
{
|
|
818
821
|
type: "Document",
|
|
819
822
|
dataelements: {
|
|
820
|
-
title:
|
|
823
|
+
title: a(n),
|
|
821
824
|
description: s
|
|
822
825
|
},
|
|
823
826
|
relateddata: {
|
|
@@ -831,7 +834,7 @@ function se(e, t, n, s = void 0, i = void 0, r = void 0) {
|
|
|
831
834
|
}
|
|
832
835
|
]
|
|
833
836
|
},
|
|
834
|
-
tempId:
|
|
837
|
+
tempId: o
|
|
835
838
|
}
|
|
836
839
|
]
|
|
837
840
|
}),
|
|
@@ -847,9 +850,9 @@ function se(e, t, n, s = void 0, i = void 0, r = void 0) {
|
|
|
847
850
|
}
|
|
848
851
|
});
|
|
849
852
|
}
|
|
850
|
-
function j(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0,
|
|
851
|
-
const
|
|
852
|
-
m(
|
|
853
|
+
function j(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1) {
|
|
854
|
+
const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
855
|
+
m(o, {
|
|
853
856
|
method: "GET",
|
|
854
857
|
onComplete(c) {
|
|
855
858
|
const d = JSON.parse(c);
|
|
@@ -886,7 +889,7 @@ function j(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
886
889
|
}));
|
|
887
890
|
}
|
|
888
891
|
}
|
|
889
|
-
p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials &&
|
|
892
|
+
p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && a ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
|
|
890
893
|
},
|
|
891
894
|
onFailure(c, d) {
|
|
892
895
|
console.warn("Erreur de récupération du contexte de sécurité. => ", {
|
|
@@ -915,28 +918,28 @@ async function L(e, t = void 0, n = void 0) {
|
|
|
915
918
|
A(
|
|
916
919
|
e,
|
|
917
920
|
(r) => {
|
|
918
|
-
e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((
|
|
919
|
-
t && t(
|
|
920
|
-
}).catch((
|
|
921
|
-
n && n(
|
|
921
|
+
e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((a) => a.blob()).then((a) => {
|
|
922
|
+
t && t(a);
|
|
923
|
+
}).catch((a) => {
|
|
924
|
+
n && n(a);
|
|
922
925
|
})) : m(r, {
|
|
923
|
-
onComplete(
|
|
924
|
-
let
|
|
926
|
+
onComplete(a) {
|
|
927
|
+
let o;
|
|
925
928
|
try {
|
|
926
|
-
|
|
929
|
+
o = JSON.parse(a);
|
|
927
930
|
} catch {
|
|
928
|
-
|
|
931
|
+
o = a;
|
|
929
932
|
}
|
|
930
|
-
t && typeof t == "function" && t(
|
|
933
|
+
t && typeof t == "function" && t(o), s(o);
|
|
931
934
|
},
|
|
932
|
-
onFailure(
|
|
933
|
-
n && (console.log("error http",
|
|
934
|
-
msg: JSON.parse(
|
|
935
|
-
headers:
|
|
935
|
+
onFailure(a, o, c) {
|
|
936
|
+
n && (console.log("error http", a), n({
|
|
937
|
+
msg: JSON.parse(a),
|
|
938
|
+
headers: o,
|
|
936
939
|
xhr: c
|
|
937
940
|
}), i({
|
|
938
|
-
msg: JSON.parse(
|
|
939
|
-
headers:
|
|
941
|
+
msg: JSON.parse(a),
|
|
942
|
+
headers: o,
|
|
940
943
|
xhr: c
|
|
941
944
|
}));
|
|
942
945
|
}
|
|
@@ -969,17 +972,17 @@ function ae(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
969
972
|
id: c
|
|
970
973
|
});
|
|
971
974
|
});
|
|
972
|
-
let
|
|
975
|
+
let a = JSON.stringify({
|
|
973
976
|
csrf: {
|
|
974
977
|
name: "ENO_CSRF_TOKEN",
|
|
975
978
|
value: e.token
|
|
976
979
|
},
|
|
977
980
|
data: r
|
|
978
981
|
});
|
|
979
|
-
const
|
|
980
|
-
m(
|
|
982
|
+
const o = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
983
|
+
m(o, {
|
|
981
984
|
method: "PUT",
|
|
982
|
-
data:
|
|
985
|
+
data: a,
|
|
983
986
|
type: "json",
|
|
984
987
|
onComplete(c) {
|
|
985
988
|
const d = c.data;
|
|
@@ -1019,7 +1022,7 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1019
1022
|
return new Promise((i) => {
|
|
1020
1023
|
if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
|
|
1021
1024
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
1022
|
-
let
|
|
1025
|
+
let a = {
|
|
1023
1026
|
method: "POST",
|
|
1024
1027
|
headers: {
|
|
1025
1028
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -1035,22 +1038,22 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1035
1038
|
]
|
|
1036
1039
|
}),
|
|
1037
1040
|
type: "json",
|
|
1038
|
-
onComplete(
|
|
1039
|
-
n && n(
|
|
1041
|
+
onComplete(o) {
|
|
1042
|
+
n && n(o);
|
|
1040
1043
|
},
|
|
1041
|
-
onFailure(
|
|
1042
|
-
s && s(
|
|
1044
|
+
onFailure(o) {
|
|
1045
|
+
s && s(o);
|
|
1043
1046
|
}
|
|
1044
1047
|
};
|
|
1045
|
-
m(r,
|
|
1048
|
+
m(r, a);
|
|
1046
1049
|
}
|
|
1047
1050
|
});
|
|
1048
1051
|
}
|
|
1049
1052
|
function Ke(e, t, n, s = void 0, i = void 0) {
|
|
1050
1053
|
return new Promise((r) => {
|
|
1051
1054
|
if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
|
|
1052
|
-
const
|
|
1053
|
-
let
|
|
1055
|
+
const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
1056
|
+
let o = {
|
|
1054
1057
|
method: "POST",
|
|
1055
1058
|
headers: {
|
|
1056
1059
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -1074,7 +1077,7 @@ function Ke(e, t, n, s = void 0, i = void 0) {
|
|
|
1074
1077
|
i && i(c);
|
|
1075
1078
|
}
|
|
1076
1079
|
};
|
|
1077
|
-
m(
|
|
1080
|
+
m(a, o);
|
|
1078
1081
|
}
|
|
1079
1082
|
});
|
|
1080
1083
|
}
|
|
@@ -1087,12 +1090,12 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1087
1090
|
"ESPACE COMMUN",
|
|
1088
1091
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
1089
1092
|
void 0,
|
|
1090
|
-
(
|
|
1091
|
-
(
|
|
1092
|
-
console.log("onError =>",
|
|
1093
|
+
(o) => e.ctx = o,
|
|
1094
|
+
(o) => {
|
|
1095
|
+
console.log("onError =>", o);
|
|
1093
1096
|
}
|
|
1094
1097
|
);
|
|
1095
|
-
let
|
|
1098
|
+
let a = {
|
|
1096
1099
|
method: "POST",
|
|
1097
1100
|
headers: {
|
|
1098
1101
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -1108,14 +1111,14 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1108
1111
|
]
|
|
1109
1112
|
}),
|
|
1110
1113
|
type: "json",
|
|
1111
|
-
onComplete(
|
|
1112
|
-
n && n(
|
|
1114
|
+
onComplete(o) {
|
|
1115
|
+
n && n(o);
|
|
1113
1116
|
},
|
|
1114
|
-
onFailure(
|
|
1115
|
-
s && s(
|
|
1117
|
+
onFailure(o) {
|
|
1118
|
+
s && s(o);
|
|
1116
1119
|
}
|
|
1117
1120
|
};
|
|
1118
|
-
m(r,
|
|
1121
|
+
m(r, a);
|
|
1119
1122
|
}
|
|
1120
1123
|
});
|
|
1121
1124
|
}
|
|
@@ -1128,12 +1131,12 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1128
1131
|
"ESPACE COMMUN",
|
|
1129
1132
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
1130
1133
|
void 0,
|
|
1131
|
-
(
|
|
1132
|
-
(
|
|
1133
|
-
console.log("onError =>",
|
|
1134
|
+
(o) => e.ctx = o,
|
|
1135
|
+
(o) => {
|
|
1136
|
+
console.log("onError =>", o);
|
|
1134
1137
|
}
|
|
1135
1138
|
);
|
|
1136
|
-
let
|
|
1139
|
+
let a = {
|
|
1137
1140
|
method: "POST",
|
|
1138
1141
|
headers: {
|
|
1139
1142
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -1155,21 +1158,21 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1155
1158
|
]
|
|
1156
1159
|
}),
|
|
1157
1160
|
type: "json",
|
|
1158
|
-
onComplete(
|
|
1159
|
-
n && n(
|
|
1161
|
+
onComplete(o) {
|
|
1162
|
+
n && n(o);
|
|
1160
1163
|
},
|
|
1161
|
-
onFailure(
|
|
1162
|
-
s && s(
|
|
1164
|
+
onFailure(o) {
|
|
1165
|
+
s && s(o);
|
|
1163
1166
|
}
|
|
1164
1167
|
};
|
|
1165
|
-
m(r,
|
|
1168
|
+
m(r, a);
|
|
1166
1169
|
}
|
|
1167
1170
|
});
|
|
1168
1171
|
}
|
|
1169
1172
|
function We(e, t, n, s = void 0, i = void 0) {
|
|
1170
1173
|
return new Promise((r) => {
|
|
1171
1174
|
if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
|
|
1172
|
-
const
|
|
1175
|
+
const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
1173
1176
|
j(
|
|
1174
1177
|
e.space,
|
|
1175
1178
|
"ESPACE COMMUN",
|
|
@@ -1180,7 +1183,7 @@ function We(e, t, n, s = void 0, i = void 0) {
|
|
|
1180
1183
|
console.log("onError =>", c);
|
|
1181
1184
|
}
|
|
1182
1185
|
);
|
|
1183
|
-
let
|
|
1186
|
+
let o = {
|
|
1184
1187
|
method: "POST",
|
|
1185
1188
|
headers: {
|
|
1186
1189
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -1209,13 +1212,13 @@ function We(e, t, n, s = void 0, i = void 0) {
|
|
|
1209
1212
|
i && i(c);
|
|
1210
1213
|
}
|
|
1211
1214
|
};
|
|
1212
|
-
m(
|
|
1215
|
+
m(a, o);
|
|
1213
1216
|
}
|
|
1214
1217
|
});
|
|
1215
1218
|
}
|
|
1216
1219
|
function Xe(e, t, n, s, i = void 0, r = void 0) {
|
|
1217
|
-
return new Promise((
|
|
1218
|
-
const
|
|
1220
|
+
return new Promise((a) => {
|
|
1221
|
+
const o = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
|
|
1219
1222
|
let c = {
|
|
1220
1223
|
attributes: {
|
|
1221
1224
|
title: n,
|
|
@@ -1243,11 +1246,11 @@ function Xe(e, t, n, s, i = void 0, r = void 0) {
|
|
|
1243
1246
|
r && r(p);
|
|
1244
1247
|
}
|
|
1245
1248
|
};
|
|
1246
|
-
m(
|
|
1249
|
+
m(o, u);
|
|
1247
1250
|
});
|
|
1248
1251
|
}
|
|
1249
1252
|
function Ve(e, t, n, s, i = void 0, r = void 0) {
|
|
1250
|
-
return console.log("credentials", e), new Promise((
|
|
1253
|
+
return console.log("credentials", e), new Promise((a) => {
|
|
1251
1254
|
`${e.space}`, JSON.stringify({
|
|
1252
1255
|
csrf: {
|
|
1253
1256
|
name: "ENO_CSRF_TOKEN",
|
|
@@ -1282,12 +1285,12 @@ function Ye(e, t = void 0, n = void 0) {
|
|
|
1282
1285
|
Accept: "application/json,text/javascript,*/*",
|
|
1283
1286
|
"Content-Type": "application/ds-json"
|
|
1284
1287
|
},
|
|
1285
|
-
onComplete(r,
|
|
1286
|
-
const
|
|
1287
|
-
t && t(
|
|
1288
|
+
onComplete(r, a) {
|
|
1289
|
+
const o = JSON.parse(r);
|
|
1290
|
+
t && t(o, a);
|
|
1288
1291
|
},
|
|
1289
|
-
onFailure(r,
|
|
1290
|
-
n && n({ response: r, headers:
|
|
1292
|
+
onFailure(r, a, o) {
|
|
1293
|
+
n && n({ response: r, headers: a, xhr: o });
|
|
1291
1294
|
}
|
|
1292
1295
|
});
|
|
1293
1296
|
}
|
|
@@ -1312,9 +1315,9 @@ async function He(e, t, n = void 0, s = void 0) {
|
|
|
1312
1315
|
return new Promise((i) => {
|
|
1313
1316
|
A(e, t, (r) => {
|
|
1314
1317
|
m(r, {
|
|
1315
|
-
onComplete: (
|
|
1316
|
-
onFailure: (
|
|
1317
|
-
s && s(
|
|
1318
|
+
onComplete: (a, o, c) => (i(JSON.parse(a)), n && n(JSON.parse(a), o, c), i),
|
|
1319
|
+
onFailure: (a, o, c) => {
|
|
1320
|
+
s && s(a, o, c), console.log(a, o?.errormsg);
|
|
1318
1321
|
}
|
|
1319
1322
|
});
|
|
1320
1323
|
});
|
|
@@ -1325,12 +1328,12 @@ function ze(e, t, n, s = void 0, i = void 0) {
|
|
|
1325
1328
|
F(
|
|
1326
1329
|
e,
|
|
1327
1330
|
n,
|
|
1328
|
-
(
|
|
1329
|
-
const
|
|
1331
|
+
(a) => {
|
|
1332
|
+
const o = a.data[0].relateddata.files[0].id, c = a.data[0].dataelements.secondaryTitle !== "" ? a.data[0].dataelements.secondaryTitle : a.data[0].dataelements.title;
|
|
1330
1333
|
D(
|
|
1331
1334
|
e,
|
|
1332
1335
|
n,
|
|
1333
|
-
|
|
1336
|
+
o,
|
|
1334
1337
|
r,
|
|
1335
1338
|
c,
|
|
1336
1339
|
(d) => {
|
|
@@ -1386,8 +1389,8 @@ function et(e, t = void 0, n = void 0) {
|
|
|
1386
1389
|
L(
|
|
1387
1390
|
e,
|
|
1388
1391
|
i.objID,
|
|
1389
|
-
(
|
|
1390
|
-
s.push({ [i.name]:
|
|
1392
|
+
(a) => {
|
|
1393
|
+
s.push({ [i.name]: a }), i.name === "dbProjets" && (M = a.affaires.map((o) => o.objectID), oe(e, J)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1391
1394
|
}
|
|
1392
1395
|
);
|
|
1393
1396
|
});
|
|
@@ -1398,7 +1401,7 @@ function oe(e, t, n = void 0, s = void 0) {
|
|
|
1398
1401
|
M,
|
|
1399
1402
|
(i) => {
|
|
1400
1403
|
const r = [...t];
|
|
1401
|
-
r.find((
|
|
1404
|
+
r.find((a) => a.objectID === i.objectId).data = i.data, J = r, U.push(i.data), n && n(U);
|
|
1402
1405
|
},
|
|
1403
1406
|
(i) => {
|
|
1404
1407
|
s && (s(i), console.log(i));
|
|
@@ -1426,7 +1429,7 @@ const re = "FA35FB9B177A280065800EA0000F599C", ce = [
|
|
|
1426
1429
|
tag: "testTag"
|
|
1427
1430
|
};
|
|
1428
1431
|
function tt(e, t, n = void 0, s = void 0) {
|
|
1429
|
-
const { space: i, tenant: r } = e, { objId:
|
|
1432
|
+
const { space: i, tenant: r } = e, { objId: a, pred: o, tag: c } = t, d = {
|
|
1430
1433
|
uri: "/resources/6w/tags",
|
|
1431
1434
|
otpCTX: "SecurityContext=preferred",
|
|
1432
1435
|
optTenant: `tenant=${r}`
|
|
@@ -1435,10 +1438,10 @@ function tt(e, t, n = void 0, s = void 0) {
|
|
|
1435
1438
|
{
|
|
1436
1439
|
subject: [
|
|
1437
1440
|
{
|
|
1438
|
-
uri: `pid://${
|
|
1441
|
+
uri: `pid://${a}`
|
|
1439
1442
|
}
|
|
1440
1443
|
],
|
|
1441
|
-
predicate: G[
|
|
1444
|
+
predicate: G[o],
|
|
1442
1445
|
object: {
|
|
1443
1446
|
literal: c
|
|
1444
1447
|
}
|
|
@@ -1458,7 +1461,7 @@ function tt(e, t, n = void 0, s = void 0) {
|
|
|
1458
1461
|
setTimeout(() => {
|
|
1459
1462
|
R(
|
|
1460
1463
|
e,
|
|
1461
|
-
|
|
1464
|
+
a,
|
|
1462
1465
|
(g) => {
|
|
1463
1466
|
const h = g.data[0].dataelements.title, y = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", S = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1464
1467
|
l.name = h, l.ext = y, l.createBy = S, t.info = { ...l }, ue(
|
|
@@ -1490,7 +1493,7 @@ function ue(e, t, n = void 0, s = void 0) {
|
|
|
1490
1493
|
const i = t.info.name, r = {
|
|
1491
1494
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1492
1495
|
uri: "/federated/search"
|
|
1493
|
-
},
|
|
1496
|
+
}, a = `${r.baseUrl}${r.uri}`, o = {
|
|
1494
1497
|
"Content-Type": "application/json",
|
|
1495
1498
|
Accept: "application/json,text/javascript,*/*"
|
|
1496
1499
|
}, c = B(), d = {
|
|
@@ -1554,9 +1557,9 @@ function ue(e, t, n = void 0, s = void 0) {
|
|
|
1554
1557
|
}
|
|
1555
1558
|
}
|
|
1556
1559
|
};
|
|
1557
|
-
console.log("dataPattern => ", d), m(
|
|
1560
|
+
console.log("dataPattern => ", d), m(a, {
|
|
1558
1561
|
method: "POST",
|
|
1559
|
-
headers:
|
|
1562
|
+
headers: o,
|
|
1560
1563
|
data: JSON.stringify(d),
|
|
1561
1564
|
onComplete(u) {
|
|
1562
1565
|
const p = JSON.parse(u);
|
|
@@ -1569,11 +1572,11 @@ function ue(e, t, n = void 0, s = void 0) {
|
|
|
1569
1572
|
});
|
|
1570
1573
|
}
|
|
1571
1574
|
function nt(e, t, n = void 0, s = void 0) {
|
|
1572
|
-
const { objId: i, pred: r, tag:
|
|
1575
|
+
const { objId: i, pred: r, tag: a } = t, o = {
|
|
1573
1576
|
uri: "/resources/6w/tags",
|
|
1574
1577
|
otpCTX: "SecurityContext=preferred",
|
|
1575
1578
|
optTenant: `tenant=${e.tenant}`
|
|
1576
|
-
}, c = `${e.space}${
|
|
1579
|
+
}, c = `${e.space}${o.uri}?${o.otpCTX}&${o.optTenant}`, d = {
|
|
1577
1580
|
tag: [
|
|
1578
1581
|
{
|
|
1579
1582
|
subject: [
|
|
@@ -1583,7 +1586,7 @@ function nt(e, t, n = void 0, s = void 0) {
|
|
|
1583
1586
|
],
|
|
1584
1587
|
predicate: G[r],
|
|
1585
1588
|
object: {
|
|
1586
|
-
literal:
|
|
1589
|
+
literal: a
|
|
1587
1590
|
}
|
|
1588
1591
|
}
|
|
1589
1592
|
]
|
|
@@ -1610,13 +1613,13 @@ function st(e, t = "", n = void 0, s = void 0) {
|
|
|
1610
1613
|
return;
|
|
1611
1614
|
const r = {
|
|
1612
1615
|
uri: "/resources/v1/modeler/documents"
|
|
1613
|
-
},
|
|
1616
|
+
}, a = {
|
|
1614
1617
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1615
1618
|
Accept: "application/json,text/javascript,*/*"
|
|
1616
|
-
},
|
|
1617
|
-
m(
|
|
1619
|
+
}, o = `${i}${r.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}`;
|
|
1620
|
+
m(o, {
|
|
1618
1621
|
method: "POST",
|
|
1619
|
-
headers:
|
|
1622
|
+
headers: a,
|
|
1620
1623
|
data: c,
|
|
1621
1624
|
onComplete(d) {
|
|
1622
1625
|
n && n(JSON.parse(d));
|
|
@@ -1630,10 +1633,10 @@ function st(e, t = "", n = void 0, s = void 0) {
|
|
|
1630
1633
|
async function w(e, t = void 0, n = void 0) {
|
|
1631
1634
|
const s = e._3DSwym + "/api/index/tk";
|
|
1632
1635
|
return m(s, {
|
|
1633
|
-
onComplete(i, r,
|
|
1634
|
-
const
|
|
1636
|
+
onComplete(i, r, a) {
|
|
1637
|
+
const o = JSON.parse(i);
|
|
1635
1638
|
if (t)
|
|
1636
|
-
return t(
|
|
1639
|
+
return t(o), e.token = o?.result?.ServerToken;
|
|
1637
1640
|
},
|
|
1638
1641
|
onFailure(i) {
|
|
1639
1642
|
n && n(i);
|
|
@@ -1661,11 +1664,11 @@ function it(e, t = void 0, n = void 0) {
|
|
|
1661
1664
|
},
|
|
1662
1665
|
data: JSON.stringify(i),
|
|
1663
1666
|
type: "json",
|
|
1664
|
-
onComplete(
|
|
1665
|
-
t && t(
|
|
1667
|
+
onComplete(a, o) {
|
|
1668
|
+
t && t(a, o);
|
|
1666
1669
|
},
|
|
1667
|
-
onFailure(
|
|
1668
|
-
n && n(
|
|
1670
|
+
onFailure(a, o) {
|
|
1671
|
+
n && n(a, o);
|
|
1669
1672
|
}
|
|
1670
1673
|
});
|
|
1671
1674
|
});
|
|
@@ -1690,12 +1693,12 @@ function at(e, t = void 0, n = void 0) {
|
|
|
1690
1693
|
},
|
|
1691
1694
|
data: JSON.stringify(i),
|
|
1692
1695
|
type: "json",
|
|
1693
|
-
onComplete(
|
|
1694
|
-
const c =
|
|
1695
|
-
t && t(c,
|
|
1696
|
+
onComplete(a, o) {
|
|
1697
|
+
const c = a.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1698
|
+
t && t(c, a);
|
|
1696
1699
|
},
|
|
1697
|
-
onFailure(
|
|
1698
|
-
n && n(
|
|
1700
|
+
onFailure(a, o) {
|
|
1701
|
+
n && n(a, o);
|
|
1699
1702
|
}
|
|
1700
1703
|
});
|
|
1701
1704
|
});
|
|
@@ -1707,14 +1710,14 @@ function ot(e, t = void 0, n = void 0) {
|
|
|
1707
1710
|
limit: `/limit/${e.limit ? e.limit : 500}`,
|
|
1708
1711
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1709
1712
|
}, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
|
|
1710
|
-
w(e, (
|
|
1713
|
+
w(e, (a) => {
|
|
1711
1714
|
m(i, {
|
|
1712
1715
|
method: "GET",
|
|
1713
1716
|
headers: {
|
|
1714
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1717
|
+
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1715
1718
|
},
|
|
1716
|
-
onComplete(
|
|
1717
|
-
const p = JSON.parse(
|
|
1719
|
+
onComplete(o, c, d) {
|
|
1720
|
+
const p = JSON.parse(o).result;
|
|
1718
1721
|
let f = 0;
|
|
1719
1722
|
p.forEach((l) => {
|
|
1720
1723
|
const g = {
|
|
@@ -1735,8 +1738,8 @@ function ot(e, t = void 0, n = void 0) {
|
|
|
1735
1738
|
);
|
|
1736
1739
|
});
|
|
1737
1740
|
},
|
|
1738
|
-
onFailure(
|
|
1739
|
-
const d =
|
|
1741
|
+
onFailure(o, c) {
|
|
1742
|
+
const d = o;
|
|
1740
1743
|
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1741
1744
|
}
|
|
1742
1745
|
});
|
|
@@ -1750,21 +1753,21 @@ function pe(e, t, n, s) {
|
|
|
1750
1753
|
community_id: t
|
|
1751
1754
|
}
|
|
1752
1755
|
};
|
|
1753
|
-
w(e, (
|
|
1756
|
+
w(e, (a) => {
|
|
1754
1757
|
m(i, {
|
|
1755
1758
|
method: "POST",
|
|
1756
1759
|
headers: {
|
|
1757
1760
|
"Content-type": "application/json;charset=UTF-8",
|
|
1758
1761
|
Accept: "application/json",
|
|
1759
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1762
|
+
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1760
1763
|
},
|
|
1761
1764
|
data: JSON.stringify(r),
|
|
1762
1765
|
type: "json",
|
|
1763
|
-
onComplete(
|
|
1764
|
-
n && n(
|
|
1766
|
+
onComplete(o, c, d) {
|
|
1767
|
+
n && n(o);
|
|
1765
1768
|
},
|
|
1766
|
-
onFailure(
|
|
1767
|
-
const d =
|
|
1769
|
+
onFailure(o, c) {
|
|
1770
|
+
const d = o;
|
|
1768
1771
|
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1769
1772
|
}
|
|
1770
1773
|
});
|
|
@@ -1782,21 +1785,21 @@ function rt(e, t = void 0, n = void 0) {
|
|
|
1782
1785
|
Accept: "application/json",
|
|
1783
1786
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1784
1787
|
},
|
|
1785
|
-
onComplete(
|
|
1786
|
-
const
|
|
1787
|
-
t && t(
|
|
1788
|
+
onComplete(a) {
|
|
1789
|
+
const o = JSON.parse(a);
|
|
1790
|
+
t && t(o);
|
|
1788
1791
|
},
|
|
1789
|
-
onFailure(
|
|
1790
|
-
const c =
|
|
1791
|
-
c.status =
|
|
1792
|
+
onFailure(a, o) {
|
|
1793
|
+
const c = a;
|
|
1794
|
+
c.status = o.status, c.response = o.errormsg, n && n(c);
|
|
1792
1795
|
}
|
|
1793
1796
|
});
|
|
1794
1797
|
});
|
|
1795
1798
|
}
|
|
1796
1799
|
function ct(e, t, n = void 0, s = void 0) {
|
|
1797
|
-
const { listAllContacts: i, currentUser: r, _3DSwym:
|
|
1800
|
+
const { listAllContacts: i, currentUser: r, _3DSwym: a } = e;
|
|
1798
1801
|
console.log("__listAllContacts", i.hits);
|
|
1799
|
-
const
|
|
1802
|
+
const o = `${a}/api/directmessages`, c = {
|
|
1800
1803
|
users: [r.login].concat(t.receipt)
|
|
1801
1804
|
}, d = {
|
|
1802
1805
|
id_msg: "",
|
|
@@ -1815,7 +1818,7 @@ function ct(e, t, n = void 0, s = void 0) {
|
|
|
1815
1818
|
}
|
|
1816
1819
|
), u === !1 && setTimeout(() => {
|
|
1817
1820
|
u === !1 && w(e, (p) => {
|
|
1818
|
-
m(
|
|
1821
|
+
m(o, {
|
|
1819
1822
|
method: "POST",
|
|
1820
1823
|
headers: {
|
|
1821
1824
|
"Content-Type": "application/json",
|
|
@@ -1845,9 +1848,9 @@ function le(e, t, n, s) {
|
|
|
1845
1848
|
Accept: "application/json,text/javascript,*/*",
|
|
1846
1849
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1847
1850
|
},
|
|
1848
|
-
onComplete(
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1851
|
+
onComplete(a) {
|
|
1852
|
+
const o = JSON.parse(a), c = [];
|
|
1853
|
+
o.result.forEach((p) => {
|
|
1851
1854
|
p.users = p.users.sort((f, l) => f.login.localeCompare(l.login)), p.users.length === t.length && c.push(p);
|
|
1852
1855
|
});
|
|
1853
1856
|
const d = t.sort(), u = c.find((p) => {
|
|
@@ -1858,9 +1861,9 @@ function le(e, t, n, s) {
|
|
|
1858
1861
|
});
|
|
1859
1862
|
n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
|
|
1860
1863
|
},
|
|
1861
|
-
onFailure(
|
|
1862
|
-
const
|
|
1863
|
-
|
|
1864
|
+
onFailure(a) {
|
|
1865
|
+
const o = a;
|
|
1866
|
+
o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), s && s(o);
|
|
1864
1867
|
}
|
|
1865
1868
|
});
|
|
1866
1869
|
});
|
|
@@ -1871,7 +1874,7 @@ function x(e, t, n = void 0, s = void 0) {
|
|
|
1871
1874
|
uri: "/api/community",
|
|
1872
1875
|
id_msg: `${t.id_msg}`,
|
|
1873
1876
|
endUri: "/instantmessages"
|
|
1874
|
-
}, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`,
|
|
1877
|
+
}, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, a = {
|
|
1875
1878
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1876
1879
|
accessState: null,
|
|
1877
1880
|
commentUri: null,
|
|
@@ -1881,15 +1884,15 @@ function x(e, t, n = void 0, s = void 0) {
|
|
|
1881
1884
|
parentCommentUri: null,
|
|
1882
1885
|
richMessage: t.msg
|
|
1883
1886
|
};
|
|
1884
|
-
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (
|
|
1887
|
+
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (o) => {
|
|
1885
1888
|
m(r, {
|
|
1886
1889
|
method: "POST",
|
|
1887
1890
|
headers: {
|
|
1888
1891
|
"Content-Type": "application/json",
|
|
1889
1892
|
Accept: "application/json",
|
|
1890
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1893
|
+
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1891
1894
|
},
|
|
1892
|
-
data: JSON.stringify(
|
|
1895
|
+
data: JSON.stringify(a),
|
|
1893
1896
|
type: "json",
|
|
1894
1897
|
onComplete(c, d, u) {
|
|
1895
1898
|
const p = c;
|
|
@@ -1912,13 +1915,13 @@ function fe(e) {
|
|
|
1912
1915
|
function dt(e, t, n = void 0, s = void 0) {
|
|
1913
1916
|
const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1914
1917
|
(c) => c.id === t.community_id
|
|
1915
|
-
),
|
|
1918
|
+
), a = e.swymCommunities.find(
|
|
1916
1919
|
(c) => c.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1917
|
-
),
|
|
1920
|
+
), o = {
|
|
1918
1921
|
params: {
|
|
1919
1922
|
title: t.title,
|
|
1920
1923
|
// String, le nom de l'affaire
|
|
1921
|
-
community_id: r?.id !== void 0 ? r.id :
|
|
1924
|
+
community_id: r?.id !== void 0 ? r.id : a.id,
|
|
1922
1925
|
// String, l'id de la communauté
|
|
1923
1926
|
message: me(t.text_html),
|
|
1924
1927
|
// STRING => le contenue du message doit être au format HTML
|
|
@@ -1935,7 +1938,7 @@ function dt(e, t, n = void 0, s = void 0) {
|
|
|
1935
1938
|
m(i, {
|
|
1936
1939
|
method: "POST",
|
|
1937
1940
|
headers: d,
|
|
1938
|
-
data: JSON.stringify(
|
|
1941
|
+
data: JSON.stringify(o),
|
|
1939
1942
|
type: "json",
|
|
1940
1943
|
onComplete(u, p, f) {
|
|
1941
1944
|
const l = JSON.parse(u);
|
|
@@ -1951,29 +1954,29 @@ function dt(e, t, n = void 0, s = void 0) {
|
|
|
1951
1954
|
function ut(e, t = void 0, n = void 0) {
|
|
1952
1955
|
const s = { base: e.space, uri: "/api/idea/add" };
|
|
1953
1956
|
if (!Array.isArray(e.swymCommunities)) {
|
|
1954
|
-
const
|
|
1957
|
+
const a = "☠️ swymCommunities doit être un tableau d'objets de communautés";
|
|
1955
1958
|
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
1956
|
-
cause:
|
|
1959
|
+
cause: a
|
|
1957
1960
|
});
|
|
1958
1961
|
}
|
|
1959
1962
|
if (e.swymCommunities.findIndex(
|
|
1960
|
-
(
|
|
1963
|
+
(a) => a.id === e.community_id
|
|
1961
1964
|
) === -1) {
|
|
1962
|
-
const
|
|
1965
|
+
const a = "la communauté n'existe pas dans la liste des communautés du Swym";
|
|
1963
1966
|
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
1964
|
-
cause:
|
|
1967
|
+
cause: a
|
|
1965
1968
|
});
|
|
1966
1969
|
}
|
|
1967
1970
|
if (e.community_id && e.community_id === "") {
|
|
1968
|
-
const
|
|
1971
|
+
const a = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
|
|
1969
1972
|
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
1970
|
-
cause:
|
|
1973
|
+
cause: a
|
|
1971
1974
|
});
|
|
1972
1975
|
}
|
|
1973
1976
|
if (e.title && e.title === "") {
|
|
1974
|
-
const
|
|
1977
|
+
const a = "☠️ title doit être un String.";
|
|
1975
1978
|
throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
|
|
1976
|
-
cause:
|
|
1979
|
+
cause: a
|
|
1977
1980
|
});
|
|
1978
1981
|
}
|
|
1979
1982
|
const r = {
|
|
@@ -1988,19 +1991,19 @@ function ut(e, t = void 0, n = void 0) {
|
|
|
1988
1991
|
// 1 publier, 0 brouillon
|
|
1989
1992
|
}
|
|
1990
1993
|
};
|
|
1991
|
-
w(e, (
|
|
1992
|
-
if (!
|
|
1994
|
+
w(e, (a) => {
|
|
1995
|
+
if (!a)
|
|
1993
1996
|
throw new Error(
|
|
1994
1997
|
`☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
|
|
1995
1998
|
{
|
|
1996
|
-
cause:
|
|
1999
|
+
cause: a
|
|
1997
2000
|
}
|
|
1998
2001
|
);
|
|
1999
|
-
const
|
|
2002
|
+
const o = {
|
|
2000
2003
|
headers: {
|
|
2001
2004
|
"Content-type": "application/json;charset=UTF-8",
|
|
2002
2005
|
Accept: "application/json",
|
|
2003
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
2006
|
+
"X-DS-SWYM-CSRFTOKEN": a?.result?.ServerToken
|
|
2004
2007
|
},
|
|
2005
2008
|
method: "POST",
|
|
2006
2009
|
data: JSON.stringify(r),
|
|
@@ -2018,7 +2021,7 @@ function ut(e, t = void 0, n = void 0) {
|
|
|
2018
2021
|
n && n(l);
|
|
2019
2022
|
}
|
|
2020
2023
|
};
|
|
2021
|
-
m(s.base + s.uri,
|
|
2024
|
+
m(s.base + s.uri, o);
|
|
2022
2025
|
});
|
|
2023
2026
|
}
|
|
2024
2027
|
function pt(e, t, n = void 0, s = void 0) {
|
|
@@ -2028,21 +2031,21 @@ function pt(e, t, n = void 0, s = void 0) {
|
|
|
2028
2031
|
ideationIds: [t.idee_id]
|
|
2029
2032
|
}
|
|
2030
2033
|
};
|
|
2031
|
-
w(e, (
|
|
2034
|
+
w(e, (a) => {
|
|
2032
2035
|
m(i, {
|
|
2033
2036
|
method: "POST",
|
|
2034
2037
|
headers: {
|
|
2035
2038
|
"Content-type": "application/json;charset=UTF-8",
|
|
2036
2039
|
Accept: "application/json",
|
|
2037
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
2040
|
+
"X-DS-SWYM-CSRFTOKEN": a?.result?.ServerToken
|
|
2038
2041
|
},
|
|
2039
2042
|
data: JSON.stringify(r),
|
|
2040
2043
|
type: "json",
|
|
2041
|
-
onComplete(
|
|
2042
|
-
n && n(
|
|
2044
|
+
onComplete(o, c, d) {
|
|
2045
|
+
n && n(o);
|
|
2043
2046
|
},
|
|
2044
|
-
onFailure(
|
|
2045
|
-
const u =
|
|
2047
|
+
onFailure(o, c, d) {
|
|
2048
|
+
const u = o;
|
|
2046
2049
|
u.status = c.status, u.response = c.errormsg, s && s(u);
|
|
2047
2050
|
}
|
|
2048
2051
|
});
|
|
@@ -2051,10 +2054,10 @@ function pt(e, t, n = void 0, s = void 0) {
|
|
|
2051
2054
|
function lt(e, t = void 0, n = void 0) {
|
|
2052
2055
|
const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
|
|
2053
2056
|
if (e.idPost === "") {
|
|
2054
|
-
const
|
|
2055
|
-
throw new Error(`Erreur sur cette requête : ${r}`, { cause:
|
|
2057
|
+
const o = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
|
|
2058
|
+
throw new Error(`Erreur sur cette requête : ${r}`, { cause: o });
|
|
2056
2059
|
}
|
|
2057
|
-
const
|
|
2060
|
+
const a = {
|
|
2058
2061
|
params: {
|
|
2059
2062
|
id: e.idPost
|
|
2060
2063
|
}
|
|
@@ -2066,12 +2069,12 @@ function lt(e, t = void 0, n = void 0) {
|
|
|
2066
2069
|
Accept: "application/json",
|
|
2067
2070
|
"X-DS-SWYM-CSRFTOKEN": i
|
|
2068
2071
|
},
|
|
2069
|
-
data: JSON.stringify(
|
|
2070
|
-
onComplete(
|
|
2071
|
-
|
|
2072
|
+
data: JSON.stringify(a),
|
|
2073
|
+
onComplete(o) {
|
|
2074
|
+
o = typeof o == "string" ? JSON.parse(o) : o, t && t({ response: o });
|
|
2072
2075
|
},
|
|
2073
|
-
onFailure(
|
|
2074
|
-
const c =
|
|
2076
|
+
onFailure(o) {
|
|
2077
|
+
const c = o;
|
|
2075
2078
|
c.status = headers.status, c.response = headers.errormsg, n && n(c);
|
|
2076
2079
|
}
|
|
2077
2080
|
});
|
|
@@ -2081,8 +2084,8 @@ function ft(e, t, n) {
|
|
|
2081
2084
|
_3DSwym: s,
|
|
2082
2085
|
_3DSwym_token: i,
|
|
2083
2086
|
idPost: r,
|
|
2084
|
-
title:
|
|
2085
|
-
community_id:
|
|
2087
|
+
title: a,
|
|
2088
|
+
community_id: o,
|
|
2086
2089
|
status_comment: c,
|
|
2087
2090
|
status_id: d,
|
|
2088
2091
|
message: u
|
|
@@ -2100,8 +2103,8 @@ function ft(e, t, n) {
|
|
|
2100
2103
|
params: {
|
|
2101
2104
|
out: "false",
|
|
2102
2105
|
id: r,
|
|
2103
|
-
title:
|
|
2104
|
-
community_id:
|
|
2106
|
+
title: a,
|
|
2107
|
+
community_id: o,
|
|
2105
2108
|
status_comment: c,
|
|
2106
2109
|
status_id: d,
|
|
2107
2110
|
message: u,
|
|
@@ -2123,15 +2126,15 @@ function ft(e, t, n) {
|
|
|
2123
2126
|
}
|
|
2124
2127
|
function mt(e, t, n = void 0, s = void 0) {
|
|
2125
2128
|
const { _3DSwym: i } = e;
|
|
2126
|
-
let { community_id: r, limit:
|
|
2129
|
+
let { community_id: r, limit: a, page: o, search: c } = t;
|
|
2127
2130
|
const d = [], u = 1;
|
|
2128
2131
|
let p = !1, f = 2;
|
|
2129
|
-
|
|
2132
|
+
o || (o = u), a || (a = 100);
|
|
2130
2133
|
const l = {
|
|
2131
2134
|
uri: "/api/idea/list",
|
|
2132
2135
|
comId: `/community_id/${r}`,
|
|
2133
|
-
limit: `/limit/${
|
|
2134
|
-
page: `/page/${
|
|
2136
|
+
limit: `/limit/${a}`,
|
|
2137
|
+
page: `/page/${o}`
|
|
2135
2138
|
};
|
|
2136
2139
|
let g = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
|
|
2137
2140
|
w(e, (h) => {
|
|
@@ -2143,8 +2146,8 @@ function mt(e, t, n = void 0, s = void 0) {
|
|
|
2143
2146
|
},
|
|
2144
2147
|
onComplete(_) {
|
|
2145
2148
|
const C = { response: JSON.parse(_) };
|
|
2146
|
-
if (f = Math.ceil(Number(C.response.nb_result) / 100), _ && f >=
|
|
2147
|
-
if (
|
|
2149
|
+
if (f = Math.ceil(Number(C.response.nb_result) / 100), _ && f >= o) {
|
|
2150
|
+
if (o++, l.page = `/page/${o}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
|
|
2148
2151
|
d.push(C.response.result);
|
|
2149
2152
|
else {
|
|
2150
2153
|
const T = C.response.result.find(
|
|
@@ -2155,7 +2158,7 @@ function mt(e, t, n = void 0, s = void 0) {
|
|
|
2155
2158
|
return;
|
|
2156
2159
|
}
|
|
2157
2160
|
}
|
|
2158
|
-
if (n && f <
|
|
2161
|
+
if (n && f < o && !c) {
|
|
2159
2162
|
p = !0, n(d);
|
|
2160
2163
|
return;
|
|
2161
2164
|
}
|
|
@@ -2247,8 +2250,8 @@ function me(e) {
|
|
|
2247
2250
|
</p>` : e;
|
|
2248
2251
|
}
|
|
2249
2252
|
function gt(e, t = void 0, n = void 0) {
|
|
2250
|
-
const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id:
|
|
2251
|
-
if (s && i && r &&
|
|
2253
|
+
const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
|
|
2254
|
+
if (s && i && r && a && o) {
|
|
2252
2255
|
const c = `${i}/api/idea/forward`;
|
|
2253
2256
|
m(c, {
|
|
2254
2257
|
method: "POST",
|
|
@@ -2258,8 +2261,8 @@ function gt(e, t = void 0, n = void 0) {
|
|
|
2258
2261
|
"X-DS-SWYM-CSRFTOKEN": r
|
|
2259
2262
|
},
|
|
2260
2263
|
data: JSON.stringify({
|
|
2261
|
-
community_uri: `swym:prd:${s.toUpperCase()}:community:${
|
|
2262
|
-
content_uri: `swym:prd:${s.toUpperCase()}:idea:${
|
|
2264
|
+
community_uri: `swym:prd:${s.toUpperCase()}:community:${a}`,
|
|
2265
|
+
content_uri: `swym:prd:${s.toUpperCase()}:idea:${o}`,
|
|
2263
2266
|
timeout: 3e4
|
|
2264
2267
|
}),
|
|
2265
2268
|
type: "json",
|
|
@@ -2287,12 +2290,12 @@ function ht(e, t = void 0, n = void 0) {
|
|
|
2287
2290
|
headers: {
|
|
2288
2291
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
2289
2292
|
},
|
|
2290
|
-
onComplete(r,
|
|
2293
|
+
onComplete(r, a, o) {
|
|
2291
2294
|
const c = JSON.parse(r);
|
|
2292
2295
|
t && t(c.result);
|
|
2293
2296
|
},
|
|
2294
|
-
onFailure(r,
|
|
2295
|
-
const c = { erreur: JSON.parse(r), headers:
|
|
2297
|
+
onFailure(r, a, o) {
|
|
2298
|
+
const c = { erreur: JSON.parse(r), headers: a, xhr: o };
|
|
2296
2299
|
n && n(c);
|
|
2297
2300
|
}
|
|
2298
2301
|
});
|
|
@@ -2306,12 +2309,12 @@ function yt(e, t, n = void 0, s = void 0) {
|
|
|
2306
2309
|
m(i, {
|
|
2307
2310
|
method: "GET",
|
|
2308
2311
|
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
2309
|
-
onComplete(
|
|
2310
|
-
const d = JSON.parse(
|
|
2312
|
+
onComplete(a, o, c) {
|
|
2313
|
+
const d = JSON.parse(a);
|
|
2311
2314
|
n && n(d);
|
|
2312
2315
|
},
|
|
2313
|
-
onFailure(
|
|
2314
|
-
s && s(
|
|
2316
|
+
onFailure(a) {
|
|
2317
|
+
s && s(a);
|
|
2315
2318
|
}
|
|
2316
2319
|
});
|
|
2317
2320
|
},
|
|
@@ -2323,15 +2326,15 @@ function St(e, t = void 0, n = void 0) {
|
|
|
2323
2326
|
_3DSwym: s,
|
|
2324
2327
|
_3DSwym_token: i,
|
|
2325
2328
|
subjectUri: r,
|
|
2326
|
-
richMessage:
|
|
2327
|
-
} = e,
|
|
2329
|
+
richMessage: a
|
|
2330
|
+
} = e, o = `${s}/commentproxy/subjects/${r}/comments`, d = {
|
|
2328
2331
|
method: "POST",
|
|
2329
2332
|
headers: {
|
|
2330
2333
|
"Content-type": "application/json;charset=UTF-8",
|
|
2331
2334
|
Accept: "application/json",
|
|
2332
2335
|
"X-DS-SWYM-CSRFTOKEN": i
|
|
2333
2336
|
},
|
|
2334
|
-
data: JSON.stringify({ richMessage:
|
|
2337
|
+
data: JSON.stringify({ richMessage: a }),
|
|
2335
2338
|
type: "json",
|
|
2336
2339
|
onComplete(u, p, f) {
|
|
2337
2340
|
const l = {
|
|
@@ -2343,30 +2346,30 @@ function St(e, t = void 0, n = void 0) {
|
|
|
2343
2346
|
n && n(u);
|
|
2344
2347
|
}
|
|
2345
2348
|
};
|
|
2346
|
-
m(
|
|
2349
|
+
m(o, d);
|
|
2347
2350
|
}
|
|
2348
2351
|
function _t(e, t = void 0, n = void 0) {
|
|
2349
|
-
e.tenant &&
|
|
2352
|
+
e.tenant && N(e, (s) => {
|
|
2350
2353
|
const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
2351
2354
|
return t && t(i), i;
|
|
2352
2355
|
});
|
|
2353
2356
|
}
|
|
2354
2357
|
function wt(e, t = void 0, n = void 0) {
|
|
2355
|
-
e.tenant &&
|
|
2358
|
+
e.tenant && N(e, (s) => {
|
|
2356
2359
|
const i = s.services.find(
|
|
2357
|
-
(
|
|
2358
|
-
)?.url, r = s.services.find((
|
|
2359
|
-
m(
|
|
2360
|
-
async onComplete(
|
|
2361
|
-
const c = typeof
|
|
2360
|
+
(o) => o.id === "3dpassport"
|
|
2361
|
+
)?.url, r = s.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?service=${r}/auth/cas`;
|
|
2362
|
+
m(a, {
|
|
2363
|
+
async onComplete(o) {
|
|
2364
|
+
const c = typeof o == "string" ? JSON.parse(o)?.x3ds_service_redirect_url : o?.x3ds_service_redirect_url;
|
|
2362
2365
|
await fetch(c, {
|
|
2363
2366
|
method: "POST"
|
|
2364
2367
|
}).then((d) => d.json()).then(async (d) => {
|
|
2365
2368
|
t && t(d?.token);
|
|
2366
2369
|
});
|
|
2367
2370
|
},
|
|
2368
|
-
onFailure(
|
|
2369
|
-
n && n(
|
|
2371
|
+
onFailure(o) {
|
|
2372
|
+
n && n(o);
|
|
2370
2373
|
}
|
|
2371
2374
|
});
|
|
2372
2375
|
});
|
|
@@ -2384,10 +2387,10 @@ function Ct(e, t = void 0, n = void 0) {
|
|
|
2384
2387
|
}
|
|
2385
2388
|
}
|
|
2386
2389
|
async function Tt(e, t, n = void 0, s = void 0) {
|
|
2387
|
-
e.tenant &&
|
|
2388
|
-
const
|
|
2390
|
+
e.tenant && N(e, (i) => {
|
|
2391
|
+
const a = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, o = e.tenant.toLowerCase();
|
|
2389
2392
|
fetch(
|
|
2390
|
-
`https://api.uixhome.fr/${
|
|
2393
|
+
`https://api.uixhome.fr/${o}/iterop/listusers?t=${t}&s=${a}`,
|
|
2391
2394
|
{
|
|
2392
2395
|
method: "POST"
|
|
2393
2396
|
}
|
|
@@ -2421,10 +2424,10 @@ async function Ot(e, t, n, s = void 0, i = void 0) {
|
|
|
2421
2424
|
{
|
|
2422
2425
|
method: "POST"
|
|
2423
2426
|
}
|
|
2424
|
-
).then((
|
|
2425
|
-
s && s(
|
|
2426
|
-
}).catch((
|
|
2427
|
-
i && i(
|
|
2427
|
+
).then((a) => a.json()).then((a) => {
|
|
2428
|
+
s && s(a);
|
|
2429
|
+
}).catch((a) => {
|
|
2430
|
+
i && i(a);
|
|
2428
2431
|
});
|
|
2429
2432
|
}
|
|
2430
2433
|
}
|
|
@@ -2436,39 +2439,39 @@ async function $t(e, t, n, s = void 0, i = void 0) {
|
|
|
2436
2439
|
{
|
|
2437
2440
|
method: "POST"
|
|
2438
2441
|
}
|
|
2439
|
-
).then((
|
|
2440
|
-
s && s(
|
|
2441
|
-
}).catch((
|
|
2442
|
-
i && i(
|
|
2442
|
+
).then((a) => a.json()).then((a) => {
|
|
2443
|
+
s && s(a);
|
|
2444
|
+
}).catch((a) => {
|
|
2445
|
+
i && i(a);
|
|
2443
2446
|
});
|
|
2444
2447
|
}
|
|
2445
2448
|
}
|
|
2446
2449
|
async function Nt(e, t, n, s, i = void 0, r = void 0) {
|
|
2447
2450
|
if (e.tenant) {
|
|
2448
|
-
const
|
|
2451
|
+
const a = e.tenant.toLowerCase();
|
|
2449
2452
|
fetch(
|
|
2450
|
-
`https://api.uixhome.fr/${
|
|
2453
|
+
`https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
|
|
2451
2454
|
{
|
|
2452
2455
|
method: "POST"
|
|
2453
2456
|
}
|
|
2454
|
-
).then((
|
|
2455
|
-
i && i(
|
|
2456
|
-
}).catch((
|
|
2457
|
-
r && r(
|
|
2457
|
+
).then((o) => o.json()).then((o) => {
|
|
2458
|
+
i && i(o);
|
|
2459
|
+
}).catch((o) => {
|
|
2460
|
+
r && r(o, n, s);
|
|
2458
2461
|
});
|
|
2459
2462
|
}
|
|
2460
2463
|
}
|
|
2461
|
-
async function It(e, t, n, s, i, r = void 0,
|
|
2464
|
+
async function It(e, t, n, s, i, r = void 0, a = void 0) {
|
|
2462
2465
|
if (e.tenant) {
|
|
2463
|
-
const
|
|
2466
|
+
const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
|
|
2464
2467
|
s
|
|
2465
2468
|
)}&b=${encodeURIComponent(i)}`;
|
|
2466
|
-
fetch(
|
|
2469
|
+
fetch(o, {
|
|
2467
2470
|
method: "POST"
|
|
2468
2471
|
}).then((c) => c.json()).then((c) => {
|
|
2469
|
-
c.url =
|
|
2472
|
+
c.url = o, r && r(c);
|
|
2470
2473
|
}).catch((c) => {
|
|
2471
|
-
|
|
2474
|
+
a && a({
|
|
2472
2475
|
error: c,
|
|
2473
2476
|
tableId: n,
|
|
2474
2477
|
columns: s,
|
|
@@ -2479,27 +2482,27 @@ async function It(e, t, n, s, i, r = void 0, o = void 0) {
|
|
|
2479
2482
|
}
|
|
2480
2483
|
async function vt(e, t, n, s, i = void 0, r = void 0) {
|
|
2481
2484
|
if (e.tenant) {
|
|
2482
|
-
const
|
|
2485
|
+
const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
|
|
2483
2486
|
s
|
|
2484
2487
|
)}`;
|
|
2485
|
-
fetch(
|
|
2488
|
+
fetch(a, {
|
|
2486
2489
|
method: "POST"
|
|
2487
|
-
}).then((
|
|
2488
|
-
i && i(
|
|
2489
|
-
}).catch((
|
|
2490
|
+
}).then((o) => o.json()).then((o) => {
|
|
2491
|
+
i && i(o);
|
|
2492
|
+
}).catch((o) => {
|
|
2490
2493
|
r && r({
|
|
2491
|
-
error:
|
|
2492
|
-
url:
|
|
2494
|
+
error: o,
|
|
2495
|
+
url: a
|
|
2493
2496
|
});
|
|
2494
2497
|
});
|
|
2495
2498
|
}
|
|
2496
2499
|
}
|
|
2497
2500
|
async function Ft(e, t, n, s, i = void 0, r = void 0) {
|
|
2498
|
-
e.tenant &&
|
|
2499
|
-
|
|
2500
|
-
const
|
|
2501
|
+
e.tenant && N(e, (a) => {
|
|
2502
|
+
a.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2503
|
+
const o = e.tenant.toLowerCase();
|
|
2501
2504
|
fetch(
|
|
2502
|
-
`https://api.uixhome.fr/${
|
|
2505
|
+
`https://api.uixhome.fr/${o}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
|
|
2503
2506
|
{
|
|
2504
2507
|
method: "POST"
|
|
2505
2508
|
}
|
|
@@ -2511,11 +2514,10 @@ async function Ft(e, t, n, s, i = void 0, r = void 0) {
|
|
|
2511
2514
|
});
|
|
2512
2515
|
}
|
|
2513
2516
|
async function jt(e, t, n, s = void 0, i = void 0) {
|
|
2514
|
-
e.tenant
|
|
2515
|
-
r.
|
|
2516
|
-
const o = e.tenant.toLowerCase();
|
|
2517
|
+
if (e.tenant) {
|
|
2518
|
+
const r = e.tenant.toLowerCase();
|
|
2517
2519
|
fetch(
|
|
2518
|
-
`https://api.uixhome.fr/${
|
|
2520
|
+
`https://api.uixhome.fr/${r}/iterop/dependencytable/one/${n}/?t=${t}`,
|
|
2519
2521
|
{
|
|
2520
2522
|
method: "POST"
|
|
2521
2523
|
}
|
|
@@ -2524,11 +2526,11 @@ async function jt(e, t, n, s = void 0, i = void 0) {
|
|
|
2524
2526
|
}).catch((a) => {
|
|
2525
2527
|
i && i(a);
|
|
2526
2528
|
});
|
|
2527
|
-
}
|
|
2529
|
+
}
|
|
2528
2530
|
}
|
|
2529
|
-
async function kt(e, t, n, s, i, r = void 0,
|
|
2530
|
-
e.tenant &&
|
|
2531
|
-
|
|
2531
|
+
async function kt(e, t, n, s, i, r = void 0, a = void 0) {
|
|
2532
|
+
e.tenant && N(e, (o) => {
|
|
2533
|
+
o.services.find((d) => d.id === "businessprocess")?.url + "";
|
|
2532
2534
|
const c = e.tenant.toLowerCase();
|
|
2533
2535
|
fetch(
|
|
2534
2536
|
`https://api.uixhome.fr/${c}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
|
|
@@ -2538,16 +2540,16 @@ async function kt(e, t, n, s, i, r = void 0, o = void 0) {
|
|
|
2538
2540
|
).then((d) => d.json()).then((d) => {
|
|
2539
2541
|
r && r(d);
|
|
2540
2542
|
}).catch((d) => {
|
|
2541
|
-
|
|
2543
|
+
a && a(d);
|
|
2542
2544
|
});
|
|
2543
2545
|
});
|
|
2544
2546
|
}
|
|
2545
2547
|
async function At(e, t, n, s, i = void 0, r = void 0) {
|
|
2546
|
-
e.tenant &&
|
|
2547
|
-
|
|
2548
|
-
const
|
|
2548
|
+
e.tenant && N(e, (a) => {
|
|
2549
|
+
a.services.find((c) => c.id === "businessprocess")?.url + "";
|
|
2550
|
+
const o = e.tenant.toLowerCase();
|
|
2549
2551
|
fetch(
|
|
2550
|
-
`https://api.uixhome.fr/${
|
|
2552
|
+
`https://api.uixhome.fr/${o}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
|
|
2551
2553
|
{
|
|
2552
2554
|
method: "POST"
|
|
2553
2555
|
}
|
|
@@ -2567,10 +2569,10 @@ async function Ut(e, t, n, s = void 0, i = void 0) {
|
|
|
2567
2569
|
{
|
|
2568
2570
|
method: "POST"
|
|
2569
2571
|
}
|
|
2570
|
-
).then((
|
|
2571
|
-
s && s(
|
|
2572
|
-
}).catch((
|
|
2573
|
-
i && i(
|
|
2572
|
+
).then((a) => a.json()).then((a) => {
|
|
2573
|
+
s && s(a);
|
|
2574
|
+
}).catch((a) => {
|
|
2575
|
+
i && i(a);
|
|
2574
2576
|
});
|
|
2575
2577
|
}
|
|
2576
2578
|
}
|
|
@@ -2582,27 +2584,27 @@ function xt(e) {
|
|
|
2582
2584
|
function Pt(e, t = void 0, n = void 0) {
|
|
2583
2585
|
return console.log("credentials", e), new Promise((s) => {
|
|
2584
2586
|
if (e.token === "" && b(e), !e.space || e.space === "") {
|
|
2585
|
-
const
|
|
2586
|
-
console.log("platformeInfo",
|
|
2587
|
+
const a = Y();
|
|
2588
|
+
console.log("platformeInfo", a);
|
|
2587
2589
|
}
|
|
2588
2590
|
j(
|
|
2589
2591
|
e,
|
|
2590
2592
|
"Common space",
|
|
2591
2593
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
2592
2594
|
void 0,
|
|
2593
|
-
(
|
|
2594
|
-
(
|
|
2595
|
-
console.log("onError =>",
|
|
2595
|
+
(a) => e.ctx = a,
|
|
2596
|
+
(a) => {
|
|
2597
|
+
console.log("onError =>", a);
|
|
2596
2598
|
},
|
|
2597
2599
|
!0
|
|
2598
2600
|
);
|
|
2599
|
-
const i =
|
|
2601
|
+
const i = O.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
2600
2602
|
m(r, {
|
|
2601
|
-
onComplete(
|
|
2602
|
-
if (Array.isArray(JSON.parse(
|
|
2603
|
-
const
|
|
2604
|
-
console.log("serviceId=3dsearch",
|
|
2605
|
-
const c = `${
|
|
2603
|
+
onComplete(a) {
|
|
2604
|
+
if (Array.isArray(JSON.parse(a))) {
|
|
2605
|
+
const o = JSON.parse(a);
|
|
2606
|
+
console.log("serviceId=3dsearch", o);
|
|
2607
|
+
const c = `${o[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
|
|
2606
2608
|
m(c, {
|
|
2607
2609
|
method: "POST",
|
|
2608
2610
|
headers: {
|
|
@@ -2652,8 +2654,8 @@ function Pt(e, t = void 0, n = void 0) {
|
|
|
2652
2654
|
});
|
|
2653
2655
|
}
|
|
2654
2656
|
},
|
|
2655
|
-
onFailure(
|
|
2656
|
-
n && n(
|
|
2657
|
+
onFailure(a) {
|
|
2658
|
+
n && n(a);
|
|
2657
2659
|
}
|
|
2658
2660
|
});
|
|
2659
2661
|
});
|
|
@@ -2719,7 +2721,7 @@ export {
|
|
|
2719
2721
|
vt as _Iterop_updateBusinessTable,
|
|
2720
2722
|
Y as _getPlateformInfos,
|
|
2721
2723
|
$e as _getPlatformServices,
|
|
2722
|
-
|
|
2724
|
+
N as _getServiceUrl,
|
|
2723
2725
|
Ne as _getServiceUrl_3DPassport,
|
|
2724
2726
|
_t as _getServiceUrl_Iterop,
|
|
2725
2727
|
m as _httpCallAuthenticated,
|