@beam3_dev/api_module 0.0.102 → 0.0.103
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 +525 -468
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +5 -5
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { v4 as M } 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 U() {
|
|
5
5
|
return M();
|
|
6
6
|
}
|
|
7
7
|
const L = {
|
|
@@ -34,7 +34,7 @@ const L = {
|
|
|
34
34
|
b3Edit8: "#616161",
|
|
35
35
|
b3Edit9: "#795548"
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
37
|
+
async function ce(e, t = void 0, n = void 0) {
|
|
38
38
|
const s = parseInt(e);
|
|
39
39
|
await fetch(
|
|
40
40
|
"https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
|
|
@@ -50,7 +50,7 @@ async function re(e, t = void 0, n = void 0) {
|
|
|
50
50
|
n && n(o), console.error("Erreur : " + o);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
async function
|
|
53
|
+
async function de(e, t = void 0, n = void 0) {
|
|
54
54
|
e = encodeURIComponent(e), await fetch(
|
|
55
55
|
"https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
|
|
56
56
|
{
|
|
@@ -65,11 +65,11 @@ async function ce(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 le(e, t = L) {
|
|
69
69
|
let n = N.now().year;
|
|
70
|
-
const s = e, o = [],
|
|
71
|
-
for (let
|
|
72
|
-
o.push({ date:
|
|
70
|
+
const s = e, o = [], r = (a) => {
|
|
71
|
+
for (let c in a)
|
|
72
|
+
o.push({ date: c, comment: a[c] });
|
|
73
73
|
};
|
|
74
74
|
for (let a = n; a <= n + 1; a++)
|
|
75
75
|
await fetch(
|
|
@@ -80,59 +80,64 @@ async function de(e, t = L) {
|
|
|
80
80
|
Accept: "application/json"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
).then((
|
|
84
|
-
c
|
|
85
|
-
}).catch((
|
|
83
|
+
).then((c) => c.json()).then((c) => {
|
|
84
|
+
r(c);
|
|
85
|
+
}).catch((c) => console.error("Erreur : " + c));
|
|
86
86
|
return (() => {
|
|
87
87
|
const a = s.length === 0 ? {
|
|
88
88
|
events: []
|
|
89
89
|
} : s;
|
|
90
|
-
for (let
|
|
90
|
+
for (let c of o)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start === N.fromISO(
|
|
92
|
+
(l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
|
-
name: "Férié : " +
|
|
95
|
-
start: N.fromISO(
|
|
96
|
-
end: N.fromISO(
|
|
94
|
+
name: "Férié : " + c.comment,
|
|
95
|
+
start: N.fromISO(c.date).toISODate(),
|
|
96
|
+
end: N.fromISO(c.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
100
100
|
return a;
|
|
101
101
|
})();
|
|
102
102
|
}
|
|
103
|
-
async function
|
|
103
|
+
async function pe(e, t, n = !0) {
|
|
104
104
|
const s = e.events.findIndex((o) => o.uuid === t.uuid);
|
|
105
|
-
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o,
|
|
105
|
+
return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, r) => o.start - r.start), e;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function f(e, t) {
|
|
108
108
|
O(["DS/WAFData/WAFData"], (n) => {
|
|
109
109
|
n.authenticatedRequest(e, t);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function ue(e, t, n) {
|
|
113
113
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
|
|
114
|
-
s.draggable(e, {
|
|
114
|
+
s.draggable(e, {
|
|
115
|
+
data: t,
|
|
116
|
+
start: n
|
|
117
|
+
});
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
|
-
function
|
|
120
|
+
function fe(e, t = void 0) {
|
|
118
121
|
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
|
|
119
122
|
let s;
|
|
120
123
|
s === void 0 && (s = n.createProxy({
|
|
121
|
-
widgetId:
|
|
124
|
+
widgetId: j.id,
|
|
122
125
|
filteringMode: "WithFilteringServices"
|
|
123
126
|
}), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
|
|
124
127
|
});
|
|
125
128
|
}
|
|
126
|
-
function
|
|
129
|
+
function me(e, t) {
|
|
127
130
|
O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
|
|
128
|
-
n.droppable(e, {
|
|
131
|
+
n.droppable(e, {
|
|
132
|
+
drop: t
|
|
133
|
+
});
|
|
129
134
|
});
|
|
130
135
|
}
|
|
131
|
-
async function
|
|
136
|
+
async function ge(e, t = void 0, n = void 0) {
|
|
132
137
|
await O(
|
|
133
138
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
134
139
|
(s) => {
|
|
135
|
-
(!e || e === "") && (e =
|
|
140
|
+
(!e || e === "") && (e = j.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
136
141
|
s.getPlatformServices({
|
|
137
142
|
platformId: e,
|
|
138
143
|
onComplete: t,
|
|
@@ -145,92 +150,128 @@ async function me(e, t = void 0, n = void 0) {
|
|
|
145
150
|
function J() {
|
|
146
151
|
let e = {};
|
|
147
152
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
148
|
-
const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(),
|
|
153
|
+
const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
|
|
149
154
|
"com.3ds.wp.passport.cors"
|
|
150
155
|
);
|
|
151
156
|
e = {
|
|
152
157
|
tenant: n,
|
|
153
158
|
user: s,
|
|
154
159
|
appsConfiguration: o,
|
|
155
|
-
appConf:
|
|
160
|
+
appConf: r
|
|
156
161
|
};
|
|
157
162
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
158
163
|
}
|
|
159
|
-
function
|
|
164
|
+
function E(e, t = void 0, n = void 0) {
|
|
165
|
+
if (e.tenant) {
|
|
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
|
+
f(s, {
|
|
168
|
+
onComplete(o) {
|
|
169
|
+
const r = JSON.parse(o);
|
|
170
|
+
if (console.log("_getServiceUrl", r), r && "platforms" in r) {
|
|
171
|
+
const i = r.find((a) => {
|
|
172
|
+
a.id, e.tenant;
|
|
173
|
+
});
|
|
174
|
+
t && t(i);
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
onFailure(o) {
|
|
178
|
+
n && n(o);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function he(e, t = void 0, n = void 0) {
|
|
184
|
+
if (e.tenant) {
|
|
185
|
+
const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
|
|
186
|
+
f(s, {
|
|
187
|
+
onComplete(o) {
|
|
188
|
+
const r = JSON.parse(o);
|
|
189
|
+
if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
|
|
190
|
+
const i = `${r[0].services[0].url}`;
|
|
191
|
+
t && t(i);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
onFailure(o) {
|
|
195
|
+
n && n(o);
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function Se(e, t, n) {
|
|
160
201
|
const s = {
|
|
161
202
|
base: `${e.space}`,
|
|
162
203
|
uri: "/resources/AppsMngt/api/custom/applications",
|
|
163
204
|
option: `?filter=${e.tenant}`
|
|
164
205
|
// facultatif
|
|
165
206
|
}, o = `${s.base}${s.uri}${s.option}`;
|
|
166
|
-
|
|
207
|
+
f(o, {
|
|
167
208
|
method: "GET",
|
|
168
209
|
headers: {
|
|
169
210
|
"Content-Type": "application/json",
|
|
170
211
|
Accept: "application/json"
|
|
171
212
|
},
|
|
172
|
-
onComplete(
|
|
173
|
-
const
|
|
213
|
+
onComplete(r, i, a) {
|
|
214
|
+
const c = JSON.parse(r), d = c.data.map((l) => {
|
|
174
215
|
const p = l.attributes.name, u = l.id;
|
|
175
216
|
return { name: p, id: u };
|
|
176
217
|
});
|
|
177
|
-
t && t(d,
|
|
218
|
+
t && t(d, c);
|
|
178
219
|
},
|
|
179
|
-
onFailure(
|
|
180
|
-
const a =
|
|
220
|
+
onFailure(r, i) {
|
|
221
|
+
const a = r;
|
|
181
222
|
a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
|
|
182
223
|
}
|
|
183
224
|
});
|
|
184
225
|
}
|
|
185
|
-
function
|
|
226
|
+
function _e(e, t = void 0, n = void 0) {
|
|
186
227
|
let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
|
|
187
|
-
|
|
188
|
-
onComplete(o,
|
|
228
|
+
f(s, {
|
|
229
|
+
onComplete(o, r, i) {
|
|
189
230
|
const a = JSON.parse(o);
|
|
190
231
|
console.log("_AppMngt_get_users => ", a), t && t(a);
|
|
191
232
|
},
|
|
192
|
-
onFailure(o,
|
|
233
|
+
onFailure(o, r) {
|
|
193
234
|
const i = o;
|
|
194
|
-
i.msg =
|
|
235
|
+
i.msg = r.errormsg, i.errCode = r.errorcode, n && n(i);
|
|
195
236
|
}
|
|
196
237
|
});
|
|
197
238
|
}
|
|
198
|
-
function
|
|
239
|
+
function ye(e, t, n = void 0, s = void 0) {
|
|
199
240
|
let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
|
|
200
|
-
|
|
201
|
-
onComplete(
|
|
202
|
-
const
|
|
203
|
-
n && n(
|
|
241
|
+
f(o, {
|
|
242
|
+
onComplete(r, i, a) {
|
|
243
|
+
const c = JSON.parse(r);
|
|
244
|
+
n && n(c);
|
|
204
245
|
},
|
|
205
|
-
onFailure(
|
|
206
|
-
const a =
|
|
246
|
+
onFailure(r, i) {
|
|
247
|
+
const a = r;
|
|
207
248
|
a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
|
|
208
249
|
}
|
|
209
250
|
});
|
|
210
251
|
}
|
|
211
|
-
const
|
|
252
|
+
const v = {
|
|
212
253
|
"Content-Type": "application/json",
|
|
213
254
|
Accept: "application/json,text/javascript,*/*"
|
|
214
255
|
};
|
|
215
|
-
function
|
|
216
|
-
const { space: o, currentUser:
|
|
256
|
+
function we(e, t, n = void 0, s = void 0) {
|
|
257
|
+
const { space: o, currentUser: r } = e, a = `${o}${{
|
|
217
258
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup"
|
|
218
|
-
}.URIUGr}`,
|
|
259
|
+
}.URIUGr}`, c = {
|
|
219
260
|
groups: [
|
|
220
261
|
{
|
|
221
262
|
title: t.title,
|
|
222
263
|
description: t.description,
|
|
223
|
-
members: t.members || [
|
|
264
|
+
members: t.members || [r.email, "samuel.mureau@beam3.fr"],
|
|
224
265
|
pending_members: [],
|
|
225
266
|
sharing: t.sharing,
|
|
226
267
|
visibility: t.visibility
|
|
227
268
|
}
|
|
228
269
|
]
|
|
229
270
|
};
|
|
230
|
-
|
|
271
|
+
f(a, {
|
|
231
272
|
method: "POST",
|
|
232
|
-
headers:
|
|
233
|
-
data: JSON.stringify(
|
|
273
|
+
headers: v,
|
|
274
|
+
data: JSON.stringify(c),
|
|
234
275
|
onComplete(d) {
|
|
235
276
|
n && n(JSON.parse(d));
|
|
236
277
|
},
|
|
@@ -241,9 +282,9 @@ function _e(e, t, n = void 0, s = void 0) {
|
|
|
241
282
|
}
|
|
242
283
|
});
|
|
243
284
|
}
|
|
244
|
-
function
|
|
245
|
-
const { space: o, tenant:
|
|
246
|
-
|
|
285
|
+
function Ce(e, t, n = void 0, s = void 0) {
|
|
286
|
+
const { space: o, tenant: r } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${i}${a}${c}`;
|
|
287
|
+
f(d, {
|
|
247
288
|
opts: {
|
|
248
289
|
method: "GET",
|
|
249
290
|
headers: {
|
|
@@ -254,19 +295,19 @@ function ye(e, t, n = void 0, s = void 0) {
|
|
|
254
295
|
onComplete(u) {
|
|
255
296
|
n && n(JSON.parse(u));
|
|
256
297
|
},
|
|
257
|
-
onFailure(u,
|
|
298
|
+
onFailure(u, m) {
|
|
258
299
|
const g = u;
|
|
259
|
-
g.msg =
|
|
300
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
|
|
260
301
|
}
|
|
261
302
|
});
|
|
262
303
|
}
|
|
263
|
-
function
|
|
264
|
-
const { space: s, tenant: o } = e,
|
|
304
|
+
function G(e, t = void 0, n = void 0) {
|
|
305
|
+
const { space: s, tenant: o } = e, r = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
|
|
265
306
|
method: "GET",
|
|
266
307
|
Accept: "application/json,*/*,test/javascript"
|
|
267
|
-
}, d = `${
|
|
268
|
-
|
|
269
|
-
OPTsH:
|
|
308
|
+
}, d = `${r}${i}${a}`;
|
|
309
|
+
f(d, {
|
|
310
|
+
OPTsH: c,
|
|
270
311
|
onComplete(l) {
|
|
271
312
|
t && t(JSON.parse(l));
|
|
272
313
|
},
|
|
@@ -276,19 +317,19 @@ function E(e, t = void 0, n = void 0) {
|
|
|
276
317
|
}
|
|
277
318
|
});
|
|
278
319
|
}
|
|
279
|
-
function
|
|
320
|
+
function Te(e, t = void 0, n = void 0) {
|
|
280
321
|
const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
|
|
281
322
|
"Content-Type": "application/json",
|
|
282
323
|
Accept: "application/json,text/javascript,*/*"
|
|
283
324
|
} };
|
|
284
325
|
try {
|
|
285
|
-
|
|
326
|
+
f(a, {
|
|
286
327
|
opts: d,
|
|
287
328
|
onComplete(l) {
|
|
288
|
-
const p = JSON.parse(l), u = {},
|
|
329
|
+
const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
|
|
289
330
|
if (o && Object.keys(o).length > 0) {
|
|
290
|
-
const g =
|
|
291
|
-
u.iam = S, u.UG =
|
|
331
|
+
const g = m.filter((_) => _.owner === o.email), h = m.filter((_) => _.members.includes(o.email)), S = g.concat(h);
|
|
332
|
+
u.iam = S, u.UG = m, u.iamMember = h, G(
|
|
292
333
|
e,
|
|
293
334
|
(_) => {
|
|
294
335
|
u.rules = _, t && t(u);
|
|
@@ -307,14 +348,14 @@ function we(e, t = void 0, n = void 0) {
|
|
|
307
348
|
console.log(l);
|
|
308
349
|
}
|
|
309
350
|
}
|
|
310
|
-
function
|
|
351
|
+
function Oe(e, t) {
|
|
311
352
|
const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
|
|
312
|
-
|
|
353
|
+
f(o, {
|
|
313
354
|
method: "DELETE"
|
|
314
355
|
});
|
|
315
356
|
}
|
|
316
|
-
function
|
|
317
|
-
const { space:
|
|
357
|
+
function be(e, t, n, s = void 0, o = void 0) {
|
|
358
|
+
const { space: r, tenant: i } = e, a = {
|
|
318
359
|
URITI: "/3drdfpersist/resources/v1/template-instances",
|
|
319
360
|
URIUGr: "/3drdfpersist/resources/v1/usersgroup",
|
|
320
361
|
nextURICh: "/characteristics",
|
|
@@ -322,9 +363,9 @@ function Te(e, t, n, s = void 0, o = void 0) {
|
|
|
322
363
|
nexURImem: "/members",
|
|
323
364
|
OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
|
|
324
365
|
OPTsTenant: `tenant=dstenant:${i}`
|
|
325
|
-
},
|
|
326
|
-
|
|
327
|
-
headers:
|
|
366
|
+
}, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
|
|
367
|
+
f(d, {
|
|
368
|
+
headers: v,
|
|
328
369
|
method: "PATCH",
|
|
329
370
|
data: l,
|
|
330
371
|
type: "json",
|
|
@@ -336,11 +377,11 @@ function Te(e, t, n, s = void 0, o = void 0) {
|
|
|
336
377
|
}
|
|
337
378
|
});
|
|
338
379
|
}
|
|
339
|
-
function
|
|
340
|
-
const { space:
|
|
341
|
-
|
|
380
|
+
function Ne(e, t, n, s = void 0, o = void 0) {
|
|
381
|
+
const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
382
|
+
f(a, {
|
|
342
383
|
method: "PATCH",
|
|
343
|
-
headers:
|
|
384
|
+
headers: v,
|
|
344
385
|
data: JSON.stringify(n),
|
|
345
386
|
type: "json",
|
|
346
387
|
onComplete(d) {
|
|
@@ -351,9 +392,9 @@ function Oe(e, t, n, s = void 0, o = void 0) {
|
|
|
351
392
|
}
|
|
352
393
|
});
|
|
353
394
|
}
|
|
354
|
-
function
|
|
395
|
+
function ke(e, t, n = void 0, s = void 0) {
|
|
355
396
|
const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
|
-
|
|
397
|
+
f(i, {
|
|
357
398
|
opts: {
|
|
358
399
|
method: "GET",
|
|
359
400
|
headers: {
|
|
@@ -369,28 +410,28 @@ function be(e, t, n = void 0, s = void 0) {
|
|
|
369
410
|
}
|
|
370
411
|
});
|
|
371
412
|
}
|
|
372
|
-
async function
|
|
413
|
+
async function K(e, t, n) {
|
|
373
414
|
if (e.space) {
|
|
374
415
|
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
375
|
-
|
|
416
|
+
f(s, {
|
|
376
417
|
onComplete(o) {
|
|
377
418
|
o = JSON.parse(o), t && t(o.csrf);
|
|
378
419
|
},
|
|
379
|
-
onFailure(o,
|
|
380
|
-
n && n({ error: o, headers:
|
|
420
|
+
onFailure(o, r, i) {
|
|
421
|
+
n && n({ error: o, headers: r, xhr: i });
|
|
381
422
|
}
|
|
382
423
|
});
|
|
383
424
|
}
|
|
384
425
|
}
|
|
385
|
-
async function
|
|
426
|
+
async function X(e, t = void 0, n = void 0, s = void 0) {
|
|
386
427
|
const o = e.space;
|
|
387
428
|
if (t === void 0) {
|
|
388
429
|
console.log("Le paramètre docid est obligatoire");
|
|
389
430
|
return;
|
|
390
431
|
}
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
onComplete(i, a,
|
|
432
|
+
const r = o + `/resources/v1/modeler/documents/${t}`;
|
|
433
|
+
f(r, {
|
|
434
|
+
onComplete(i, a, c) {
|
|
394
435
|
const d = JSON.parse(i);
|
|
395
436
|
n && n(d);
|
|
396
437
|
},
|
|
@@ -402,8 +443,8 @@ async function K(e, t = void 0, n = void 0, s = void 0) {
|
|
|
402
443
|
function k(e, t = void 0, n = void 0) {
|
|
403
444
|
if (e.objID && e.objID !== "") {
|
|
404
445
|
let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
|
|
405
|
-
|
|
406
|
-
onComplete(o,
|
|
446
|
+
f(s, {
|
|
447
|
+
onComplete(o, r, i) {
|
|
407
448
|
const a = JSON.parse(o);
|
|
408
449
|
e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
|
|
409
450
|
},
|
|
@@ -425,15 +466,15 @@ function k(e, t = void 0, n = void 0) {
|
|
|
425
466
|
function T(e, t = void 0, n = void 0) {
|
|
426
467
|
if (e.space) {
|
|
427
468
|
const s = e.space + "/resources/v1/application/CSRF";
|
|
428
|
-
|
|
429
|
-
onComplete(o,
|
|
469
|
+
f(s, {
|
|
470
|
+
onComplete(o, r, i) {
|
|
430
471
|
const a = JSON.parse(o);
|
|
431
472
|
t && t(a.csrf.value);
|
|
432
473
|
},
|
|
433
|
-
onFailure(o,
|
|
474
|
+
onFailure(o, r, i) {
|
|
434
475
|
n && n({
|
|
435
476
|
response: o,
|
|
436
|
-
headers:
|
|
477
|
+
headers: r,
|
|
437
478
|
xhr: i
|
|
438
479
|
});
|
|
439
480
|
}
|
|
@@ -441,22 +482,22 @@ function T(e, t = void 0, n = void 0) {
|
|
|
441
482
|
} else
|
|
442
483
|
n && n("ERROR : url du 3DSpace non défini.");
|
|
443
484
|
}
|
|
444
|
-
function
|
|
485
|
+
function D(e, t = void 0, n = void 0) {
|
|
445
486
|
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
446
487
|
k(
|
|
447
488
|
e,
|
|
448
489
|
(o) => {
|
|
449
|
-
|
|
490
|
+
f(s, {
|
|
450
491
|
method: "PUT",
|
|
451
492
|
headers: {
|
|
452
493
|
ENO_CSRF_TOKEN: e.token
|
|
453
494
|
},
|
|
454
|
-
onComplete(
|
|
455
|
-
const a = JSON.parse(
|
|
495
|
+
onComplete(r) {
|
|
496
|
+
const a = JSON.parse(r).data[0].dataelements.ticketURL;
|
|
456
497
|
t && t(a);
|
|
457
498
|
},
|
|
458
|
-
onFailure(
|
|
459
|
-
console.warn("☠️ error => ",
|
|
499
|
+
onFailure(r, i) {
|
|
500
|
+
console.warn("☠️ error => ", r, i), n && n(r, i);
|
|
460
501
|
}
|
|
461
502
|
});
|
|
462
503
|
},
|
|
@@ -465,9 +506,9 @@ function j(e, t = void 0, n = void 0) {
|
|
|
465
506
|
}
|
|
466
507
|
);
|
|
467
508
|
}
|
|
468
|
-
function
|
|
469
|
-
const
|
|
470
|
-
n || (n = e.token),
|
|
509
|
+
function Fe(e, t, n, s = void 0, o = void 0) {
|
|
510
|
+
const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
511
|
+
n || (n = e.token), f(r, {
|
|
471
512
|
method: "PUT",
|
|
472
513
|
headers: {
|
|
473
514
|
ENO_CSRF_TOKEN: n
|
|
@@ -476,10 +517,10 @@ function Ne(e, t, n, s = void 0, o = void 0) {
|
|
|
476
517
|
let a = JSON.parse(i);
|
|
477
518
|
if (console.log("☠️ info => ", a), a.success === !0)
|
|
478
519
|
try {
|
|
479
|
-
const
|
|
480
|
-
s && s(
|
|
481
|
-
} catch (
|
|
482
|
-
o && o(
|
|
520
|
+
const c = a.data[0].dataelements.ticketURL;
|
|
521
|
+
s && s(c);
|
|
522
|
+
} catch (c) {
|
|
523
|
+
o && o(c);
|
|
483
524
|
}
|
|
484
525
|
},
|
|
485
526
|
onFailure(i) {
|
|
@@ -487,40 +528,40 @@ function Ne(e, t, n, s = void 0, o = void 0) {
|
|
|
487
528
|
}
|
|
488
529
|
});
|
|
489
530
|
}
|
|
490
|
-
function
|
|
531
|
+
function V(e, t, n, s, o, r = void 0, i = void 0) {
|
|
491
532
|
k(
|
|
492
533
|
e,
|
|
493
534
|
t,
|
|
494
535
|
(a) => {
|
|
495
|
-
|
|
536
|
+
W(
|
|
496
537
|
e,
|
|
497
538
|
t,
|
|
498
539
|
n,
|
|
499
540
|
s,
|
|
500
541
|
o,
|
|
501
542
|
a.csrf.value,
|
|
502
|
-
|
|
543
|
+
r,
|
|
503
544
|
i
|
|
504
545
|
);
|
|
505
546
|
}
|
|
506
547
|
);
|
|
507
548
|
}
|
|
508
|
-
function
|
|
509
|
-
const
|
|
510
|
-
|
|
549
|
+
function W(e, t, n, s, o, r, i = void 0, a = void 0) {
|
|
550
|
+
const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
|
|
551
|
+
f(c, {
|
|
511
552
|
method: "PUT",
|
|
512
553
|
headers: {
|
|
513
|
-
ENO_CSRF_TOKEN:
|
|
554
|
+
ENO_CSRF_TOKEN: r
|
|
514
555
|
},
|
|
515
556
|
onComplete(d, l, p) {
|
|
516
|
-
const u = JSON.parse(d).data[0].dataelements,
|
|
517
|
-
|
|
557
|
+
const u = JSON.parse(d).data[0].dataelements, m = new FormData();
|
|
558
|
+
m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
|
|
518
559
|
const g = {};
|
|
519
|
-
g.method = "POST", g.data =
|
|
560
|
+
g.method = "POST", g.data = m, g.onComplete = function(h) {
|
|
520
561
|
let S = "temp_" + Date.now(), _ = {
|
|
521
562
|
method: "PUT",
|
|
522
563
|
headers: {
|
|
523
|
-
ENO_CSRF_TOKEN:
|
|
564
|
+
ENO_CSRF_TOKEN: r
|
|
524
565
|
},
|
|
525
566
|
data: JSON.stringify({
|
|
526
567
|
data: [{
|
|
@@ -546,41 +587,41 @@ function V(e, t, n, s, o, c, i = void 0, a = void 0) {
|
|
|
546
587
|
a && a(y);
|
|
547
588
|
}
|
|
548
589
|
};
|
|
549
|
-
|
|
590
|
+
f(
|
|
550
591
|
e.space + "/resources/v1/modeler/documents",
|
|
551
592
|
_
|
|
552
593
|
);
|
|
553
594
|
}, g.onFailure = function(h) {
|
|
554
595
|
a && a(h);
|
|
555
|
-
}, g.timeout = 0,
|
|
596
|
+
}, g.timeout = 0, f(u.ticketURL, g);
|
|
556
597
|
}
|
|
557
598
|
});
|
|
558
599
|
}
|
|
559
|
-
async function
|
|
560
|
-
const i = e.space, a = e.token,
|
|
600
|
+
async function ve(e, t, n, s, o = void 0, r = void 0) {
|
|
601
|
+
const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
|
|
561
602
|
type: "text/plain"
|
|
562
603
|
}), p = {
|
|
563
604
|
url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
|
|
564
|
-
url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${
|
|
605
|
+
url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
|
|
565
606
|
};
|
|
566
607
|
if (!i && i !== "") {
|
|
567
608
|
console.log("le store._3DSpace est vide");
|
|
568
609
|
return;
|
|
569
610
|
}
|
|
570
|
-
|
|
611
|
+
f(p.url_Ticket, {
|
|
571
612
|
method: "PUT",
|
|
572
613
|
headers: {
|
|
573
614
|
ENO_CSRF_TOKEN: a.value
|
|
574
615
|
},
|
|
575
|
-
onComplete(u,
|
|
616
|
+
onComplete(u, m, g) {
|
|
576
617
|
const h = JSON.parse(u).data[0].dataelements;
|
|
577
618
|
d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
|
|
578
619
|
const S = {
|
|
579
620
|
method: "POST",
|
|
580
621
|
data: d,
|
|
581
622
|
onComplete(C) {
|
|
582
|
-
if (
|
|
583
|
-
const
|
|
623
|
+
if (c !== "" && a !== "") {
|
|
624
|
+
const F = {
|
|
584
625
|
method: "POST",
|
|
585
626
|
headers: {
|
|
586
627
|
ENO_CSRF_TOKEN: a,
|
|
@@ -603,7 +644,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
603
644
|
}
|
|
604
645
|
}]
|
|
605
646
|
},
|
|
606
|
-
tempId:
|
|
647
|
+
tempId: U()
|
|
607
648
|
}]
|
|
608
649
|
}),
|
|
609
650
|
type: "json",
|
|
@@ -611,7 +652,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
611
652
|
onComplete: _,
|
|
612
653
|
onFailure: y
|
|
613
654
|
};
|
|
614
|
-
|
|
655
|
+
c !== "" && f(p.url_Post, F);
|
|
615
656
|
} else
|
|
616
657
|
console.warn("le store est vide");
|
|
617
658
|
},
|
|
@@ -620,21 +661,21 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
620
661
|
function _(C) {
|
|
621
662
|
console.log("Success -- response ", C.data[0]), o && o(C);
|
|
622
663
|
}
|
|
623
|
-
function y(C,
|
|
664
|
+
function y(C, F) {
|
|
624
665
|
console.log("Erreur -- response ", C, `
|
|
625
|
-
headers `,
|
|
666
|
+
headers `, F), r && r(C);
|
|
626
667
|
}
|
|
627
|
-
|
|
668
|
+
f(h.ticketURL, S);
|
|
628
669
|
}
|
|
629
670
|
});
|
|
630
671
|
}
|
|
631
|
-
function b(e, t = void 0, n = void 0, s = void 0, o = void 0,
|
|
672
|
+
function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0, i = !1) {
|
|
632
673
|
const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
633
|
-
|
|
674
|
+
f(a, {
|
|
634
675
|
method: "GET",
|
|
635
|
-
onComplete(
|
|
636
|
-
const d = JSON.parse(
|
|
637
|
-
let l = "", p, u,
|
|
676
|
+
onComplete(c) {
|
|
677
|
+
const d = JSON.parse(c);
|
|
678
|
+
let l = "", p, u, m;
|
|
638
679
|
if (t) {
|
|
639
680
|
let g = d.collabspaces.find((h) => h.title === t);
|
|
640
681
|
if (g) {
|
|
@@ -645,44 +686,44 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1
|
|
|
645
686
|
(C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
|
|
646
687
|
)
|
|
647
688
|
), n && (Array.isArray(n) ? n.forEach((S) => {
|
|
648
|
-
|
|
689
|
+
m || h.forEach((_) => {
|
|
649
690
|
if (S === _.role.name && s === _.organization.title)
|
|
650
|
-
|
|
691
|
+
m = S, u = s;
|
|
651
692
|
else if (S === _.role.name) {
|
|
652
693
|
let y = h.filter(
|
|
653
694
|
(C) => C.role.name === S
|
|
654
695
|
);
|
|
655
|
-
y.length === 1 ? (
|
|
696
|
+
y.length === 1 ? (m = y[0].role.name, u = y[0].organization.title) : r(y);
|
|
656
697
|
}
|
|
657
698
|
});
|
|
658
699
|
}) : h.forEach((S) => {
|
|
659
700
|
if (n === S.role.name && s === S.organization.title)
|
|
660
|
-
|
|
701
|
+
m = n, u = s;
|
|
661
702
|
else if (n === S.role.name) {
|
|
662
703
|
let _ = h.filter(
|
|
663
704
|
(y) => y.role.name === n
|
|
664
705
|
);
|
|
665
|
-
_.length === 1 ? (
|
|
706
|
+
_.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) : r(_);
|
|
666
707
|
}
|
|
667
708
|
}));
|
|
668
709
|
}
|
|
669
710
|
}
|
|
670
|
-
p && u &&
|
|
711
|
+
p && u && m ? (l = m + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : r && (l = m + "." + u + "." + p, r(l));
|
|
671
712
|
},
|
|
672
|
-
onFailure(
|
|
713
|
+
onFailure(c, d) {
|
|
673
714
|
console.log("Erreur de récupération du contexte de sécurité. => ", {
|
|
674
|
-
err:
|
|
715
|
+
err: c,
|
|
675
716
|
headers: d
|
|
676
717
|
});
|
|
677
718
|
}
|
|
678
719
|
});
|
|
679
720
|
}
|
|
680
|
-
async function
|
|
721
|
+
async function I(e, t = void 0, n = void 0) {
|
|
681
722
|
return (!e.objID || e.objID === "") && console.warn(
|
|
682
723
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
683
724
|
), (e.space === "" || !e.space) && console.warn(
|
|
684
725
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
685
|
-
), (e.token === "" || !e.token) && (
|
|
726
|
+
), (e.token === "" || !e.token) && (K(
|
|
686
727
|
e,
|
|
687
728
|
(s) => {
|
|
688
729
|
e.token = s;
|
|
@@ -693,58 +734,58 @@ async function v(e, t = void 0, n = void 0) {
|
|
|
693
734
|
), console.warn(
|
|
694
735
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
695
736
|
)), new Promise((s, o) => {
|
|
696
|
-
|
|
737
|
+
D(
|
|
697
738
|
e,
|
|
698
|
-
(
|
|
699
|
-
|
|
739
|
+
(r) => {
|
|
740
|
+
f(r, {
|
|
700
741
|
headers: {
|
|
701
742
|
"Content-Type": "application/json",
|
|
702
743
|
Accept: "application/json"
|
|
703
744
|
},
|
|
704
745
|
onComplete(a) {
|
|
705
|
-
let
|
|
746
|
+
let c;
|
|
706
747
|
try {
|
|
707
|
-
|
|
748
|
+
c = JSON.parse(a);
|
|
708
749
|
} catch {
|
|
709
|
-
|
|
750
|
+
c = a;
|
|
710
751
|
}
|
|
711
|
-
t && typeof t == "function" && t(
|
|
752
|
+
t && typeof t == "function" && t(c), s(c);
|
|
712
753
|
},
|
|
713
|
-
onFailure(a,
|
|
754
|
+
onFailure(a, c, d) {
|
|
714
755
|
n && (console.log("error http", a), n({
|
|
715
756
|
msg: JSON.parse(a),
|
|
716
|
-
headers:
|
|
757
|
+
headers: c,
|
|
717
758
|
xhr: d
|
|
718
759
|
}), o({
|
|
719
760
|
msg: JSON.parse(a),
|
|
720
|
-
headers:
|
|
761
|
+
headers: c,
|
|
721
762
|
xhr: d
|
|
722
763
|
}));
|
|
723
764
|
}
|
|
724
765
|
});
|
|
725
766
|
},
|
|
726
|
-
(
|
|
727
|
-
n && n(
|
|
767
|
+
(r) => {
|
|
768
|
+
n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), o(r);
|
|
728
769
|
}
|
|
729
770
|
);
|
|
730
771
|
});
|
|
731
772
|
}
|
|
732
|
-
async function
|
|
773
|
+
async function B(e, t, n = void 0, s = void 0) {
|
|
733
774
|
let o = [];
|
|
734
775
|
if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
|
|
735
776
|
for (let a = 0; a < t.length; a += 80) {
|
|
736
|
-
const
|
|
737
|
-
o.push(
|
|
777
|
+
const c = t.slice(a, a + 80);
|
|
778
|
+
o.push(c);
|
|
738
779
|
}
|
|
739
780
|
const i = (a) => {
|
|
740
|
-
|
|
781
|
+
Y(
|
|
741
782
|
e,
|
|
742
783
|
o[a],
|
|
743
784
|
() => {
|
|
744
785
|
a++, a < o.length && i(a);
|
|
745
786
|
},
|
|
746
|
-
(
|
|
747
|
-
n && n(
|
|
787
|
+
(c) => {
|
|
788
|
+
n && n(c);
|
|
748
789
|
}
|
|
749
790
|
);
|
|
750
791
|
};
|
|
@@ -752,11 +793,11 @@ async function W(e, t, n = void 0, s = void 0) {
|
|
|
752
793
|
} else
|
|
753
794
|
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.");
|
|
754
795
|
}
|
|
755
|
-
function
|
|
756
|
-
const
|
|
757
|
-
t.forEach((
|
|
758
|
-
|
|
759
|
-
id:
|
|
796
|
+
function Y(e, t, n = void 0, s = void 0, o = void 0) {
|
|
797
|
+
const r = [];
|
|
798
|
+
t.forEach((c) => {
|
|
799
|
+
r.push({
|
|
800
|
+
id: c
|
|
760
801
|
});
|
|
761
802
|
});
|
|
762
803
|
let i = JSON.stringify({
|
|
@@ -764,28 +805,28 @@ function B(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
764
805
|
name: "ENO_CSRF_TOKEN",
|
|
765
806
|
value: e.token
|
|
766
807
|
},
|
|
767
|
-
data:
|
|
808
|
+
data: r
|
|
768
809
|
});
|
|
769
810
|
const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
|
|
770
|
-
|
|
811
|
+
f(a, {
|
|
771
812
|
method: "PUT",
|
|
772
813
|
data: i,
|
|
773
814
|
type: "json",
|
|
774
|
-
onComplete(
|
|
775
|
-
const d =
|
|
776
|
-
|
|
815
|
+
onComplete(c) {
|
|
816
|
+
const d = c.data;
|
|
817
|
+
c.success === !0 && (n && n(), d.forEach((l) => {
|
|
777
818
|
try {
|
|
778
819
|
const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
|
|
779
|
-
|
|
780
|
-
onComplete: (
|
|
820
|
+
f(u, {
|
|
821
|
+
onComplete: (m) => {
|
|
781
822
|
s && s({
|
|
782
823
|
objectId: l.id,
|
|
783
824
|
fileName: p,
|
|
784
|
-
data: JSON.parse(
|
|
825
|
+
data: JSON.parse(m)
|
|
785
826
|
});
|
|
786
827
|
},
|
|
787
|
-
onFailure: (
|
|
788
|
-
console.log("error http",
|
|
828
|
+
onFailure: (m) => {
|
|
829
|
+
console.log("error http", m);
|
|
789
830
|
}
|
|
790
831
|
});
|
|
791
832
|
} catch (p) {
|
|
@@ -793,15 +834,15 @@ function B(e, t, n = void 0, s = void 0, o = void 0) {
|
|
|
793
834
|
}
|
|
794
835
|
}));
|
|
795
836
|
},
|
|
796
|
-
onFailure(
|
|
797
|
-
console.log(
|
|
837
|
+
onFailure(c) {
|
|
838
|
+
console.log(c), o && o(c);
|
|
798
839
|
}
|
|
799
840
|
});
|
|
800
841
|
}
|
|
801
842
|
function De(e, t, n = void 0, s = void 0) {
|
|
802
843
|
return new Promise((o) => {
|
|
803
844
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
804
|
-
const
|
|
845
|
+
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
805
846
|
b(
|
|
806
847
|
e.space,
|
|
807
848
|
"ESPACE COMMUN",
|
|
@@ -833,12 +874,12 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
833
874
|
s && s(a);
|
|
834
875
|
}
|
|
835
876
|
};
|
|
836
|
-
|
|
877
|
+
f(r, i);
|
|
837
878
|
}
|
|
838
879
|
});
|
|
839
880
|
}
|
|
840
|
-
function
|
|
841
|
-
return new Promise((
|
|
881
|
+
function Ae(e, t, n, s = void 0, o = void 0) {
|
|
882
|
+
return new Promise((r) => {
|
|
842
883
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
843
884
|
const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
844
885
|
b(
|
|
@@ -846,9 +887,9 @@ function Fe(e, t, n, s = void 0, o = void 0) {
|
|
|
846
887
|
"ESPACE COMMUN",
|
|
847
888
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
848
889
|
void 0,
|
|
849
|
-
(
|
|
850
|
-
(
|
|
851
|
-
console.log("onError =>",
|
|
890
|
+
(c) => e.ctx = c,
|
|
891
|
+
(c) => {
|
|
892
|
+
console.log("onError =>", c);
|
|
852
893
|
}
|
|
853
894
|
);
|
|
854
895
|
let a = {
|
|
@@ -866,21 +907,21 @@ function Fe(e, t, n, s = void 0, o = void 0) {
|
|
|
866
907
|
}]
|
|
867
908
|
}),
|
|
868
909
|
type: "json",
|
|
869
|
-
onComplete(
|
|
870
|
-
s && s(
|
|
910
|
+
onComplete(c) {
|
|
911
|
+
s && s(c);
|
|
871
912
|
},
|
|
872
|
-
onFailure(
|
|
873
|
-
o && o(
|
|
913
|
+
onFailure(c) {
|
|
914
|
+
o && o(c);
|
|
874
915
|
}
|
|
875
916
|
};
|
|
876
|
-
|
|
917
|
+
f(i, a);
|
|
877
918
|
}
|
|
878
919
|
});
|
|
879
920
|
}
|
|
880
|
-
function
|
|
921
|
+
function $e(e, t, n = void 0, s = void 0) {
|
|
881
922
|
return new Promise((o) => {
|
|
882
923
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
883
|
-
const
|
|
924
|
+
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
884
925
|
b(
|
|
885
926
|
e.space,
|
|
886
927
|
"ESPACE COMMUN",
|
|
@@ -912,14 +953,14 @@ function je(e, t, n = void 0, s = void 0) {
|
|
|
912
953
|
s && s(a);
|
|
913
954
|
}
|
|
914
955
|
};
|
|
915
|
-
|
|
956
|
+
f(r, i);
|
|
916
957
|
}
|
|
917
958
|
});
|
|
918
959
|
}
|
|
919
|
-
function
|
|
960
|
+
function je(e, t, n = void 0, s = void 0) {
|
|
920
961
|
return new Promise((o) => {
|
|
921
962
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
922
|
-
const
|
|
963
|
+
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
923
964
|
b(
|
|
924
965
|
e.space,
|
|
925
966
|
"ESPACE COMMUN",
|
|
@@ -957,12 +998,12 @@ function Ae(e, t, n = void 0, s = void 0) {
|
|
|
957
998
|
s && s(a);
|
|
958
999
|
}
|
|
959
1000
|
};
|
|
960
|
-
|
|
1001
|
+
f(r, i);
|
|
961
1002
|
}
|
|
962
1003
|
});
|
|
963
1004
|
}
|
|
964
|
-
function
|
|
965
|
-
return new Promise((
|
|
1005
|
+
function Ue(e, t, n, s = void 0, o = void 0) {
|
|
1006
|
+
return new Promise((r) => {
|
|
966
1007
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
967
1008
|
const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
968
1009
|
b(
|
|
@@ -970,9 +1011,9 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
970
1011
|
"ESPACE COMMUN",
|
|
971
1012
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
972
1013
|
void 0,
|
|
973
|
-
(
|
|
974
|
-
(
|
|
975
|
-
console.log("onError =>",
|
|
1014
|
+
(c) => e.ctx = c,
|
|
1015
|
+
(c) => {
|
|
1016
|
+
console.log("onError =>", c);
|
|
976
1017
|
}
|
|
977
1018
|
);
|
|
978
1019
|
let a = {
|
|
@@ -995,18 +1036,18 @@ function $e(e, t, n, s = void 0, o = void 0) {
|
|
|
995
1036
|
notificationTimeout: 600
|
|
996
1037
|
}),
|
|
997
1038
|
type: "json",
|
|
998
|
-
onComplete(
|
|
999
|
-
s && s(
|
|
1039
|
+
onComplete(c) {
|
|
1040
|
+
s && s(c);
|
|
1000
1041
|
},
|
|
1001
|
-
onFailure(
|
|
1002
|
-
o && o(
|
|
1042
|
+
onFailure(c) {
|
|
1043
|
+
o && o(c);
|
|
1003
1044
|
}
|
|
1004
1045
|
};
|
|
1005
|
-
|
|
1046
|
+
f(i, a);
|
|
1006
1047
|
}
|
|
1007
1048
|
});
|
|
1008
1049
|
}
|
|
1009
|
-
function
|
|
1050
|
+
function Ie(e, t, n, s, o = void 0, r = void 0) {
|
|
1010
1051
|
return console.log("credentials", e), new Promise((i) => {
|
|
1011
1052
|
`${e.space}`, JSON.stringify({
|
|
1012
1053
|
csrf: {
|
|
@@ -1028,69 +1069,69 @@ function Ue(e, t, n, s, o = void 0, c = void 0) {
|
|
|
1028
1069
|
});
|
|
1029
1070
|
}
|
|
1030
1071
|
//!SECTION
|
|
1031
|
-
function
|
|
1072
|
+
function Re(e, t = void 0, n = void 0) {
|
|
1032
1073
|
const s = {
|
|
1033
1074
|
base: `${e.space}`,
|
|
1034
1075
|
uri: "/resources/bps/cspaces",
|
|
1035
1076
|
optTenant: `tenant=${e.tenant}`
|
|
1036
1077
|
}, o = `${s.base}${s.uri}?${s.optTenant}`;
|
|
1037
|
-
|
|
1078
|
+
f(o, {
|
|
1038
1079
|
method: "GET",
|
|
1039
1080
|
headers: {
|
|
1040
1081
|
Accept: "application/json,text/javascript,*/*",
|
|
1041
1082
|
"Content-Type": "application/ds-json"
|
|
1042
1083
|
},
|
|
1043
|
-
onComplete(
|
|
1044
|
-
const a = JSON.parse(
|
|
1084
|
+
onComplete(r, i) {
|
|
1085
|
+
const a = JSON.parse(r);
|
|
1045
1086
|
t && t(a, i);
|
|
1046
1087
|
},
|
|
1047
|
-
onFailure(
|
|
1048
|
-
n && n({ response:
|
|
1088
|
+
onFailure(r, i, a) {
|
|
1089
|
+
n && n({ response: r, headers: i, xhr: a });
|
|
1049
1090
|
}
|
|
1050
1091
|
});
|
|
1051
1092
|
}
|
|
1052
|
-
function
|
|
1053
|
-
|
|
1093
|
+
function Pe(e, t, n, s) {
|
|
1094
|
+
D(
|
|
1054
1095
|
e.space,
|
|
1055
1096
|
t,
|
|
1056
1097
|
(o) => {
|
|
1057
|
-
|
|
1098
|
+
f(o, {
|
|
1058
1099
|
header: { ENO_CSRF_TOKEN: e.token },
|
|
1059
|
-
onComplete: (
|
|
1060
|
-
n && n(
|
|
1100
|
+
onComplete: (r) => {
|
|
1101
|
+
n && n(r);
|
|
1061
1102
|
},
|
|
1062
|
-
onFailure: (
|
|
1063
|
-
console.log("error http",
|
|
1103
|
+
onFailure: (r) => {
|
|
1104
|
+
console.log("error http", r), s && s(r);
|
|
1064
1105
|
}
|
|
1065
1106
|
});
|
|
1066
1107
|
}
|
|
1067
1108
|
);
|
|
1068
1109
|
}
|
|
1069
|
-
async function
|
|
1110
|
+
async function xe(e, t, n = void 0, s = void 0) {
|
|
1070
1111
|
return new Promise((o) => {
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
onComplete: (i, a,
|
|
1074
|
-
onFailure: (i, a,
|
|
1075
|
-
s && s(i, a,
|
|
1112
|
+
D(e, t, (r) => {
|
|
1113
|
+
f(r, {
|
|
1114
|
+
onComplete: (i, a, c) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, c), o),
|
|
1115
|
+
onFailure: (i, a, c) => {
|
|
1116
|
+
s && s(i, a, c), console.log(i, a?.errormsg);
|
|
1076
1117
|
}
|
|
1077
1118
|
});
|
|
1078
1119
|
});
|
|
1079
1120
|
});
|
|
1080
1121
|
}
|
|
1081
|
-
function
|
|
1082
|
-
const
|
|
1122
|
+
function Me(e, t, n, s = void 0, o = void 0) {
|
|
1123
|
+
const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
|
|
1083
1124
|
k(
|
|
1084
1125
|
e,
|
|
1085
1126
|
n,
|
|
1086
1127
|
(i) => {
|
|
1087
|
-
const a = i.data[0].relateddata.files[0].id,
|
|
1088
|
-
|
|
1128
|
+
const a = i.data[0].relateddata.files[0].id, c = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
|
|
1129
|
+
V(
|
|
1089
1130
|
e,
|
|
1090
1131
|
n,
|
|
1091
1132
|
a,
|
|
1092
|
-
c,
|
|
1093
1133
|
r,
|
|
1134
|
+
c,
|
|
1094
1135
|
(d) => {
|
|
1095
1136
|
s && s(d);
|
|
1096
1137
|
},
|
|
@@ -1103,7 +1144,7 @@ function Pe(e, t, n, s = void 0, o = void 0) {
|
|
|
1103
1144
|
}
|
|
1104
1145
|
let R, P;
|
|
1105
1146
|
const A = [];
|
|
1106
|
-
async function
|
|
1147
|
+
async function Le(e, t = void 0, n = void 0) {
|
|
1107
1148
|
e.objID && e.objID !== "" ? k(
|
|
1108
1149
|
e,
|
|
1109
1150
|
(s) => {
|
|
@@ -1122,8 +1163,8 @@ async function xe(e, t = void 0, n = void 0) {
|
|
|
1122
1163
|
}
|
|
1123
1164
|
);
|
|
1124
1165
|
}
|
|
1125
|
-
async function
|
|
1126
|
-
console.log("getDatasByTenant (getDocuments)", e), await
|
|
1166
|
+
async function Je(e, t = void 0, n = void 0) {
|
|
1167
|
+
console.log("getDatasByTenant (getDocuments)", e), await I(
|
|
1127
1168
|
e,
|
|
1128
1169
|
(s) => {
|
|
1129
1170
|
const o = {};
|
|
@@ -1134,36 +1175,36 @@ async function Me(e, t = void 0, n = void 0) {
|
|
|
1134
1175
|
}
|
|
1135
1176
|
);
|
|
1136
1177
|
}
|
|
1137
|
-
function
|
|
1178
|
+
function Ee(e, t = void 0, n = void 0) {
|
|
1138
1179
|
const s = [];
|
|
1139
1180
|
if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
|
|
1140
1181
|
console.warn("la liste est vide ou n'est pas un tableau");
|
|
1141
1182
|
return;
|
|
1142
1183
|
}
|
|
1143
|
-
e.objIds.forEach((o,
|
|
1144
|
-
|
|
1184
|
+
e.objIds.forEach((o, r) => {
|
|
1185
|
+
I(
|
|
1145
1186
|
e,
|
|
1146
1187
|
o.objID,
|
|
1147
1188
|
(i) => {
|
|
1148
|
-
s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID),
|
|
1189
|
+
s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID), q(e, P)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1149
1190
|
}
|
|
1150
1191
|
);
|
|
1151
1192
|
});
|
|
1152
1193
|
}
|
|
1153
|
-
function
|
|
1154
|
-
|
|
1194
|
+
function q(e, t, n = void 0, s = void 0) {
|
|
1195
|
+
B(
|
|
1155
1196
|
e,
|
|
1156
1197
|
R,
|
|
1157
1198
|
(o) => {
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1199
|
+
const r = [...t];
|
|
1200
|
+
r.find((i) => i.objectID === o.objectId).data = o.data, P = r, A.push(o.data), n && n(A);
|
|
1160
1201
|
},
|
|
1161
1202
|
(o) => {
|
|
1162
1203
|
s && (s(o), console.log(o));
|
|
1163
1204
|
}
|
|
1164
1205
|
);
|
|
1165
1206
|
}
|
|
1166
|
-
const
|
|
1207
|
+
const H = "FA35FB9B177A280065800EA0000F599C", z = [
|
|
1167
1208
|
"swym",
|
|
1168
1209
|
"3dspace",
|
|
1169
1210
|
"drive",
|
|
@@ -1177,17 +1218,17 @@ const q = "FA35FB9B177A280065800EA0000F599C", H = [
|
|
|
1177
1218
|
where: "ds6w:where",
|
|
1178
1219
|
who: "ds6w:who",
|
|
1179
1220
|
why: "ds6w:why"
|
|
1180
|
-
},
|
|
1181
|
-
objId:
|
|
1221
|
+
}, Q = {
|
|
1222
|
+
objId: H,
|
|
1182
1223
|
pred: "who",
|
|
1183
1224
|
order_by: "desc",
|
|
1184
1225
|
tag: "testTag"
|
|
1185
1226
|
};
|
|
1186
|
-
function
|
|
1187
|
-
const { space: o, tenant:
|
|
1227
|
+
function Ge(e, t, n = void 0, s = void 0) {
|
|
1228
|
+
const { space: o, tenant: r } = e, { objId: i, pred: a, tag: c } = t, d = {
|
|
1188
1229
|
uri: "/resources/6w/tags",
|
|
1189
1230
|
otpCTX: "SecurityContext=preferred",
|
|
1190
|
-
optTenant: `tenant=${
|
|
1231
|
+
optTenant: `tenant=${r}`
|
|
1191
1232
|
}, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
|
|
1192
1233
|
tag: [
|
|
1193
1234
|
{
|
|
@@ -1198,12 +1239,12 @@ function Je(e, t, n = void 0, s = void 0) {
|
|
|
1198
1239
|
],
|
|
1199
1240
|
predicate: x[a],
|
|
1200
1241
|
object: {
|
|
1201
|
-
literal:
|
|
1242
|
+
literal: c
|
|
1202
1243
|
}
|
|
1203
1244
|
}
|
|
1204
1245
|
]
|
|
1205
1246
|
};
|
|
1206
|
-
|
|
1247
|
+
f(l, {
|
|
1207
1248
|
method: "PUT",
|
|
1208
1249
|
headers: {
|
|
1209
1250
|
"Content-Type": "application/json",
|
|
@@ -1212,14 +1253,14 @@ function Je(e, t, n = void 0, s = void 0) {
|
|
|
1212
1253
|
data: JSON.stringify(p),
|
|
1213
1254
|
onComplete(u) {
|
|
1214
1255
|
JSON.parse(u);
|
|
1215
|
-
const
|
|
1256
|
+
const m = {};
|
|
1216
1257
|
setTimeout(() => {
|
|
1217
|
-
|
|
1258
|
+
X(
|
|
1218
1259
|
e,
|
|
1219
1260
|
i,
|
|
1220
1261
|
(g) => {
|
|
1221
1262
|
const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
1222
|
-
|
|
1263
|
+
m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, Z(
|
|
1223
1264
|
e,
|
|
1224
1265
|
t,
|
|
1225
1266
|
(y) => {
|
|
@@ -1237,25 +1278,25 @@ function Je(e, t, n = void 0, s = void 0) {
|
|
|
1237
1278
|
);
|
|
1238
1279
|
}, 2e3);
|
|
1239
1280
|
},
|
|
1240
|
-
onFailure(u,
|
|
1281
|
+
onFailure(u, m) {
|
|
1241
1282
|
const g = u;
|
|
1242
|
-
g.msg =
|
|
1283
|
+
g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
|
|
1243
1284
|
}
|
|
1244
1285
|
});
|
|
1245
1286
|
}
|
|
1246
|
-
function
|
|
1287
|
+
function Z(e, t, n = void 0, s = void 0) {
|
|
1247
1288
|
console.log("obj ", t);
|
|
1248
|
-
const o = t.info.name,
|
|
1289
|
+
const o = t.info.name, r = {
|
|
1249
1290
|
baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
1250
1291
|
uri: "/federated/search"
|
|
1251
|
-
}, i = `${
|
|
1292
|
+
}, i = `${r.baseUrl}${r.uri}`, a = {
|
|
1252
1293
|
"Content-Type": "application/json",
|
|
1253
1294
|
Accept: "application/json,text/javascript,*/*"
|
|
1254
|
-
},
|
|
1295
|
+
}, c = U(), d = {
|
|
1255
1296
|
with_indexing_date: !0,
|
|
1256
1297
|
with_synthesis: !0,
|
|
1257
1298
|
with_nls: !1,
|
|
1258
|
-
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${
|
|
1299
|
+
label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
|
|
1259
1300
|
locale: "fr",
|
|
1260
1301
|
select_predicate: [
|
|
1261
1302
|
"ds6w:label",
|
|
@@ -1293,7 +1334,7 @@ function Q(e, t, n = void 0, s = void 0) {
|
|
|
1293
1334
|
}
|
|
1294
1335
|
},
|
|
1295
1336
|
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
1296
|
-
order_by:
|
|
1337
|
+
order_by: Q.order_by,
|
|
1297
1338
|
order_field: "relevance",
|
|
1298
1339
|
select_snippets: [
|
|
1299
1340
|
"ds6w:snippet",
|
|
@@ -1304,7 +1345,7 @@ function Q(e, t, n = void 0, s = void 0) {
|
|
|
1304
1345
|
],
|
|
1305
1346
|
nresults: 40,
|
|
1306
1347
|
start: "0",
|
|
1307
|
-
source:
|
|
1348
|
+
source: z,
|
|
1308
1349
|
tenant: e.tenant,
|
|
1309
1350
|
login: {
|
|
1310
1351
|
"3dspace": {
|
|
@@ -1312,7 +1353,7 @@ function Q(e, t, n = void 0, s = void 0) {
|
|
|
1312
1353
|
}
|
|
1313
1354
|
}
|
|
1314
1355
|
};
|
|
1315
|
-
console.log("dataPattern => ", d),
|
|
1356
|
+
console.log("dataPattern => ", d), f(i, {
|
|
1316
1357
|
method: "POST",
|
|
1317
1358
|
headers: a,
|
|
1318
1359
|
data: JSON.stringify(d),
|
|
@@ -1326,12 +1367,12 @@ function Q(e, t, n = void 0, s = void 0) {
|
|
|
1326
1367
|
}
|
|
1327
1368
|
});
|
|
1328
1369
|
}
|
|
1329
|
-
function
|
|
1330
|
-
const { objId: o, pred:
|
|
1370
|
+
function Ke(e, t, n = void 0, s = void 0) {
|
|
1371
|
+
const { objId: o, pred: r, tag: i } = t, a = {
|
|
1331
1372
|
uri: "/resources/6w/tags",
|
|
1332
1373
|
otpCTX: "SecurityContext=preferred",
|
|
1333
1374
|
optTenant: `tenant=${e.tenant}`
|
|
1334
|
-
},
|
|
1375
|
+
}, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
|
|
1335
1376
|
tag: [
|
|
1336
1377
|
{
|
|
1337
1378
|
subject: [
|
|
@@ -1339,14 +1380,14 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1339
1380
|
uri: `pid://${o}`
|
|
1340
1381
|
}
|
|
1341
1382
|
],
|
|
1342
|
-
predicate: x[
|
|
1383
|
+
predicate: x[r],
|
|
1343
1384
|
object: {
|
|
1344
1385
|
literal: i
|
|
1345
1386
|
}
|
|
1346
1387
|
}
|
|
1347
1388
|
]
|
|
1348
1389
|
};
|
|
1349
|
-
|
|
1390
|
+
f(c, {
|
|
1350
1391
|
method: "DELETE",
|
|
1351
1392
|
data: JSON.stringify(d),
|
|
1352
1393
|
headers: {
|
|
@@ -1362,20 +1403,20 @@ function Ee(e, t, n = void 0, s = void 0) {
|
|
|
1362
1403
|
}
|
|
1363
1404
|
});
|
|
1364
1405
|
}
|
|
1365
|
-
function
|
|
1406
|
+
function Xe(e, t = "", n = void 0, s = void 0) {
|
|
1366
1407
|
const { space: o } = e;
|
|
1367
1408
|
if (t === "")
|
|
1368
1409
|
return;
|
|
1369
|
-
const
|
|
1410
|
+
const r = {
|
|
1370
1411
|
uri: "/resources/v1/modeler/documents"
|
|
1371
1412
|
}, i = {
|
|
1372
1413
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
1373
1414
|
Accept: "application/json,text/javascript,*/*"
|
|
1374
|
-
}, a = `${o}${
|
|
1375
|
-
|
|
1415
|
+
}, a = `${o}${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}`;
|
|
1416
|
+
f(a, {
|
|
1376
1417
|
method: "POST",
|
|
1377
1418
|
headers: i,
|
|
1378
|
-
data:
|
|
1419
|
+
data: c,
|
|
1379
1420
|
onComplete(d) {
|
|
1380
1421
|
n && n(JSON.parse(d));
|
|
1381
1422
|
},
|
|
@@ -1387,8 +1428,8 @@ function Ge(e, t = "", n = void 0, s = void 0) {
|
|
|
1387
1428
|
}
|
|
1388
1429
|
async function w(e, t = void 0, n = void 0) {
|
|
1389
1430
|
const s = e.space + "/api/index/tk";
|
|
1390
|
-
return
|
|
1391
|
-
onComplete(o,
|
|
1431
|
+
return f(s, {
|
|
1432
|
+
onComplete(o, r, i) {
|
|
1392
1433
|
const a = JSON.parse(o);
|
|
1393
1434
|
if (t)
|
|
1394
1435
|
return t(a), e.token = a?.result?.ServerToken;
|
|
@@ -1398,7 +1439,7 @@ async function w(e, t = void 0, n = void 0) {
|
|
|
1398
1439
|
}
|
|
1399
1440
|
});
|
|
1400
1441
|
}
|
|
1401
|
-
function
|
|
1442
|
+
function Ve(e, t = void 0, n = void 0) {
|
|
1402
1443
|
const s = `${e.space}/api/exalead/whatsnew`, o = {
|
|
1403
1444
|
params: {
|
|
1404
1445
|
community_id: null,
|
|
@@ -1409,11 +1450,11 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1409
1450
|
start: 0
|
|
1410
1451
|
}
|
|
1411
1452
|
};
|
|
1412
|
-
w(e, (
|
|
1413
|
-
|
|
1453
|
+
w(e, (r) => {
|
|
1454
|
+
f(s, {
|
|
1414
1455
|
method: "POST",
|
|
1415
1456
|
headers: {
|
|
1416
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1457
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1417
1458
|
"Content-type": "application/json;charset=UTF-8",
|
|
1418
1459
|
Accept: "application/json"
|
|
1419
1460
|
},
|
|
@@ -1428,7 +1469,7 @@ function Ke(e, t = void 0, n = void 0) {
|
|
|
1428
1469
|
});
|
|
1429
1470
|
});
|
|
1430
1471
|
}
|
|
1431
|
-
function
|
|
1472
|
+
function We(e, t = void 0, n = void 0) {
|
|
1432
1473
|
const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
|
|
1433
1474
|
params: {
|
|
1434
1475
|
idsToFilterArr: [],
|
|
@@ -1438,19 +1479,19 @@ function Xe(e, t = void 0, n = void 0) {
|
|
|
1438
1479
|
maxNbOfCommonElements: "5"
|
|
1439
1480
|
}
|
|
1440
1481
|
};
|
|
1441
|
-
w(e, (
|
|
1442
|
-
|
|
1482
|
+
w(e, (r) => {
|
|
1483
|
+
f(s, {
|
|
1443
1484
|
method: "POST",
|
|
1444
1485
|
headers: {
|
|
1445
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1486
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
|
|
1446
1487
|
"Content-type": "application/json;charset=UTF-8",
|
|
1447
1488
|
Accept: "application/json"
|
|
1448
1489
|
},
|
|
1449
1490
|
data: JSON.stringify(o),
|
|
1450
1491
|
type: "json",
|
|
1451
1492
|
onComplete(i, a) {
|
|
1452
|
-
const
|
|
1453
|
-
t && t(
|
|
1493
|
+
const c = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
|
|
1494
|
+
t && t(c, i);
|
|
1454
1495
|
},
|
|
1455
1496
|
onFailure(i, a) {
|
|
1456
1497
|
n && n(i, a);
|
|
@@ -1458,50 +1499,50 @@ function Xe(e, t = void 0, n = void 0) {
|
|
|
1458
1499
|
});
|
|
1459
1500
|
});
|
|
1460
1501
|
}
|
|
1461
|
-
function
|
|
1502
|
+
function Be(e, t = void 0, n = void 0) {
|
|
1462
1503
|
const s = {
|
|
1463
1504
|
base: e.space,
|
|
1464
1505
|
uri: "/api/community/listmycommunities",
|
|
1465
1506
|
limit: `/limit/${e.limit ? e.limit : 128}`,
|
|
1466
1507
|
page: `/page/${e.page ? e.page : "1"}`
|
|
1467
|
-
}, o = `${s.base}${s.uri}${s.limit}${s.page}`,
|
|
1508
|
+
}, o = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
|
|
1468
1509
|
w(e, (i) => {
|
|
1469
|
-
|
|
1510
|
+
f(o, {
|
|
1470
1511
|
method: "GET",
|
|
1471
1512
|
headers: {
|
|
1472
1513
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1473
1514
|
},
|
|
1474
|
-
onComplete(a,
|
|
1515
|
+
onComplete(a, c, d) {
|
|
1475
1516
|
const p = JSON.parse(a).result;
|
|
1476
1517
|
let u = 0;
|
|
1477
|
-
p.forEach((
|
|
1518
|
+
p.forEach((m) => {
|
|
1478
1519
|
const g = {
|
|
1479
|
-
description:
|
|
1480
|
-
id:
|
|
1481
|
-
title:
|
|
1482
|
-
owner:
|
|
1483
|
-
role:
|
|
1484
|
-
access:
|
|
1520
|
+
description: m.description,
|
|
1521
|
+
id: m.id,
|
|
1522
|
+
title: m.title,
|
|
1523
|
+
owner: m.owner,
|
|
1524
|
+
role: m.role,
|
|
1525
|
+
access: m.access
|
|
1485
1526
|
};
|
|
1486
|
-
|
|
1527
|
+
ee(
|
|
1487
1528
|
e,
|
|
1488
|
-
|
|
1529
|
+
m.id,
|
|
1489
1530
|
(h) => {
|
|
1490
|
-
u++, g.members = h,
|
|
1531
|
+
u++, g.members = h, r.push(g), u === p.length && t && t(r);
|
|
1491
1532
|
},
|
|
1492
1533
|
(h) => n(h)
|
|
1493
1534
|
);
|
|
1494
1535
|
});
|
|
1495
1536
|
},
|
|
1496
|
-
onFailure(a,
|
|
1537
|
+
onFailure(a, c) {
|
|
1497
1538
|
const d = a;
|
|
1498
|
-
d.status =
|
|
1539
|
+
d.status = c.status, d.response = c.errormsg, n && n(d);
|
|
1499
1540
|
}
|
|
1500
1541
|
});
|
|
1501
1542
|
});
|
|
1502
1543
|
}
|
|
1503
|
-
function
|
|
1504
|
-
const o = `${e.space}/api/community/listmembers`,
|
|
1544
|
+
function ee(e, t, n, s) {
|
|
1545
|
+
const o = `${e.space}/api/community/listmembers`, r = {
|
|
1505
1546
|
params: {
|
|
1506
1547
|
page: e.page ? e.page : 1,
|
|
1507
1548
|
limit: e.limit ? e.limit : 50,
|
|
@@ -1509,71 +1550,71 @@ function Z(e, t, n, s) {
|
|
|
1509
1550
|
}
|
|
1510
1551
|
};
|
|
1511
1552
|
w(e, (i) => {
|
|
1512
|
-
|
|
1553
|
+
f(o, {
|
|
1513
1554
|
method: "POST",
|
|
1514
1555
|
headers: {
|
|
1515
1556
|
"Content-type": "application/json;charset=UTF-8",
|
|
1516
1557
|
Accept: "application/json",
|
|
1517
1558
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1518
1559
|
},
|
|
1519
|
-
data: JSON.stringify(
|
|
1560
|
+
data: JSON.stringify(r),
|
|
1520
1561
|
type: "json",
|
|
1521
|
-
onComplete(a,
|
|
1562
|
+
onComplete(a, c, d) {
|
|
1522
1563
|
n && n(a);
|
|
1523
1564
|
},
|
|
1524
|
-
onFailure(a,
|
|
1565
|
+
onFailure(a, c) {
|
|
1525
1566
|
const d = a;
|
|
1526
|
-
d.status =
|
|
1567
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1527
1568
|
}
|
|
1528
1569
|
});
|
|
1529
1570
|
});
|
|
1530
1571
|
}
|
|
1531
|
-
function
|
|
1572
|
+
function Ye(e, t = void 0, n = void 0) {
|
|
1532
1573
|
const s = "YXdA5x4DSUKtlAi2wmnyTA";
|
|
1533
1574
|
e.commu_id || (e.commu_id = s);
|
|
1534
1575
|
const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
|
|
1535
|
-
w(e, (
|
|
1536
|
-
|
|
1576
|
+
w(e, (r) => {
|
|
1577
|
+
f(o, {
|
|
1537
1578
|
method: "GET",
|
|
1538
1579
|
headers: {
|
|
1539
1580
|
"Content-type": "application/json;charset=UTF-8",
|
|
1540
1581
|
Accept: "application/json",
|
|
1541
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1582
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1542
1583
|
},
|
|
1543
1584
|
onComplete(i) {
|
|
1544
1585
|
const a = JSON.parse(i);
|
|
1545
1586
|
t && t(a);
|
|
1546
1587
|
},
|
|
1547
1588
|
onFailure(i, a) {
|
|
1548
|
-
const
|
|
1549
|
-
|
|
1589
|
+
const c = i;
|
|
1590
|
+
c.status = a.status, c.response = a.errormsg, n && n(c);
|
|
1550
1591
|
}
|
|
1551
1592
|
});
|
|
1552
1593
|
});
|
|
1553
1594
|
}
|
|
1554
|
-
function
|
|
1555
|
-
const { listAllContacts: o, currentUser:
|
|
1595
|
+
function qe(e, t, n = void 0, s = void 0) {
|
|
1596
|
+
const { listAllContacts: o, currentUser: r } = e;
|
|
1556
1597
|
console.log("__listAllContacts", o.hits);
|
|
1557
1598
|
const i = `${e.space}/api/directmessages`, a = {
|
|
1558
|
-
users: [
|
|
1559
|
-
},
|
|
1599
|
+
users: [r.login].concat(t.receipt)
|
|
1600
|
+
}, c = {
|
|
1560
1601
|
id_msg: "",
|
|
1561
1602
|
senderId: e.currentUser.login,
|
|
1562
1603
|
senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
|
|
1563
|
-
msg:
|
|
1604
|
+
msg: ne(t.msg)
|
|
1564
1605
|
};
|
|
1565
1606
|
let d = !1;
|
|
1566
|
-
|
|
1607
|
+
te(
|
|
1567
1608
|
a.users,
|
|
1568
1609
|
(l) => {
|
|
1569
|
-
l !== void 0 && (
|
|
1610
|
+
l !== void 0 && (c.id_msg = l.id, d = !0, $(e, c));
|
|
1570
1611
|
},
|
|
1571
1612
|
(l) => {
|
|
1572
|
-
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l),
|
|
1613
|
+
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
|
|
1573
1614
|
}
|
|
1574
1615
|
), d === !1 && setTimeout(() => {
|
|
1575
1616
|
d === !1 && w(e, (l) => {
|
|
1576
|
-
|
|
1617
|
+
f(i, {
|
|
1577
1618
|
method: "POST",
|
|
1578
1619
|
headers: {
|
|
1579
1620
|
"Content-Type": "application/json",
|
|
@@ -1582,11 +1623,11 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1582
1623
|
},
|
|
1583
1624
|
data: JSON.stringify(a),
|
|
1584
1625
|
type: "json",
|
|
1585
|
-
onComplete(p, u,
|
|
1626
|
+
onComplete(p, u, m) {
|
|
1586
1627
|
const g = p;
|
|
1587
|
-
g.reponse = JSON.parse(
|
|
1628
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, $(e, c);
|
|
1588
1629
|
},
|
|
1589
|
-
onFailure(p, u,
|
|
1630
|
+
onFailure(p, u, m) {
|
|
1590
1631
|
const g = p;
|
|
1591
1632
|
g.msg = u.errormsg, g.status = u.status, s && s(g);
|
|
1592
1633
|
}
|
|
@@ -1594,24 +1635,24 @@ function Be(e, t, n = void 0, s = void 0) {
|
|
|
1594
1635
|
});
|
|
1595
1636
|
}, 500);
|
|
1596
1637
|
}
|
|
1597
|
-
function
|
|
1638
|
+
function te(e, t, n, s) {
|
|
1598
1639
|
const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
|
|
1599
|
-
w(e, (
|
|
1600
|
-
|
|
1640
|
+
w(e, (r) => {
|
|
1641
|
+
f(o, {
|
|
1601
1642
|
method: "GET",
|
|
1602
1643
|
headers: {
|
|
1603
1644
|
Accept: "application/json,text/javascript,*/*",
|
|
1604
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1645
|
+
"X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
|
|
1605
1646
|
},
|
|
1606
1647
|
onComplete(i) {
|
|
1607
|
-
const a = JSON.parse(i),
|
|
1648
|
+
const a = JSON.parse(i), c = [];
|
|
1608
1649
|
a.result.forEach((p) => {
|
|
1609
|
-
p.users = p.users.sort((u,
|
|
1650
|
+
p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
|
|
1610
1651
|
});
|
|
1611
|
-
const d = t.sort(), l =
|
|
1652
|
+
const d = t.sort(), l = c.find((p) => {
|
|
1612
1653
|
const u = [];
|
|
1613
|
-
return p.users.forEach((
|
|
1614
|
-
u.push(
|
|
1654
|
+
return p.users.forEach((m) => {
|
|
1655
|
+
u.push(m.login);
|
|
1615
1656
|
}), JSON.stringify(u) === JSON.stringify(d);
|
|
1616
1657
|
});
|
|
1617
1658
|
n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
|
|
@@ -1629,7 +1670,7 @@ function $(e, t, n = void 0, s = void 0) {
|
|
|
1629
1670
|
uri: "/api/community",
|
|
1630
1671
|
id_msg: `${t.id_msg}`,
|
|
1631
1672
|
endUri: "/instantmessages"
|
|
1632
|
-
},
|
|
1673
|
+
}, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
|
|
1633
1674
|
author: { login: t.senderId, displayName: t.senderName },
|
|
1634
1675
|
accessState: null,
|
|
1635
1676
|
commentUri: null,
|
|
@@ -1639,8 +1680,8 @@ function $(e, t, n = void 0, s = void 0) {
|
|
|
1639
1680
|
parentCommentUri: null,
|
|
1640
1681
|
richMessage: t.msg
|
|
1641
1682
|
};
|
|
1642
|
-
console.log("_3dSwym_sendDirectMessageData url ",
|
|
1643
|
-
|
|
1683
|
+
console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
|
|
1684
|
+
f(r, {
|
|
1644
1685
|
method: "POST",
|
|
1645
1686
|
headers: {
|
|
1646
1687
|
"Content-Type": "application/json",
|
|
@@ -1649,25 +1690,25 @@ function $(e, t, n = void 0, s = void 0) {
|
|
|
1649
1690
|
},
|
|
1650
1691
|
data: JSON.stringify(i),
|
|
1651
1692
|
type: "json",
|
|
1652
|
-
onComplete(
|
|
1653
|
-
const p =
|
|
1693
|
+
onComplete(c, d, l) {
|
|
1694
|
+
const p = c;
|
|
1654
1695
|
p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
|
|
1655
1696
|
},
|
|
1656
|
-
onFailure(
|
|
1657
|
-
const l =
|
|
1697
|
+
onFailure(c, d) {
|
|
1698
|
+
const l = c;
|
|
1658
1699
|
l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
|
|
1659
1700
|
}
|
|
1660
1701
|
});
|
|
1661
1702
|
});
|
|
1662
1703
|
}
|
|
1663
|
-
function
|
|
1704
|
+
function ne(e) {
|
|
1664
1705
|
const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
1665
1706
|
return `<p>${e} </p>
|
|
1666
1707
|
<br/>
|
|
1667
1708
|
<hr/>
|
|
1668
1709
|
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
|
|
1669
1710
|
}
|
|
1670
|
-
const
|
|
1711
|
+
const se = {
|
|
1671
1712
|
title: "TEST DEV COMMUNITY IDEA",
|
|
1672
1713
|
// titre du post
|
|
1673
1714
|
community_id: "YXdA5x4DSUKtlAi2wmnyTA",
|
|
@@ -1677,82 +1718,82 @@ const ne = {
|
|
|
1677
1718
|
idee_id: "THhRI8rlQNWKRxpv3Xqqug"
|
|
1678
1719
|
// id de l'idee qui est créer au post (_3dSwym_postIdea)
|
|
1679
1720
|
};
|
|
1680
|
-
function
|
|
1681
|
-
const o = `${e.space}/api/idea/add`,
|
|
1682
|
-
(
|
|
1721
|
+
function He(e, t, n = void 0, s = void 0) {
|
|
1722
|
+
const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
|
|
1723
|
+
(c) => c.id === t.community_id
|
|
1683
1724
|
), i = e.swymCommunities.find(
|
|
1684
|
-
(
|
|
1725
|
+
(c) => c.title.toLowerCase() === t.community_title.toLowerCase()
|
|
1685
1726
|
), a = {
|
|
1686
1727
|
params: {
|
|
1687
1728
|
title: t.title,
|
|
1688
1729
|
// String, le nom de l'affaire
|
|
1689
|
-
community_id:
|
|
1730
|
+
community_id: r?.id !== void 0 ? r.id : i.id,
|
|
1690
1731
|
// String, l'id de la communauté
|
|
1691
|
-
message:
|
|
1732
|
+
message: ae(t.text_html),
|
|
1692
1733
|
// STRING => le contenue du message doit être au format HTML
|
|
1693
1734
|
published: 1
|
|
1694
1735
|
// 1 publier, 0 non publier
|
|
1695
1736
|
}
|
|
1696
1737
|
};
|
|
1697
|
-
w(e, (
|
|
1738
|
+
w(e, (c) => {
|
|
1698
1739
|
const d = {
|
|
1699
1740
|
"Content-type": "application/json;charset=UTF-8",
|
|
1700
1741
|
Accept: "application/json",
|
|
1701
|
-
"X-DS-SWYM-CSRFTOKEN":
|
|
1742
|
+
"X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
|
|
1702
1743
|
};
|
|
1703
|
-
|
|
1744
|
+
f(o, {
|
|
1704
1745
|
method: "POST",
|
|
1705
1746
|
headers: d,
|
|
1706
1747
|
data: JSON.stringify(a),
|
|
1707
1748
|
type: "json",
|
|
1708
1749
|
onComplete(l, p, u) {
|
|
1709
|
-
const
|
|
1710
|
-
|
|
1750
|
+
const m = JSON.parse(l);
|
|
1751
|
+
m.status = u.status, m.response = u.response, n && n(m);
|
|
1711
1752
|
},
|
|
1712
1753
|
onFailure(l, p, u) {
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1754
|
+
const m = l;
|
|
1755
|
+
m.status = p.status, m.response = p.errormsg, s && s(m);
|
|
1715
1756
|
}
|
|
1716
1757
|
});
|
|
1717
1758
|
});
|
|
1718
1759
|
}
|
|
1719
|
-
function
|
|
1720
|
-
const o = `${e.space}/api/idea/delete`,
|
|
1760
|
+
function ze(e, t, n = void 0, s = void 0) {
|
|
1761
|
+
const o = `${e.space}/api/idea/delete`, r = {
|
|
1721
1762
|
params: {
|
|
1722
1763
|
community_id: t.community_id,
|
|
1723
1764
|
ideationIds: [t.idee_id]
|
|
1724
1765
|
}
|
|
1725
1766
|
};
|
|
1726
1767
|
w(e, (i) => {
|
|
1727
|
-
|
|
1768
|
+
f(o, {
|
|
1728
1769
|
method: "POST",
|
|
1729
1770
|
headers: {
|
|
1730
1771
|
"Content-type": "application/json;charset=UTF-8",
|
|
1731
1772
|
Accept: "application/json",
|
|
1732
1773
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1733
1774
|
},
|
|
1734
|
-
data: JSON.stringify(
|
|
1775
|
+
data: JSON.stringify(r),
|
|
1735
1776
|
type: "json",
|
|
1736
|
-
onComplete(a,
|
|
1777
|
+
onComplete(a, c, d) {
|
|
1737
1778
|
n && n(a);
|
|
1738
1779
|
},
|
|
1739
|
-
onFailure(a,
|
|
1780
|
+
onFailure(a, c, d) {
|
|
1740
1781
|
const l = a;
|
|
1741
|
-
l.status =
|
|
1782
|
+
l.status = c.status, l.response = c.errormsg, s && s(l);
|
|
1742
1783
|
}
|
|
1743
1784
|
});
|
|
1744
1785
|
});
|
|
1745
1786
|
}
|
|
1746
|
-
function
|
|
1787
|
+
function Qe(e, t = "", n = void 0, s = void 0) {
|
|
1747
1788
|
const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
|
|
1748
1789
|
t === "" && (t = o);
|
|
1749
|
-
const
|
|
1790
|
+
const r = `${e.space}/api/idea/get`, i = {
|
|
1750
1791
|
params: {
|
|
1751
1792
|
id: t
|
|
1752
1793
|
}
|
|
1753
1794
|
};
|
|
1754
1795
|
w(e, (a) => {
|
|
1755
|
-
|
|
1796
|
+
f(r, {
|
|
1756
1797
|
method: "POST",
|
|
1757
1798
|
headers: {
|
|
1758
1799
|
"Content-type": "application/json;charset=UTF-8",
|
|
@@ -1761,41 +1802,41 @@ function He(e, t = "", n = void 0, s = void 0) {
|
|
|
1761
1802
|
},
|
|
1762
1803
|
data: JSON.stringify(i),
|
|
1763
1804
|
type: "json",
|
|
1764
|
-
onComplete(
|
|
1765
|
-
const d =
|
|
1805
|
+
onComplete(c) {
|
|
1806
|
+
const d = c;
|
|
1766
1807
|
d.msg = d.result.message, n && n(d);
|
|
1767
1808
|
},
|
|
1768
|
-
onFailure(
|
|
1769
|
-
const d =
|
|
1809
|
+
onFailure(c) {
|
|
1810
|
+
const d = c;
|
|
1770
1811
|
d.status = headers.status, d.response = headers.errormsg, s && s(d);
|
|
1771
1812
|
}
|
|
1772
1813
|
});
|
|
1773
1814
|
});
|
|
1774
1815
|
}
|
|
1775
|
-
function
|
|
1816
|
+
function Ze(e, t = se, n = void 0, s = void 0) {
|
|
1776
1817
|
const o = {
|
|
1777
1818
|
uri: "/api/idea/list",
|
|
1778
1819
|
comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
|
|
1779
1820
|
limit: `/limit/${t.limit ? t.limit : 10}`
|
|
1780
|
-
},
|
|
1821
|
+
}, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
|
|
1781
1822
|
w(e, (i) => {
|
|
1782
|
-
|
|
1823
|
+
f(r, {
|
|
1783
1824
|
method: "GET",
|
|
1784
1825
|
headers: {
|
|
1785
1826
|
"X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
|
|
1786
1827
|
},
|
|
1787
1828
|
onComplete(a) {
|
|
1788
|
-
const
|
|
1789
|
-
n && n(
|
|
1829
|
+
const c = JSON.parse(a);
|
|
1830
|
+
n && n(c);
|
|
1790
1831
|
},
|
|
1791
|
-
onFailure(a,
|
|
1832
|
+
onFailure(a, c) {
|
|
1792
1833
|
const d = a;
|
|
1793
|
-
d.status =
|
|
1834
|
+
d.status = c.status, d.response = c.errormsg, s && s(d);
|
|
1794
1835
|
}
|
|
1795
1836
|
});
|
|
1796
1837
|
});
|
|
1797
1838
|
}
|
|
1798
|
-
function
|
|
1839
|
+
function ae(e) {
|
|
1799
1840
|
return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
1800
1841
|
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
1801
1842
|
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
@@ -1870,34 +1911,34 @@ function se(e) {
|
|
|
1870
1911
|
<p>
|
|
1871
1912
|
</p>` : e;
|
|
1872
1913
|
}
|
|
1873
|
-
function
|
|
1914
|
+
function et(e, t = void 0, n = void 0) {
|
|
1874
1915
|
const s = e.space + "/api/user/getcurrent/";
|
|
1875
1916
|
w(e, (o) => {
|
|
1876
|
-
|
|
1917
|
+
f(s, {
|
|
1877
1918
|
method: "GET",
|
|
1878
1919
|
headers: {
|
|
1879
1920
|
"X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
|
|
1880
1921
|
},
|
|
1881
|
-
onComplete(
|
|
1882
|
-
const
|
|
1883
|
-
t && t(
|
|
1922
|
+
onComplete(r, i, a) {
|
|
1923
|
+
const c = JSON.parse(r);
|
|
1924
|
+
t && t(c.result);
|
|
1884
1925
|
},
|
|
1885
|
-
onFailure(
|
|
1886
|
-
const
|
|
1887
|
-
n && n(
|
|
1926
|
+
onFailure(r, i, a) {
|
|
1927
|
+
const c = { erreur: JSON.parse(r), headers: i, xhr: a };
|
|
1928
|
+
n && n(c);
|
|
1888
1929
|
}
|
|
1889
1930
|
});
|
|
1890
1931
|
});
|
|
1891
1932
|
}
|
|
1892
|
-
function
|
|
1933
|
+
function tt(e, t, n = void 0, s = void 0) {
|
|
1893
1934
|
const o = e.space + "/api/user/find/login/" + t;
|
|
1894
1935
|
w(
|
|
1895
1936
|
e,
|
|
1896
|
-
(
|
|
1897
|
-
|
|
1937
|
+
(r) => {
|
|
1938
|
+
f(o, {
|
|
1898
1939
|
method: "GET",
|
|
1899
|
-
headers: { "X-DS-SWYM-CSRFTOKEN":
|
|
1900
|
-
onComplete(i, a,
|
|
1940
|
+
headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
|
|
1941
|
+
onComplete(i, a, c) {
|
|
1901
1942
|
const d = JSON.parse(i);
|
|
1902
1943
|
n && n(d);
|
|
1903
1944
|
},
|
|
@@ -1909,11 +1950,24 @@ function Ze(e, t, n = void 0, s = void 0) {
|
|
|
1909
1950
|
s
|
|
1910
1951
|
);
|
|
1911
1952
|
}
|
|
1912
|
-
function
|
|
1953
|
+
function nt(e, t = void 0, n = void 0) {
|
|
1954
|
+
e.tenant && E(e, (s) => {
|
|
1955
|
+
const o = s.find((a) => a.id === "3dpassport")?.url, r = s.find((a) => a.id === "businessprocess")?.url + "/api/v2", i = `${o}/login/?service=${r}/auth/cas`;
|
|
1956
|
+
f(i, {
|
|
1957
|
+
onComplete(a, c) {
|
|
1958
|
+
console.log("response", a), console.log("headers", c);
|
|
1959
|
+
},
|
|
1960
|
+
onFailure(a) {
|
|
1961
|
+
n && n(a);
|
|
1962
|
+
}
|
|
1963
|
+
});
|
|
1964
|
+
});
|
|
1965
|
+
}
|
|
1966
|
+
function st(e) {
|
|
1913
1967
|
const t = "Hello " + e;
|
|
1914
1968
|
return console.log(t), t;
|
|
1915
1969
|
}
|
|
1916
|
-
function
|
|
1970
|
+
function at(e, t = void 0, n = void 0) {
|
|
1917
1971
|
return console.log("credentials", e), new Promise((s) => {
|
|
1918
1972
|
if (e.token === "" && T(e), !e.space || e.space === "") {
|
|
1919
1973
|
const i = J();
|
|
@@ -1930,14 +1984,14 @@ function tt(e, t = void 0, n = void 0) {
|
|
|
1930
1984
|
},
|
|
1931
1985
|
!0
|
|
1932
1986
|
);
|
|
1933
|
-
const o = N.now().ts,
|
|
1934
|
-
|
|
1987
|
+
const o = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
1988
|
+
f(r, {
|
|
1935
1989
|
onComplete(i) {
|
|
1936
1990
|
if (Array.isArray(JSON.parse(i))) {
|
|
1937
1991
|
const a = JSON.parse(i);
|
|
1938
1992
|
console.log("serviceId=3dsearch", a);
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1993
|
+
const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
|
|
1994
|
+
f(c, {
|
|
1941
1995
|
method: "POST",
|
|
1942
1996
|
headers: {
|
|
1943
1997
|
Accept: "application/json",
|
|
@@ -1993,75 +2047,78 @@ function tt(e, t = void 0, n = void 0) {
|
|
|
1993
2047
|
});
|
|
1994
2048
|
}
|
|
1995
2049
|
export {
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2050
|
+
U as UUID,
|
|
2051
|
+
at as _3DSearch_usersGroup,
|
|
2052
|
+
ve as _3DSpace_Create_Doc,
|
|
2053
|
+
Ie as _3DSpace_bookmark_addSubsciptions,
|
|
2000
2054
|
T as _3DSpace_csrf,
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2055
|
+
I as _3DSpace_download_doc,
|
|
2056
|
+
B as _3DSpace_download_multidoc,
|
|
2057
|
+
V as _3DSpace_file_update,
|
|
2058
|
+
W as _3DSpace_file_update_csr,
|
|
2059
|
+
Fe as _3DSpace_file_url_csr,
|
|
2006
2060
|
k as _3DSpace_get_csrf,
|
|
2007
|
-
|
|
2008
|
-
|
|
2061
|
+
X as _3DSpace_get_docInfo,
|
|
2062
|
+
Y as _3DSpace_get_downloadTicket_multidoc,
|
|
2009
2063
|
b as _3DSpace_get_securityContexts,
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2064
|
+
D as _3DSpace_get_ticket,
|
|
2065
|
+
Ue as _3DSpace_lifecycle_changeRevision,
|
|
2066
|
+
Ae as _3DSpace_lifecycle_changeState,
|
|
2067
|
+
$e as _3DSpace_lifecycle_getGraph,
|
|
2068
|
+
je as _3DSpace_lifecycle_getNextRevision,
|
|
2015
2069
|
De as _3DSpace_lifecycle_getNextStates,
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2070
|
+
qe as _3DSwym_buildDirectMessage,
|
|
2071
|
+
ze as _3DSwym_deleteIdea,
|
|
2072
|
+
te as _3DSwym_findCommunityToInstantMSG,
|
|
2073
|
+
Be as _3DSwym_getAllCommunities,
|
|
2074
|
+
Ve as _3DSwym_getAllNews,
|
|
2075
|
+
We as _3DSwym_getFamiliarPeople,
|
|
2076
|
+
Ye as _3DSwym_getIdeaStatusMaturity,
|
|
2077
|
+
ee as _3DSwym_getMembersCommunity,
|
|
2078
|
+
Qe as _3DSwym_getSWYMIdea,
|
|
2079
|
+
Ze as _3DSwym_get_AllSWYMIdeas,
|
|
2080
|
+
et as _3DSwym_get_currentUser,
|
|
2081
|
+
tt as _3DSwym_get_findUser,
|
|
2028
2082
|
w as _3DSwym_get_version,
|
|
2029
|
-
|
|
2083
|
+
He as _3DSwym_postIdea,
|
|
2030
2084
|
$ as _3DSwym_sendMessageData,
|
|
2031
|
-
|
|
2032
|
-
|
|
2085
|
+
ye as _AppMngt_get_info_user,
|
|
2086
|
+
_e as _AppMngt_get_users,
|
|
2087
|
+
nt as _Iterop_Auth_CAS,
|
|
2033
2088
|
J as _getPlateformInfos,
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
ue as
|
|
2039
|
-
|
|
2040
|
-
|
|
2089
|
+
ge as _getPlatformServices,
|
|
2090
|
+
E as _getServiceUrl,
|
|
2091
|
+
he as _getServiceUrl_3DPassport,
|
|
2092
|
+
f as _httpCallAuthenticated,
|
|
2093
|
+
ue as _setDraggable,
|
|
2094
|
+
me as _setDroppable,
|
|
2095
|
+
fe as _setupTagger,
|
|
2096
|
+
Ge as addTagToDoc,
|
|
2097
|
+
Se as compass_getListAdditionalApps,
|
|
2041
2098
|
L as couleurs,
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2099
|
+
we as createUserGroups,
|
|
2100
|
+
q as dataMixing,
|
|
2101
|
+
Oe as deleteUserGroups,
|
|
2102
|
+
de as findAdresse,
|
|
2103
|
+
Re as getAllContextSecurity,
|
|
2104
|
+
K as getCSRFToken,
|
|
2105
|
+
ce as getCommunes,
|
|
2106
|
+
Ce as getComplementUG,
|
|
2107
|
+
Pe as getDataFrom3DSpace,
|
|
2108
|
+
le as getDataFromGouvFr,
|
|
2109
|
+
Je as getDatasByTenant,
|
|
2110
|
+
Ee as getDatasFrom3DSpace,
|
|
2111
|
+
xe as getDownloadDocument,
|
|
2112
|
+
Xe as getInfoDocTags,
|
|
2113
|
+
Te as getUserGroupsList,
|
|
2114
|
+
G as getUsersGroupRules,
|
|
2115
|
+
Le as get_3DSpace_csrf,
|
|
2116
|
+
be as patchUserGroups,
|
|
2117
|
+
Ne as patchUserGroupsControl,
|
|
2118
|
+
Me as pushDataIn3DSpace,
|
|
2119
|
+
ke as readUserGroupControl,
|
|
2120
|
+
Ke as removeTagToDoc,
|
|
2121
|
+
st as sayHello,
|
|
2122
|
+
pe as updateEvent
|
|
2066
2123
|
};
|
|
2067
2124
|
//# sourceMappingURL=wb3Api.js.map
|