@beam3_dev/api_module 0.0.125 → 0.0.127
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 +66 -58
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +5 -5
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { v4 as
|
|
1
|
+
import { v4 as L } from "uuid";
|
|
2
2
|
import { DateTime as N } from "luxon";
|
|
3
|
-
import { requirejs as O, widget as
|
|
4
|
-
function
|
|
5
|
-
return
|
|
3
|
+
import { requirejs as O, widget as D } from "@widget-lab/3ddashboard-utils";
|
|
4
|
+
function I() {
|
|
5
|
+
return L();
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const J = {
|
|
8
8
|
b3M3Yellow: "#FFB300",
|
|
9
9
|
b3AboutageBlue: "#42A5F5",
|
|
10
10
|
b3UsinageGreen: "#689F38",
|
|
@@ -65,7 +65,7 @@ async function de(e, t = void 0, n = void 0) {
|
|
|
65
65
|
n && n(s), console.error("Erreur : " + s);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function le(e, t =
|
|
68
|
+
async function le(e, t = J) {
|
|
69
69
|
let n = N.now().year;
|
|
70
70
|
const s = e, i = [], r = (a) => {
|
|
71
71
|
for (let c in a)
|
|
@@ -121,7 +121,7 @@ function fe(e, t = void 0) {
|
|
|
121
121
|
O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
|
|
122
122
|
let s;
|
|
123
123
|
s === void 0 && (s = n.createProxy({
|
|
124
|
-
widgetId:
|
|
124
|
+
widgetId: D.id,
|
|
125
125
|
filteringMode: "WithFilteringServices"
|
|
126
126
|
}), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
|
|
127
127
|
});
|
|
@@ -137,7 +137,7 @@ async function ge(e, t = void 0, n = void 0) {
|
|
|
137
137
|
await O(
|
|
138
138
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
139
139
|
(s) => {
|
|
140
|
-
(!e || e === "") && (e =
|
|
140
|
+
(!e || e === "") && (e = D.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
|
|
141
141
|
s.getPlatformServices({
|
|
142
142
|
platformId: e,
|
|
143
143
|
onComplete: t,
|
|
@@ -147,7 +147,7 @@ async function ge(e, t = void 0, n = void 0) {
|
|
|
147
147
|
}
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function E() {
|
|
151
151
|
let e = {};
|
|
152
152
|
return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
|
|
153
153
|
const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
|
|
@@ -161,7 +161,7 @@ function J() {
|
|
|
161
161
|
};
|
|
162
162
|
}), console.log("%cRETOUR API :", "color:blue", e), e;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function j(e, t = void 0, n = void 0) {
|
|
165
165
|
if (e.tenant) {
|
|
166
166
|
const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
|
|
167
167
|
f(s, {
|
|
@@ -483,7 +483,7 @@ function T(e, t = void 0, n = void 0) {
|
|
|
483
483
|
} else
|
|
484
484
|
n && n("ERROR : url du 3DSpace non défini.");
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function A(e, t = void 0, n = void 0) {
|
|
487
487
|
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
488
488
|
v(
|
|
489
489
|
e,
|
|
@@ -645,7 +645,7 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
|
|
|
645
645
|
}
|
|
646
646
|
}]
|
|
647
647
|
},
|
|
648
|
-
tempId:
|
|
648
|
+
tempId: I()
|
|
649
649
|
}]
|
|
650
650
|
}),
|
|
651
651
|
type: "json",
|
|
@@ -719,7 +719,7 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
|
|
|
719
719
|
}
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
-
async function
|
|
722
|
+
async function R(e, t = void 0, n = void 0) {
|
|
723
723
|
return (!e.objID || e.objID === "") && console.warn(
|
|
724
724
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
725
725
|
), (e.space === "" || !e.space) && console.warn(
|
|
@@ -735,7 +735,7 @@ async function I(e, t = void 0, n = void 0) {
|
|
|
735
735
|
), console.warn(
|
|
736
736
|
"_3DSpace_download_doc() / Le paramètre token est obligatoire"
|
|
737
737
|
)), new Promise((s, i) => {
|
|
738
|
-
|
|
738
|
+
A(
|
|
739
739
|
e,
|
|
740
740
|
(r) => {
|
|
741
741
|
f(r, {
|
|
@@ -840,7 +840,7 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
|
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Ae(e, t, n = void 0, s = void 0) {
|
|
844
844
|
return new Promise((i) => {
|
|
845
845
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
846
846
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
@@ -879,7 +879,7 @@ function $e(e, t, n = void 0, s = void 0) {
|
|
|
879
879
|
}
|
|
880
880
|
});
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function $e(e, t, n, s = void 0, i = void 0) {
|
|
883
883
|
return new Promise((r) => {
|
|
884
884
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
885
885
|
const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
@@ -919,7 +919,7 @@ function Ae(e, t, n, s = void 0, i = void 0) {
|
|
|
919
919
|
}
|
|
920
920
|
});
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function Ue(e, t, n = void 0, s = void 0) {
|
|
923
923
|
return new Promise((i) => {
|
|
924
924
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
925
925
|
const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
@@ -958,7 +958,7 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function De(e, t, n = void 0, s = void 0) {
|
|
962
962
|
return new Promise((i) => {
|
|
963
963
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
964
964
|
const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
@@ -1003,7 +1003,7 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Ie(e, t, n, s = void 0, i = void 0) {
|
|
1007
1007
|
return new Promise((r) => {
|
|
1008
1008
|
if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
|
|
1009
1009
|
const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
@@ -1048,7 +1048,7 @@ function je(e, t, n, s = void 0, i = void 0) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function je(e, t, n, s, i = void 0, r = void 0) {
|
|
1052
1052
|
return console.log("credentials", e), new Promise((o) => {
|
|
1053
1053
|
`${e.space}`, JSON.stringify({
|
|
1054
1054
|
csrf: {
|
|
@@ -1092,7 +1092,7 @@ function Re(e, t = void 0, n = void 0) {
|
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
1094
|
function xe(e, t, n, s) {
|
|
1095
|
-
|
|
1095
|
+
A(
|
|
1096
1096
|
e.space,
|
|
1097
1097
|
t,
|
|
1098
1098
|
(i) => {
|
|
@@ -1110,7 +1110,7 @@ function xe(e, t, n, s) {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
async function Pe(e, t, n = void 0, s = void 0) {
|
|
1112
1112
|
return new Promise((i) => {
|
|
1113
|
-
|
|
1113
|
+
A(e, t, (r) => {
|
|
1114
1114
|
f(r, {
|
|
1115
1115
|
onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
|
|
1116
1116
|
onFailure: (o, a, c) => {
|
|
@@ -1143,8 +1143,8 @@ function Me(e, t, n, s = void 0, i = void 0) {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
let
|
|
1147
|
-
const
|
|
1146
|
+
let x, P;
|
|
1147
|
+
const $ = [];
|
|
1148
1148
|
async function Le(e, t = void 0, n = void 0) {
|
|
1149
1149
|
e.objID && e.objID !== "" ? v(
|
|
1150
1150
|
e,
|
|
@@ -1165,7 +1165,7 @@ async function Le(e, t = void 0, n = void 0) {
|
|
|
1165
1165
|
);
|
|
1166
1166
|
}
|
|
1167
1167
|
async function Je(e, t = void 0, n = void 0) {
|
|
1168
|
-
console.log("getDatasByTenant (getDocuments)", e), await
|
|
1168
|
+
console.log("getDatasByTenant (getDocuments)", e), await R(
|
|
1169
1169
|
e,
|
|
1170
1170
|
(s) => {
|
|
1171
1171
|
const i = {};
|
|
@@ -1183,11 +1183,11 @@ function Ee(e, t = void 0, n = void 0) {
|
|
|
1183
1183
|
return;
|
|
1184
1184
|
}
|
|
1185
1185
|
e.objIds.forEach((i, r) => {
|
|
1186
|
-
|
|
1186
|
+
R(
|
|
1187
1187
|
e,
|
|
1188
1188
|
i.objID,
|
|
1189
1189
|
(o) => {
|
|
1190
|
-
s.push({ [i.name]: o }), i.name === "dbProjets" && (
|
|
1190
|
+
s.push({ [i.name]: o }), i.name === "dbProjets" && (x = o.affaires.map((a) => a.objectID), q(e, P)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
|
|
1191
1191
|
}
|
|
1192
1192
|
);
|
|
1193
1193
|
});
|
|
@@ -1195,10 +1195,10 @@ function Ee(e, t = void 0, n = void 0) {
|
|
|
1195
1195
|
function q(e, t, n = void 0, s = void 0) {
|
|
1196
1196
|
B(
|
|
1197
1197
|
e,
|
|
1198
|
-
|
|
1198
|
+
x,
|
|
1199
1199
|
(i) => {
|
|
1200
1200
|
const r = [...t];
|
|
1201
|
-
r.find((o) => o.objectID === i.objectId).data = i.data,
|
|
1201
|
+
r.find((o) => o.objectID === i.objectId).data = i.data, P = r, $.push(i.data), n && n($);
|
|
1202
1202
|
},
|
|
1203
1203
|
(i) => {
|
|
1204
1204
|
s && (s(i), console.log(i));
|
|
@@ -1212,7 +1212,7 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
|
|
|
1212
1212
|
"usersgroup",
|
|
1213
1213
|
"3dplan",
|
|
1214
1214
|
"dashboard"
|
|
1215
|
-
],
|
|
1215
|
+
], M = {
|
|
1216
1216
|
how: "ds6w:how",
|
|
1217
1217
|
what: "ds6w:what",
|
|
1218
1218
|
when: "ds6w:when",
|
|
@@ -1238,7 +1238,7 @@ function Ge(e, t, n = void 0, s = void 0) {
|
|
|
1238
1238
|
uri: `pid://${o}`
|
|
1239
1239
|
}
|
|
1240
1240
|
],
|
|
1241
|
-
predicate:
|
|
1241
|
+
predicate: M[a],
|
|
1242
1242
|
object: {
|
|
1243
1243
|
literal: c
|
|
1244
1244
|
}
|
|
@@ -1293,7 +1293,7 @@ function Z(e, t, n = void 0, s = void 0) {
|
|
|
1293
1293
|
}, o = `${r.baseUrl}${r.uri}`, a = {
|
|
1294
1294
|
"Content-Type": "application/json",
|
|
1295
1295
|
Accept: "application/json,text/javascript,*/*"
|
|
1296
|
-
}, c =
|
|
1296
|
+
}, c = I(), d = {
|
|
1297
1297
|
with_indexing_date: !0,
|
|
1298
1298
|
with_synthesis: !0,
|
|
1299
1299
|
with_nls: !1,
|
|
@@ -1381,7 +1381,7 @@ function Ke(e, t, n = void 0, s = void 0) {
|
|
|
1381
1381
|
uri: `pid://${i}`
|
|
1382
1382
|
}
|
|
1383
1383
|
],
|
|
1384
|
-
predicate:
|
|
1384
|
+
predicate: M[r],
|
|
1385
1385
|
object: {
|
|
1386
1386
|
literal: o
|
|
1387
1387
|
}
|
|
@@ -1608,7 +1608,7 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1608
1608
|
te(
|
|
1609
1609
|
a.users,
|
|
1610
1610
|
(l) => {
|
|
1611
|
-
l !== void 0 && (c.id_msg = l.id, d = !0,
|
|
1611
|
+
l !== void 0 && (c.id_msg = l.id, d = !0, U(e, c));
|
|
1612
1612
|
},
|
|
1613
1613
|
(l) => {
|
|
1614
1614
|
d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
|
|
@@ -1626,7 +1626,7 @@ function qe(e, t, n = void 0, s = void 0) {
|
|
|
1626
1626
|
type: "json",
|
|
1627
1627
|
onComplete(p, u, m) {
|
|
1628
1628
|
const g = p;
|
|
1629
|
-
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id,
|
|
1629
|
+
g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, U(e, c);
|
|
1630
1630
|
},
|
|
1631
1631
|
onFailure(p, u, m) {
|
|
1632
1632
|
const g = p;
|
|
@@ -1665,7 +1665,7 @@ function te(e, t, n, s) {
|
|
|
1665
1665
|
});
|
|
1666
1666
|
});
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1668
|
+
function U(e, t, n = void 0, s = void 0) {
|
|
1669
1669
|
const i = {
|
|
1670
1670
|
base: e.space,
|
|
1671
1671
|
uri: "/api/community",
|
|
@@ -1952,7 +1952,14 @@ function tt(e, t, n = void 0, s = void 0) {
|
|
|
1952
1952
|
);
|
|
1953
1953
|
}
|
|
1954
1954
|
function nt(e, t = void 0, n = void 0) {
|
|
1955
|
-
e.tenant &&
|
|
1955
|
+
e.tenant && j(e, (s) => {
|
|
1956
|
+
console.log("serviceUrls", s);
|
|
1957
|
+
const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
|
|
1958
|
+
t && t(i);
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
function st(e, t = void 0, n = void 0) {
|
|
1962
|
+
e.tenant && j(e, (s) => {
|
|
1956
1963
|
console.log("serviceUrls", s);
|
|
1957
1964
|
const i = s.services.find((a) => a.id === "3dpassport")?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
|
|
1958
1965
|
f(o, {
|
|
@@ -1971,7 +1978,7 @@ function nt(e, t = void 0, n = void 0) {
|
|
|
1971
1978
|
});
|
|
1972
1979
|
});
|
|
1973
1980
|
}
|
|
1974
|
-
function
|
|
1981
|
+
function at(e, t) {
|
|
1975
1982
|
const n = new Headers();
|
|
1976
1983
|
n.append("Authorization", `Bearer ${t}`);
|
|
1977
1984
|
const s = {
|
|
@@ -1981,14 +1988,14 @@ function st(e, t) {
|
|
|
1981
1988
|
};
|
|
1982
1989
|
fetch(`${e}/identity/users`, s).then((i) => i.text()).then((i) => console.log(i)).catch((i) => console.error(i));
|
|
1983
1990
|
}
|
|
1984
|
-
function
|
|
1991
|
+
function it(e) {
|
|
1985
1992
|
const t = "Hello " + e;
|
|
1986
1993
|
return console.log(t), t;
|
|
1987
1994
|
}
|
|
1988
|
-
function
|
|
1995
|
+
function ot(e, t = void 0, n = void 0) {
|
|
1989
1996
|
return console.log("credentials", e), new Promise((s) => {
|
|
1990
1997
|
if (e.token === "" && T(e), !e.space || e.space === "") {
|
|
1991
|
-
const o =
|
|
1998
|
+
const o = E();
|
|
1992
1999
|
console.log("platformeInfo", o);
|
|
1993
2000
|
}
|
|
1994
2001
|
b(
|
|
@@ -2065,12 +2072,12 @@ function it(e, t = void 0, n = void 0) {
|
|
|
2065
2072
|
});
|
|
2066
2073
|
}
|
|
2067
2074
|
export {
|
|
2068
|
-
|
|
2069
|
-
|
|
2075
|
+
I as UUID,
|
|
2076
|
+
ot as _3DSearch_usersGroup,
|
|
2070
2077
|
Fe as _3DSpace_Create_Doc,
|
|
2071
|
-
|
|
2078
|
+
je as _3DSpace_bookmark_addSubsciptions,
|
|
2072
2079
|
T as _3DSpace_csrf,
|
|
2073
|
-
|
|
2080
|
+
R as _3DSpace_download_doc,
|
|
2074
2081
|
B as _3DSpace_download_multidoc,
|
|
2075
2082
|
V as _3DSpace_file_update,
|
|
2076
2083
|
W as _3DSpace_file_update_csr,
|
|
@@ -2079,12 +2086,12 @@ export {
|
|
|
2079
2086
|
X as _3DSpace_get_docInfo,
|
|
2080
2087
|
Y as _3DSpace_get_downloadTicket_multidoc,
|
|
2081
2088
|
b as _3DSpace_get_securityContexts,
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2089
|
+
A as _3DSpace_get_ticket,
|
|
2090
|
+
Ie as _3DSpace_lifecycle_changeRevision,
|
|
2091
|
+
$e as _3DSpace_lifecycle_changeState,
|
|
2092
|
+
Ue as _3DSpace_lifecycle_getGraph,
|
|
2093
|
+
De as _3DSpace_lifecycle_getNextRevision,
|
|
2094
|
+
Ae as _3DSpace_lifecycle_getNextStates,
|
|
2088
2095
|
qe as _3DSwym_buildDirectMessage,
|
|
2089
2096
|
ze as _3DSwym_deleteIdea,
|
|
2090
2097
|
te as _3DSwym_findCommunityToInstantMSG,
|
|
@@ -2099,22 +2106,23 @@ export {
|
|
|
2099
2106
|
tt as _3DSwym_get_findUser,
|
|
2100
2107
|
w as _3DSwym_get_version,
|
|
2101
2108
|
He as _3DSwym_postIdea,
|
|
2102
|
-
|
|
2109
|
+
U as _3DSwym_sendMessageData,
|
|
2103
2110
|
ye as _AppMngt_get_info_user,
|
|
2104
2111
|
_e as _AppMngt_get_users,
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2112
|
+
st as _Iterop_Auth_CAS,
|
|
2113
|
+
at as _Iterop_ListUsers,
|
|
2114
|
+
E as _getPlateformInfos,
|
|
2108
2115
|
ge as _getPlatformServices,
|
|
2109
|
-
|
|
2116
|
+
j as _getServiceUrl,
|
|
2110
2117
|
he as _getServiceUrl_3DPassport,
|
|
2118
|
+
nt as _getServiceUrl_Iterop,
|
|
2111
2119
|
f as _httpCallAuthenticated,
|
|
2112
2120
|
ue as _setDraggable,
|
|
2113
2121
|
me as _setDroppable,
|
|
2114
2122
|
fe as _setupTagger,
|
|
2115
2123
|
Ge as addTagToDoc,
|
|
2116
2124
|
Se as compass_getListAdditionalApps,
|
|
2117
|
-
|
|
2125
|
+
J as couleurs,
|
|
2118
2126
|
we as createUserGroups,
|
|
2119
2127
|
q as dataMixing,
|
|
2120
2128
|
Oe as deleteUserGroups,
|
|
@@ -2137,7 +2145,7 @@ export {
|
|
|
2137
2145
|
Me as pushDataIn3DSpace,
|
|
2138
2146
|
ve as readUserGroupControl,
|
|
2139
2147
|
Ke as removeTagToDoc,
|
|
2140
|
-
|
|
2148
|
+
it as sayHello,
|
|
2141
2149
|
pe as updateEvent
|
|
2142
2150
|
};
|
|
2143
2151
|
//# sourceMappingURL=wb3Api.js.map
|