@beam3_dev/api_module 0.0.142 → 0.0.144
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 +462 -437
- 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 +2 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { v4 as L } from "uuid";
|
|
2
2
|
import { DateTime as N } from "luxon";
|
|
3
|
-
import { requirejs as O, widget as
|
|
4
|
-
function
|
|
3
|
+
import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
|
|
4
|
+
function D() {
|
|
5
5
|
return L();
|
|
6
6
|
}
|
|
7
7
|
const J = {
|
|
@@ -44,10 +44,10 @@ async function ce(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((a) => a.json()).then((a) => {
|
|
48
|
+
t && t(a);
|
|
49
|
+
}).catch((a) => {
|
|
50
|
+
n && n(a), console.error("Erreur : " + a);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
async function de(e, t = void 0, n = void 0) {
|
|
@@ -65,15 +65,15 @@ async function de(e, t = void 0, n = void 0) {
|
|
|
65
65
|
n && n(s), console.error("Erreur : " + s);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
68
|
+
async function pe(e, t = J) {
|
|
69
69
|
let n = N.now().year;
|
|
70
|
-
const s = e,
|
|
71
|
-
for (let c in
|
|
72
|
-
|
|
70
|
+
const s = e, a = [], r = (i) => {
|
|
71
|
+
for (let c in i)
|
|
72
|
+
a.push({ date: c, comment: i[c] });
|
|
73
73
|
};
|
|
74
|
-
for (let
|
|
74
|
+
for (let i = n; i <= n + 1; i++)
|
|
75
75
|
await fetch(
|
|
76
|
-
"https://calendrier.api.gouv.fr/jours-feries/metropole/" +
|
|
76
|
+
"https://calendrier.api.gouv.fr/jours-feries/metropole/" + i + ".json",
|
|
77
77
|
{
|
|
78
78
|
method: "GET",
|
|
79
79
|
headers: {
|
|
@@ -84,25 +84,25 @@ async function le(e, t = J) {
|
|
|
84
84
|
r(c);
|
|
85
85
|
}).catch((c) => console.error("Erreur : " + c));
|
|
86
86
|
return (() => {
|
|
87
|
-
const
|
|
87
|
+
const i = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : s;
|
|
90
|
-
for (let c of
|
|
91
|
-
|
|
92
|
-
(
|
|
93
|
-
) === -1 &&
|
|
90
|
+
for (let c of a)
|
|
91
|
+
i.events.findIndex(
|
|
92
|
+
(p) => p.start === N.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
|
|
93
|
+
) === -1 && i.events.push({
|
|
94
94
|
name: "Férié : " + c.comment,
|
|
95
95
|
start: N.fromISO(c.date).toISODate(),
|
|
96
96
|
end: N.fromISO(c.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
|
-
return
|
|
100
|
+
return i;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function
|
|
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((
|
|
103
|
+
async function le(e, t, n = !0) {
|
|
104
|
+
const s = e.events.findIndex((a) => a.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((a, r) => a.start - r.start), e;
|
|
106
106
|
}
|
|
107
107
|
function f(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (n) => {
|
|
@@ -121,7 +121,7 @@ function fe(e, t = void 0) {
|
|
|
121
121
|
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
|
|
122
122
|
let s;
|
|
123
123
|
s === void 0 && (s = n.createProxy({
|
|
124
|
-
widgetId:
|
|
124
|
+
widgetId: j.id,
|
|
125
125
|
filteringMode: "WithFilteringServices"
|
|
126
126
|
}), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
|
|
127
127
|
});
|
|
@@ -137,7 +137,7 @@ async function ge(e, t = void 0, n = void 0) {
|
|
|
137
137
|
await O(
|
|
138
138
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
139
139
|
(s) => {
|
|
140
|
-
(!e || e === "") && (e =
|
|
140
|
+
(!e || e === "") && (e = j.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
141
141
|
s.getPlatformServices({
|
|
142
142
|
platformId: e,
|
|
143
143
|
onComplete: t,
|
|
@@ -150,33 +150,33 @@ async function ge(e, t = void 0, n = void 0) {
|
|
|
150
150
|
function E() {
|
|
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(), a = t.getAllApplicationConfigurations(), r = 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: a,
|
|
160
160
|
appConf: r
|
|
161
161
|
};
|
|
162
162
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function v(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
|
f(s, {
|
|
168
|
-
onComplete(
|
|
169
|
-
const r = typeof
|
|
168
|
+
onComplete(a) {
|
|
169
|
+
const r = typeof a == "string" ? JSON.parse(a) : a;
|
|
170
170
|
if (r && "platforms" in r) {
|
|
171
171
|
const o = r.platforms.find(
|
|
172
|
-
(
|
|
172
|
+
(i) => i.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(a) {
|
|
179
|
+
n && n(a);
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
}
|
|
@@ -185,15 +185,15 @@ function he(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
|
f(s, {
|
|
188
|
-
onComplete(
|
|
189
|
-
const r = JSON.parse(
|
|
188
|
+
onComplete(a) {
|
|
189
|
+
const r = JSON.parse(a);
|
|
190
190
|
if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
|
|
191
191
|
const o = `${r[0].services[0].url}`;
|
|
192
192
|
t && t(o);
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
onFailure(
|
|
196
|
-
n && n(
|
|
195
|
+
onFailure(a) {
|
|
196
|
+
n && n(a);
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
}
|
|
@@ -204,58 +204,58 @@ function Se(e, t, n) {
|
|
|
204
204
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
205
205
|
option: `?filter=${e.tenant}`
|
|
206
206
|
// facultatif
|
|
207
|
-
},
|
|
208
|
-
f(
|
|
207
|
+
}, a = `${s.base}${s.uri}${s.option}`;
|
|
208
|
+
f(a, {
|
|
209
209
|
method: "GET",
|
|
210
210
|
headers: {
|
|
211
211
|
"Content-Type": "application/json",
|
|
212
212
|
Accept: "application/json"
|
|
213
213
|
},
|
|
214
|
-
onComplete(r, o,
|
|
215
|
-
const c = JSON.parse(r), d = c.data.map((
|
|
216
|
-
const
|
|
217
|
-
return { name:
|
|
214
|
+
onComplete(r, o, i) {
|
|
215
|
+
const c = JSON.parse(r), d = c.data.map((p) => {
|
|
216
|
+
const l = p.attributes.name, u = p.id;
|
|
217
|
+
return { name: l, id: u };
|
|
218
218
|
});
|
|
219
219
|
t && t(d, c);
|
|
220
220
|
},
|
|
221
221
|
onFailure(r, o) {
|
|
222
|
-
const
|
|
223
|
-
|
|
222
|
+
const i = r;
|
|
223
|
+
i.msg = o.errormsg, i.errCode = o.errorcode, n && n(i);
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
function _e(e, t = void 0, n = void 0) {
|
|
228
228
|
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
229
229
|
f(s, {
|
|
230
|
-
onComplete(
|
|
231
|
-
const
|
|
232
|
-
console.log("_AppMngt_get_users => ",
|
|
230
|
+
onComplete(a, r, o) {
|
|
231
|
+
const i = JSON.parse(a);
|
|
232
|
+
console.log("_AppMngt_get_users => ", i), t && t(i);
|
|
233
233
|
},
|
|
234
|
-
onFailure(
|
|
235
|
-
const o =
|
|
234
|
+
onFailure(a, r) {
|
|
235
|
+
const o = a;
|
|
236
236
|
o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
|
|
237
237
|
}
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
240
|
function ye(e, t, n = void 0, s = void 0) {
|
|
241
|
-
let
|
|
242
|
-
f(
|
|
243
|
-
onComplete(r, o,
|
|
241
|
+
let a = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
242
|
+
f(a, {
|
|
243
|
+
onComplete(r, o, i) {
|
|
244
244
|
const c = JSON.parse(r);
|
|
245
245
|
n && n(c);
|
|
246
246
|
},
|
|
247
247
|
onFailure(r, o) {
|
|
248
|
-
const
|
|
249
|
-
|
|
248
|
+
const i = r;
|
|
249
|
+
i.msg = o.errormsg, i.errCode = o.errorcode, s && s(i);
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const A = {
|
|
254
254
|
"Content-Type": "application/json",
|
|
255
255
|
Accept: "application/json,text/javascript,*/*"
|
|
256
256
|
};
|
|
257
257
|
function we(e, t, n = void 0, s = void 0) {
|
|
258
|
-
const { space:
|
|
258
|
+
const { space: a, currentUser: r } = e, i = `${a}${{
|
|
259
259
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
260
260
|
}.URIUGr}`, c = {
|
|
261
261
|
groups: [
|
|
@@ -269,22 +269,22 @@ function we(e, t, n = void 0, s = void 0) {
|
|
|
269
269
|
}
|
|
270
270
|
]
|
|
271
271
|
};
|
|
272
|
-
f(
|
|
272
|
+
f(i, {
|
|
273
273
|
method: "POST",
|
|
274
|
-
headers:
|
|
274
|
+
headers: A,
|
|
275
275
|
data: JSON.stringify(c),
|
|
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
286
|
function Ce(e, t, n = void 0, s = void 0) {
|
|
287
|
-
const { space:
|
|
287
|
+
const { space: a, tenant: r } = e, o = a, i = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${i}${c}`;
|
|
288
288
|
f(d, {
|
|
289
289
|
opts: {
|
|
290
290
|
method: "GET",
|
|
@@ -303,33 +303,33 @@ function Ce(e, t, n = void 0, s = void 0) {
|
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
305
|
function G(e, t = void 0, n = void 0) {
|
|
306
|
-
const { space: s, tenant:
|
|
306
|
+
const { space: s, tenant: a } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", i = `?tenant=dstenant:${a}`, c = {
|
|
307
307
|
method: "GET",
|
|
308
308
|
Accept: "application/json,*/*,test/javascript"
|
|
309
|
-
}, d = `${r}${o}${
|
|
309
|
+
}, d = `${r}${o}${i}`;
|
|
310
310
|
f(d, {
|
|
311
311
|
OPTsH: c,
|
|
312
|
-
onComplete(
|
|
313
|
-
t && t(JSON.parse(
|
|
312
|
+
onComplete(p) {
|
|
313
|
+
t && t(JSON.parse(p));
|
|
314
314
|
},
|
|
315
|
-
onFailure(
|
|
316
|
-
const u =
|
|
317
|
-
u.msg =
|
|
315
|
+
onFailure(p, l) {
|
|
316
|
+
const u = p;
|
|
317
|
+
u.msg = l.errormsg, u.errCode = l.errorcode, n && n(u);
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
function Te(e, t = void 0, n = void 0) {
|
|
322
|
-
const { space: s, currentUser:
|
|
322
|
+
const { space: s, currentUser: a } = e, i = `${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
|
-
f(
|
|
327
|
+
f(i, {
|
|
328
328
|
opts: d,
|
|
329
|
-
onComplete(
|
|
330
|
-
const
|
|
331
|
-
if (
|
|
332
|
-
const g = m.filter((_) => _.owner ===
|
|
329
|
+
onComplete(p) {
|
|
330
|
+
const l = JSON.parse(p), u = {}, m = l.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
331
|
+
if (a && Object.keys(a).length > 0) {
|
|
332
|
+
const g = m.filter((_) => _.owner === a.email), h = m.filter((_) => _.members.includes(a.email)), S = g.concat(h);
|
|
333
333
|
u.iam = S, u.UG = m, u.iamMember = h, G(
|
|
334
334
|
e,
|
|
335
335
|
(_) => {
|
|
@@ -341,22 +341,22 @@ function Te(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
352
|
function Oe(e, t) {
|
|
353
|
-
const { space: n } = e,
|
|
354
|
-
f(
|
|
353
|
+
const { space: n } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
354
|
+
f(a, {
|
|
355
355
|
method: "DELETE"
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
function be(e, t, n, s = void 0,
|
|
359
|
-
const { space: r, tenant: o } = e,
|
|
358
|
+
function be(e, t, n, s = void 0, a = void 0) {
|
|
359
|
+
const { space: r, tenant: o } = e, i = {
|
|
360
360
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
361
361
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
362
362
|
nextURICh: "/characteristics",
|
|
@@ -364,37 +364,37 @@ function be(e, t, n, s = void 0, i = void 0) {
|
|
|
364
364
|
nexURImem: "/members",
|
|
365
365
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
366
366
|
OPTsTenant: `tenant=dstenant:${o}`
|
|
367
|
-
}, c = n, d = `${r}${
|
|
367
|
+
}, c = n, d = `${r}${i.URIUGr}/${t}`, p = JSON.stringify(c);
|
|
368
368
|
f(d, {
|
|
369
|
-
headers:
|
|
369
|
+
headers: A,
|
|
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
|
+
a && a(l);
|
|
378
378
|
}
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function Ne(e, t, n, s = void 0,
|
|
382
|
-
const { space: r } = e,
|
|
383
|
-
f(
|
|
381
|
+
function Ne(e, t, n, s = void 0, a = void 0) {
|
|
382
|
+
const { space: r } = e, i = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
383
|
+
f(i, {
|
|
384
384
|
method: "PATCH",
|
|
385
|
-
headers:
|
|
385
|
+
headers: A,
|
|
386
386
|
data: JSON.stringify(n),
|
|
387
387
|
type: "json",
|
|
388
388
|
onComplete(d) {
|
|
389
389
|
s && s(d);
|
|
390
390
|
},
|
|
391
391
|
onFailure(d) {
|
|
392
|
-
|
|
392
|
+
a && a(d);
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
function ve(e, t, n = void 0, s = void 0) {
|
|
397
|
-
const { space:
|
|
397
|
+
const { space: a } = e, o = `${a}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
398
398
|
f(o, {
|
|
399
399
|
opts: {
|
|
400
400
|
method: "GET",
|
|
@@ -415,24 +415,24 @@ async function K(e, t, n) {
|
|
|
415
415
|
if (e.space) {
|
|
416
416
|
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
417
417
|
f(s, {
|
|
418
|
-
onComplete(
|
|
419
|
-
|
|
418
|
+
onComplete(a) {
|
|
419
|
+
a = JSON.parse(a), t && t(a.csrf);
|
|
420
420
|
},
|
|
421
|
-
onFailure(
|
|
422
|
-
n && n({ error:
|
|
421
|
+
onFailure(a, r, o) {
|
|
422
|
+
n && n({ error: a, headers: r, xhr: o });
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
async function V(e, t = void 0, n = void 0, s = void 0) {
|
|
428
|
-
const
|
|
428
|
+
const a = e.space;
|
|
429
429
|
if (t === void 0) {
|
|
430
430
|
console.log("Le paramètre docid est obligatoire");
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
|
-
const r =
|
|
433
|
+
const r = a + `/resources/v1/modeler/documents/${t}`;
|
|
434
434
|
f(r, {
|
|
435
|
-
onComplete(o,
|
|
435
|
+
onComplete(o, i, c) {
|
|
436
436
|
const d = JSON.parse(o);
|
|
437
437
|
n && n(d);
|
|
438
438
|
},
|
|
@@ -441,16 +441,16 @@ async function V(e, t = void 0, n = void 0, s = void 0) {
|
|
|
441
441
|
}
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function $(e, t = void 0, n = void 0) {
|
|
445
445
|
if (e.objID && e.objID !== "") {
|
|
446
446
|
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
447
447
|
f(s, {
|
|
448
|
-
onComplete(
|
|
449
|
-
const
|
|
450
|
-
e.token =
|
|
448
|
+
onComplete(a, r, o) {
|
|
449
|
+
const i = JSON.parse(a);
|
|
450
|
+
e.token = i?.csrf?.value, e.datas = i?.data[0], t && t(e);
|
|
451
451
|
},
|
|
452
|
-
onFailure(
|
|
453
|
-
n && n(
|
|
452
|
+
onFailure(a) {
|
|
453
|
+
n && n(a);
|
|
454
454
|
}
|
|
455
455
|
});
|
|
456
456
|
} else
|
|
@@ -468,13 +468,13 @@ function T(e, t = void 0, n = void 0) {
|
|
|
468
468
|
if (e.space) {
|
|
469
469
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
470
470
|
f(s, {
|
|
471
|
-
onComplete(
|
|
472
|
-
const
|
|
473
|
-
t && t(
|
|
471
|
+
onComplete(a, r, o) {
|
|
472
|
+
const i = JSON.parse(a);
|
|
473
|
+
t && t(i.csrf.value);
|
|
474
474
|
},
|
|
475
|
-
onFailure(
|
|
475
|
+
onFailure(a, r, o) {
|
|
476
476
|
n && n({
|
|
477
|
-
response:
|
|
477
|
+
response: a,
|
|
478
478
|
headers: r,
|
|
479
479
|
xhr: o
|
|
480
480
|
});
|
|
@@ -483,31 +483,31 @@ function T(e, t = void 0, n = void 0) {
|
|
|
483
483
|
} else
|
|
484
484
|
n && n("ERROR : url du 3DSpace non défini.");
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function k(e, t = void 0, n = void 0) {
|
|
487
487
|
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
488
|
-
|
|
488
|
+
$(
|
|
489
489
|
e,
|
|
490
|
-
(
|
|
490
|
+
(a) => {
|
|
491
491
|
f(s, {
|
|
492
492
|
method: "PUT",
|
|
493
493
|
headers: {
|
|
494
494
|
ENO_CSRF_TOKEN: e.token
|
|
495
495
|
},
|
|
496
496
|
onComplete(r) {
|
|
497
|
-
const
|
|
498
|
-
t && t(
|
|
497
|
+
const i = JSON.parse(r).data[0].dataelements.ticketURL;
|
|
498
|
+
t && t(i);
|
|
499
499
|
},
|
|
500
500
|
onFailure(r, o) {
|
|
501
501
|
console.warn("☠️ error => ", r, o), n && n(r, o);
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
},
|
|
505
|
-
(
|
|
506
|
-
console.warn("_3DSpace_get_ticket / error => ",
|
|
505
|
+
(a) => {
|
|
506
|
+
console.warn("_3DSpace_get_ticket / error => ", a), n && n(a);
|
|
507
507
|
}
|
|
508
508
|
);
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function $e(e, t, n, s = void 0, a = void 0) {
|
|
511
511
|
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
512
512
|
n || (n = e.token), f(r, {
|
|
513
513
|
method: "PUT",
|
|
@@ -515,48 +515,48 @@ function ke(e, t, n, s = void 0, i = void 0) {
|
|
|
515
515
|
ENO_CSRF_TOKEN: n
|
|
516
516
|
},
|
|
517
517
|
onComplete(o) {
|
|
518
|
-
let
|
|
519
|
-
if (console.log("☠️ info => ",
|
|
518
|
+
let i = JSON.parse(o);
|
|
519
|
+
if (console.log("☠️ info => ", i), i.success === !0)
|
|
520
520
|
try {
|
|
521
|
-
const c =
|
|
521
|
+
const c = i.data[0].dataelements.ticketURL;
|
|
522
522
|
s && s(c);
|
|
523
523
|
} catch (c) {
|
|
524
|
-
|
|
524
|
+
a && a(c);
|
|
525
525
|
}
|
|
526
526
|
},
|
|
527
527
|
onFailure(o) {
|
|
528
|
-
|
|
528
|
+
a && a(o);
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
-
function X(e, t, n, s,
|
|
533
|
-
|
|
532
|
+
function X(e, t, n, s, a, r = void 0, o = void 0) {
|
|
533
|
+
$(
|
|
534
534
|
e,
|
|
535
535
|
t,
|
|
536
|
-
(
|
|
536
|
+
(i) => {
|
|
537
537
|
W(
|
|
538
538
|
e,
|
|
539
539
|
t,
|
|
540
540
|
n,
|
|
541
541
|
s,
|
|
542
|
-
|
|
543
|
-
|
|
542
|
+
a,
|
|
543
|
+
i.csrf.value,
|
|
544
544
|
r,
|
|
545
545
|
o
|
|
546
546
|
);
|
|
547
547
|
}
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
|
-
function W(e, t, n, s,
|
|
550
|
+
function W(e, t, n, s, a, r, o = void 0, i = void 0) {
|
|
551
551
|
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
552
552
|
f(c, {
|
|
553
553
|
method: "PUT",
|
|
554
554
|
headers: {
|
|
555
555
|
ENO_CSRF_TOKEN: r
|
|
556
556
|
},
|
|
557
|
-
onComplete(d,
|
|
557
|
+
onComplete(d, p, l) {
|
|
558
558
|
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
559
|
-
m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s,
|
|
559
|
+
m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, a);
|
|
560
560
|
const g = {};
|
|
561
561
|
g.method = "POST", g.data = m, g.onComplete = function(h) {
|
|
562
562
|
let S = "temp_" + Date.now(), _ = {
|
|
@@ -571,7 +571,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
571
571
|
files: [{
|
|
572
572
|
id: n,
|
|
573
573
|
dataelements: {
|
|
574
|
-
title:
|
|
574
|
+
title: a,
|
|
575
575
|
receipt: h
|
|
576
576
|
},
|
|
577
577
|
updateAction: "REVISE"
|
|
@@ -585,7 +585,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
585
585
|
o && o(y);
|
|
586
586
|
},
|
|
587
587
|
onFailure(y) {
|
|
588
|
-
|
|
588
|
+
i && i(y);
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
591
|
f(
|
|
@@ -593,15 +593,15 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
|
|
|
593
593
|
_
|
|
594
594
|
);
|
|
595
595
|
}, g.onFailure = function(h) {
|
|
596
|
-
|
|
596
|
+
i && i(h);
|
|
597
597
|
}, g.timeout = 0, f(u.ticketURL, g);
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
|
-
async function
|
|
602
|
-
const o = e.space,
|
|
601
|
+
async function Ie(e, t, n, s, a = void 0, r = void 0) {
|
|
602
|
+
const o = e.space, i = e.token, c = e.ctx, d = new FormData(), p = new Blob([JSON.stringify(t)], {
|
|
603
603
|
type: "text/plain"
|
|
604
|
-
}),
|
|
604
|
+
}), l = {
|
|
605
605
|
url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
606
606
|
url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
|
|
607
607
|
};
|
|
@@ -609,23 +609,23 @@ async function Ae(e, t, n, s, i = void 0, r = void 0) {
|
|
|
609
609
|
console.log("le store._3DSpace est vide");
|
|
610
610
|
return;
|
|
611
611
|
}
|
|
612
|
-
f(
|
|
612
|
+
f(l.url_Ticket, {
|
|
613
613
|
method: "PUT",
|
|
614
614
|
headers: {
|
|
615
|
-
ENO_CSRF_TOKEN:
|
|
615
|
+
ENO_CSRF_TOKEN: i.value
|
|
616
616
|
},
|
|
617
617
|
onComplete(u, m, g) {
|
|
618
618
|
const h = JSON.parse(u).data[0].dataelements;
|
|
619
|
-
d.append("__fcs__jobTicket", h.ticket), d.append("filename",
|
|
619
|
+
d.append("__fcs__jobTicket", h.ticket), d.append("filename", p, n);
|
|
620
620
|
const S = {
|
|
621
621
|
method: "POST",
|
|
622
622
|
data: d,
|
|
623
623
|
onComplete(C) {
|
|
624
|
-
if (c !== "" &&
|
|
625
|
-
const
|
|
624
|
+
if (c !== "" && i !== "") {
|
|
625
|
+
const I = {
|
|
626
626
|
method: "POST",
|
|
627
627
|
headers: {
|
|
628
|
-
ENO_CSRF_TOKEN:
|
|
628
|
+
ENO_CSRF_TOKEN: i,
|
|
629
629
|
Accept: "application/json",
|
|
630
630
|
"Content-Type": "application/json"
|
|
631
631
|
},
|
|
@@ -645,7 +645,7 @@ async function Ae(e, t, n, s, i = void 0, r = void 0) {
|
|
|
645
645
|
}
|
|
646
646
|
}]
|
|
647
647
|
},
|
|
648
|
-
tempId:
|
|
648
|
+
tempId: D()
|
|
649
649
|
}]
|
|
650
650
|
}),
|
|
651
651
|
type: "json",
|
|
@@ -653,34 +653,34 @@ async function Ae(e, t, n, s, i = void 0, r = void 0) {
|
|
|
653
653
|
onComplete: _,
|
|
654
654
|
onFailure: y
|
|
655
655
|
};
|
|
656
|
-
c !== "" && f(
|
|
656
|
+
c !== "" && f(l.url_Post, I);
|
|
657
657
|
} else
|
|
658
658
|
console.warn("le store est vide");
|
|
659
659
|
},
|
|
660
660
|
onFailure: y
|
|
661
661
|
};
|
|
662
662
|
function _(C) {
|
|
663
|
-
console.log("Success -- response ", C.data[0]),
|
|
663
|
+
console.log("Success -- response ", C.data[0]), a && a(C);
|
|
664
664
|
}
|
|
665
|
-
function y(C,
|
|
665
|
+
function y(C, I) {
|
|
666
666
|
console.log("Erreur -- response ", C, `
|
|
667
|
-
headers `,
|
|
667
|
+
headers `, I), r && r(C);
|
|
668
668
|
}
|
|
669
669
|
f(h.ticketURL, S);
|
|
670
670
|
}
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function b(e, t = void 0, n = void 0, s = void 0,
|
|
674
|
-
const
|
|
675
|
-
f(
|
|
673
|
+
function b(e, t = void 0, n = void 0, s = void 0, a = void 0, r = void 0, o = !1) {
|
|
674
|
+
const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
675
|
+
f(i, {
|
|
676
676
|
method: "GET",
|
|
677
677
|
onComplete(c) {
|
|
678
678
|
const d = JSON.parse(c);
|
|
679
|
-
let
|
|
679
|
+
let p = "", l, u, m;
|
|
680
680
|
if (t) {
|
|
681
681
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
682
682
|
if (g) {
|
|
683
|
-
|
|
683
|
+
l = t;
|
|
684
684
|
let h = g.couples;
|
|
685
685
|
h = h.filter(
|
|
686
686
|
(S, _, y) => _ === y.findIndex(
|
|
@@ -709,7 +709,7 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
709
709
|
}));
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
|
|
712
|
+
l && u && m ? (p = m + "." + u + "." + l, a(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, a(p)) : r && (p = m + "." + u + "." + l, r(p));
|
|
713
713
|
},
|
|
714
714
|
onFailure(c, d) {
|
|
715
715
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
@@ -719,7 +719,7 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
719
719
|
}
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
-
async function
|
|
722
|
+
async function P(e, t = void 0, n = void 0) {
|
|
723
723
|
return (!e.objID || e.objID === "") && console.warn(
|
|
724
724
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
725
725
|
), (e.space === "" || !e.space) && console.warn(
|
|
@@ -734,8 +734,8 @@ async function R(e, t = void 0, n = void 0) {
|
|
|
734
734
|
}
|
|
735
735
|
), console.warn(
|
|
736
736
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
737
|
-
)), new Promise((s,
|
|
738
|
-
|
|
737
|
+
)), new Promise((s, a) => {
|
|
738
|
+
k(
|
|
739
739
|
e,
|
|
740
740
|
(r) => {
|
|
741
741
|
f(r, {
|
|
@@ -743,22 +743,22 @@ async function R(e, t = void 0, n = void 0) {
|
|
|
743
743
|
"Content-Type": "application/json",
|
|
744
744
|
Accept: "application/json"
|
|
745
745
|
},
|
|
746
|
-
onComplete(
|
|
746
|
+
onComplete(i) {
|
|
747
747
|
let c;
|
|
748
748
|
try {
|
|
749
|
-
c = JSON.parse(
|
|
749
|
+
c = JSON.parse(i);
|
|
750
750
|
} catch {
|
|
751
|
-
c =
|
|
751
|
+
c = i;
|
|
752
752
|
}
|
|
753
753
|
t && typeof t == "function" && t(c), s(c);
|
|
754
754
|
},
|
|
755
|
-
onFailure(
|
|
756
|
-
n && (console.log("error http",
|
|
757
|
-
msg: JSON.parse(
|
|
755
|
+
onFailure(i, c, d) {
|
|
756
|
+
n && (console.log("error http", i), n({
|
|
757
|
+
msg: JSON.parse(i),
|
|
758
758
|
headers: c,
|
|
759
759
|
xhr: d
|
|
760
|
-
}),
|
|
761
|
-
msg: JSON.parse(
|
|
760
|
+
}), a({
|
|
761
|
+
msg: JSON.parse(i),
|
|
762
762
|
headers: c,
|
|
763
763
|
xhr: d
|
|
764
764
|
}));
|
|
@@ -766,24 +766,24 @@ async function R(e, t = void 0, n = void 0) {
|
|
|
766
766
|
});
|
|
767
767
|
},
|
|
768
768
|
(r) => {
|
|
769
|
-
n && n(r), console.log("*_3dspace_download_doc / error file URL *", r),
|
|
769
|
+
n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), a(r);
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
772
|
});
|
|
773
773
|
}
|
|
774
774
|
async function B(e, t, n = void 0, s = void 0) {
|
|
775
|
-
let
|
|
775
|
+
let a = [];
|
|
776
776
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
777
|
-
for (let
|
|
778
|
-
const c = t.slice(
|
|
779
|
-
|
|
777
|
+
for (let i = 0; i < t.length; i += 80) {
|
|
778
|
+
const c = t.slice(i, i + 80);
|
|
779
|
+
a.push(c);
|
|
780
780
|
}
|
|
781
|
-
const o = (
|
|
781
|
+
const o = (i) => {
|
|
782
782
|
Y(
|
|
783
783
|
e,
|
|
784
|
-
i
|
|
784
|
+
a[i],
|
|
785
785
|
() => {
|
|
786
|
-
|
|
786
|
+
i++, i < a.length && o(i);
|
|
787
787
|
},
|
|
788
788
|
(c) => {
|
|
789
789
|
n && n(c);
|
|
@@ -794,7 +794,7 @@ async function B(e, t, n = void 0, s = void 0) {
|
|
|
794
794
|
} else
|
|
795
795
|
console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), s && s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
|
|
796
796
|
}
|
|
797
|
-
function Y(e, t, n = void 0, s = void 0,
|
|
797
|
+
function Y(e, t, n = void 0, s = void 0, a = void 0) {
|
|
798
798
|
const r = [];
|
|
799
799
|
t.forEach((c) => {
|
|
800
800
|
r.push({
|
|
@@ -808,21 +808,21 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
808
808
|
},
|
|
809
809
|
data: r
|
|
810
810
|
});
|
|
811
|
-
const
|
|
812
|
-
f(
|
|
811
|
+
const i = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
812
|
+
f(i, {
|
|
813
813
|
method: "PUT",
|
|
814
814
|
data: o,
|
|
815
815
|
type: "json",
|
|
816
816
|
onComplete(c) {
|
|
817
817
|
const d = c.data;
|
|
818
|
-
c.success === !0 && (n && n(), d.forEach((
|
|
818
|
+
c.success === !0 && (n && n(), d.forEach((p) => {
|
|
819
819
|
try {
|
|
820
|
-
const
|
|
820
|
+
const l = p.dataelements.fileName, u = p.dataelements.ticketURL;
|
|
821
821
|
f(u, {
|
|
822
822
|
onComplete: (m) => {
|
|
823
823
|
s && s({
|
|
824
|
-
objectId:
|
|
825
|
-
fileName:
|
|
824
|
+
objectId: p.id,
|
|
825
|
+
fileName: l,
|
|
826
826
|
data: JSON.parse(m)
|
|
827
827
|
});
|
|
828
828
|
},
|
|
@@ -830,18 +830,18 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
830
830
|
console.log("error http", m);
|
|
831
831
|
}
|
|
832
832
|
});
|
|
833
|
-
} catch (
|
|
834
|
-
console.log(
|
|
833
|
+
} catch (l) {
|
|
834
|
+
console.log(l), a && a(l);
|
|
835
835
|
}
|
|
836
836
|
}));
|
|
837
837
|
},
|
|
838
838
|
onFailure(c) {
|
|
839
|
-
console.log(c),
|
|
839
|
+
console.log(c), a && a(c);
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
return new Promise((
|
|
843
|
+
function Ae(e, t, n = void 0, s = void 0) {
|
|
844
|
+
return new Promise((a) => {
|
|
845
845
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
846
846
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
847
847
|
b(
|
|
@@ -849,9 +849,9 @@ function Fe(e, t, n = void 0, s = void 0) {
|
|
|
849
849
|
"ESPACE COMMUN",
|
|
850
850
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
851
851
|
void 0,
|
|
852
|
-
(
|
|
853
|
-
(
|
|
854
|
-
console.log("onError =>",
|
|
852
|
+
(i) => e.ctx = i,
|
|
853
|
+
(i) => {
|
|
854
|
+
console.log("onError =>", i);
|
|
855
855
|
}
|
|
856
856
|
);
|
|
857
857
|
let o = {
|
|
@@ -868,18 +868,18 @@ function Fe(e, t, n = void 0, s = void 0) {
|
|
|
868
868
|
}]
|
|
869
869
|
}),
|
|
870
870
|
type: "json",
|
|
871
|
-
onComplete(
|
|
872
|
-
n && n(
|
|
871
|
+
onComplete(i) {
|
|
872
|
+
n && n(i);
|
|
873
873
|
},
|
|
874
|
-
onFailure(
|
|
875
|
-
s && s(
|
|
874
|
+
onFailure(i) {
|
|
875
|
+
s && s(i);
|
|
876
876
|
}
|
|
877
877
|
};
|
|
878
878
|
f(r, o);
|
|
879
879
|
}
|
|
880
880
|
});
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function ke(e, t, n, s = void 0, a = void 0) {
|
|
883
883
|
return new Promise((r) => {
|
|
884
884
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
885
885
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
@@ -893,7 +893,7 @@ function $e(e, t, n, s = void 0, i = void 0) {
|
|
|
893
893
|
console.log("onError =>", c);
|
|
894
894
|
}
|
|
895
895
|
);
|
|
896
|
-
let
|
|
896
|
+
let i = {
|
|
897
897
|
method: "POST",
|
|
898
898
|
headers: {
|
|
899
899
|
SecurityContext: "ctx::" + e.ctx,
|
|
@@ -912,15 +912,15 @@ function $e(e, t, n, s = void 0, i = void 0) {
|
|
|
912
912
|
s && s(c);
|
|
913
913
|
},
|
|
914
914
|
onFailure(c) {
|
|
915
|
-
|
|
915
|
+
a && a(c);
|
|
916
916
|
}
|
|
917
917
|
};
|
|
918
|
-
f(o,
|
|
918
|
+
f(o, i);
|
|
919
919
|
}
|
|
920
920
|
});
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
return new Promise((
|
|
922
|
+
function Fe(e, t, n = void 0, s = void 0) {
|
|
923
|
+
return new Promise((a) => {
|
|
924
924
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
925
925
|
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
926
926
|
b(
|
|
@@ -928,9 +928,9 @@ function Ie(e, t, n = void 0, s = void 0) {
|
|
|
928
928
|
"ESPACE COMMUN",
|
|
929
929
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
930
930
|
void 0,
|
|
931
|
-
(
|
|
932
|
-
(
|
|
933
|
-
console.log("onError =>",
|
|
931
|
+
(i) => e.ctx = i,
|
|
932
|
+
(i) => {
|
|
933
|
+
console.log("onError =>", i);
|
|
934
934
|
}
|
|
935
935
|
);
|
|
936
936
|
let o = {
|
|
@@ -947,11 +947,11 @@ function Ie(e, t, n = void 0, s = void 0) {
|
|
|
947
947
|
}]
|
|
948
948
|
}),
|
|
949
949
|
type: "json",
|
|
950
|
-
onComplete(
|
|
951
|
-
n && n(
|
|
950
|
+
onComplete(i) {
|
|
951
|
+
n && n(i);
|
|
952
952
|
},
|
|
953
|
-
onFailure(
|
|
954
|
-
s && s(
|
|
953
|
+
onFailure(i) {
|
|
954
|
+
s && s(i);
|
|
955
955
|
}
|
|
956
956
|
};
|
|
957
957
|
f(r, o);
|
|
@@ -959,7 +959,7 @@ function Ie(e, t, n = void 0, s = void 0) {
|
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
961
|
function Ue(e, t, n = void 0, s = void 0) {
|
|
962
|
-
return new Promise((
|
|
962
|
+
return new Promise((a) => {
|
|
963
963
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
964
964
|
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
965
965
|
b(
|
|
@@ -967,9 +967,9 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
967
967
|
"ESPACE COMMUN",
|
|
968
968
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
969
969
|
void 0,
|
|
970
|
-
(
|
|
971
|
-
(
|
|
972
|
-
console.log("onError =>",
|
|
970
|
+
(i) => e.ctx = i,
|
|
971
|
+
(i) => {
|
|
972
|
+
console.log("onError =>", i);
|
|
973
973
|
}
|
|
974
974
|
);
|
|
975
975
|
let o = {
|
|
@@ -992,18 +992,18 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
992
992
|
}]
|
|
993
993
|
}),
|
|
994
994
|
type: "json",
|
|
995
|
-
onComplete(
|
|
996
|
-
n && n(
|
|
995
|
+
onComplete(i) {
|
|
996
|
+
n && n(i);
|
|
997
997
|
},
|
|
998
|
-
onFailure(
|
|
999
|
-
s && s(
|
|
998
|
+
onFailure(i) {
|
|
999
|
+
s && s(i);
|
|
1000
1000
|
}
|
|
1001
1001
|
};
|
|
1002
1002
|
f(r, o);
|
|
1003
1003
|
}
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function je(e, t, n, s = void 0, a = void 0) {
|
|
1007
1007
|
return new Promise((r) => {
|
|
1008
1008
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1009
1009
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
@@ -1017,7 +1017,7 @@ function De(e, t, n, s = void 0, i = void 0) {
|
|
|
1017
1017
|
console.log("onError =>", c);
|
|
1018
1018
|
}
|
|
1019
1019
|
);
|
|
1020
|
-
let
|
|
1020
|
+
let i = {
|
|
1021
1021
|
method: "POST",
|
|
1022
1022
|
headers: {
|
|
1023
1023
|
securitycontext: "ctx::" + e.ctx,
|
|
@@ -1041,14 +1041,14 @@ function De(e, t, n, s = void 0, i = void 0) {
|
|
|
1041
1041
|
s && s(c);
|
|
1042
1042
|
},
|
|
1043
1043
|
onFailure(c) {
|
|
1044
|
-
|
|
1044
|
+
a && a(c);
|
|
1045
1045
|
}
|
|
1046
1046
|
};
|
|
1047
|
-
f(o,
|
|
1047
|
+
f(o, i);
|
|
1048
1048
|
}
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function De(e, t, n, s, a = void 0, r = void 0) {
|
|
1052
1052
|
return console.log("credentials", e), new Promise((o) => {
|
|
1053
1053
|
`${e.space}`, JSON.stringify({
|
|
1054
1054
|
csrf: {
|
|
@@ -1070,33 +1070,33 @@ function je(e, t, n, s, i = void 0, r = void 0) {
|
|
|
1070
1070
|
});
|
|
1071
1071
|
}
|
|
1072
1072
|
//!SECTION
|
|
1073
|
-
function
|
|
1073
|
+
function Pe(e, t = void 0, n = void 0) {
|
|
1074
1074
|
const s = {
|
|
1075
1075
|
base: `${e.space}`,
|
|
1076
1076
|
uri: "/resources/bps/cspaces",
|
|
1077
1077
|
optTenant: `tenant=${e.tenant}`
|
|
1078
|
-
},
|
|
1079
|
-
f(
|
|
1078
|
+
}, a = `${s.base}${s.uri}?${s.optTenant}`;
|
|
1079
|
+
f(a, {
|
|
1080
1080
|
method: "GET",
|
|
1081
1081
|
headers: {
|
|
1082
1082
|
Accept: "application/json,text/javascript,*/*",
|
|
1083
1083
|
"Content-Type": "application/ds-json"
|
|
1084
1084
|
},
|
|
1085
1085
|
onComplete(r, o) {
|
|
1086
|
-
const
|
|
1087
|
-
t && t(
|
|
1086
|
+
const i = JSON.parse(r);
|
|
1087
|
+
t && t(i, o);
|
|
1088
1088
|
},
|
|
1089
|
-
onFailure(r, o,
|
|
1090
|
-
n && n({ response: r, headers: o, xhr:
|
|
1089
|
+
onFailure(r, o, i) {
|
|
1090
|
+
n && n({ response: r, headers: o, xhr: i });
|
|
1091
1091
|
}
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
|
|
1094
|
+
function Re(e, t, n, s) {
|
|
1095
|
+
k(
|
|
1096
1096
|
e.space,
|
|
1097
1097
|
t,
|
|
1098
|
-
(
|
|
1099
|
-
f(
|
|
1098
|
+
(a) => {
|
|
1099
|
+
f(a, {
|
|
1100
1100
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1101
1101
|
onComplete: (r) => {
|
|
1102
1102
|
n && n(r);
|
|
@@ -1109,44 +1109,44 @@ function Pe(e, t, n, s) {
|
|
|
1109
1109
|
);
|
|
1110
1110
|
}
|
|
1111
1111
|
async function xe(e, t, n = void 0, s = void 0) {
|
|
1112
|
-
return new Promise((
|
|
1113
|
-
|
|
1112
|
+
return new Promise((a) => {
|
|
1113
|
+
k(e, t, (r) => {
|
|
1114
1114
|
f(r, {
|
|
1115
|
-
onComplete: (o,
|
|
1116
|
-
onFailure: (o,
|
|
1117
|
-
s && s(o,
|
|
1115
|
+
onComplete: (o, i, c) => (a(JSON.parse(o)), n && n(JSON.parse(o), i, c), a),
|
|
1116
|
+
onFailure: (o, i, c) => {
|
|
1117
|
+
s && s(o, i, c), console.log(o, i?.errormsg);
|
|
1118
1118
|
}
|
|
1119
1119
|
});
|
|
1120
1120
|
});
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
1123
|
-
function Me(e, t, n, s = void 0,
|
|
1123
|
+
function Me(e, t, n, s = void 0, a = void 0) {
|
|
1124
1124
|
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1125
|
-
|
|
1125
|
+
$(
|
|
1126
1126
|
e,
|
|
1127
1127
|
n,
|
|
1128
1128
|
(o) => {
|
|
1129
|
-
const
|
|
1129
|
+
const i = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
|
|
1130
1130
|
X(
|
|
1131
1131
|
e,
|
|
1132
1132
|
n,
|
|
1133
|
-
|
|
1133
|
+
i,
|
|
1134
1134
|
r,
|
|
1135
1135
|
c,
|
|
1136
1136
|
(d) => {
|
|
1137
1137
|
s && s(d);
|
|
1138
1138
|
},
|
|
1139
1139
|
(d) => {
|
|
1140
|
-
|
|
1140
|
+
a && a(d);
|
|
1141
1141
|
}
|
|
1142
1142
|
);
|
|
1143
1143
|
}
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
let
|
|
1147
|
-
const
|
|
1146
|
+
let R, x;
|
|
1147
|
+
const F = [];
|
|
1148
1148
|
async function Le(e, t = void 0, n = void 0) {
|
|
1149
|
-
e.objID && e.objID !== "" ?
|
|
1149
|
+
e.objID && e.objID !== "" ? $(
|
|
1150
1150
|
e,
|
|
1151
1151
|
(s) => {
|
|
1152
1152
|
t && t(s);
|
|
@@ -1165,11 +1165,11 @@ async function Le(e, t = void 0, n = void 0) {
|
|
|
1165
1165
|
);
|
|
1166
1166
|
}
|
|
1167
1167
|
async function Je(e, t = void 0, n = void 0) {
|
|
1168
|
-
console.log("getDatasByTenant (getDocuments)", e), await
|
|
1168
|
+
console.log("getDatasByTenant (getDocuments)", e), await P(
|
|
1169
1169
|
e,
|
|
1170
1170
|
(s) => {
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1171
|
+
const a = {};
|
|
1172
|
+
a.obj = s, console.log("getDatasByTenant (getDocuments) _datas", a), t && t?.(a);
|
|
1173
1173
|
},
|
|
1174
1174
|
(s) => {
|
|
1175
1175
|
n && n?.(s);
|
|
@@ -1182,12 +1182,12 @@ function Ee(e, t = void 0, n = void 0) {
|
|
|
1182
1182
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1183
1183
|
return;
|
|
1184
1184
|
}
|
|
1185
|
-
e.objIds.forEach((
|
|
1186
|
-
|
|
1185
|
+
e.objIds.forEach((a, r) => {
|
|
1186
|
+
P(
|
|
1187
1187
|
e,
|
|
1188
|
-
|
|
1188
|
+
a.objID,
|
|
1189
1189
|
(o) => {
|
|
1190
|
-
s.push({ [
|
|
1190
|
+
s.push({ [a.name]: o }), a.name === "dbProjets" && (R = o.affaires.map((i) => i.objectID), q(e, x)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1191
1191
|
}
|
|
1192
1192
|
);
|
|
1193
1193
|
});
|
|
@@ -1195,13 +1195,13 @@ function Ee(e, t = void 0, n = void 0) {
|
|
|
1195
1195
|
function q(e, t, n = void 0, s = void 0) {
|
|
1196
1196
|
B(
|
|
1197
1197
|
e,
|
|
1198
|
-
|
|
1199
|
-
(
|
|
1198
|
+
R,
|
|
1199
|
+
(a) => {
|
|
1200
1200
|
const r = [...t];
|
|
1201
|
-
r.find((o) => o.objectID ===
|
|
1201
|
+
r.find((o) => o.objectID === a.objectId).data = a.data, x = r, F.push(a.data), n && n(F);
|
|
1202
1202
|
},
|
|
1203
|
-
(
|
|
1204
|
-
s && (s(
|
|
1203
|
+
(a) => {
|
|
1204
|
+
s && (s(a), console.log(a));
|
|
1205
1205
|
}
|
|
1206
1206
|
);
|
|
1207
1207
|
}
|
|
@@ -1226,11 +1226,11 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
|
|
|
1226
1226
|
tag: "testTag"
|
|
1227
1227
|
};
|
|
1228
1228
|
function Ge(e, t, n = void 0, s = void 0) {
|
|
1229
|
-
const { space:
|
|
1229
|
+
const { space: a, tenant: r } = e, { objId: o, pred: i, tag: c } = t, d = {
|
|
1230
1230
|
uri: "/resources/6w/tags",
|
|
1231
1231
|
otpCTX: "SecurityContext=preferred",
|
|
1232
1232
|
optTenant: `tenant=${r}`
|
|
1233
|
-
},
|
|
1233
|
+
}, p = `${a}${d.uri}?${d.otpCTX}&${d.optTenant}`, l = {
|
|
1234
1234
|
tag: [
|
|
1235
1235
|
{
|
|
1236
1236
|
subject: [
|
|
@@ -1238,20 +1238,20 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1238
1238
|
uri: `pid://${o}`
|
|
1239
1239
|
}
|
|
1240
1240
|
],
|
|
1241
|
-
predicate: M[
|
|
1241
|
+
predicate: M[i],
|
|
1242
1242
|
object: {
|
|
1243
1243
|
literal: c
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
1246
|
]
|
|
1247
1247
|
};
|
|
1248
|
-
f(
|
|
1248
|
+
f(p, {
|
|
1249
1249
|
method: "PUT",
|
|
1250
1250
|
headers: {
|
|
1251
1251
|
"Content-Type": "application/json",
|
|
1252
1252
|
Accept: "application/json"
|
|
1253
1253
|
},
|
|
1254
|
-
data: JSON.stringify(
|
|
1254
|
+
data: JSON.stringify(l),
|
|
1255
1255
|
onComplete(u) {
|
|
1256
1256
|
JSON.parse(u);
|
|
1257
1257
|
const m = {};
|
|
@@ -1287,13 +1287,13 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
function Z(e, t, n = void 0, s = void 0) {
|
|
1289
1289
|
console.log("obj ", t);
|
|
1290
|
-
const
|
|
1290
|
+
const a = t.info.name, r = {
|
|
1291
1291
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1292
1292
|
uri: "/federated/search"
|
|
1293
|
-
}, o = `${r.baseUrl}${r.uri}`,
|
|
1293
|
+
}, o = `${r.baseUrl}${r.uri}`, i = {
|
|
1294
1294
|
"Content-Type": "application/json",
|
|
1295
1295
|
Accept: "application/json,text/javascript,*/*"
|
|
1296
|
-
}, c =
|
|
1296
|
+
}, c = D(), d = {
|
|
1297
1297
|
with_indexing_date: !0,
|
|
1298
1298
|
with_synthesis: !0,
|
|
1299
1299
|
with_nls: !1,
|
|
@@ -1325,7 +1325,7 @@ function Z(e, t, n = void 0, s = void 0) {
|
|
|
1325
1325
|
],
|
|
1326
1326
|
with_synthesis_hierarchical: !0,
|
|
1327
1327
|
select_file: ["icon", "thumbnail_2d"],
|
|
1328
|
-
query:
|
|
1328
|
+
query: a,
|
|
1329
1329
|
specific_source_parameter: {
|
|
1330
1330
|
"3dspace": {
|
|
1331
1331
|
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)'
|
|
@@ -1356,29 +1356,29 @@ function Z(e, t, n = void 0, s = void 0) {
|
|
|
1356
1356
|
};
|
|
1357
1357
|
console.log("dataPattern => ", d), f(o, {
|
|
1358
1358
|
method: "POST",
|
|
1359
|
-
headers:
|
|
1359
|
+
headers: i,
|
|
1360
1360
|
data: JSON.stringify(d),
|
|
1361
|
-
onComplete(
|
|
1362
|
-
const
|
|
1363
|
-
n(
|
|
1361
|
+
onComplete(p) {
|
|
1362
|
+
const l = JSON.parse(p);
|
|
1363
|
+
n(l);
|
|
1364
1364
|
},
|
|
1365
|
-
onFailure(
|
|
1366
|
-
const u =
|
|
1367
|
-
u.msg =
|
|
1365
|
+
onFailure(p, l) {
|
|
1366
|
+
const u = p;
|
|
1367
|
+
u.msg = l.errormsg, u.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", p);
|
|
1368
1368
|
}
|
|
1369
1369
|
});
|
|
1370
1370
|
}
|
|
1371
1371
|
function Ke(e, t, n = void 0, s = void 0) {
|
|
1372
|
-
const { objId:
|
|
1372
|
+
const { objId: a, pred: r, tag: o } = t, i = {
|
|
1373
1373
|
uri: "/resources/6w/tags",
|
|
1374
1374
|
otpCTX: "SecurityContext=preferred",
|
|
1375
1375
|
optTenant: `tenant=${e.tenant}`
|
|
1376
|
-
}, c = `${e.space}${
|
|
1376
|
+
}, c = `${e.space}${i.uri}?${i.otpCTX}&${i.optTenant}`, d = {
|
|
1377
1377
|
tag: [
|
|
1378
1378
|
{
|
|
1379
1379
|
subject: [
|
|
1380
1380
|
{
|
|
1381
|
-
uri: `pid://${
|
|
1381
|
+
uri: `pid://${a}`
|
|
1382
1382
|
}
|
|
1383
1383
|
],
|
|
1384
1384
|
predicate: M[r],
|
|
@@ -1395,17 +1395,17 @@ function Ke(e, t, n = void 0, s = void 0) {
|
|
|
1395
1395
|
"Content-Type": "application/json",
|
|
1396
1396
|
Accept: "application/json,text/javascript,*/*"
|
|
1397
1397
|
},
|
|
1398
|
-
onComplete(
|
|
1399
|
-
n && n(
|
|
1398
|
+
onComplete(p) {
|
|
1399
|
+
n && n(p);
|
|
1400
1400
|
},
|
|
1401
|
-
onFailure(
|
|
1402
|
-
const u =
|
|
1403
|
-
u.msg =
|
|
1401
|
+
onFailure(p, l) {
|
|
1402
|
+
const u = p;
|
|
1403
|
+
u.msg = l.errormsg, u.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
|
|
1404
1404
|
}
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
1407
|
function Ve(e, t = "", n = void 0, s = void 0) {
|
|
1408
|
-
const { space:
|
|
1408
|
+
const { space: a } = e;
|
|
1409
1409
|
if (t === "")
|
|
1410
1410
|
return;
|
|
1411
1411
|
const r = {
|
|
@@ -1413,35 +1413,35 @@ function Ve(e, t = "", n = void 0, s = void 0) {
|
|
|
1413
1413
|
}, o = {
|
|
1414
1414
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1415
1415
|
Accept: "application/json,text/javascript,*/*"
|
|
1416
|
-
},
|
|
1417
|
-
f(
|
|
1416
|
+
}, i = `${a}${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}`;
|
|
1417
|
+
f(i, {
|
|
1418
1418
|
method: "POST",
|
|
1419
1419
|
headers: o,
|
|
1420
1420
|
data: c,
|
|
1421
1421
|
onComplete(d) {
|
|
1422
1422
|
n && n(JSON.parse(d));
|
|
1423
1423
|
},
|
|
1424
|
-
onFailure(d,
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1424
|
+
onFailure(d, p) {
|
|
1425
|
+
const l = d;
|
|
1426
|
+
l.msg = p.error, s && s(l);
|
|
1427
1427
|
}
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
1430
|
async function w(e, t = void 0, n = void 0) {
|
|
1431
1431
|
const s = e.space + "/api/index/tk";
|
|
1432
1432
|
return f(s, {
|
|
1433
|
-
onComplete(
|
|
1434
|
-
const
|
|
1433
|
+
onComplete(a, r, o) {
|
|
1434
|
+
const i = JSON.parse(a);
|
|
1435
1435
|
if (t)
|
|
1436
|
-
return t(
|
|
1436
|
+
return t(i), e.token = i?.result?.ServerToken;
|
|
1437
1437
|
},
|
|
1438
|
-
onFailure(
|
|
1439
|
-
n && n(
|
|
1438
|
+
onFailure(a) {
|
|
1439
|
+
n && n(a);
|
|
1440
1440
|
}
|
|
1441
1441
|
});
|
|
1442
1442
|
}
|
|
1443
1443
|
function Xe(e, t = void 0, n = void 0) {
|
|
1444
|
-
const s = `${e.space}/api/exalead/whatsnew`,
|
|
1444
|
+
const s = `${e.space}/api/exalead/whatsnew`, a = {
|
|
1445
1445
|
params: {
|
|
1446
1446
|
community_id: null,
|
|
1447
1447
|
hash_key: null,
|
|
@@ -1459,19 +1459,19 @@ function Xe(e, t = void 0, n = void 0) {
|
|
|
1459
1459
|
"Content-type": "application/json;charset=UTF-8",
|
|
1460
1460
|
Accept: "application/json"
|
|
1461
1461
|
},
|
|
1462
|
-
data: JSON.stringify(
|
|
1462
|
+
data: JSON.stringify(a),
|
|
1463
1463
|
type: "json",
|
|
1464
|
-
onComplete(o,
|
|
1465
|
-
t && t(o,
|
|
1464
|
+
onComplete(o, i) {
|
|
1465
|
+
t && t(o, i);
|
|
1466
1466
|
},
|
|
1467
|
-
onFailure(o,
|
|
1468
|
-
n && n(o,
|
|
1467
|
+
onFailure(o, i) {
|
|
1468
|
+
n && n(o, i);
|
|
1469
1469
|
}
|
|
1470
1470
|
});
|
|
1471
1471
|
});
|
|
1472
1472
|
}
|
|
1473
1473
|
function We(e, t = void 0, n = void 0) {
|
|
1474
|
-
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`,
|
|
1474
|
+
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, a = {
|
|
1475
1475
|
params: {
|
|
1476
1476
|
idsToFilterArr: [],
|
|
1477
1477
|
mode: "offline",
|
|
@@ -1488,14 +1488,14 @@ function We(e, t = void 0, n = void 0) {
|
|
|
1488
1488
|
"Content-type": "application/json;charset=UTF-8",
|
|
1489
1489
|
Accept: "application/json"
|
|
1490
1490
|
},
|
|
1491
|
-
data: JSON.stringify(
|
|
1491
|
+
data: JSON.stringify(a),
|
|
1492
1492
|
type: "json",
|
|
1493
|
-
onComplete(o,
|
|
1493
|
+
onComplete(o, i) {
|
|
1494
1494
|
const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1495
1495
|
t && t(c, o);
|
|
1496
1496
|
},
|
|
1497
|
-
onFailure(o,
|
|
1498
|
-
n && n(o,
|
|
1497
|
+
onFailure(o, i) {
|
|
1498
|
+
n && n(o, i);
|
|
1499
1499
|
}
|
|
1500
1500
|
});
|
|
1501
1501
|
});
|
|
@@ -1506,17 +1506,17 @@ function Be(e, t = void 0, n = void 0) {
|
|
|
1506
1506
|
uri: "/api/community/listmycommunities",
|
|
1507
1507
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1508
1508
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1509
|
-
},
|
|
1509
|
+
}, a = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
|
|
1510
1510
|
w(e, (o) => {
|
|
1511
|
-
f(
|
|
1511
|
+
f(a, {
|
|
1512
1512
|
method: "GET",
|
|
1513
1513
|
headers: {
|
|
1514
1514
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1515
1515
|
},
|
|
1516
|
-
onComplete(
|
|
1517
|
-
const
|
|
1516
|
+
onComplete(i, c, d) {
|
|
1517
|
+
const l = JSON.parse(i).result;
|
|
1518
1518
|
let u = 0;
|
|
1519
|
-
|
|
1519
|
+
l.forEach((m) => {
|
|
1520
1520
|
const g = {
|
|
1521
1521
|
description: m.description,
|
|
1522
1522
|
id: m.id,
|
|
@@ -1529,21 +1529,21 @@ function Be(e, t = void 0, n = void 0) {
|
|
|
1529
1529
|
e,
|
|
1530
1530
|
m.id,
|
|
1531
1531
|
(h) => {
|
|
1532
|
-
u++, g.members = h, r.push(g), u ===
|
|
1532
|
+
u++, g.members = h, r.push(g), u === l.length && t && t(r);
|
|
1533
1533
|
},
|
|
1534
1534
|
(h) => n(h)
|
|
1535
1535
|
);
|
|
1536
1536
|
});
|
|
1537
1537
|
},
|
|
1538
|
-
onFailure(
|
|
1539
|
-
const d =
|
|
1538
|
+
onFailure(i, c) {
|
|
1539
|
+
const d = i;
|
|
1540
1540
|
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1541
1541
|
}
|
|
1542
1542
|
});
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
1545
|
function ee(e, t, n, s) {
|
|
1546
|
-
const
|
|
1546
|
+
const a = `${e.space}/api/community/listmembers`, r = {
|
|
1547
1547
|
params: {
|
|
1548
1548
|
page: e.page ? e.page : 1,
|
|
1549
1549
|
limit: e.limit ? e.limit : 50,
|
|
@@ -1551,7 +1551,7 @@ function ee(e, t, n, s) {
|
|
|
1551
1551
|
}
|
|
1552
1552
|
};
|
|
1553
1553
|
w(e, (o) => {
|
|
1554
|
-
f(
|
|
1554
|
+
f(a, {
|
|
1555
1555
|
method: "POST",
|
|
1556
1556
|
headers: {
|
|
1557
1557
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1560,11 +1560,11 @@ function ee(e, t, n, s) {
|
|
|
1560
1560
|
},
|
|
1561
1561
|
data: JSON.stringify(r),
|
|
1562
1562
|
type: "json",
|
|
1563
|
-
onComplete(
|
|
1564
|
-
n && n(
|
|
1563
|
+
onComplete(i, c, d) {
|
|
1564
|
+
n && n(i);
|
|
1565
1565
|
},
|
|
1566
|
-
onFailure(
|
|
1567
|
-
const d =
|
|
1566
|
+
onFailure(i, c) {
|
|
1567
|
+
const d = i;
|
|
1568
1568
|
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1569
1569
|
}
|
|
1570
1570
|
});
|
|
@@ -1573,9 +1573,9 @@ function ee(e, t, n, s) {
|
|
|
1573
1573
|
function Ye(e, t = void 0, n = void 0) {
|
|
1574
1574
|
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1575
1575
|
e.commu_id || (e.commu_id = s);
|
|
1576
|
-
const
|
|
1576
|
+
const a = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1577
1577
|
w(e, (r) => {
|
|
1578
|
-
f(
|
|
1578
|
+
f(a, {
|
|
1579
1579
|
method: "GET",
|
|
1580
1580
|
headers: {
|
|
1581
1581
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1583,20 +1583,20 @@ function Ye(e, t = void 0, n = void 0) {
|
|
|
1583
1583
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1584
1584
|
},
|
|
1585
1585
|
onComplete(o) {
|
|
1586
|
-
const
|
|
1587
|
-
t && t(
|
|
1586
|
+
const i = JSON.parse(o);
|
|
1587
|
+
t && t(i);
|
|
1588
1588
|
},
|
|
1589
|
-
onFailure(o,
|
|
1589
|
+
onFailure(o, i) {
|
|
1590
1590
|
const c = o;
|
|
1591
|
-
c.status =
|
|
1591
|
+
c.status = i.status, c.response = i.errormsg, n && n(c);
|
|
1592
1592
|
}
|
|
1593
1593
|
});
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
1596
|
function qe(e, t, n = void 0, s = void 0) {
|
|
1597
|
-
const { listAllContacts:
|
|
1598
|
-
console.log("__listAllContacts",
|
|
1599
|
-
const o = `${e.space}/api/directmessages`,
|
|
1597
|
+
const { listAllContacts: a, currentUser: r } = e;
|
|
1598
|
+
console.log("__listAllContacts", a.hits);
|
|
1599
|
+
const o = `${e.space}/api/directmessages`, i = {
|
|
1600
1600
|
users: [r.login].concat(t.receipt)
|
|
1601
1601
|
}, c = {
|
|
1602
1602
|
id_msg: "",
|
|
@@ -1606,30 +1606,30 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1606
1606
|
};
|
|
1607
1607
|
let d = !1;
|
|
1608
1608
|
te(
|
|
1609
|
-
|
|
1610
|
-
(
|
|
1611
|
-
|
|
1609
|
+
i.users,
|
|
1610
|
+
(p) => {
|
|
1611
|
+
p !== void 0 && (c.id_msg = p.id, d = !0, U(e, c));
|
|
1612
1612
|
},
|
|
1613
|
-
(
|
|
1614
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback",
|
|
1613
|
+
(p) => {
|
|
1614
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), c.id_msg = "";
|
|
1615
1615
|
}
|
|
1616
1616
|
), d === !1 && setTimeout(() => {
|
|
1617
|
-
d === !1 && w(e, (
|
|
1617
|
+
d === !1 && w(e, (p) => {
|
|
1618
1618
|
f(o, {
|
|
1619
1619
|
method: "POST",
|
|
1620
1620
|
headers: {
|
|
1621
1621
|
"Content-Type": "application/json",
|
|
1622
1622
|
Accept: "application/json",
|
|
1623
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1623
|
+
"X-DS-SWYM-CSRFTOKEN": p.result.ServerToken
|
|
1624
1624
|
},
|
|
1625
|
-
data: JSON.stringify(
|
|
1625
|
+
data: JSON.stringify(i),
|
|
1626
1626
|
type: "json",
|
|
1627
|
-
onComplete(
|
|
1628
|
-
const g =
|
|
1627
|
+
onComplete(l, u, m) {
|
|
1628
|
+
const g = l;
|
|
1629
1629
|
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, U(e, c);
|
|
1630
1630
|
},
|
|
1631
|
-
onFailure(
|
|
1632
|
-
const g =
|
|
1631
|
+
onFailure(l, u, m) {
|
|
1632
|
+
const g = l;
|
|
1633
1633
|
g.msg = u.errormsg, g.status = u.status, s && s(g);
|
|
1634
1634
|
}
|
|
1635
1635
|
});
|
|
@@ -1637,41 +1637,41 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1637
1637
|
}, 500);
|
|
1638
1638
|
}
|
|
1639
1639
|
function te(e, t, n, s) {
|
|
1640
|
-
const
|
|
1640
|
+
const a = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1641
1641
|
w(e, (r) => {
|
|
1642
|
-
f(
|
|
1642
|
+
f(a, {
|
|
1643
1643
|
method: "GET",
|
|
1644
1644
|
headers: {
|
|
1645
1645
|
Accept: "application/json,text/javascript,*/*",
|
|
1646
1646
|
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1647
1647
|
},
|
|
1648
1648
|
onComplete(o) {
|
|
1649
|
-
const
|
|
1650
|
-
|
|
1651
|
-
|
|
1649
|
+
const i = JSON.parse(o), c = [];
|
|
1650
|
+
i.result.forEach((l) => {
|
|
1651
|
+
l.users = l.users.sort((u, m) => u.login.localeCompare(m.login)), l.users.length === t.length && c.push(l);
|
|
1652
1652
|
});
|
|
1653
|
-
const d = t.sort(),
|
|
1653
|
+
const d = t.sort(), p = c.find((l) => {
|
|
1654
1654
|
const u = [];
|
|
1655
|
-
return
|
|
1655
|
+
return l.users.forEach((m) => {
|
|
1656
1656
|
u.push(m.login);
|
|
1657
1657
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1658
1658
|
});
|
|
1659
|
-
n &&
|
|
1659
|
+
n && p !== void 0 ? n(p) : (s || p === void 0) && s(p);
|
|
1660
1660
|
},
|
|
1661
1661
|
onFailure(o) {
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1662
|
+
const i = o;
|
|
1663
|
+
i.msg = headers.errormsg, i.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", i), s && s(i);
|
|
1664
1664
|
}
|
|
1665
1665
|
});
|
|
1666
1666
|
});
|
|
1667
1667
|
}
|
|
1668
1668
|
function U(e, t, n = void 0, s = void 0) {
|
|
1669
|
-
const
|
|
1669
|
+
const a = {
|
|
1670
1670
|
base: e.space,
|
|
1671
1671
|
uri: "/api/community",
|
|
1672
1672
|
id_msg: `${t.id_msg}`,
|
|
1673
1673
|
endUri: "/instantmessages"
|
|
1674
|
-
}, r = `${
|
|
1674
|
+
}, r = `${a.base}${a.uri}/${a.id_msg}${a.endUri}`, o = {
|
|
1675
1675
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1676
1676
|
accessState: null,
|
|
1677
1677
|
commentUri: null,
|
|
@@ -1681,23 +1681,23 @@ function U(e, t, n = void 0, s = void 0) {
|
|
|
1681
1681
|
parentCommentUri: null,
|
|
1682
1682
|
richMessage: t.msg
|
|
1683
1683
|
};
|
|
1684
|
-
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (
|
|
1684
|
+
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (i) => {
|
|
1685
1685
|
f(r, {
|
|
1686
1686
|
method: "POST",
|
|
1687
1687
|
headers: {
|
|
1688
1688
|
"Content-Type": "application/json",
|
|
1689
1689
|
Accept: "application/json",
|
|
1690
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1690
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1691
1691
|
},
|
|
1692
1692
|
data: JSON.stringify(o),
|
|
1693
1693
|
type: "json",
|
|
1694
|
-
onComplete(c, d,
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1694
|
+
onComplete(c, d, p) {
|
|
1695
|
+
const l = c;
|
|
1696
|
+
l.status = p.status, l.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", l), n && n(l);
|
|
1697
1697
|
},
|
|
1698
1698
|
onFailure(c, d) {
|
|
1699
|
-
const
|
|
1700
|
-
|
|
1699
|
+
const p = c;
|
|
1700
|
+
p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
|
|
1701
1701
|
}
|
|
1702
1702
|
});
|
|
1703
1703
|
});
|
|
@@ -1720,17 +1720,17 @@ const se = {
|
|
|
1720
1720
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1721
1721
|
};
|
|
1722
1722
|
function He(e, t, n = void 0, s = void 0) {
|
|
1723
|
-
const
|
|
1723
|
+
const a = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1724
1724
|
(c) => c.id === t.community_id
|
|
1725
1725
|
), o = e.swymCommunities.find(
|
|
1726
1726
|
(c) => c.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1727
|
-
),
|
|
1727
|
+
), i = {
|
|
1728
1728
|
params: {
|
|
1729
1729
|
title: t.title,
|
|
1730
1730
|
// String, le nom de l'affaire
|
|
1731
1731
|
community_id: r?.id !== void 0 ? r.id : o.id,
|
|
1732
1732
|
// String, l'id de la communauté
|
|
1733
|
-
message:
|
|
1733
|
+
message: ie(t.text_html),
|
|
1734
1734
|
// STRING => le contenue du message doit être au format HTML
|
|
1735
1735
|
published: 1
|
|
1736
1736
|
// 1 publier, 0 non publier
|
|
@@ -1742,31 +1742,31 @@ function He(e, t, n = void 0, s = void 0) {
|
|
|
1742
1742
|
Accept: "application/json",
|
|
1743
1743
|
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1744
1744
|
};
|
|
1745
|
-
f(
|
|
1745
|
+
f(a, {
|
|
1746
1746
|
method: "POST",
|
|
1747
1747
|
headers: d,
|
|
1748
|
-
data: JSON.stringify(
|
|
1748
|
+
data: JSON.stringify(i),
|
|
1749
1749
|
type: "json",
|
|
1750
|
-
onComplete(
|
|
1751
|
-
const m = JSON.parse(
|
|
1750
|
+
onComplete(p, l, u) {
|
|
1751
|
+
const m = JSON.parse(p);
|
|
1752
1752
|
m.status = u.status, m.response = u.response, n && n(m);
|
|
1753
1753
|
},
|
|
1754
|
-
onFailure(
|
|
1755
|
-
const m =
|
|
1756
|
-
m.status =
|
|
1754
|
+
onFailure(p, l, u) {
|
|
1755
|
+
const m = p;
|
|
1756
|
+
m.status = l.status, m.response = l.errormsg, s && s(m);
|
|
1757
1757
|
}
|
|
1758
1758
|
});
|
|
1759
1759
|
});
|
|
1760
1760
|
}
|
|
1761
1761
|
function ze(e, t, n = void 0, s = void 0) {
|
|
1762
|
-
const
|
|
1762
|
+
const a = `${e.space}/api/idea/delete`, r = {
|
|
1763
1763
|
params: {
|
|
1764
1764
|
community_id: t.community_id,
|
|
1765
1765
|
ideationIds: [t.idee_id]
|
|
1766
1766
|
}
|
|
1767
1767
|
};
|
|
1768
1768
|
w(e, (o) => {
|
|
1769
|
-
f(
|
|
1769
|
+
f(a, {
|
|
1770
1770
|
method: "POST",
|
|
1771
1771
|
headers: {
|
|
1772
1772
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1775,31 +1775,31 @@ function ze(e, t, n = void 0, s = void 0) {
|
|
|
1775
1775
|
},
|
|
1776
1776
|
data: JSON.stringify(r),
|
|
1777
1777
|
type: "json",
|
|
1778
|
-
onComplete(
|
|
1779
|
-
n && n(
|
|
1778
|
+
onComplete(i, c, d) {
|
|
1779
|
+
n && n(i);
|
|
1780
1780
|
},
|
|
1781
|
-
onFailure(
|
|
1782
|
-
const
|
|
1783
|
-
|
|
1781
|
+
onFailure(i, c, d) {
|
|
1782
|
+
const p = i;
|
|
1783
|
+
p.status = c.status, p.response = c.errormsg, s && s(p);
|
|
1784
1784
|
}
|
|
1785
1785
|
});
|
|
1786
1786
|
});
|
|
1787
1787
|
}
|
|
1788
1788
|
function Qe(e, t = "", n = void 0, s = void 0) {
|
|
1789
|
-
const
|
|
1790
|
-
t === "" && (t =
|
|
1789
|
+
const a = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1790
|
+
t === "" && (t = a);
|
|
1791
1791
|
const r = `${e.space}/api/idea/get`, o = {
|
|
1792
1792
|
params: {
|
|
1793
1793
|
id: t
|
|
1794
1794
|
}
|
|
1795
1795
|
};
|
|
1796
|
-
w(e, (
|
|
1796
|
+
w(e, (i) => {
|
|
1797
1797
|
f(r, {
|
|
1798
1798
|
method: "POST",
|
|
1799
1799
|
headers: {
|
|
1800
1800
|
"Content-type": "application/json;charset=UTF-8",
|
|
1801
1801
|
Accept: "application/json",
|
|
1802
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1802
|
+
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1803
1803
|
},
|
|
1804
1804
|
data: JSON.stringify(o),
|
|
1805
1805
|
type: "json",
|
|
@@ -1815,29 +1815,29 @@ function Qe(e, t = "", n = void 0, s = void 0) {
|
|
|
1815
1815
|
});
|
|
1816
1816
|
}
|
|
1817
1817
|
function Ze(e, t = se, n = void 0, s = void 0) {
|
|
1818
|
-
const
|
|
1818
|
+
const a = {
|
|
1819
1819
|
uri: "/api/idea/list",
|
|
1820
1820
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1821
1821
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1822
|
-
}, r = `${e.space}${
|
|
1822
|
+
}, r = `${e.space}${a.uri}${a.comId}${a.limit}`;
|
|
1823
1823
|
w(e, (o) => {
|
|
1824
1824
|
f(r, {
|
|
1825
1825
|
method: "GET",
|
|
1826
1826
|
headers: {
|
|
1827
1827
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1828
1828
|
},
|
|
1829
|
-
onComplete(
|
|
1830
|
-
const c = JSON.parse(
|
|
1829
|
+
onComplete(i) {
|
|
1830
|
+
const c = JSON.parse(i);
|
|
1831
1831
|
n && n(c);
|
|
1832
1832
|
},
|
|
1833
|
-
onFailure(
|
|
1834
|
-
const d =
|
|
1833
|
+
onFailure(i, c) {
|
|
1834
|
+
const d = i;
|
|
1835
1835
|
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1836
1836
|
}
|
|
1837
1837
|
});
|
|
1838
1838
|
});
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function ie(e) {
|
|
1841
1841
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
1842
1842
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
1843
1843
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -1914,32 +1914,32 @@ function ae(e) {
|
|
|
1914
1914
|
}
|
|
1915
1915
|
function et(e, t = void 0, n = void 0) {
|
|
1916
1916
|
const s = e.space + "/api/user/getcurrent/";
|
|
1917
|
-
w(e, (
|
|
1917
|
+
w(e, (a) => {
|
|
1918
1918
|
f(s, {
|
|
1919
1919
|
method: "GET",
|
|
1920
1920
|
headers: {
|
|
1921
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1921
|
+
"X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
|
|
1922
1922
|
},
|
|
1923
|
-
onComplete(r, o,
|
|
1923
|
+
onComplete(r, o, i) {
|
|
1924
1924
|
const c = JSON.parse(r);
|
|
1925
1925
|
t && t(c.result);
|
|
1926
1926
|
},
|
|
1927
|
-
onFailure(r, o,
|
|
1928
|
-
const c = { erreur: JSON.parse(r), headers: o, xhr:
|
|
1927
|
+
onFailure(r, o, i) {
|
|
1928
|
+
const c = { erreur: JSON.parse(r), headers: o, xhr: i };
|
|
1929
1929
|
n && n(c);
|
|
1930
1930
|
}
|
|
1931
1931
|
});
|
|
1932
1932
|
});
|
|
1933
1933
|
}
|
|
1934
1934
|
function tt(e, t, n = void 0, s = void 0) {
|
|
1935
|
-
const
|
|
1935
|
+
const a = e.space + "/api/user/find/login/" + t;
|
|
1936
1936
|
w(
|
|
1937
1937
|
e,
|
|
1938
1938
|
(r) => {
|
|
1939
|
-
f(
|
|
1939
|
+
f(a, {
|
|
1940
1940
|
method: "GET",
|
|
1941
1941
|
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
1942
|
-
onComplete(o,
|
|
1942
|
+
onComplete(o, i, c) {
|
|
1943
1943
|
const d = JSON.parse(o);
|
|
1944
1944
|
n && n(d);
|
|
1945
1945
|
},
|
|
@@ -1952,50 +1952,73 @@ function tt(e, t, n = void 0, s = void 0) {
|
|
|
1952
1952
|
);
|
|
1953
1953
|
}
|
|
1954
1954
|
function nt(e, t = void 0, n = void 0) {
|
|
1955
|
-
e.tenant &&
|
|
1955
|
+
e.tenant && v(e, (s) => {
|
|
1956
1956
|
console.log("serviceUrls", s);
|
|
1957
|
-
const
|
|
1958
|
-
t && t(
|
|
1957
|
+
const a = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
1958
|
+
t && t(a);
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
1961
|
function st(e, t = void 0, n = void 0) {
|
|
1962
|
-
e.tenant &&
|
|
1962
|
+
e.tenant && v(e, (s) => {
|
|
1963
1963
|
console.log("serviceUrls", s);
|
|
1964
|
-
const
|
|
1964
|
+
const a = s.services.find((i) => i.id === "3dpassport")?.url, r = s.services.find((i) => i.id === "businessprocess")?.url + "/api/v2", o = `${a}/login/?service=${r}/auth/cas`;
|
|
1965
1965
|
f(o, {
|
|
1966
|
-
async onComplete(
|
|
1967
|
-
console.log("response",
|
|
1968
|
-
const c = typeof
|
|
1966
|
+
async onComplete(i) {
|
|
1967
|
+
console.log("response", i);
|
|
1968
|
+
const c = typeof i == "string" ? JSON.parse(i)?.x3ds_service_redirect_url : i?.x3ds_service_redirect_url;
|
|
1969
1969
|
await fetch(c, {
|
|
1970
1970
|
method: "POST"
|
|
1971
1971
|
}).then((d) => d.json()).then(async (d) => {
|
|
1972
1972
|
t && t(d?.token);
|
|
1973
1973
|
});
|
|
1974
1974
|
},
|
|
1975
|
-
onFailure(
|
|
1976
|
-
n && n(
|
|
1975
|
+
onFailure(i) {
|
|
1976
|
+
n && n(i);
|
|
1977
1977
|
}
|
|
1978
1978
|
});
|
|
1979
1979
|
});
|
|
1980
1980
|
}
|
|
1981
|
-
async function
|
|
1982
|
-
e.tenant &&
|
|
1983
|
-
|
|
1984
|
-
const o = `${i.services.find((a) => a.id === "businessprocess")?.url + "/api/v2"}/identity/users`;
|
|
1981
|
+
async function it(e, t, n = void 0, s = void 0) {
|
|
1982
|
+
e.tenant && v(e, (a) => {
|
|
1983
|
+
const o = `${a.services.find((i) => i.id === "businessprocess")?.url + "/api/v2"}/identity/users`;
|
|
1985
1984
|
fetch(`https://api.uixhome.fr/iterop/listusers?t=${t}&s=${o}`, {
|
|
1986
1985
|
method: "POST"
|
|
1987
|
-
}).then((
|
|
1988
|
-
n && n(
|
|
1989
|
-
}).catch((
|
|
1990
|
-
s && s(
|
|
1986
|
+
}).then((i) => i.json()).then((i) => {
|
|
1987
|
+
n && n(i);
|
|
1988
|
+
}).catch((i) => {
|
|
1989
|
+
s && s(i);
|
|
1990
|
+
});
|
|
1991
|
+
});
|
|
1992
|
+
}
|
|
1993
|
+
async function at(e, t, n = void 0, s = void 0) {
|
|
1994
|
+
e.tenant && v(e, (a) => {
|
|
1995
|
+
const o = `${a.services.find((i) => i.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`;
|
|
1996
|
+
fetch(`https://api.uixhome.fr/iterop/repository/data/tables?t=${t}&s=${o}`, {
|
|
1997
|
+
method: "GET"
|
|
1998
|
+
}).then((i) => i.json()).then((i) => {
|
|
1999
|
+
n && n(i);
|
|
2000
|
+
}).catch((i) => {
|
|
2001
|
+
s && s(i);
|
|
2002
|
+
});
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
2005
|
+
async function ot(e, t, n, s, a = void 0, r = void 0) {
|
|
2006
|
+
e.tenant && v(e, (o) => {
|
|
2007
|
+
const c = `${o.services.find((d) => d.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`;
|
|
2008
|
+
fetch(`https://api.uixhome.fr/iterop/runtime/processes/${n}?t=${t}&s=${c}&b=${s}`, {
|
|
2009
|
+
method: "POST"
|
|
2010
|
+
}).then((d) => d.json()).then((d) => {
|
|
2011
|
+
a && a(d);
|
|
2012
|
+
}).catch((d) => {
|
|
2013
|
+
r && r(d);
|
|
1991
2014
|
});
|
|
1992
2015
|
});
|
|
1993
2016
|
}
|
|
1994
|
-
function
|
|
2017
|
+
function rt(e) {
|
|
1995
2018
|
const t = "Hello " + e;
|
|
1996
2019
|
return console.log(t), t;
|
|
1997
2020
|
}
|
|
1998
|
-
function
|
|
2021
|
+
function ct(e, t = void 0, n = void 0) {
|
|
1999
2022
|
return console.log("credentials", e), new Promise((s) => {
|
|
2000
2023
|
if (e.token === "" && T(e), !e.space || e.space === "") {
|
|
2001
2024
|
const o = E();
|
|
@@ -2012,13 +2035,13 @@ function ot(e, t = void 0, n = void 0) {
|
|
|
2012
2035
|
},
|
|
2013
2036
|
!0
|
|
2014
2037
|
);
|
|
2015
|
-
const
|
|
2038
|
+
const a = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
2016
2039
|
f(r, {
|
|
2017
2040
|
onComplete(o) {
|
|
2018
2041
|
if (Array.isArray(JSON.parse(o))) {
|
|
2019
|
-
const
|
|
2020
|
-
console.log("serviceId=3dsearch",
|
|
2021
|
-
const c = `${
|
|
2042
|
+
const i = JSON.parse(o);
|
|
2043
|
+
console.log("serviceId=3dsearch", i);
|
|
2044
|
+
const c = `${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
|
|
2022
2045
|
f(c, {
|
|
2023
2046
|
method: "POST",
|
|
2024
2047
|
headers: {
|
|
@@ -2028,7 +2051,7 @@ function ot(e, t = void 0, n = void 0) {
|
|
|
2028
2051
|
data: JSON.stringify({
|
|
2029
2052
|
with_indexing_date: !0,
|
|
2030
2053
|
with_nls: !1,
|
|
2031
|
-
label: `3DSearch-${
|
|
2054
|
+
label: `3DSearch-${a}`,
|
|
2032
2055
|
locale: "en",
|
|
2033
2056
|
select_predicate: [
|
|
2034
2057
|
"ds6w:label",
|
|
@@ -2075,26 +2098,26 @@ function ot(e, t = void 0, n = void 0) {
|
|
|
2075
2098
|
});
|
|
2076
2099
|
}
|
|
2077
2100
|
export {
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2101
|
+
D as UUID,
|
|
2102
|
+
ct as _3DSearch_usersGroup,
|
|
2103
|
+
Ie as _3DSpace_Create_Doc,
|
|
2104
|
+
De as _3DSpace_bookmark_addSubsciptions,
|
|
2082
2105
|
T as _3DSpace_csrf,
|
|
2083
|
-
|
|
2106
|
+
P as _3DSpace_download_doc,
|
|
2084
2107
|
B as _3DSpace_download_multidoc,
|
|
2085
2108
|
X as _3DSpace_file_update,
|
|
2086
2109
|
W as _3DSpace_file_update_csr,
|
|
2087
|
-
|
|
2088
|
-
|
|
2110
|
+
$e as _3DSpace_file_url_csr,
|
|
2111
|
+
$ as _3DSpace_get_csrf,
|
|
2089
2112
|
V as _3DSpace_get_docInfo,
|
|
2090
2113
|
Y as _3DSpace_get_downloadTicket_multidoc,
|
|
2091
2114
|
b as _3DSpace_get_securityContexts,
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2115
|
+
k as _3DSpace_get_ticket,
|
|
2116
|
+
je as _3DSpace_lifecycle_changeRevision,
|
|
2117
|
+
ke as _3DSpace_lifecycle_changeState,
|
|
2118
|
+
Fe as _3DSpace_lifecycle_getGraph,
|
|
2096
2119
|
Ue as _3DSpace_lifecycle_getNextRevision,
|
|
2097
|
-
|
|
2120
|
+
Ae as _3DSpace_lifecycle_getNextStates,
|
|
2098
2121
|
qe as _3DSwym_buildDirectMessage,
|
|
2099
2122
|
ze as _3DSwym_deleteIdea,
|
|
2100
2123
|
te as _3DSwym_findCommunityToInstantMSG,
|
|
@@ -2113,10 +2136,12 @@ export {
|
|
|
2113
2136
|
ye as _AppMngt_get_info_user,
|
|
2114
2137
|
_e as _AppMngt_get_users,
|
|
2115
2138
|
st as _Iterop_Auth_CAS,
|
|
2116
|
-
|
|
2139
|
+
it as _Iterop_ListUsers,
|
|
2140
|
+
at as _Iterop_getAllBusinessTables,
|
|
2141
|
+
ot as _Iterop_processStart,
|
|
2117
2142
|
E as _getPlateformInfos,
|
|
2118
2143
|
ge as _getPlatformServices,
|
|
2119
|
-
|
|
2144
|
+
v as _getServiceUrl,
|
|
2120
2145
|
he as _getServiceUrl_3DPassport,
|
|
2121
2146
|
nt as _getServiceUrl_Iterop,
|
|
2122
2147
|
f as _httpCallAuthenticated,
|
|
@@ -2130,12 +2155,12 @@ export {
|
|
|
2130
2155
|
q as dataMixing,
|
|
2131
2156
|
Oe as deleteUserGroups,
|
|
2132
2157
|
de as findAdresse,
|
|
2133
|
-
|
|
2158
|
+
Pe as getAllContextSecurity,
|
|
2134
2159
|
K as getCSRFToken,
|
|
2135
2160
|
ce as getCommunes,
|
|
2136
2161
|
Ce as getComplementUG,
|
|
2137
|
-
|
|
2138
|
-
|
|
2162
|
+
Re as getDataFrom3DSpace,
|
|
2163
|
+
pe as getDataFromGouvFr,
|
|
2139
2164
|
Je as getDatasByTenant,
|
|
2140
2165
|
Ee as getDatasFrom3DSpace,
|
|
2141
2166
|
xe as getDownloadDocument,
|
|
@@ -2148,7 +2173,7 @@ export {
|
|
|
2148
2173
|
Me as pushDataIn3DSpace,
|
|
2149
2174
|
ve as readUserGroupControl,
|
|
2150
2175
|
Ke as removeTagToDoc,
|
|
2151
|
-
|
|
2152
|
-
|
|
2176
|
+
rt as sayHello,
|
|
2177
|
+
le as updateEvent
|
|
2153
2178
|
};
|
|
2154
2179
|
//# sourceMappingURL=wb3Api.js.map
|