@beam3_dev/api_module 0.0.157 → 0.0.159

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 DELETED
@@ -1,2290 +0,0 @@
1
- import { v4 as E } from "uuid";
2
- import { DateTime as v } from "luxon";
3
- import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
4
- function D() {
5
- return E();
6
- }
7
- const G = {
8
- b3M3Yellow: "#FFB300",
9
- b3AboutageBlue: "#42A5F5",
10
- b3UsinageGreen: "#689F38",
11
- b3PanneauOrange: "#ff8000",
12
- b3M350percent: "#fafa6e",
13
- b3M380percent: "#aae479",
14
- b3M390percent: "#64c987",
15
- b3M3100percent: "#23aa8f",
16
- b3M3105percent: "#00898a",
17
- b3M3110percent: "#176877",
18
- b3M3120percent: "#2a4858",
19
- b3Aboutage50percent: "#fafa6e",
20
- b3Aboutage80percent: "#aae479",
21
- b3Aboutage90percent: "#64c987",
22
- b3Aboutage100percent: "#23aa8f",
23
- b3Aboutage105percent: "#00898a",
24
- b3Aboutage110percent: "#176877",
25
- b3Aboutage120percent: "#2a4858",
26
- b3Warning: "#FF0000",
27
- b3Edit1: "#AD1457",
28
- b3Edit2: "#F4511E",
29
- b3Edit3: "#009688",
30
- b3Edit4: "#D50000",
31
- b3Edit5: "#039BE5",
32
- b3Edit6: "#9E69AF",
33
- b3Edit7: "#A79B8E",
34
- b3Edit8: "#616161",
35
- b3Edit9: "#795548"
36
- };
37
- async function fe(e, t = void 0, n = void 0) {
38
- const s = parseInt(e);
39
- await fetch(
40
- "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
41
- {
42
- method: "GET",
43
- headers: {
44
- Accept: "application/json"
45
- }
46
- }
47
- ).then((a) => a.json()).then((a) => {
48
- t && t(a);
49
- }).catch((a) => {
50
- n && n(a), console.error("Erreur : " + a);
51
- });
52
- }
53
- async function me(e, t = void 0, n = void 0) {
54
- e = encodeURIComponent(e), await fetch(
55
- "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
- {
57
- method: "GET",
58
- headers: {
59
- Accept: "application/json"
60
- }
61
- }
62
- ).then((s) => s.json()).then((s) => {
63
- t && t(s);
64
- }).catch((s) => {
65
- n && n(s), console.error("Erreur : " + s);
66
- });
67
- }
68
- async function ge(e, t = G) {
69
- let n = v.now().year;
70
- const s = e, a = [], r = (i) => {
71
- for (let c in i)
72
- a.push({ date: c, comment: i[c] });
73
- };
74
- for (let i = n; i <= n + 1; i++)
75
- await fetch(
76
- "https://calendrier.api.gouv.fr/jours-feries/metropole/" + i + ".json",
77
- {
78
- method: "GET",
79
- headers: {
80
- Accept: "application/json"
81
- }
82
- }
83
- ).then((c) => c.json()).then((c) => {
84
- r(c);
85
- }).catch((c) => console.error("Erreur : " + c));
86
- return (() => {
87
- const i = s.length === 0 ? {
88
- events: []
89
- } : s;
90
- for (let c of a)
91
- i.events.findIndex(
92
- (l) => l.start === v.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
93
- ) === -1 && i.events.push({
94
- name: "Férié : " + c.comment,
95
- start: v.fromISO(c.date).toISODate(),
96
- end: v.fromISO(c.date).toISODate(),
97
- color: t.b3BusinnessDays,
98
- timed: !1
99
- });
100
- return i;
101
- })();
102
- }
103
- async function he(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
- }
107
- function m(e, t) {
108
- O(["DS/WAFData/WAFData"], (n) => {
109
- n.authenticatedRequest(e, t);
110
- });
111
- }
112
- function Se(e, t, n) {
113
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
- s.draggable(e, {
115
- data: t,
116
- start: n
117
- });
118
- });
119
- }
120
- function ye(e, t = void 0) {
121
- O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
122
- let s;
123
- s === void 0 && (s = n.createProxy({
124
- widgetId: R.id,
125
- filteringMode: "WithFilteringServices"
126
- }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
127
- });
128
- }
129
- function _e(e, t) {
130
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
131
- n.droppable(e, {
132
- drop: t
133
- });
134
- });
135
- }
136
- async function we(e, t = void 0, n = void 0) {
137
- await O(
138
- ["DS/i3DXCompassServices/i3DXCompassServices"],
139
- (s) => {
140
- (!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
141
- s.getPlatformServices({
142
- platformId: e,
143
- onComplete: t,
144
- onFailure: n
145
- })
146
- );
147
- }
148
- );
149
- }
150
- function K() {
151
- let e = {};
152
- return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
153
- const n = t.getTenant(), s = t.getUser(), a = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
154
- "com.3ds.wp.passport.cors"
155
- );
156
- e = {
157
- tenant: n,
158
- user: s,
159
- appsConfiguration: a,
160
- appConf: r
161
- };
162
- }), console.log("%cRETOUR API :", "color:blue", e), e;
163
- }
164
- function $(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
- m(s, {
168
- onComplete(a) {
169
- const r = typeof a == "string" ? JSON.parse(a) : a;
170
- if (r && "platforms" in r) {
171
- const o = r.platforms.find(
172
- (i) => i.id === e.tenant.toUpperCase()
173
- );
174
- t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
175
- } else
176
- n && n("_getServiceUrl return oResponse = undefined");
177
- },
178
- onFailure(a) {
179
- n && n(a);
180
- }
181
- });
182
- }
183
- }
184
- function Ce(e, t = void 0, n = void 0) {
185
- if (e.tenant) {
186
- const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
187
- m(s, {
188
- onComplete(a) {
189
- const r = JSON.parse(a);
190
- if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
191
- const o = `${r[0].services[0].url}`;
192
- t && t(o);
193
- }
194
- },
195
- onFailure(a) {
196
- n && n(a);
197
- }
198
- });
199
- }
200
- }
201
- function Te(e, t, n) {
202
- const s = {
203
- base: `${e.space}`,
204
- uri: "/resources/AppsMngt/api/custom/applications",
205
- option: `?filter=${e.tenant}`
206
- // facultatif
207
- }, a = `${s.base}${s.uri}${s.option}`;
208
- m(a, {
209
- method: "GET",
210
- headers: {
211
- "Content-Type": "application/json",
212
- Accept: "application/json"
213
- },
214
- onComplete(r, o, i) {
215
- const c = JSON.parse(r), d = c.data.map((l) => {
216
- const p = l.attributes.name, f = l.id;
217
- return { name: p, id: f };
218
- });
219
- t && t(d, c);
220
- },
221
- onFailure(r, o) {
222
- const i = r;
223
- i.msg = o.errormsg, i.errCode = o.errorcode, n && n(i);
224
- }
225
- });
226
- }
227
- function Oe(e, t = void 0, n = void 0) {
228
- let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
229
- m(s, {
230
- onComplete(a, r, o) {
231
- const i = JSON.parse(a);
232
- console.log("_AppMngt_get_users => ", i), t && t(i);
233
- },
234
- onFailure(a, r) {
235
- const o = a;
236
- o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
237
- }
238
- });
239
- }
240
- function be(e, t, n = void 0, s = void 0) {
241
- let a = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
- m(a, {
243
- onComplete(r, o, i) {
244
- const c = JSON.parse(r);
245
- n && n(c);
246
- },
247
- onFailure(r, o) {
248
- const i = r;
249
- i.msg = o.errormsg, i.errCode = o.errorcode, s && s(i);
250
- }
251
- });
252
- }
253
- const F = {
254
- "Content-Type": "application/json",
255
- Accept: "application/json,text/javascript,*/*"
256
- };
257
- function Ne(e, t, n = void 0, s = void 0) {
258
- const { space: a, currentUser: r } = e, i = `${a}${{
259
- URIUGr: "/3drdfpersist/resources/v1/usersgroup"
260
- }.URIUGr}`, c = {
261
- groups: [
262
- {
263
- title: t.title,
264
- description: t.description,
265
- members: t.members || [r.email, "samuel.mureau@beam3.fr"],
266
- pending_members: [],
267
- sharing: t.sharing,
268
- visibility: t.visibility
269
- }
270
- ]
271
- };
272
- m(i, {
273
- method: "POST",
274
- headers: F,
275
- data: JSON.stringify(c),
276
- onComplete(d) {
277
- n && n(JSON.parse(d));
278
- },
279
- onFailure(d, l) {
280
- console.log(d);
281
- const p = d;
282
- p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
283
- }
284
- });
285
- }
286
- function ve(e, t, n = void 0, s = void 0) {
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
- m(d, {
289
- opts: {
290
- method: "GET",
291
- headers: {
292
- "Content-Type": "application/json",
293
- Accept: "application/json,text/javascript,*/*"
294
- }
295
- },
296
- onComplete(f) {
297
- n && n(JSON.parse(f));
298
- },
299
- onFailure(f, u) {
300
- const g = f;
301
- g.msg = u.errormsg, g.errCode = u.errorcode, s && s(g);
302
- }
303
- });
304
- }
305
- function V(e, t = void 0, n = void 0) {
306
- const { space: s, tenant: a } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", i = `?tenant=dstenant:${a}`, c = {
307
- method: "GET",
308
- Accept: "application/json,*/*,test/javascript"
309
- }, d = `${r}${o}${i}`;
310
- m(d, {
311
- OPTsH: c,
312
- onComplete(l) {
313
- t && t(JSON.parse(l));
314
- },
315
- onFailure(l, p) {
316
- const f = l;
317
- f.msg = p.errormsg, f.errCode = p.errorcode, n && n(f);
318
- }
319
- });
320
- }
321
- function Ie(e, t = void 0, n = void 0) {
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
- "Content-Type": "application/json",
324
- Accept: "application/json,text/javascript,*/*"
325
- } };
326
- try {
327
- m(i, {
328
- opts: d,
329
- onComplete(l) {
330
- const p = JSON.parse(l), f = {}, u = p.groups.filter((g) => g.uri.startsWith("uuid:"));
331
- if (a && Object.keys(a).length > 0) {
332
- const g = u.filter((y) => y.owner === a.email), h = u.filter((y) => y.members.includes(a.email)), S = g.concat(h);
333
- f.iam = S, f.UG = u, f.iamMember = h, V(
334
- e,
335
- (y) => {
336
- f.rules = y, t && t(f);
337
- },
338
- (y) => {
339
- n && n(y);
340
- }
341
- );
342
- }
343
- },
344
- onFailure(l) {
345
- n && n(l);
346
- }
347
- });
348
- } catch (l) {
349
- console.log(l);
350
- }
351
- }
352
- function $e(e, t) {
353
- const { space: n } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
354
- m(a, {
355
- method: "DELETE"
356
- });
357
- }
358
- function Ae(e, t, n, s = void 0, a = void 0) {
359
- const { space: r, tenant: o } = e, i = {
360
- URITI: "/3drdfpersist/resources/v1/template-instances",
361
- URIUGr: "/3drdfpersist/resources/v1/usersgroup",
362
- nextURICh: "/characteristics",
363
- nextURIGr: "/group",
364
- nexURImem: "/members",
365
- OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
366
- OPTsTenant: `tenant=dstenant:${o}`
367
- }, c = n, d = `${r}${i.URIUGr}/${t}`, l = JSON.stringify(c);
368
- m(d, {
369
- headers: F,
370
- method: "PATCH",
371
- data: l,
372
- type: "json",
373
- onComplete(p) {
374
- s && s(p);
375
- },
376
- onFailure(p) {
377
- a && a(p);
378
- }
379
- });
380
- }
381
- function ke(e, t, n, s = void 0, a = void 0) {
382
- const { space: r } = e, i = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
- m(i, {
384
- method: "PATCH",
385
- headers: F,
386
- data: JSON.stringify(n),
387
- type: "json",
388
- onComplete(d) {
389
- s && s(d);
390
- },
391
- onFailure(d) {
392
- a && a(d);
393
- }
394
- });
395
- }
396
- function Fe(e, t, n = void 0, s = void 0) {
397
- const { space: a } = e, o = `${a}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
- m(o, {
399
- opts: {
400
- method: "GET",
401
- headers: {
402
- "Content-Type": "application/json",
403
- Accept: "application/json,text/javascript,*/*"
404
- }
405
- },
406
- onComplete(d) {
407
- n && n(JSON.parse(d));
408
- },
409
- onFailure(d) {
410
- s && s(d);
411
- }
412
- });
413
- }
414
- async function W(e, t, n) {
415
- if (e.space) {
416
- const s = `${e.space}/resources/v1/application/CSRF`;
417
- m(s, {
418
- onComplete(a) {
419
- a = JSON.parse(a), t && t(a.csrf);
420
- },
421
- onFailure(a, r, o) {
422
- n && n({ error: a, headers: r, xhr: o });
423
- }
424
- });
425
- }
426
- }
427
- var I = {};
428
- function B(e, t) {
429
- return Object.prototype.hasOwnProperty.call(e, t);
430
- }
431
- var X = function(e, t, n, s) {
432
- t = t || "&", n = n || "=";
433
- var a = {};
434
- if (typeof e != "string" || e.length === 0)
435
- return a;
436
- var r = /\+/g;
437
- e = e.split(t);
438
- var o = 1e3;
439
- s && typeof s.maxKeys == "number" && (o = s.maxKeys);
440
- var i = e.length;
441
- o > 0 && i > o && (i = o);
442
- for (var c = 0; c < i; ++c) {
443
- var d = e[c].replace(r, "%20"), l = d.indexOf(n), p, f, u, g;
444
- l >= 0 ? (p = d.substr(0, l), f = d.substr(l + 1)) : (p = d, f = ""), u = decodeURIComponent(p), g = decodeURIComponent(f), B(a, u) ? Array.isArray(a[u]) ? a[u].push(g) : a[u] = [a[u], g] : a[u] = g;
445
- }
446
- return a;
447
- }, N = function(e) {
448
- switch (typeof e) {
449
- case "string":
450
- return e;
451
- case "boolean":
452
- return e ? "true" : "false";
453
- case "number":
454
- return isFinite(e) ? e : "";
455
- default:
456
- return "";
457
- }
458
- }, Y = function(e, t, n, s) {
459
- return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(a) {
460
- var r = encodeURIComponent(N(a)) + n;
461
- return Array.isArray(e[a]) ? e[a].map(function(o) {
462
- return r + encodeURIComponent(N(o));
463
- }).join(t) : r + encodeURIComponent(N(e[a]));
464
- }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
465
- };
466
- I.decode = I.parse = X;
467
- I.encode = I.stringify = Y;
468
- async function H(e, t = void 0, n = void 0, s = void 0) {
469
- const a = e.space;
470
- if (t === void 0) {
471
- console.log("Le paramètre docid est obligatoire");
472
- return;
473
- }
474
- const r = a + `/resources/v1/modeler/documents/${t}`;
475
- m(r, {
476
- onComplete(o, i, c) {
477
- const d = JSON.parse(o);
478
- n && n(d);
479
- },
480
- onFailure(o) {
481
- s && s(o);
482
- }
483
- });
484
- }
485
- async function Ue(e, t = void 0, n = void 0, s = void 0) {
486
- const a = e.space;
487
- if (t === void 0) {
488
- console.log("Le paramètre docids est obligatoire");
489
- return;
490
- }
491
- let r = `${a}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = I.stringify({
492
- $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
493
- });
494
- m(r, {
495
- method: "POST",
496
- headers: {
497
- "Content-Type": "application/x-www-form-urlencoded"
498
- },
499
- data: o,
500
- onComplete(i, c, d) {
501
- const l = JSON.parse(i);
502
- n && n(l);
503
- },
504
- onFailure(i) {
505
- s && s(i);
506
- }
507
- });
508
- }
509
- function A(e, t = void 0, n = void 0) {
510
- if (e.objID && e.objID !== "") {
511
- let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
512
- m(s, {
513
- onComplete(a, r, o) {
514
- const i = JSON.parse(a);
515
- e.token = i?.csrf?.value, e.datas = i?.data[0], t && t(e);
516
- },
517
- onFailure(a) {
518
- n && n(a);
519
- }
520
- });
521
- } else
522
- T(
523
- e,
524
- (s) => {
525
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
526
- },
527
- (s) => {
528
- n && n(s);
529
- }
530
- );
531
- }
532
- function T(e, t = void 0, n = void 0) {
533
- if (e.space) {
534
- const s = e.space + "/resources/v1/application/CSRF";
535
- m(s, {
536
- onComplete(a, r, o) {
537
- const i = JSON.parse(a);
538
- t && t(i.csrf.value);
539
- },
540
- onFailure(a, r, o) {
541
- n && n({
542
- response: a,
543
- headers: r,
544
- xhr: o
545
- });
546
- }
547
- });
548
- } else
549
- n && n("ERROR : url du 3DSpace non défini.");
550
- }
551
- function U(e, t = void 0, n = void 0) {
552
- let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
553
- A(
554
- e,
555
- (a) => {
556
- m(s, {
557
- method: "PUT",
558
- headers: {
559
- ENO_CSRF_TOKEN: e.token
560
- },
561
- onComplete(r, o) {
562
- const c = JSON.parse(r).data[0].dataelements.ticketURL;
563
- t && t(c, o);
564
- },
565
- onFailure(r, o) {
566
- console.warn("☠️ error => ", r, o), n && n(r, o);
567
- }
568
- });
569
- },
570
- (a) => {
571
- console.warn("_3DSpace_get_ticket / error => ", a), n && n(a);
572
- }
573
- );
574
- }
575
- function je(e, t, n, s = void 0, a = void 0) {
576
- const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
577
- n || (n = e.token), m(r, {
578
- method: "PUT",
579
- headers: {
580
- ENO_CSRF_TOKEN: n
581
- },
582
- onComplete(o) {
583
- let i = JSON.parse(o);
584
- if (console.log("☠️ info => ", i), i.success === !0)
585
- try {
586
- const c = i.data[0].dataelements.ticketURL;
587
- s && s(c);
588
- } catch (c) {
589
- a && a(c);
590
- }
591
- },
592
- onFailure(o) {
593
- a && a(o);
594
- }
595
- });
596
- }
597
- function z(e, t, n, s, a, r = void 0, o = void 0) {
598
- const i = () => q(
599
- e,
600
- t,
601
- n,
602
- s,
603
- a,
604
- e.token,
605
- r,
606
- o
607
- );
608
- e.token ? i() : A(
609
- e,
610
- t,
611
- (c) => {
612
- e.token = c.csrf.value, i();
613
- }
614
- );
615
- }
616
- function q(e, t, n, s, a, r, o = void 0, i = void 0) {
617
- const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
618
- m(c, {
619
- method: "PUT",
620
- headers: {
621
- ENO_CSRF_TOKEN: r
622
- },
623
- onComplete(d, l, p) {
624
- const f = JSON.parse(d).data[0].dataelements, u = new FormData();
625
- u.append("__fcs__jobTicket", f.ticket), u.append("file_0", s, a);
626
- const g = {};
627
- g.method = "POST", g.data = u, g.onComplete = function(h) {
628
- let S = "temp_" + Date.now(), y = {
629
- method: "PUT",
630
- headers: {
631
- ENO_CSRF_TOKEN: r
632
- },
633
- data: JSON.stringify({
634
- data: [{
635
- id: t,
636
- relateddata: {
637
- files: [{
638
- id: n,
639
- dataelements: {
640
- title: a,
641
- receipt: h
642
- },
643
- updateAction: "REVISE"
644
- }]
645
- },
646
- tempId: S
647
- }]
648
- }),
649
- type: "json",
650
- onComplete(_) {
651
- o && o(_);
652
- },
653
- onFailure(_) {
654
- i && i(_);
655
- }
656
- };
657
- m(
658
- e.space + "/resources/v1/modeler/documents",
659
- y
660
- );
661
- }, g.onFailure = function(h) {
662
- i && i(h);
663
- }, g.timeout = 0, m(f.ticketURL, g);
664
- }
665
- });
666
- }
667
- async function Pe(e, t, n, s, a = void 0, r = void 0) {
668
- const o = e.space, i = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
669
- type: "text/plain"
670
- }), p = {
671
- url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
672
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
673
- };
674
- if (!o && o !== "") {
675
- console.log("le store._3DSpace est vide");
676
- return;
677
- }
678
- m(p.url_Ticket, {
679
- method: "PUT",
680
- headers: {
681
- ENO_CSRF_TOKEN: i.value
682
- },
683
- onComplete(f, u, g) {
684
- const h = JSON.parse(f).data[0].dataelements;
685
- d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
686
- const S = {
687
- method: "POST",
688
- data: d,
689
- onComplete(C) {
690
- if (c !== "" && i !== "") {
691
- const k = {
692
- method: "POST",
693
- headers: {
694
- ENO_CSRF_TOKEN: i,
695
- Accept: "application/json",
696
- "Content-Type": "application/json"
697
- },
698
- data: JSON.stringify({
699
- data: [{
700
- type: "Document",
701
- dataelements: {
702
- title: `Title_${n.toLowerCase().split(" ").join("_")}`,
703
- policy: "Document Release",
704
- description: s
705
- },
706
- relateddata: {
707
- files: [{
708
- dataelements: {
709
- title: `${n}.json`,
710
- receipt: C
711
- }
712
- }]
713
- },
714
- tempId: D()
715
- }]
716
- }),
717
- type: "json",
718
- timeout: 0,
719
- onComplete: y,
720
- onFailure: _
721
- };
722
- c !== "" && m(p.url_Post, k);
723
- } else
724
- console.warn("le store est vide");
725
- },
726
- onFailure: _
727
- };
728
- function y(C) {
729
- console.log("Success -- response ", C.data[0]), a && a(C);
730
- }
731
- function _(C, k) {
732
- console.log("Erreur -- response ", C, `
733
- headers `, k), r && r(C);
734
- }
735
- m(h.ticketURL, S);
736
- }
737
- });
738
- }
739
- function b(e, t = void 0, n = void 0, s = void 0, a = void 0, r = void 0, o = !1) {
740
- const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
741
- m(i, {
742
- method: "GET",
743
- onComplete(c) {
744
- const d = JSON.parse(c);
745
- let l = "", p, f, u;
746
- if (t) {
747
- let g = d.collabspaces.find((h) => h.title === t);
748
- if (g) {
749
- p = t;
750
- let h = g.couples;
751
- h = h.filter(
752
- (S, y, _) => y === _.findIndex(
753
- (C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
754
- )
755
- ), n && (Array.isArray(n) ? n.forEach((S) => {
756
- u || h.forEach((y) => {
757
- if (S === y.role.name && s === y.organization.title)
758
- u = S, f = s;
759
- else if (S === y.role.name) {
760
- let _ = h.filter(
761
- (C) => C.role.name === S
762
- );
763
- _.length === 1 ? (u = _[0].role.name, f = _[0].organization.title) : r(_);
764
- }
765
- });
766
- }) : h.forEach((S) => {
767
- if (n === S.role.name && s === S.organization.title)
768
- u = n, f = s;
769
- else if (n === S.role.name) {
770
- let y = h.filter(
771
- (_) => _.role.name === n
772
- );
773
- y.length === 1 ? (u = y[0].role.name, f = y[0].organization.title) : r(y);
774
- }
775
- }));
776
- }
777
- }
778
- p && f && u ? (l = u + "." + f + "." + p, a(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, a(l)) : r && (l = u + "." + f + "." + p, r(l));
779
- },
780
- onFailure(c, d) {
781
- console.log("Erreur de récupération du contexte de sécurité. => ", {
782
- err: c,
783
- headers: d
784
- });
785
- }
786
- });
787
- }
788
- async function x(e, t = void 0, n = void 0) {
789
- return (!e.objID || e.objID === "") && console.warn(
790
- "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
791
- ), (e.space === "" || !e.space) && console.warn(
792
- "_3DSpace_download_doc() / Le paramètre space est obligatoire"
793
- ), (e.token === "" || !e.token) && W(
794
- e,
795
- (s) => {
796
- e.token = s;
797
- },
798
- (s) => {
799
- console.log("☠️ error => ", s);
800
- }
801
- ), new Promise((s, a) => {
802
- U(
803
- e,
804
- (r) => {
805
- e?.returnType === "blob" ? fetch(r).then((o) => o.blob()).then((o) => {
806
- t && t(o);
807
- }) : m(r, {
808
- onComplete(o) {
809
- let i;
810
- try {
811
- i = JSON.parse(o);
812
- } catch {
813
- i = o;
814
- }
815
- t && typeof t == "function" && t(i), s(i);
816
- },
817
- onFailure(o, i, c) {
818
- n && (console.log("error http", o), n({
819
- msg: JSON.parse(o),
820
- headers: i,
821
- xhr: c
822
- }), a({
823
- msg: JSON.parse(o),
824
- headers: i,
825
- xhr: c
826
- }));
827
- }
828
- });
829
- },
830
- (r) => {
831
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), a(r);
832
- }
833
- );
834
- });
835
- }
836
- async function Q(e, t, n = void 0, s = void 0) {
837
- let a = [];
838
- if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
839
- for (let i = 0; i < t.length; i += 80) {
840
- const c = t.slice(i, i + 80);
841
- a.push(c);
842
- }
843
- const o = (i) => {
844
- Z(
845
- e,
846
- a[i],
847
- () => {
848
- i++, i < a.length && o(i);
849
- },
850
- (c) => {
851
- n && n(c);
852
- }
853
- );
854
- };
855
- o(0);
856
- } else
857
- console.warn(
858
- "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
859
- ), s && s(
860
- "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
861
- );
862
- }
863
- function Z(e, t, n = void 0, s = void 0, a = void 0) {
864
- const r = [];
865
- t.forEach((c) => {
866
- r.push({
867
- id: c
868
- });
869
- });
870
- let o = JSON.stringify({
871
- csrf: {
872
- name: "ENO_CSRF_TOKEN",
873
- value: e.token
874
- },
875
- data: r
876
- });
877
- const i = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
878
- m(i, {
879
- method: "PUT",
880
- data: o,
881
- type: "json",
882
- onComplete(c) {
883
- const d = c.data;
884
- c.success === !0 && (n && n(), d.forEach((l) => {
885
- try {
886
- const p = l.dataelements.fileName, f = l.dataelements.ticketURL;
887
- m(f, {
888
- onComplete: (u, g) => {
889
- let h;
890
- try {
891
- h = JSON.parse(u);
892
- } catch {
893
- h = u.blob();
894
- }
895
- s && s({
896
- objectId: l.id,
897
- headers: g,
898
- fileName: p,
899
- data: h
900
- });
901
- },
902
- onFailure: (u) => {
903
- console.log("error http", u);
904
- }
905
- });
906
- } catch (p) {
907
- console.log(p), a && a(p);
908
- }
909
- }));
910
- },
911
- onFailure(c) {
912
- console.log(c), a && a(c);
913
- }
914
- });
915
- }
916
- function Re(e, t, n = void 0, s = void 0) {
917
- return new Promise((a) => {
918
- if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
919
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
920
- b(
921
- e.space,
922
- "ESPACE COMMUN",
923
- ["VPLMProjectLeader", "VPLMCreator"],
924
- void 0,
925
- (i) => e.ctx = i,
926
- (i) => {
927
- console.log("onError =>", i);
928
- }
929
- );
930
- let o = {
931
- method: "POST",
932
- headers: {
933
- SecurityContext: "ctx::" + e.ctx,
934
- ENO_CSRF_TOKEN: e.token,
935
- Accept: "application/json",
936
- "Content-Type": "application/json"
937
- },
938
- data: JSON.stringify({
939
- data: [{
940
- id: t
941
- }]
942
- }),
943
- type: "json",
944
- onComplete(i) {
945
- n && n(i);
946
- },
947
- onFailure(i) {
948
- s && s(i);
949
- }
950
- };
951
- m(r, o);
952
- }
953
- });
954
- }
955
- function De(e, t, n, s = void 0, a = void 0) {
956
- return new Promise((r) => {
957
- if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
958
- const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
959
- b(
960
- e.space,
961
- "ESPACE COMMUN",
962
- ["VPLMProjectLeader", "VPLMCreator"],
963
- void 0,
964
- (c) => e.ctx = c,
965
- (c) => {
966
- console.log("onError =>", c);
967
- }
968
- );
969
- let i = {
970
- method: "POST",
971
- headers: {
972
- SecurityContext: "ctx::" + e.ctx,
973
- ENO_CSRF_TOKEN: e.token,
974
- Accept: "application/json",
975
- "Content-Type": "application/json"
976
- },
977
- data: JSON.stringify({
978
- data: [{
979
- id: t,
980
- nextState: n
981
- }]
982
- }),
983
- type: "json",
984
- onComplete(c) {
985
- s && s(c);
986
- },
987
- onFailure(c) {
988
- a && a(c);
989
- }
990
- };
991
- m(o, i);
992
- }
993
- });
994
- }
995
- function xe(e, t, n = void 0, s = void 0) {
996
- return new Promise((a) => {
997
- if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
998
- const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
999
- b(
1000
- e.space,
1001
- "ESPACE COMMUN",
1002
- ["VPLMProjectLeader", "VPLMCreator"],
1003
- void 0,
1004
- (i) => e.ctx = i,
1005
- (i) => {
1006
- console.log("onError =>", i);
1007
- }
1008
- );
1009
- let o = {
1010
- method: "POST",
1011
- headers: {
1012
- securitycontext: "ctx::" + e.ctx,
1013
- ENO_CSRF_TOKEN: e.token,
1014
- Accept: "application/json",
1015
- "Content-Type": "application/json"
1016
- },
1017
- data: JSON.stringify({
1018
- graphRequests: [{
1019
- id: t
1020
- }]
1021
- }),
1022
- type: "json",
1023
- onComplete(i) {
1024
- n && n(i);
1025
- },
1026
- onFailure(i) {
1027
- s && s(i);
1028
- }
1029
- };
1030
- m(r, o);
1031
- }
1032
- });
1033
- }
1034
- function Me(e, t, n = void 0, s = void 0) {
1035
- return new Promise((a) => {
1036
- if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1037
- const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1038
- b(
1039
- e.space,
1040
- "ESPACE COMMUN",
1041
- ["VPLMProjectLeader", "VPLMCreator"],
1042
- void 0,
1043
- (i) => e.ctx = i,
1044
- (i) => {
1045
- console.log("onError =>", i);
1046
- }
1047
- );
1048
- let o = {
1049
- method: "POST",
1050
- headers: {
1051
- SecurityContext: "ctx::" + e.ctx,
1052
- ENO_CSRF_TOKEN: e.token,
1053
- Accept: "application/json",
1054
- "Content-Type": "application/json"
1055
- },
1056
- data: JSON.stringify({
1057
- data: [{
1058
- "attribute[PLMReference.V_versionComment]": null,
1059
- physicalid: t,
1060
- type: "Document",
1061
- tenant: e.tenant,
1062
- objectId: t,
1063
- policy: "Document Release",
1064
- availableSemantic: ["E", "LAST", "NEW", "DUP"]
1065
- }]
1066
- }),
1067
- type: "json",
1068
- onComplete(i) {
1069
- n && n(i);
1070
- },
1071
- onFailure(i) {
1072
- s && s(i);
1073
- }
1074
- };
1075
- m(r, o);
1076
- }
1077
- });
1078
- }
1079
- function Le(e, t, n, s = void 0, a = void 0) {
1080
- return new Promise((r) => {
1081
- if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1082
- const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1083
- b(
1084
- e.space,
1085
- "ESPACE COMMUN",
1086
- ["VPLMProjectLeader", "VPLMCreator"],
1087
- void 0,
1088
- (c) => e.ctx = c,
1089
- (c) => {
1090
- console.log("onError =>", c);
1091
- }
1092
- );
1093
- let i = {
1094
- method: "POST",
1095
- headers: {
1096
- securitycontext: "ctx::" + e.ctx,
1097
- ENO_CSRF_TOKEN: e.token,
1098
- Accept: "application/json",
1099
- "Content-Type": "application/json"
1100
- },
1101
- data: JSON.stringify({
1102
- data: [{
1103
- physicalid: t,
1104
- proposedRevision: n,
1105
- modifiedAttributes: {
1106
- revision: n
1107
- }
1108
- }],
1109
- folderid: null,
1110
- notificationTimeout: 600
1111
- }),
1112
- type: "json",
1113
- onComplete(c) {
1114
- s && s(c);
1115
- },
1116
- onFailure(c) {
1117
- a && a(c);
1118
- }
1119
- };
1120
- m(o, i);
1121
- }
1122
- });
1123
- }
1124
- function Je(e, t, n, s, a = void 0, r = void 0) {
1125
- return new Promise((o) => {
1126
- const i = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1127
- let c = {
1128
- attributes: {
1129
- title: n,
1130
- description: s,
1131
- inheritedAccess: "no"
1132
- }
1133
- }, d = {
1134
- items: []
1135
- };
1136
- t && (d.parentId = t), d.items.push(c);
1137
- let l = {
1138
- method: "POST",
1139
- headers: {
1140
- Accept: "application/json",
1141
- "Content-Type": "application/json",
1142
- SecurityContext: e.ctx,
1143
- ENO_CSRF_TOKEN: e.token
1144
- },
1145
- data: JSON.stringify(d),
1146
- type: "json",
1147
- onComplete(p) {
1148
- a && a(p);
1149
- },
1150
- onFailure(p) {
1151
- r && r(p);
1152
- }
1153
- };
1154
- m(i, l);
1155
- });
1156
- }
1157
- function Ee(e, t, n, s, a = void 0, r = void 0) {
1158
- return console.log("credentials", e), new Promise((o) => {
1159
- `${e.space}`, JSON.stringify({
1160
- csrf: {
1161
- name: "ENO_CSRF_TOKEN",
1162
- value: e.token
1163
- },
1164
- data: [{
1165
- type: "Workspace",
1166
- cestamp: "businessobject",
1167
- relId: t,
1168
- id: t,
1169
- dataelements: {
1170
- personList: n,
1171
- eventsList: s
1172
- },
1173
- tenant: e.tenant
1174
- }]
1175
- });
1176
- });
1177
- }
1178
- //!SECTION
1179
- function Ge(e, t = void 0, n = void 0) {
1180
- const s = {
1181
- base: `${e.space}`,
1182
- uri: "/resources/bps/cspaces",
1183
- optTenant: `tenant=${e.tenant}`
1184
- }, a = `${s.base}${s.uri}?${s.optTenant}`;
1185
- m(a, {
1186
- method: "GET",
1187
- headers: {
1188
- Accept: "application/json,text/javascript,*/*",
1189
- "Content-Type": "application/ds-json"
1190
- },
1191
- onComplete(r, o) {
1192
- const i = JSON.parse(r);
1193
- t && t(i, o);
1194
- },
1195
- onFailure(r, o, i) {
1196
- n && n({ response: r, headers: o, xhr: i });
1197
- }
1198
- });
1199
- }
1200
- function Ke(e, t, n, s) {
1201
- U(
1202
- e.space,
1203
- t,
1204
- (a) => {
1205
- m(a, {
1206
- header: { ENO_CSRF_TOKEN: e.token },
1207
- onComplete: (r) => {
1208
- n && n(r);
1209
- },
1210
- onFailure: (r) => {
1211
- console.log("error http", r), s && s(r);
1212
- }
1213
- });
1214
- }
1215
- );
1216
- }
1217
- async function Ve(e, t, n = void 0, s = void 0) {
1218
- return new Promise((a) => {
1219
- U(e, t, (r) => {
1220
- m(r, {
1221
- onComplete: (o, i, c) => (a(JSON.parse(o)), n && n(JSON.parse(o), i, c), a),
1222
- onFailure: (o, i, c) => {
1223
- s && s(o, i, c), console.log(o, i?.errormsg);
1224
- }
1225
- });
1226
- });
1227
- });
1228
- }
1229
- function We(e, t, n, s = void 0, a = void 0) {
1230
- const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1231
- A(
1232
- e,
1233
- n,
1234
- (o) => {
1235
- 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;
1236
- z(
1237
- e,
1238
- n,
1239
- i,
1240
- r,
1241
- c,
1242
- (d) => {
1243
- s && s(d);
1244
- },
1245
- (d) => {
1246
- a && a(d);
1247
- }
1248
- );
1249
- }
1250
- );
1251
- }
1252
- let M, L;
1253
- const j = [];
1254
- async function Be(e, t = void 0, n = void 0) {
1255
- e.objID && e.objID !== "" ? A(
1256
- e,
1257
- (s) => {
1258
- t && t(s);
1259
- },
1260
- (s) => {
1261
- n && n(s);
1262
- }
1263
- ) : (e.objID === null || e.objID === "") && T(
1264
- e,
1265
- (s) => {
1266
- t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1267
- },
1268
- (s) => {
1269
- n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1270
- }
1271
- );
1272
- }
1273
- async function Xe(e, t = void 0, n = void 0) {
1274
- console.log("getDatasByTenant (getDocuments)", e), await x(
1275
- e,
1276
- (s) => {
1277
- const a = {};
1278
- a.obj = s, console.log("getDatasByTenant (getDocuments) _datas", a), t && t?.(a);
1279
- },
1280
- (s) => {
1281
- n && n?.(s);
1282
- }
1283
- );
1284
- }
1285
- function Ye(e, t = void 0, n = void 0) {
1286
- const s = [];
1287
- if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1288
- console.warn("la liste est vide ou n'est pas un tableau");
1289
- return;
1290
- }
1291
- e.objIds.forEach((a, r) => {
1292
- x(
1293
- e,
1294
- a.objID,
1295
- (o) => {
1296
- s.push({ [a.name]: o }), a.name === "dbProjets" && (M = o.affaires.map((i) => i.objectID), ee(e, L)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1297
- }
1298
- );
1299
- });
1300
- }
1301
- function ee(e, t, n = void 0, s = void 0) {
1302
- Q(
1303
- e,
1304
- M,
1305
- (a) => {
1306
- const r = [...t];
1307
- r.find((o) => o.objectID === a.objectId).data = a.data, L = r, j.push(a.data), n && n(j);
1308
- },
1309
- (a) => {
1310
- s && (s(a), console.log(a));
1311
- }
1312
- );
1313
- }
1314
- const te = "FA35FB9B177A280065800EA0000F599C", ne = [
1315
- "swym",
1316
- "3dspace",
1317
- "drive",
1318
- "usersgroup",
1319
- "3dplan",
1320
- "dashboard"
1321
- ], J = {
1322
- how: "ds6w:how",
1323
- what: "ds6w:what",
1324
- when: "ds6w:when",
1325
- where: "ds6w:where",
1326
- who: "ds6w:who",
1327
- why: "ds6w:why"
1328
- }, se = {
1329
- objId: te,
1330
- pred: "who",
1331
- order_by: "desc",
1332
- tag: "testTag"
1333
- };
1334
- function He(e, t, n = void 0, s = void 0) {
1335
- const { space: a, tenant: r } = e, { objId: o, pred: i, tag: c } = t, d = {
1336
- uri: "/resources/6w/tags",
1337
- otpCTX: "SecurityContext=preferred",
1338
- optTenant: `tenant=${r}`
1339
- }, l = `${a}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1340
- tag: [
1341
- {
1342
- subject: [
1343
- {
1344
- uri: `pid://${o}`
1345
- }
1346
- ],
1347
- predicate: J[i],
1348
- object: {
1349
- literal: c
1350
- }
1351
- }
1352
- ]
1353
- };
1354
- m(l, {
1355
- method: "PUT",
1356
- headers: {
1357
- "Content-Type": "application/json",
1358
- Accept: "application/json"
1359
- },
1360
- data: JSON.stringify(p),
1361
- onComplete(f) {
1362
- JSON.parse(f);
1363
- const u = {};
1364
- setTimeout(() => {
1365
- H(
1366
- e,
1367
- o,
1368
- (g) => {
1369
- const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", y = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1370
- u.name = h, u.ext = S, u.createBy = y, t.info = { ...u }, ie(
1371
- e,
1372
- t,
1373
- (_) => {
1374
- n && n(_);
1375
- },
1376
- (_) => {
1377
- s && s(_);
1378
- }
1379
- );
1380
- },
1381
- (g, h) => {
1382
- const S = g;
1383
- S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
1384
- }
1385
- );
1386
- }, 2e3);
1387
- },
1388
- onFailure(f, u) {
1389
- const g = f;
1390
- g.msg = u.errormsg, g.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1391
- }
1392
- });
1393
- }
1394
- function ie(e, t, n = void 0, s = void 0) {
1395
- console.log("obj ", t);
1396
- const a = t.info.name, r = {
1397
- baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1398
- uri: "/federated/search"
1399
- }, o = `${r.baseUrl}${r.uri}`, i = {
1400
- "Content-Type": "application/json",
1401
- Accept: "application/json,text/javascript,*/*"
1402
- }, c = D(), d = {
1403
- with_indexing_date: !0,
1404
- with_synthesis: !0,
1405
- with_nls: !1,
1406
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1407
- locale: "fr",
1408
- select_predicate: [
1409
- "ds6w:label",
1410
- "ds6w:type",
1411
- "ds6w:description",
1412
- "ds6w:identifier",
1413
- "ds6w:modified",
1414
- "ds6w:created",
1415
- "ds6wg:revision",
1416
- "ds6w:status",
1417
- "ds6w:responsible",
1418
- "owner",
1419
- "ds6w:responsibleUid",
1420
- "ds6wg:filesize",
1421
- "ds6w:project",
1422
- "ds6w:dataSource",
1423
- "ds6w:community",
1424
- "ds6w:originator",
1425
- "dsgeo:referential",
1426
- "ds6w:lastModifiedBy",
1427
- "ds6w:repository",
1428
- "dcterms:title",
1429
- "dcterms:description",
1430
- "ds6w:containerUid"
1431
- ],
1432
- with_synthesis_hierarchical: !0,
1433
- select_file: ["icon", "thumbnail_2d"],
1434
- query: a,
1435
- specific_source_parameter: {
1436
- "3dspace": {
1437
- 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)'
1438
- },
1439
- drive: {
1440
- additional_query: ' AND NOT ([flattenedtaxonomies]:"types/DriveNode" AND ( [current]:"Trashed" OR [policy]:"Drive File Iteration") )'
1441
- }
1442
- },
1443
- select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
1444
- order_by: se.order_by,
1445
- order_field: "relevance",
1446
- select_snippets: [
1447
- "ds6w:snippet",
1448
- "ds6w:label:snippet",
1449
- "ds6w:responsible:snippet",
1450
- "ds6w:community:snippet",
1451
- "swym:message_text:snippet"
1452
- ],
1453
- nresults: 40,
1454
- start: "0",
1455
- source: ne,
1456
- tenant: e.tenant,
1457
- login: {
1458
- "3dspace": {
1459
- SecurityContext: e.ctx
1460
- }
1461
- }
1462
- };
1463
- console.log("dataPattern => ", d), m(o, {
1464
- method: "POST",
1465
- headers: i,
1466
- data: JSON.stringify(d),
1467
- onComplete(l) {
1468
- const p = JSON.parse(l);
1469
- n(p);
1470
- },
1471
- onFailure(l, p) {
1472
- const f = l;
1473
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", l);
1474
- }
1475
- });
1476
- }
1477
- function ze(e, t, n = void 0, s = void 0) {
1478
- const { objId: a, pred: r, tag: o } = t, i = {
1479
- uri: "/resources/6w/tags",
1480
- otpCTX: "SecurityContext=preferred",
1481
- optTenant: `tenant=${e.tenant}`
1482
- }, c = `${e.space}${i.uri}?${i.otpCTX}&${i.optTenant}`, d = {
1483
- tag: [
1484
- {
1485
- subject: [
1486
- {
1487
- uri: `pid://${a}`
1488
- }
1489
- ],
1490
- predicate: J[r],
1491
- object: {
1492
- literal: o
1493
- }
1494
- }
1495
- ]
1496
- };
1497
- m(c, {
1498
- method: "DELETE",
1499
- data: JSON.stringify(d),
1500
- headers: {
1501
- "Content-Type": "application/json",
1502
- Accept: "application/json,text/javascript,*/*"
1503
- },
1504
- onComplete(l) {
1505
- n && n(l);
1506
- },
1507
- onFailure(l, p) {
1508
- const f = l;
1509
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1510
- }
1511
- });
1512
- }
1513
- function qe(e, t = "", n = void 0, s = void 0) {
1514
- const { space: a } = e;
1515
- if (t === "")
1516
- return;
1517
- const r = {
1518
- uri: "/resources/v1/modeler/documents"
1519
- }, o = {
1520
- "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1521
- Accept: "application/json,text/javascript,*/*"
1522
- }, 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}`;
1523
- m(i, {
1524
- method: "POST",
1525
- headers: o,
1526
- data: c,
1527
- onComplete(d) {
1528
- n && n(JSON.parse(d));
1529
- },
1530
- onFailure(d, l) {
1531
- const p = d;
1532
- p.msg = l.error, s && s(p);
1533
- }
1534
- });
1535
- }
1536
- async function w(e, t = void 0, n = void 0) {
1537
- const s = e.space + "/api/index/tk";
1538
- return m(s, {
1539
- onComplete(a, r, o) {
1540
- const i = JSON.parse(a);
1541
- if (t)
1542
- return t(i), e.token = i?.result?.ServerToken;
1543
- },
1544
- onFailure(a) {
1545
- n && n(a);
1546
- }
1547
- });
1548
- }
1549
- function Qe(e, t = void 0, n = void 0) {
1550
- const s = `${e.space}/api/exalead/whatsnew`, a = {
1551
- params: {
1552
- community_id: null,
1553
- hash_key: null,
1554
- legacyFormat: !1,
1555
- nresults: 1,
1556
- query: "#all",
1557
- start: 0
1558
- }
1559
- };
1560
- w(e, (r) => {
1561
- m(s, {
1562
- method: "POST",
1563
- headers: {
1564
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1565
- "Content-type": "application/json;charset=UTF-8",
1566
- Accept: "application/json"
1567
- },
1568
- data: JSON.stringify(a),
1569
- type: "json",
1570
- onComplete(o, i) {
1571
- t && t(o, i);
1572
- },
1573
- onFailure(o, i) {
1574
- n && n(o, i);
1575
- }
1576
- });
1577
- });
1578
- }
1579
- function Ze(e, t = void 0, n = void 0) {
1580
- const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, a = {
1581
- params: {
1582
- idsToFilterArr: [],
1583
- mode: "offline",
1584
- limit: 30,
1585
- itemType: "User",
1586
- maxNbOfCommonElements: "5"
1587
- }
1588
- };
1589
- w(e, (r) => {
1590
- m(s, {
1591
- method: "POST",
1592
- headers: {
1593
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1594
- "Content-type": "application/json;charset=UTF-8",
1595
- Accept: "application/json"
1596
- },
1597
- data: JSON.stringify(a),
1598
- type: "json",
1599
- onComplete(o, i) {
1600
- const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1601
- t && t(c, o);
1602
- },
1603
- onFailure(o, i) {
1604
- n && n(o, i);
1605
- }
1606
- });
1607
- });
1608
- }
1609
- function et(e, t = void 0, n = void 0) {
1610
- const s = {
1611
- base: e.space,
1612
- uri: "/api/community/listmycommunities",
1613
- limit: `/limit/${e.limit ? e.limit : 128}`,
1614
- page: `/page/${e.page ? e.page : "1"}`
1615
- }, a = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1616
- w(e, (o) => {
1617
- m(a, {
1618
- method: "GET",
1619
- headers: {
1620
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1621
- },
1622
- onComplete(i, c, d) {
1623
- const p = JSON.parse(i).result;
1624
- let f = 0;
1625
- p.forEach((u) => {
1626
- const g = {
1627
- description: u.description,
1628
- id: u.id,
1629
- title: u.title,
1630
- owner: u.owner,
1631
- role: u.role,
1632
- access: u.access
1633
- };
1634
- ae(
1635
- e,
1636
- u.id,
1637
- (h) => {
1638
- f++, g.members = h, r.push(g), f === p.length && t && t(r);
1639
- },
1640
- (h) => n(h)
1641
- );
1642
- });
1643
- },
1644
- onFailure(i, c) {
1645
- const d = i;
1646
- d.status = c.status, d.response = c.errormsg, n && n(d);
1647
- }
1648
- });
1649
- });
1650
- }
1651
- function ae(e, t, n, s) {
1652
- const a = `${e.space}/api/community/listmembers`, r = {
1653
- params: {
1654
- page: e.page ? e.page : 1,
1655
- limit: e.limit ? e.limit : 50,
1656
- community_id: t
1657
- }
1658
- };
1659
- w(e, (o) => {
1660
- m(a, {
1661
- method: "POST",
1662
- headers: {
1663
- "Content-type": "application/json;charset=UTF-8",
1664
- Accept: "application/json",
1665
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1666
- },
1667
- data: JSON.stringify(r),
1668
- type: "json",
1669
- onComplete(i, c, d) {
1670
- n && n(i);
1671
- },
1672
- onFailure(i, c) {
1673
- const d = i;
1674
- d.status = c.status, d.response = c.errormsg, s && s(d);
1675
- }
1676
- });
1677
- });
1678
- }
1679
- function tt(e, t = void 0, n = void 0) {
1680
- const s = "YXdA5x4DSUKtlAi2wmnyTA";
1681
- e.commu_id || (e.commu_id = s);
1682
- const a = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1683
- w(e, (r) => {
1684
- m(a, {
1685
- method: "GET",
1686
- headers: {
1687
- "Content-type": "application/json;charset=UTF-8",
1688
- Accept: "application/json",
1689
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1690
- },
1691
- onComplete(o) {
1692
- const i = JSON.parse(o);
1693
- t && t(i);
1694
- },
1695
- onFailure(o, i) {
1696
- const c = o;
1697
- c.status = i.status, c.response = i.errormsg, n && n(c);
1698
- }
1699
- });
1700
- });
1701
- }
1702
- function nt(e, t, n = void 0, s = void 0) {
1703
- const { listAllContacts: a, currentUser: r } = e;
1704
- console.log("__listAllContacts", a.hits);
1705
- const o = `${e.space}/api/directmessages`, i = {
1706
- users: [r.login].concat(t.receipt)
1707
- }, c = {
1708
- id_msg: "",
1709
- senderId: e.currentUser.login,
1710
- senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
1711
- msg: re(t.msg)
1712
- };
1713
- let d = !1;
1714
- oe(
1715
- i.users,
1716
- (l) => {
1717
- l !== void 0 && (c.id_msg = l.id, d = !0, P(e, c));
1718
- },
1719
- (l) => {
1720
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1721
- }
1722
- ), d === !1 && setTimeout(() => {
1723
- d === !1 && w(e, (l) => {
1724
- m(o, {
1725
- method: "POST",
1726
- headers: {
1727
- "Content-Type": "application/json",
1728
- Accept: "application/json",
1729
- "X-DS-SWYM-CSRFTOKEN": l.result.ServerToken
1730
- },
1731
- data: JSON.stringify(i),
1732
- type: "json",
1733
- onComplete(p, f, u) {
1734
- const g = p;
1735
- g.reponse = JSON.parse(u.response), g.status = u.status, n && n(g), c.id_msg = g.result.id, P(e, c);
1736
- },
1737
- onFailure(p, f, u) {
1738
- const g = p;
1739
- g.msg = f.errormsg, g.status = f.status, s && s(g);
1740
- }
1741
- });
1742
- });
1743
- }, 500);
1744
- }
1745
- function oe(e, t, n, s) {
1746
- const a = `${e.space}/api/directmessages/lite?with_favorites=false`;
1747
- w(e, (r) => {
1748
- m(a, {
1749
- method: "GET",
1750
- headers: {
1751
- Accept: "application/json,text/javascript,*/*",
1752
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1753
- },
1754
- onComplete(o) {
1755
- const i = JSON.parse(o), c = [];
1756
- i.result.forEach((p) => {
1757
- p.users = p.users.sort((f, u) => f.login.localeCompare(u.login)), p.users.length === t.length && c.push(p);
1758
- });
1759
- const d = t.sort(), l = c.find((p) => {
1760
- const f = [];
1761
- return p.users.forEach((u) => {
1762
- f.push(u.login);
1763
- }), JSON.stringify(f) === JSON.stringify(d);
1764
- });
1765
- n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1766
- },
1767
- onFailure(o) {
1768
- const i = o;
1769
- i.msg = headers.errormsg, i.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", i), s && s(i);
1770
- }
1771
- });
1772
- });
1773
- }
1774
- function P(e, t, n = void 0, s = void 0) {
1775
- const a = {
1776
- base: e.space,
1777
- uri: "/api/community",
1778
- id_msg: `${t.id_msg}`,
1779
- endUri: "/instantmessages"
1780
- }, r = `${a.base}${a.uri}/${a.id_msg}${a.endUri}`, o = {
1781
- author: { login: t.senderId, displayName: t.senderName },
1782
- accessState: null,
1783
- commentUri: null,
1784
- comments: null,
1785
- endorsements: null,
1786
- moderationState: null,
1787
- parentCommentUri: null,
1788
- richMessage: t.msg
1789
- };
1790
- console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (i) => {
1791
- m(r, {
1792
- method: "POST",
1793
- headers: {
1794
- "Content-Type": "application/json",
1795
- Accept: "application/json",
1796
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1797
- },
1798
- data: JSON.stringify(o),
1799
- type: "json",
1800
- onComplete(c, d, l) {
1801
- const p = c;
1802
- p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1803
- },
1804
- onFailure(c, d) {
1805
- const l = c;
1806
- l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1807
- }
1808
- });
1809
- });
1810
- }
1811
- function re(e) {
1812
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1813
- return `<p>${e} </p>
1814
- <br/>
1815
- <hr/>
1816
- <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1817
- }
1818
- const ce = {
1819
- title: "TEST DEV COMMUNITY IDEA",
1820
- // titre du post
1821
- community_id: "YXdA5x4DSUKtlAi2wmnyTA",
1822
- // STATUT PROJETS - Phase commerciale, tenant PIVETEAU TEST
1823
- community_title: "TEST DEV COMMUNITY",
1824
- // Possibilité de recherche par titre de la communauté (option)
1825
- idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1826
- // id de l'idee qui est créer au post (_3dSwym_postIdea)
1827
- };
1828
- function st(e, t, n = void 0, s = void 0) {
1829
- const a = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1830
- (c) => c.id === t.community_id
1831
- ), o = e.swymCommunities.find(
1832
- (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1833
- ), i = {
1834
- params: {
1835
- title: t.title,
1836
- // String, le nom de l'affaire
1837
- community_id: r?.id !== void 0 ? r.id : o.id,
1838
- // String, l'id de la communauté
1839
- message: de(t.text_html),
1840
- // STRING => le contenue du message doit être au format HTML
1841
- published: 1
1842
- // 1 publier, 0 non publier
1843
- }
1844
- };
1845
- w(e, (c) => {
1846
- const d = {
1847
- "Content-type": "application/json;charset=UTF-8",
1848
- Accept: "application/json",
1849
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1850
- };
1851
- m(a, {
1852
- method: "POST",
1853
- headers: d,
1854
- data: JSON.stringify(i),
1855
- type: "json",
1856
- onComplete(l, p, f) {
1857
- const u = JSON.parse(l);
1858
- u.status = f.status, u.response = f.response, n && n(u);
1859
- },
1860
- onFailure(l, p, f) {
1861
- const u = l;
1862
- u.status = p.status, u.response = p.errormsg, s && s(u);
1863
- }
1864
- });
1865
- });
1866
- }
1867
- function it(e, t, n = void 0, s = void 0) {
1868
- const a = `${e.space}/api/idea/delete`, r = {
1869
- params: {
1870
- community_id: t.community_id,
1871
- ideationIds: [t.idee_id]
1872
- }
1873
- };
1874
- w(e, (o) => {
1875
- m(a, {
1876
- method: "POST",
1877
- headers: {
1878
- "Content-type": "application/json;charset=UTF-8",
1879
- Accept: "application/json",
1880
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1881
- },
1882
- data: JSON.stringify(r),
1883
- type: "json",
1884
- onComplete(i, c, d) {
1885
- n && n(i);
1886
- },
1887
- onFailure(i, c, d) {
1888
- const l = i;
1889
- l.status = c.status, l.response = c.errormsg, s && s(l);
1890
- }
1891
- });
1892
- });
1893
- }
1894
- function at(e, t = "", n = void 0, s = void 0) {
1895
- const a = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1896
- t === "" && (t = a);
1897
- const r = `${e.space}/api/idea/get`, o = {
1898
- params: {
1899
- id: t
1900
- }
1901
- };
1902
- w(e, (i) => {
1903
- m(r, {
1904
- method: "POST",
1905
- headers: {
1906
- "Content-type": "application/json;charset=UTF-8",
1907
- Accept: "application/json",
1908
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1909
- },
1910
- data: JSON.stringify(o),
1911
- type: "json",
1912
- onComplete(c) {
1913
- const d = c;
1914
- d.msg = d.result.message, n && n(d);
1915
- },
1916
- onFailure(c) {
1917
- const d = c;
1918
- d.status = headers.status, d.response = headers.errormsg, s && s(d);
1919
- }
1920
- });
1921
- });
1922
- }
1923
- function ot(e, t = ce, n = void 0, s = void 0) {
1924
- const a = {
1925
- uri: "/api/idea/list",
1926
- comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1927
- limit: `/limit/${t.limit ? t.limit : 10}`
1928
- }, r = `${e.space}${a.uri}${a.comId}${a.limit}`;
1929
- w(e, (o) => {
1930
- m(r, {
1931
- method: "GET",
1932
- headers: {
1933
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1934
- },
1935
- onComplete(i) {
1936
- const c = JSON.parse(i);
1937
- n && n(c);
1938
- },
1939
- onFailure(i, c) {
1940
- const d = i;
1941
- d.status = c.status, d.response = c.errormsg, s && s(d);
1942
- }
1943
- });
1944
- });
1945
- }
1946
- function de(e) {
1947
- return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
1948
- <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
1949
- <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
1950
- <p><strong>Référence client </strong>: <em>
1951
- <a data-predicate="ds6w:who" data-type="internal" class="s6m-tag-link s6m-link">CLIENT</a>
1952
- </em></p>
1953
- <p><strong>Référence projet </strong>: <em>
1954
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">NOM AFFAIRE</a>
1955
- <a data-predicate="ds6w:where" data-type="internal" class="s6m-tag-link s6m-link">VILLE</a>
1956
- <a data-predicate="ds6w:where" data-type="internal" class="s6m-tag-link s6m-link">DPT</a>
1957
- </em></p>
1958
- <p>&#x1f4dd; <strong>Base documentaire</strong> : LIEN projet</p>
1959
- <p>&#x1f4dd; <strong>Fiche COCLICO</strong> : LIEN projet<em><strong></strong>
1960
- </em></p>
1961
- <p><br /></p>
1962
- <table border="1">
1963
- <tbody>
1964
- <tr><td><strong>Description projet </strong>:
1965
- <br /><br /></td></tr>
1966
- </tbody>
1967
- </table>
1968
- <p><br /></p>
1969
- <p><br /></p>
1970
- <p><strong>Produit :<em> </em></strong><em>
1971
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Hexapli Usiné</a>
1972
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Hexapli MP</a>
1973
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Lamwood</a>
1974
- </em></p>
1975
- <p><strong>Type de Bâtiment :</strong><em>
1976
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Logements</a>
1977
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">BUP</a>
1978
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">ERP</a>
1979
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Plateforme Logistique</a>
1980
- </em></p>
1981
- <p><strong>Essence :</strong> <em>
1982
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">DOUGLAS</a>
1983
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">PIN</a>
1984
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">MIXTE</a>
1985
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">EPICEA</a>
1986
- </em></p>
1987
- <p><strong>Qualité : </strong><em>
1988
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">NVI</a>
1989
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">VI1F</a>
1990
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">VI2F</a>
1991
- </em><strong></strong></p>
1992
- <p><strong>Traitement : </strong><em>
1993
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">PARKA</a>
1994
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">CT2</a>
1995
- </em></p>
1996
- <p><strong>Type de Paroi : </strong><em>
1997
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Murs Intérieurs</a>
1998
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Murs Extérieurs</a>
1999
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Planchers</a>
2000
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Couverture</a>
2001
- </em></p>
2002
- <p><em>
2003
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Etanchéité Accessible</a>
2004
- <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Etanchéité Non-Accessible</a>
2005
- </em></p>
2006
- <p><strong>Hauteur Dernier Plancher :</strong><em><strong> </strong>
2007
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">Hauteur &lt;8m</a>
2008
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">8m&lt; Hauteur &lt;28m</a>
2009
- <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">28m&lt; Hauteur &lt;50m</a>
2010
- </em></p>
2011
- <h2><br /></h2>
2012
- <h2><u>EQUIPE PIVETEAU :</u></h2>
2013
- <table border="1">
2014
- <tbody>
2015
- <tr><td><strong>Chargé d&#39;Affaires</strong></td><td><br /></td></tr>
2016
- <tr><td><strong>Service études de prix</strong></td><td><br /></td></tr>
2017
- </tbody></table>
2018
- <p>
2019
- </p>` : e;
2020
- }
2021
- function rt(e, t = void 0, n = void 0) {
2022
- const s = e.space + "/api/user/getcurrent/";
2023
- w(e, (a) => {
2024
- m(s, {
2025
- method: "GET",
2026
- headers: {
2027
- "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
2028
- },
2029
- onComplete(r, o, i) {
2030
- const c = JSON.parse(r);
2031
- t && t(c.result);
2032
- },
2033
- onFailure(r, o, i) {
2034
- const c = { erreur: JSON.parse(r), headers: o, xhr: i };
2035
- n && n(c);
2036
- }
2037
- });
2038
- });
2039
- }
2040
- function ct(e, t, n = void 0, s = void 0) {
2041
- const a = e.space + "/api/user/find/login/" + t;
2042
- w(
2043
- e,
2044
- (r) => {
2045
- m(a, {
2046
- method: "GET",
2047
- headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2048
- onComplete(o, i, c) {
2049
- const d = JSON.parse(o);
2050
- n && n(d);
2051
- },
2052
- onFailure(o) {
2053
- s && s(o);
2054
- }
2055
- });
2056
- },
2057
- s
2058
- );
2059
- }
2060
- function dt(e, t = void 0, n = void 0) {
2061
- e.tenant && $(e, (s) => {
2062
- console.log("serviceUrls", s);
2063
- const a = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2064
- t && t(a);
2065
- });
2066
- }
2067
- function lt(e, t = void 0, n = void 0) {
2068
- e.tenant && $(e, (s) => {
2069
- console.log("serviceUrls", s);
2070
- 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`;
2071
- m(o, {
2072
- async onComplete(i) {
2073
- console.log("response", i);
2074
- const c = typeof i == "string" ? JSON.parse(i)?.x3ds_service_redirect_url : i?.x3ds_service_redirect_url;
2075
- await fetch(c, {
2076
- method: "POST"
2077
- }).then((d) => d.json()).then(async (d) => {
2078
- t && t(d?.token);
2079
- });
2080
- },
2081
- onFailure(i) {
2082
- n && n(i);
2083
- }
2084
- });
2085
- });
2086
- }
2087
- async function pt(e, t, n = void 0, s = void 0) {
2088
- e.tenant && $(e, (a) => {
2089
- const o = `${a.services.find((i) => i.id === "businessprocess")?.url + "/api/v2"}/identity/users`;
2090
- fetch(`https://api.uixhome.fr/iterop/listusers?t=${t}&s=${o}`, {
2091
- method: "POST"
2092
- }).then((i) => i.json()).then((i) => {
2093
- n && n(i);
2094
- }).catch((i) => {
2095
- s && s(i);
2096
- });
2097
- });
2098
- }
2099
- async function ut(e, t, n = void 0, s = void 0) {
2100
- e.tenant && $(e, (a) => {
2101
- const o = `${a.services.find((i) => i.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`;
2102
- fetch(`https://api.uixhome.fr/iterop/repository/data/tables?t=${t}&s=${o}`, {
2103
- method: "GET"
2104
- }).then((i) => i.json()).then((i) => {
2105
- n && n(i);
2106
- }).catch((i) => {
2107
- s && s(i);
2108
- });
2109
- });
2110
- }
2111
- async function ft(e, t, n, s, a = void 0, r = void 0) {
2112
- e.tenant && $(e, (o) => {
2113
- const i = o.services.find((d) => d.id === "businessprocess")?.url + "/api/v2", c = encodeURIComponent(`${i}`);
2114
- fetch(
2115
- `https://api.uixhome.fr/iterop/runtime/processes/${n}?t=${t}&s=${c}&b=${s}`,
2116
- {
2117
- method: "POST"
2118
- }
2119
- ).then((d) => d.json()).then((d) => {
2120
- a && a(d);
2121
- }).catch((d) => {
2122
- r && r(d);
2123
- });
2124
- });
2125
- }
2126
- function mt(e) {
2127
- const t = "Hello " + e;
2128
- return console.log(t), t;
2129
- }
2130
- function gt(e, t = void 0, n = void 0) {
2131
- return console.log("credentials", e), new Promise((s) => {
2132
- if (e.token === "" && T(e), !e.space || e.space === "") {
2133
- const o = K();
2134
- console.log("platformeInfo", o);
2135
- }
2136
- b(
2137
- e,
2138
- "Common space",
2139
- ["VPLMProjectLeader", "VPLMCreator"],
2140
- void 0,
2141
- (o) => e.ctx = o,
2142
- (o) => {
2143
- console.log("onError =>", o);
2144
- },
2145
- !0
2146
- );
2147
- const a = v.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2148
- m(r, {
2149
- onComplete(o) {
2150
- if (Array.isArray(JSON.parse(o))) {
2151
- const i = JSON.parse(o);
2152
- console.log("serviceId=3dsearch", i);
2153
- const c = `${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2154
- m(c, {
2155
- method: "POST",
2156
- headers: {
2157
- Accept: "application/json",
2158
- "Content-Type": "application/json"
2159
- },
2160
- data: JSON.stringify({
2161
- with_indexing_date: !0,
2162
- with_nls: !1,
2163
- label: `3DSearch-${a}`,
2164
- locale: "en",
2165
- select_predicate: [
2166
- "ds6w:label",
2167
- "ds6w:type",
2168
- "ds6w:description",
2169
- "ds6w:identifier",
2170
- "ds6w:responsible",
2171
- "ds6wg:fullname"
2172
- ],
2173
- select_file: [
2174
- "icon",
2175
- "thumbnail_2d"
2176
- ],
2177
- query: '([ds6w:type]:(Group) AND [ds6w:status]:(Public)) OR (flattenedtaxonomies:"types/Person" AND current:"active")',
2178
- order_by: "desc",
2179
- order_field: "relevance",
2180
- nresults: 1e3,
2181
- start: "0",
2182
- source: [
2183
- "3dspace",
2184
- "usersgroup"
2185
- ],
2186
- tenant: e.tenant,
2187
- login: {
2188
- "3dspace": {
2189
- SecurityContext: `ctx::${e.ctx}`
2190
- }
2191
- }
2192
- }),
2193
- type: "json",
2194
- onComplete(d) {
2195
- t && t(d);
2196
- },
2197
- onFailure(d) {
2198
- n && n(d);
2199
- }
2200
- });
2201
- }
2202
- },
2203
- onFailure(o) {
2204
- n && n(o);
2205
- }
2206
- });
2207
- });
2208
- }
2209
- export {
2210
- D as UUID,
2211
- gt as _3DSearch_usersGroup,
2212
- Pe as _3DSpace_Create_Doc,
2213
- Ee as _3DSpace_bookmark_addSubsciptions,
2214
- Je as _3DSpace_bookmark_newWorkspace,
2215
- T as _3DSpace_csrf,
2216
- x as _3DSpace_download_doc,
2217
- Q as _3DSpace_download_multidoc,
2218
- z as _3DSpace_file_update,
2219
- q as _3DSpace_file_update_csr,
2220
- je as _3DSpace_file_url_csr,
2221
- A as _3DSpace_get_csrf,
2222
- H as _3DSpace_get_docInfo,
2223
- Z as _3DSpace_get_downloadTicket_multidoc,
2224
- Ue as _3DSpace_get_multiDocInfo,
2225
- b as _3DSpace_get_securityContexts,
2226
- U as _3DSpace_get_ticket,
2227
- Le as _3DSpace_lifecycle_changeRevision,
2228
- De as _3DSpace_lifecycle_changeState,
2229
- xe as _3DSpace_lifecycle_getGraph,
2230
- Me as _3DSpace_lifecycle_getNextRevision,
2231
- Re as _3DSpace_lifecycle_getNextStates,
2232
- nt as _3DSwym_buildDirectMessage,
2233
- it as _3DSwym_deleteIdea,
2234
- oe as _3DSwym_findCommunityToInstantMSG,
2235
- et as _3DSwym_getAllCommunities,
2236
- Qe as _3DSwym_getAllNews,
2237
- Ze as _3DSwym_getFamiliarPeople,
2238
- tt as _3DSwym_getIdeaStatusMaturity,
2239
- ae as _3DSwym_getMembersCommunity,
2240
- at as _3DSwym_getSWYMIdea,
2241
- ot as _3DSwym_get_AllSWYMIdeas,
2242
- rt as _3DSwym_get_currentUser,
2243
- ct as _3DSwym_get_findUser,
2244
- w as _3DSwym_get_version,
2245
- st as _3DSwym_postIdea,
2246
- P as _3DSwym_sendMessageData,
2247
- be as _AppMngt_get_info_user,
2248
- Oe as _AppMngt_get_users,
2249
- lt as _Iterop_Auth_CAS,
2250
- pt as _Iterop_ListUsers,
2251
- ut as _Iterop_getAllBusinessTables,
2252
- ft as _Iterop_runProcess,
2253
- K as _getPlateformInfos,
2254
- we as _getPlatformServices,
2255
- $ as _getServiceUrl,
2256
- Ce as _getServiceUrl_3DPassport,
2257
- dt as _getServiceUrl_Iterop,
2258
- m as _httpCallAuthenticated,
2259
- Se as _setDraggable,
2260
- _e as _setDroppable,
2261
- ye as _setupTagger,
2262
- He as addTagToDoc,
2263
- Te as compass_getListAdditionalApps,
2264
- G as couleurs,
2265
- Ne as createUserGroups,
2266
- ee as dataMixing,
2267
- $e as deleteUserGroups,
2268
- me as findAdresse,
2269
- Ge as getAllContextSecurity,
2270
- W as getCSRFToken,
2271
- fe as getCommunes,
2272
- ve as getComplementUG,
2273
- Ke as getDataFrom3DSpace,
2274
- ge as getDataFromGouvFr,
2275
- Xe as getDatasByTenant,
2276
- Ye as getDatasFrom3DSpace,
2277
- Ve as getDownloadDocument,
2278
- qe as getInfoDocTags,
2279
- Ie as getUserGroupsList,
2280
- V as getUsersGroupRules,
2281
- Be as get_3DSpace_csrf,
2282
- Ae as patchUserGroups,
2283
- ke as patchUserGroupsControl,
2284
- We as pushDataIn3DSpace,
2285
- Fe as readUserGroupControl,
2286
- ze as removeTagToDoc,
2287
- mt as sayHello,
2288
- he as updateEvent
2289
- };
2290
- //# sourceMappingURL=wb3Api.js.map