@beam3_dev/api_module 0.0.68 → 0.0.69
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 +33 -32
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +4 -4
- 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
|
-
import { DateTime as
|
|
2
|
+
import { DateTime as N } from "luxon";
|
|
3
3
|
import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
|
|
4
|
-
function
|
|
4
|
+
function I() {
|
|
5
5
|
return M();
|
|
6
6
|
}
|
|
7
7
|
const L = {
|
|
@@ -66,7 +66,7 @@ async function re(e, t = void 0, n = void 0) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async function ce(e, t = L) {
|
|
69
|
-
let n =
|
|
69
|
+
let n = N.now().year;
|
|
70
70
|
const s = e, o = [], c = (a) => {
|
|
71
71
|
for (let i in a)
|
|
72
72
|
o.push({ date: i, comment: a[i] });
|
|
@@ -89,11 +89,11 @@ async function ce(e, t = L) {
|
|
|
89
89
|
} : s;
|
|
90
90
|
for (let i of o)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(l) => l.start ===
|
|
92
|
+
(l) => l.start === N.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
94
|
name: "Férié : " + i.comment,
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
95
|
+
start: N.fromISO(i.date).toISODate(),
|
|
96
|
+
end: N.fromISO(i.date).toISODate(),
|
|
97
97
|
color: t.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
@@ -351,7 +351,7 @@ function Oe(e, t, n, s = void 0, o = void 0) {
|
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function be(e, t, n = void 0, s = void 0) {
|
|
355
355
|
const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
|
|
356
356
|
f(r, {
|
|
357
357
|
opts: {
|
|
@@ -465,7 +465,7 @@ function U(e, t = void 0, n = void 0) {
|
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Ne(e, t, n, s = void 0, o = void 0) {
|
|
469
469
|
const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
|
|
470
470
|
n || (n = e.token), f(c, {
|
|
471
471
|
method: "PUT",
|
|
@@ -610,7 +610,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
610
610
|
}
|
|
611
611
|
]
|
|
612
612
|
},
|
|
613
|
-
tempId:
|
|
613
|
+
tempId: I()
|
|
614
614
|
}
|
|
615
615
|
]
|
|
616
616
|
}),
|
|
@@ -636,7 +636,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
|
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
|
|
640
640
|
const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
|
|
641
641
|
f(r, {
|
|
642
642
|
method: "GET",
|
|
@@ -682,7 +682,7 @@ function N(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0) {
|
|
|
682
682
|
}
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
async function
|
|
685
|
+
async function R(e, t = void 0, n = void 0) {
|
|
686
686
|
return (!e.objID || e.objID === "") && console.warn(
|
|
687
687
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
688
688
|
), (e.space === "" || !e.space) && console.warn(
|
|
@@ -702,11 +702,12 @@ async function I(e, t = void 0, n = void 0) {
|
|
|
702
702
|
e,
|
|
703
703
|
(r) => {
|
|
704
704
|
setTimeout(() => {
|
|
705
|
-
const a = {
|
|
706
|
-
ENO_CSRF_TOKEN: e.token
|
|
707
|
-
};
|
|
708
705
|
f(r, {
|
|
709
|
-
headers:
|
|
706
|
+
headers: {
|
|
707
|
+
// ENO_CSRF_TOKEN: credentials.token,
|
|
708
|
+
"Content-Type": "application/json",
|
|
709
|
+
Accept: "application/json"
|
|
710
|
+
},
|
|
710
711
|
onComplete(i) {
|
|
711
712
|
const d = JSON.parse(i);
|
|
712
713
|
console.log(
|
|
@@ -796,7 +797,7 @@ function De(e, t, n = void 0, s = void 0) {
|
|
|
796
797
|
return new Promise((o) => {
|
|
797
798
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
798
799
|
const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
|
|
799
|
-
|
|
800
|
+
b(
|
|
800
801
|
e.space,
|
|
801
802
|
"ESPACE COMMUN",
|
|
802
803
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -837,7 +838,7 @@ function Fe(e, t, n, s = void 0, o = void 0) {
|
|
|
837
838
|
return new Promise((c) => {
|
|
838
839
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
839
840
|
const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
|
|
840
|
-
|
|
841
|
+
b(
|
|
841
842
|
e.space,
|
|
842
843
|
"ESPACE COMMUN",
|
|
843
844
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -879,7 +880,7 @@ function Ue(e, t, n = void 0, s = void 0) {
|
|
|
879
880
|
return new Promise((o) => {
|
|
880
881
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
881
882
|
const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
|
|
882
|
-
|
|
883
|
+
b(
|
|
883
884
|
e.space,
|
|
884
885
|
"ESPACE COMMUN",
|
|
885
886
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -920,7 +921,7 @@ function $e(e, t, n = void 0, s = void 0) {
|
|
|
920
921
|
return new Promise((o) => {
|
|
921
922
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
922
923
|
const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
|
|
923
|
-
|
|
924
|
+
b(
|
|
924
925
|
e.space,
|
|
925
926
|
"ESPACE COMMUN",
|
|
926
927
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -967,7 +968,7 @@ function je(e, t, n, s = void 0, o = void 0) {
|
|
|
967
968
|
return new Promise((c) => {
|
|
968
969
|
if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
|
|
969
970
|
const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
|
|
970
|
-
|
|
971
|
+
b(
|
|
971
972
|
e.space,
|
|
972
973
|
"ESPACE COMMUN",
|
|
973
974
|
["VPLMProjectLeader", "VPLMCreator"],
|
|
@@ -1032,7 +1033,7 @@ function Ae(e, t = void 0, n = void 0) {
|
|
|
1032
1033
|
}
|
|
1033
1034
|
});
|
|
1034
1035
|
}
|
|
1035
|
-
function
|
|
1036
|
+
function Ie(e, t, n, s) {
|
|
1036
1037
|
U(
|
|
1037
1038
|
e.space,
|
|
1038
1039
|
t,
|
|
@@ -1049,7 +1050,7 @@ function Re(e, t, n, s) {
|
|
|
1049
1050
|
}
|
|
1050
1051
|
);
|
|
1051
1052
|
}
|
|
1052
|
-
async function
|
|
1053
|
+
async function Re(e, t, n = void 0, s = void 0) {
|
|
1053
1054
|
return new Promise((o) => {
|
|
1054
1055
|
U(e, t, (c) => {
|
|
1055
1056
|
f(c, {
|
|
@@ -1106,7 +1107,7 @@ async function Pe(e, t = void 0, n = void 0) {
|
|
|
1106
1107
|
);
|
|
1107
1108
|
}
|
|
1108
1109
|
async function xe(e, t = void 0, n = void 0) {
|
|
1109
|
-
console.log("getDatasByTenant (getDocuments)", e), await
|
|
1110
|
+
console.log("getDatasByTenant (getDocuments)", e), await R(
|
|
1110
1111
|
e,
|
|
1111
1112
|
(s) => {
|
|
1112
1113
|
const o = {};
|
|
@@ -1120,7 +1121,7 @@ async function xe(e, t = void 0, n = void 0) {
|
|
|
1120
1121
|
function Me(e, t = void 0, n = void 0) {
|
|
1121
1122
|
const s = [];
|
|
1122
1123
|
e.objIds.forEach((o, c) => {
|
|
1123
|
-
|
|
1124
|
+
R(
|
|
1124
1125
|
e,
|
|
1125
1126
|
o.objId,
|
|
1126
1127
|
(r) => {
|
|
@@ -1230,7 +1231,7 @@ function q(e, t, n = void 0, s = void 0) {
|
|
|
1230
1231
|
}, r = `${c.baseUrl}${c.uri}`, a = {
|
|
1231
1232
|
"Content-Type": "application/json",
|
|
1232
1233
|
Accept: "application/json,text/javascript,*/*"
|
|
1233
|
-
}, i =
|
|
1234
|
+
}, i = I(), d = {
|
|
1234
1235
|
with_indexing_date: !0,
|
|
1235
1236
|
with_synthesis: !0,
|
|
1236
1237
|
with_nls: !1,
|
|
@@ -1893,18 +1894,18 @@ function Ze(e) {
|
|
|
1893
1894
|
return console.log(t), t;
|
|
1894
1895
|
}
|
|
1895
1896
|
export {
|
|
1896
|
-
|
|
1897
|
+
I as UUID,
|
|
1897
1898
|
ke as _3DSpace_Create_Doc,
|
|
1898
1899
|
C as _3DSpace_csrf,
|
|
1899
|
-
|
|
1900
|
+
R as _3DSpace_download_doc,
|
|
1900
1901
|
X as _3DSpace_download_multidoc,
|
|
1901
1902
|
K as _3DSpace_file_update,
|
|
1902
1903
|
W as _3DSpace_file_update_csr,
|
|
1903
|
-
|
|
1904
|
+
Ne as _3DSpace_file_url_csr,
|
|
1904
1905
|
k as _3DSpace_get_csrf,
|
|
1905
1906
|
G as _3DSpace_get_docInfo,
|
|
1906
1907
|
V as _3DSpace_get_downloadTicket_multidoc,
|
|
1907
|
-
|
|
1908
|
+
b as _3DSpace_get_securityContexts,
|
|
1908
1909
|
U as _3DSpace_get_ticket,
|
|
1909
1910
|
je as _3DSpace_lifecycle_changeRevision,
|
|
1910
1911
|
Fe as _3DSpace_lifecycle_changeState,
|
|
@@ -1945,11 +1946,11 @@ export {
|
|
|
1945
1946
|
J as getCSRFToken,
|
|
1946
1947
|
ie as getCommunes,
|
|
1947
1948
|
ye as getComplementUG,
|
|
1948
|
-
|
|
1949
|
+
Ie as getDataFrom3DSpace,
|
|
1949
1950
|
ce as getDataFromGouvFr,
|
|
1950
1951
|
xe as getDatasByTenant,
|
|
1951
1952
|
Me as getDatasFrom3DSpace,
|
|
1952
|
-
|
|
1953
|
+
Re as getDownloadDocument,
|
|
1953
1954
|
Je as getInfoDocTags,
|
|
1954
1955
|
we as getUserGroupsList,
|
|
1955
1956
|
E as getUsersGroupRules,
|
|
@@ -1957,7 +1958,7 @@ export {
|
|
|
1957
1958
|
Ce as patchUserGroups,
|
|
1958
1959
|
Oe as patchUserGroupsControl,
|
|
1959
1960
|
ve as pushDataIn3DSpace,
|
|
1960
|
-
|
|
1961
|
+
be as readUserGroupControl,
|
|
1961
1962
|
Ee as removeTagToDoc,
|
|
1962
1963
|
Ze as sayHello,
|
|
1963
1964
|
de as updateEvent
|