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