@beam3_dev/api_module 0.0.355 → 0.0.357
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 +62 -49
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +6 -6
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v4 as V } from "uuid";
|
|
2
|
-
import { DateTime as
|
|
2
|
+
import { DateTime as O } from "luxon";
|
|
3
3
|
import { requirejs as $, widget as L } from "@widget-lab/3ddashboard-utils";
|
|
4
4
|
function Y() {
|
|
5
5
|
return V();
|
|
@@ -66,7 +66,7 @@ async function Ue(e, n = void 0, t = void 0) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
async function Re(e, n = z) {
|
|
69
|
-
let t =
|
|
69
|
+
let t = O.now().year;
|
|
70
70
|
const s = e, i = [], r = (a) => {
|
|
71
71
|
for (let c in a)
|
|
72
72
|
i.push({ date: c, comment: a[c] });
|
|
@@ -89,11 +89,11 @@ async function Re(e, n = z) {
|
|
|
89
89
|
} : s;
|
|
90
90
|
for (let c of i)
|
|
91
91
|
a.events.findIndex(
|
|
92
|
-
(u) => u.start ===
|
|
92
|
+
(u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
|
|
93
93
|
) === -1 && a.events.push({
|
|
94
94
|
name: "Férié : " + c.comment,
|
|
95
|
-
start:
|
|
96
|
-
end:
|
|
95
|
+
start: O.fromISO(c.date).toISODate(),
|
|
96
|
+
end: O.fromISO(c.date).toISODate(),
|
|
97
97
|
color: n.b3BusinnessDays,
|
|
98
98
|
timed: !1
|
|
99
99
|
});
|
|
@@ -167,7 +167,7 @@ function ke(e, n) {
|
|
|
167
167
|
});
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
async function
|
|
170
|
+
async function ve(e, n = void 0, t = void 0) {
|
|
171
171
|
await $(
|
|
172
172
|
["DS/i3DXCompassServices/i3DXCompassServices"],
|
|
173
173
|
(s) => {
|
|
@@ -195,7 +195,7 @@ function Z() {
|
|
|
195
195
|
};
|
|
196
196
|
}), e;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function De(e, n = void 0, t = void 0) {
|
|
199
199
|
if (e.tenant) {
|
|
200
200
|
const s = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
|
|
201
201
|
m(s, {
|
|
@@ -227,7 +227,7 @@ function J(e, n = void 0, t = void 0) {
|
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function je(e, n = void 0, t = void 0) {
|
|
231
231
|
if (e.tenant) {
|
|
232
232
|
const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
|
|
233
233
|
m(s, {
|
|
@@ -742,7 +742,7 @@ function b(e, n = void 0, t = void 0) {
|
|
|
742
742
|
} else
|
|
743
743
|
t && t("ERROR : url du 3DSpace non défini.");
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function v(e, n = void 0, t = void 0) {
|
|
746
746
|
let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
|
|
747
747
|
N(
|
|
748
748
|
e,
|
|
@@ -919,7 +919,7 @@ async function Ze(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0)
|
|
|
919
919
|
i && i("Définition du fichier undefined");
|
|
920
920
|
return;
|
|
921
921
|
}
|
|
922
|
-
const c =
|
|
922
|
+
const c = O.now().ts;
|
|
923
923
|
let d = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(
|
|
924
924
|
a
|
|
925
925
|
)}/ticket?id=${c}&tenant=${o.toUpperCase()}&xrequestedwith=xmlhttprequest`;
|
|
@@ -949,11 +949,11 @@ async function Ze(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0)
|
|
|
949
949
|
const k = new DOMParser().parseFromString(
|
|
950
950
|
_,
|
|
951
951
|
"text/html"
|
|
952
|
-
).body.firstChild.querySelector("input").getAttributeNode("value").value,
|
|
952
|
+
).body.firstChild.querySelector("input").getAttributeNode("value").value, D = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(
|
|
953
953
|
a
|
|
954
954
|
)}/contents?receipt=${encodeURIComponent(k)}`;
|
|
955
955
|
let W = /(?:\.([^.]+))?$/.exec(n)[1];
|
|
956
|
-
const
|
|
956
|
+
const j = JSON.stringify({
|
|
957
957
|
actions: [],
|
|
958
958
|
businessobj: {
|
|
959
959
|
description: e?.description ? e?.description : "",
|
|
@@ -969,14 +969,14 @@ async function Ze(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0)
|
|
|
969
969
|
},
|
|
970
970
|
collabspace: a
|
|
971
971
|
});
|
|
972
|
-
m(
|
|
972
|
+
m(D, {
|
|
973
973
|
method: "POST",
|
|
974
974
|
headers: {
|
|
975
975
|
Accept: "application/json",
|
|
976
976
|
"Content-Type": "application/json;charset=UTF-8",
|
|
977
977
|
"X-DS-CSRFTOKEN": p
|
|
978
978
|
},
|
|
979
|
-
data:
|
|
979
|
+
data: j,
|
|
980
980
|
type: "json",
|
|
981
981
|
onComplete(F, Ce, be) {
|
|
982
982
|
s && s(F);
|
|
@@ -984,7 +984,7 @@ async function Ze(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0)
|
|
|
984
984
|
onFailure(F) {
|
|
985
985
|
console.warn(
|
|
986
986
|
"_3DSpace_Upload_Doc | pushFileInFcs | onFailure",
|
|
987
|
-
{ url:
|
|
987
|
+
{ url: D, bodyRequest: j, err: F }
|
|
988
988
|
), i && i(F);
|
|
989
989
|
}
|
|
990
990
|
});
|
|
@@ -1118,7 +1118,7 @@ function B(e, n, t, s = void 0, i = void 0, r = void 0) {
|
|
|
1118
1118
|
function re(e, n, t, s = void 0, i = void 0, r = void 0) {
|
|
1119
1119
|
console.log("relatedDocAndFile", { credentials: e, receipt: n, filename: t });
|
|
1120
1120
|
const o = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
|
|
1121
|
-
let a = "temp_" +
|
|
1121
|
+
let a = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
|
|
1122
1122
|
m(c, {
|
|
1123
1123
|
method: "POST",
|
|
1124
1124
|
headers: {
|
|
@@ -1227,7 +1227,7 @@ async function E(e, n = void 0, t = void 0) {
|
|
|
1227
1227
|
console.log("☠️ error => ", s);
|
|
1228
1228
|
}
|
|
1229
1229
|
), new Promise((s, i) => {
|
|
1230
|
-
|
|
1230
|
+
v(
|
|
1231
1231
|
e,
|
|
1232
1232
|
(r) => {
|
|
1233
1233
|
e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
|
|
@@ -1664,7 +1664,13 @@ function ct(e) {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
function dt(e, n) {
|
|
1666
1666
|
return new Promise((t, s) => {
|
|
1667
|
-
const i
|
|
1667
|
+
const { space: i, ctx: r, tenant: o } = e;
|
|
1668
|
+
i || s("%cstore._3DSpace manquant"), r || s("%cstore.ctx manquant"), o || s("tenant manquant");
|
|
1669
|
+
const a = {
|
|
1670
|
+
base: i,
|
|
1671
|
+
uri: `/resources/v1/FolderManagement/Folder/${n}/folderTree`,
|
|
1672
|
+
optTenant: `tenant=${o}`
|
|
1673
|
+
}, c = `${a.base}${a.uri}?${a.optTenant}`, d = {
|
|
1668
1674
|
expandList: "",
|
|
1669
1675
|
isRoot: "",
|
|
1670
1676
|
isPersonalFolder: !1,
|
|
@@ -1675,22 +1681,29 @@ function dt(e, n) {
|
|
|
1675
1681
|
nextStart: 0,
|
|
1676
1682
|
refine: ""
|
|
1677
1683
|
};
|
|
1678
|
-
|
|
1684
|
+
console.log("url =>", c), console.log("body =>", d), console.log(
|
|
1685
|
+
"_3DSpace : ",
|
|
1686
|
+
i,
|
|
1687
|
+
" ctx : ",
|
|
1688
|
+
r,
|
|
1689
|
+
" currentTenant : ",
|
|
1690
|
+
o
|
|
1691
|
+
), console.groupEnd("GET LIST BK ENFANT"), m(c, {
|
|
1679
1692
|
method: "POST",
|
|
1680
1693
|
headers: {
|
|
1681
1694
|
Accept: "application/json",
|
|
1682
1695
|
"content-Type": "application/json",
|
|
1683
|
-
SecurityContext: `ctx::${
|
|
1696
|
+
SecurityContext: `ctx::${r}`
|
|
1684
1697
|
},
|
|
1685
|
-
data: JSON.stringify(
|
|
1698
|
+
data: JSON.stringify(d),
|
|
1686
1699
|
type: "json",
|
|
1687
|
-
onComplete(
|
|
1688
|
-
const
|
|
1689
|
-
console.log("getListBkEnfant | réponse => ",
|
|
1700
|
+
onComplete(u, p, f) {
|
|
1701
|
+
const l = u;
|
|
1702
|
+
console.log("getListBkEnfant | réponse => ", l), t(l);
|
|
1690
1703
|
},
|
|
1691
|
-
onFailure(
|
|
1692
|
-
const
|
|
1693
|
-
|
|
1704
|
+
onFailure(u, p, f) {
|
|
1705
|
+
const l = {};
|
|
1706
|
+
l.error = u, l.headers = p, l.xhr = f, s(l);
|
|
1694
1707
|
}
|
|
1695
1708
|
});
|
|
1696
1709
|
});
|
|
@@ -1796,7 +1809,7 @@ function ft(e, n = void 0, t = void 0) {
|
|
|
1796
1809
|
});
|
|
1797
1810
|
}
|
|
1798
1811
|
function mt(e, n, t, s) {
|
|
1799
|
-
|
|
1812
|
+
v(
|
|
1800
1813
|
e.space,
|
|
1801
1814
|
n,
|
|
1802
1815
|
(i) => {
|
|
@@ -1814,7 +1827,7 @@ function mt(e, n, t, s) {
|
|
|
1814
1827
|
}
|
|
1815
1828
|
async function gt(e, n, t = void 0, s = void 0) {
|
|
1816
1829
|
return new Promise((i) => {
|
|
1817
|
-
|
|
1830
|
+
v(e, n, (r) => {
|
|
1818
1831
|
m(r, {
|
|
1819
1832
|
onComplete: (o, a, c) => (i(JSON.parse(o)), t && t(JSON.parse(o), a, c), i),
|
|
1820
1833
|
onFailure: (o, a, c) => {
|
|
@@ -2147,7 +2160,7 @@ async function C(e, n = void 0, t = void 0) {
|
|
|
2147
2160
|
}
|
|
2148
2161
|
});
|
|
2149
2162
|
}
|
|
2150
|
-
function
|
|
2163
|
+
function Tt(e, n = void 0, t = void 0) {
|
|
2151
2164
|
const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
|
|
2152
2165
|
params: {
|
|
2153
2166
|
community_id: null,
|
|
@@ -2177,7 +2190,7 @@ function Ot(e, n = void 0, t = void 0) {
|
|
|
2177
2190
|
});
|
|
2178
2191
|
});
|
|
2179
2192
|
}
|
|
2180
|
-
function
|
|
2193
|
+
function Ot(e, n = void 0, t = void 0) {
|
|
2181
2194
|
const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
2182
2195
|
params: {
|
|
2183
2196
|
idsToFilterArr: [],
|
|
@@ -2628,7 +2641,7 @@ function kt(e, n, t) {
|
|
|
2628
2641
|
};
|
|
2629
2642
|
m(p.base + p.uri, l);
|
|
2630
2643
|
}
|
|
2631
|
-
function
|
|
2644
|
+
function vt(e, n, t = void 0, s = void 0) {
|
|
2632
2645
|
const { _3DSwym: i } = e;
|
|
2633
2646
|
let { community_id: r, limit: o, page: a, search: c } = n;
|
|
2634
2647
|
const d = [], u = 1;
|
|
@@ -2654,11 +2667,11 @@ function jt(e, n, t = void 0, s = void 0) {
|
|
|
2654
2667
|
if (a++, l.page = `/page/${a}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
|
|
2655
2668
|
d.push(_.response.result);
|
|
2656
2669
|
else {
|
|
2657
|
-
const
|
|
2670
|
+
const T = _.response.result.find(
|
|
2658
2671
|
(k) => k.title.includes(c)
|
|
2659
2672
|
);
|
|
2660
|
-
if (
|
|
2661
|
-
t(
|
|
2673
|
+
if (T) {
|
|
2674
|
+
t(T);
|
|
2662
2675
|
return;
|
|
2663
2676
|
}
|
|
2664
2677
|
}
|
|
@@ -2670,8 +2683,8 @@ function jt(e, n, t = void 0, s = void 0) {
|
|
|
2670
2683
|
}
|
|
2671
2684
|
},
|
|
2672
2685
|
onFailure(w, _) {
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2686
|
+
const T = w;
|
|
2687
|
+
T.status = _.status, T.response = _.errormsg, s && s(T);
|
|
2675
2688
|
}
|
|
2676
2689
|
});
|
|
2677
2690
|
};
|
|
@@ -2753,7 +2766,7 @@ function Se(e) {
|
|
|
2753
2766
|
<p>
|
|
2754
2767
|
</p>` : e;
|
|
2755
2768
|
}
|
|
2756
|
-
function
|
|
2769
|
+
function Dt(e, n = void 0, t = void 0) {
|
|
2757
2770
|
const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
|
|
2758
2771
|
if (s && i && r && o && a) {
|
|
2759
2772
|
const c = `${i}/api/idea/forward`;
|
|
@@ -2786,7 +2799,7 @@ function vt(e, n = void 0, t = void 0) {
|
|
|
2786
2799
|
credentials: e
|
|
2787
2800
|
});
|
|
2788
2801
|
}
|
|
2789
|
-
function
|
|
2802
|
+
function jt(e, n = void 0, t = void 0) {
|
|
2790
2803
|
return new Promise((s, i) => {
|
|
2791
2804
|
try {
|
|
2792
2805
|
let r;
|
|
@@ -3115,7 +3128,7 @@ function en(e, n = void 0, t = void 0) {
|
|
|
3115
3128
|
},
|
|
3116
3129
|
!0
|
|
3117
3130
|
);
|
|
3118
|
-
const i =
|
|
3131
|
+
const i = O.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
|
|
3119
3132
|
m(r, {
|
|
3120
3133
|
onComplete(o) {
|
|
3121
3134
|
if (Array.isArray(JSON.parse(o))) {
|
|
@@ -3200,7 +3213,7 @@ export {
|
|
|
3200
3213
|
de as _3DSpace_get_downloadTicket_multidoc,
|
|
3201
3214
|
Ye as _3DSpace_get_multiDocInfo,
|
|
3202
3215
|
I as _3DSpace_get_securityContexts,
|
|
3203
|
-
|
|
3216
|
+
v as _3DSpace_get_ticket,
|
|
3204
3217
|
at as _3DSpace_lifecycle_changeRevision,
|
|
3205
3218
|
st as _3DSpace_lifecycle_changeState,
|
|
3206
3219
|
it as _3DSpace_lifecycle_getGraph,
|
|
@@ -3208,21 +3221,21 @@ export {
|
|
|
3208
3221
|
nt as _3DSpace_lifecycle_getNextStates,
|
|
3209
3222
|
rt as _3DSpace_lifecycle_getRevisions,
|
|
3210
3223
|
Qe as _3DSpace_put_docInfo,
|
|
3211
|
-
|
|
3224
|
+
Dt as _3DSwym_ForwardIdea,
|
|
3212
3225
|
Pt as _3DSwym_addComment,
|
|
3213
3226
|
Ut as _3DSwym_buildDirectMessage,
|
|
3214
3227
|
Nt as _3DSwym_deleteIdea,
|
|
3215
3228
|
kt as _3DSwym_editIdea,
|
|
3216
3229
|
ye as _3DSwym_findCommunityToInstantMSG,
|
|
3217
3230
|
$t as _3DSwym_getAllCommunities,
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3231
|
+
vt as _3DSwym_getAllListIdeas,
|
|
3232
|
+
Tt as _3DSwym_getAllNews,
|
|
3233
|
+
Ot as _3DSwym_getFamiliarPeople,
|
|
3221
3234
|
xt as _3DSwym_getIdeaStatusMaturity,
|
|
3222
3235
|
he as _3DSwym_getMembersCommunity,
|
|
3223
3236
|
It as _3DSwym_getOneIdea,
|
|
3224
3237
|
C as _3DSwym_get_Token,
|
|
3225
|
-
|
|
3238
|
+
jt as _3DSwym_get_currentUser,
|
|
3226
3239
|
At as _3DSwym_get_findUser,
|
|
3227
3240
|
Ft as _3DSwym_postIdea,
|
|
3228
3241
|
Rt as _3DSwym_postIdeaTemplate,
|
|
@@ -3244,11 +3257,11 @@ export {
|
|
|
3244
3257
|
Vt as _Iterop_runProcess,
|
|
3245
3258
|
Xt as _Iterop_updateBusinessTable,
|
|
3246
3259
|
Ae as _Registry_getServicesUrl,
|
|
3247
|
-
|
|
3260
|
+
De as _getMe,
|
|
3248
3261
|
Z as _getPlateformInfos,
|
|
3249
|
-
|
|
3262
|
+
ve as _getPlatformServices,
|
|
3250
3263
|
J as _getServiceUrl,
|
|
3251
|
-
|
|
3264
|
+
je as _getServiceUrl_3DPassport,
|
|
3252
3265
|
Lt as _getServiceUrl_Iterop,
|
|
3253
3266
|
m as _httpCallAuthenticated,
|
|
3254
3267
|
Ne as _setDraggable,
|