@beam3_dev/api_module 0.0.71 → 0.0.76

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/README.md CHANGED
@@ -27,3 +27,5 @@ npm run b3:publish
27
27
 
28
28
  - Ne pas oublier de mettre à jour le fichier README.md en cas de modification de la librairie.
29
29
  - Mettre à jour le widget dans lequel on utilise déjà la librairie.
30
+
31
+ .
package/dist/wb3Api.js CHANGED
@@ -132,13 +132,13 @@ async function fe(e, t = void 0, n = void 0) {
132
132
  await O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
134
  (s) => {
135
- (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && (console.log("i3DXCompassServices", s), t(
135
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
136
  s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
139
139
  onFailure: n
140
140
  })
141
- ));
141
+ );
142
142
  }
143
143
  );
144
144
  }
@@ -402,7 +402,7 @@ async function G(e, t = void 0, n = void 0, s = void 0) {
402
402
  function k(e, t = void 0, n = void 0) {
403
403
  if (e.objID && e.objID !== "") {
404
404
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
- console.log("_3DSpace_get_csrf / url", s), f(s, {
405
+ f(s, {
406
406
  onComplete(o, c, r) {
407
407
  const a = JSON.parse(o);
408
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
@@ -431,7 +431,11 @@ function C(e, t = void 0, n = void 0) {
431
431
  t && t(a.csrf.value);
432
432
  },
433
433
  onFailure(o, c, r) {
434
- n && n({ response: o, headers: c, xhr: r });
434
+ n && n({
435
+ response: o,
436
+ headers: c,
437
+ xhr: r
438
+ });
435
439
  }
436
440
  });
437
441
  } else
@@ -519,24 +523,20 @@ function W(e, t, n, s, o, c, r = void 0, a = void 0) {
519
523
  ENO_CSRF_TOKEN: c
520
524
  },
521
525
  data: JSON.stringify({
522
- data: [
523
- {
524
- id: t,
525
- relateddata: {
526
- files: [
527
- {
528
- id: n,
529
- dataelements: {
530
- title: o,
531
- receipt: h
532
- },
533
- updateAction: "REVISE"
534
- }
535
- ]
536
- },
537
- tempId: S
538
- }
539
- ]
526
+ data: [{
527
+ id: t,
528
+ relateddata: {
529
+ files: [{
530
+ id: n,
531
+ dataelements: {
532
+ title: o,
533
+ receipt: h
534
+ },
535
+ updateAction: "REVISE"
536
+ }]
537
+ },
538
+ tempId: S
539
+ }]
540
540
  }),
541
541
  type: "json",
542
542
  onComplete(y) {
@@ -588,27 +588,23 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
588
588
  "Content-Type": "application/json"
589
589
  },
590
590
  data: JSON.stringify({
591
- data: [
592
- {
593
- type: "Document",
594
- dataelements: {
595
- title: `Title_${n.toLowerCase().split(" ").join("_")}`,
596
- policy: "Document Release",
597
- description: s
598
- },
599
- relateddata: {
600
- files: [
601
- {
602
- dataelements: {
603
- title: `${n}.json`,
604
- receipt: T
605
- }
606
- }
607
- ]
608
- },
609
- tempId: I()
610
- }
611
- ]
591
+ data: [{
592
+ type: "Document",
593
+ dataelements: {
594
+ title: `Title_${n.toLowerCase().split(" ").join("_")}`,
595
+ policy: "Document Release",
596
+ description: s
597
+ },
598
+ relateddata: {
599
+ files: [{
600
+ dataelements: {
601
+ title: `${n}.json`,
602
+ receipt: T
603
+ }
604
+ }]
605
+ },
606
+ tempId: I()
607
+ }]
612
608
  }),
613
609
  type: "json",
614
610
  timeout: 0,
@@ -703,11 +699,24 @@ async function R(e, t = void 0, n = void 0) {
703
699
  Accept: "application/json"
704
700
  },
705
701
  onComplete(i) {
706
- const d = JSON.parse(i);
707
- t && t(d), o(d);
702
+ let d;
703
+ try {
704
+ d = JSON.parse(i);
705
+ } catch {
706
+ d = i;
707
+ }
708
+ return result = d, t && t(d), result;
708
709
  },
709
710
  onFailure(i, d, l) {
710
- n && (console.log("error http", i), n({ msg: JSON.parse(i), headers: d, xhr: l }), c({ msg: JSON.parse(i), headers: d, xhr: l }));
711
+ n && (console.log("error http", i), n({
712
+ msg: JSON.parse(i),
713
+ headers: d,
714
+ xhr: l
715
+ }), c({
716
+ msg: JSON.parse(i),
717
+ headers: d,
718
+ xhr: l
719
+ }));
711
720
  }
712
721
  });
713
722
  },
@@ -806,11 +815,9 @@ function De(e, t, n = void 0, s = void 0) {
806
815
  "Content-Type": "application/json"
807
816
  },
808
817
  data: JSON.stringify({
809
- data: [
810
- {
811
- id: t
812
- }
813
- ]
818
+ data: [{
819
+ id: t
820
+ }]
814
821
  }),
815
822
  type: "json",
816
823
  onComplete(a) {
@@ -847,12 +854,10 @@ function Fe(e, t, n, s = void 0, o = void 0) {
847
854
  "Content-Type": "application/json"
848
855
  },
849
856
  data: JSON.stringify({
850
- data: [
851
- {
852
- id: t,
853
- nextState: n
854
- }
855
- ]
857
+ data: [{
858
+ id: t,
859
+ nextState: n
860
+ }]
856
861
  }),
857
862
  type: "json",
858
863
  onComplete(i) {
@@ -889,11 +894,9 @@ function Ue(e, t, n = void 0, s = void 0) {
889
894
  "Content-Type": "application/json"
890
895
  },
891
896
  data: JSON.stringify({
892
- graphRequests: [
893
- {
894
- id: t
895
- }
896
- ]
897
+ graphRequests: [{
898
+ id: t
899
+ }]
897
900
  }),
898
901
  type: "json",
899
902
  onComplete(a) {
@@ -930,17 +933,15 @@ function je(e, t, n = void 0, s = void 0) {
930
933
  "Content-Type": "application/json"
931
934
  },
932
935
  data: JSON.stringify({
933
- data: [
934
- {
935
- "attribute[PLMReference.V_versionComment]": null,
936
- physicalid: t,
937
- type: "Document",
938
- tenant: e.tenant,
939
- objectId: t,
940
- policy: "Document Release",
941
- availableSemantic: ["E", "LAST", "NEW", "DUP"]
942
- }
943
- ]
936
+ data: [{
937
+ "attribute[PLMReference.V_versionComment]": null,
938
+ physicalid: t,
939
+ type: "Document",
940
+ tenant: e.tenant,
941
+ objectId: t,
942
+ policy: "Document Release",
943
+ availableSemantic: ["E", "LAST", "NEW", "DUP"]
944
+ }]
944
945
  }),
945
946
  type: "json",
946
947
  onComplete(a) {
@@ -977,15 +978,13 @@ function $e(e, t, n, s = void 0, o = void 0) {
977
978
  "Content-Type": "application/json"
978
979
  },
979
980
  data: JSON.stringify({
980
- data: [
981
- {
982
- physicalid: t,
983
- proposedRevision: n,
984
- modifiedAttributes: {
985
- revision: n
986
- }
981
+ data: [{
982
+ physicalid: t,
983
+ proposedRevision: n,
984
+ modifiedAttributes: {
985
+ revision: n
987
986
  }
988
- ],
987
+ }],
989
988
  folderid: null,
990
989
  notificationTimeout: 600
991
990
  }),
@@ -1078,7 +1077,7 @@ function ve(e, t, n, s = void 0, o = void 0) {
1078
1077
  let v, P;
1079
1078
  const j = [];
1080
1079
  async function Pe(e, t = void 0, n = void 0) {
1081
- e.objID && e.objID !== "" ? (console.log("obj est présent"), k(
1080
+ e.objID && e.objID !== "" ? k(
1082
1081
  e,
1083
1082
  (s) => {
1084
1083
  t && t(s);
@@ -1086,7 +1085,7 @@ async function Pe(e, t = void 0, n = void 0) {
1086
1085
  (s) => {
1087
1086
  n && n(s);
1088
1087
  }
1089
- )) : (e.objID === null || e.objID === "") && C(
1088
+ ) : (e.objID === null || e.objID === "") && C(
1090
1089
  e,
1091
1090
  (s) => {
1092
1091
  t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
@@ -1906,14 +1905,14 @@ export {
1906
1905
  Ue as _3DSpace_lifecycle_getGraph,
1907
1906
  je as _3DSpace_lifecycle_getNextRevision,
1908
1907
  De as _3DSpace_lifecycle_getNextStates,
1909
- We as _3DSwim_getAllCommunities,
1910
- Q as _3DSwim_getMembersCommunity,
1911
1908
  Ve as _3DSwym_buildDirectMessage,
1912
1909
  Ye as _3DSwym_deleteIdea,
1913
1910
  Z as _3DSwym_findCommunityToInstantMSG,
1911
+ We as _3DSwym_getAllCommunities,
1914
1912
  Ge as _3DSwym_getAllNews,
1915
1913
  Ke as _3DSwym_getFamiliarPeople,
1916
1914
  Xe as _3DSwym_getIdeaStatusMaturity,
1915
+ Q as _3DSwym_getMembersCommunity,
1917
1916
  He as _3DSwym_getSWYMIdea,
1918
1917
  ze as _3DSwym_get_AllSWYMIdeas,
1919
1918
  qe as _3DSwym_get_currentUser,