@beam3_dev/api_module 0.0.356 → 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 -50
- 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,23 +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
|
-
|
|
1684
|
-
SecurityContext: `ctx::${e.ctx}`
|
|
1696
|
+
SecurityContext: `ctx::${r}`
|
|
1685
1697
|
},
|
|
1686
|
-
data: JSON.stringify(
|
|
1698
|
+
data: JSON.stringify(d),
|
|
1687
1699
|
type: "json",
|
|
1688
|
-
onComplete(
|
|
1689
|
-
const
|
|
1690
|
-
console.log("getListBkEnfant | réponse => ",
|
|
1700
|
+
onComplete(u, p, f) {
|
|
1701
|
+
const l = u;
|
|
1702
|
+
console.log("getListBkEnfant | réponse => ", l), t(l);
|
|
1691
1703
|
},
|
|
1692
|
-
onFailure(
|
|
1693
|
-
const
|
|
1694
|
-
|
|
1704
|
+
onFailure(u, p, f) {
|
|
1705
|
+
const l = {};
|
|
1706
|
+
l.error = u, l.headers = p, l.xhr = f, s(l);
|
|
1695
1707
|
}
|
|
1696
1708
|
});
|
|
1697
1709
|
});
|
|
@@ -1797,7 +1809,7 @@ function ft(e, n = void 0, t = void 0) {
|
|
|
1797
1809
|
});
|
|
1798
1810
|
}
|
|
1799
1811
|
function mt(e, n, t, s) {
|
|
1800
|
-
|
|
1812
|
+
v(
|
|
1801
1813
|
e.space,
|
|
1802
1814
|
n,
|
|
1803
1815
|
(i) => {
|
|
@@ -1815,7 +1827,7 @@ function mt(e, n, t, s) {
|
|
|
1815
1827
|
}
|
|
1816
1828
|
async function gt(e, n, t = void 0, s = void 0) {
|
|
1817
1829
|
return new Promise((i) => {
|
|
1818
|
-
|
|
1830
|
+
v(e, n, (r) => {
|
|
1819
1831
|
m(r, {
|
|
1820
1832
|
onComplete: (o, a, c) => (i(JSON.parse(o)), t && t(JSON.parse(o), a, c), i),
|
|
1821
1833
|
onFailure: (o, a, c) => {
|
|
@@ -2148,7 +2160,7 @@ async function C(e, n = void 0, t = void 0) {
|
|
|
2148
2160
|
}
|
|
2149
2161
|
});
|
|
2150
2162
|
}
|
|
2151
|
-
function
|
|
2163
|
+
function Tt(e, n = void 0, t = void 0) {
|
|
2152
2164
|
const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
|
|
2153
2165
|
params: {
|
|
2154
2166
|
community_id: null,
|
|
@@ -2178,7 +2190,7 @@ function Ot(e, n = void 0, t = void 0) {
|
|
|
2178
2190
|
});
|
|
2179
2191
|
});
|
|
2180
2192
|
}
|
|
2181
|
-
function
|
|
2193
|
+
function Ot(e, n = void 0, t = void 0) {
|
|
2182
2194
|
const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
|
|
2183
2195
|
params: {
|
|
2184
2196
|
idsToFilterArr: [],
|
|
@@ -2629,7 +2641,7 @@ function kt(e, n, t) {
|
|
|
2629
2641
|
};
|
|
2630
2642
|
m(p.base + p.uri, l);
|
|
2631
2643
|
}
|
|
2632
|
-
function
|
|
2644
|
+
function vt(e, n, t = void 0, s = void 0) {
|
|
2633
2645
|
const { _3DSwym: i } = e;
|
|
2634
2646
|
let { community_id: r, limit: o, page: a, search: c } = n;
|
|
2635
2647
|
const d = [], u = 1;
|
|
@@ -2655,11 +2667,11 @@ function jt(e, n, t = void 0, s = void 0) {
|
|
|
2655
2667
|
if (a++, l.page = `/page/${a}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
|
|
2656
2668
|
d.push(_.response.result);
|
|
2657
2669
|
else {
|
|
2658
|
-
const
|
|
2670
|
+
const T = _.response.result.find(
|
|
2659
2671
|
(k) => k.title.includes(c)
|
|
2660
2672
|
);
|
|
2661
|
-
if (
|
|
2662
|
-
t(
|
|
2673
|
+
if (T) {
|
|
2674
|
+
t(T);
|
|
2663
2675
|
return;
|
|
2664
2676
|
}
|
|
2665
2677
|
}
|
|
@@ -2671,8 +2683,8 @@ function jt(e, n, t = void 0, s = void 0) {
|
|
|
2671
2683
|
}
|
|
2672
2684
|
},
|
|
2673
2685
|
onFailure(w, _) {
|
|
2674
|
-
const
|
|
2675
|
-
|
|
2686
|
+
const T = w;
|
|
2687
|
+
T.status = _.status, T.response = _.errormsg, s && s(T);
|
|
2676
2688
|
}
|
|
2677
2689
|
});
|
|
2678
2690
|
};
|
|
@@ -2754,7 +2766,7 @@ function Se(e) {
|
|
|
2754
2766
|
<p>
|
|
2755
2767
|
</p>` : e;
|
|
2756
2768
|
}
|
|
2757
|
-
function
|
|
2769
|
+
function Dt(e, n = void 0, t = void 0) {
|
|
2758
2770
|
const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
|
|
2759
2771
|
if (s && i && r && o && a) {
|
|
2760
2772
|
const c = `${i}/api/idea/forward`;
|
|
@@ -2787,7 +2799,7 @@ function vt(e, n = void 0, t = void 0) {
|
|
|
2787
2799
|
credentials: e
|
|
2788
2800
|
});
|
|
2789
2801
|
}
|
|
2790
|
-
function
|
|
2802
|
+
function jt(e, n = void 0, t = void 0) {
|
|
2791
2803
|
return new Promise((s, i) => {
|
|
2792
2804
|
try {
|
|
2793
2805
|
let r;
|
|
@@ -3116,7 +3128,7 @@ function en(e, n = void 0, t = void 0) {
|
|
|
3116
3128
|
},
|
|
3117
3129
|
!0
|
|
3118
3130
|
);
|
|
3119
|
-
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}`;
|
|
3120
3132
|
m(r, {
|
|
3121
3133
|
onComplete(o) {
|
|
3122
3134
|
if (Array.isArray(JSON.parse(o))) {
|
|
@@ -3201,7 +3213,7 @@ export {
|
|
|
3201
3213
|
de as _3DSpace_get_downloadTicket_multidoc,
|
|
3202
3214
|
Ye as _3DSpace_get_multiDocInfo,
|
|
3203
3215
|
I as _3DSpace_get_securityContexts,
|
|
3204
|
-
|
|
3216
|
+
v as _3DSpace_get_ticket,
|
|
3205
3217
|
at as _3DSpace_lifecycle_changeRevision,
|
|
3206
3218
|
st as _3DSpace_lifecycle_changeState,
|
|
3207
3219
|
it as _3DSpace_lifecycle_getGraph,
|
|
@@ -3209,21 +3221,21 @@ export {
|
|
|
3209
3221
|
nt as _3DSpace_lifecycle_getNextStates,
|
|
3210
3222
|
rt as _3DSpace_lifecycle_getRevisions,
|
|
3211
3223
|
Qe as _3DSpace_put_docInfo,
|
|
3212
|
-
|
|
3224
|
+
Dt as _3DSwym_ForwardIdea,
|
|
3213
3225
|
Pt as _3DSwym_addComment,
|
|
3214
3226
|
Ut as _3DSwym_buildDirectMessage,
|
|
3215
3227
|
Nt as _3DSwym_deleteIdea,
|
|
3216
3228
|
kt as _3DSwym_editIdea,
|
|
3217
3229
|
ye as _3DSwym_findCommunityToInstantMSG,
|
|
3218
3230
|
$t as _3DSwym_getAllCommunities,
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3231
|
+
vt as _3DSwym_getAllListIdeas,
|
|
3232
|
+
Tt as _3DSwym_getAllNews,
|
|
3233
|
+
Ot as _3DSwym_getFamiliarPeople,
|
|
3222
3234
|
xt as _3DSwym_getIdeaStatusMaturity,
|
|
3223
3235
|
he as _3DSwym_getMembersCommunity,
|
|
3224
3236
|
It as _3DSwym_getOneIdea,
|
|
3225
3237
|
C as _3DSwym_get_Token,
|
|
3226
|
-
|
|
3238
|
+
jt as _3DSwym_get_currentUser,
|
|
3227
3239
|
At as _3DSwym_get_findUser,
|
|
3228
3240
|
Ft as _3DSwym_postIdea,
|
|
3229
3241
|
Rt as _3DSwym_postIdeaTemplate,
|
|
@@ -3245,11 +3257,11 @@ export {
|
|
|
3245
3257
|
Vt as _Iterop_runProcess,
|
|
3246
3258
|
Xt as _Iterop_updateBusinessTable,
|
|
3247
3259
|
Ae as _Registry_getServicesUrl,
|
|
3248
|
-
|
|
3260
|
+
De as _getMe,
|
|
3249
3261
|
Z as _getPlateformInfos,
|
|
3250
|
-
|
|
3262
|
+
ve as _getPlatformServices,
|
|
3251
3263
|
J as _getServiceUrl,
|
|
3252
|
-
|
|
3264
|
+
je as _getServiceUrl_3DPassport,
|
|
3253
3265
|
Lt as _getServiceUrl_Iterop,
|
|
3254
3266
|
m as _httpCallAuthenticated,
|
|
3255
3267
|
Ne as _setDraggable,
|