@beam3_dev/api_module 0.0.148 → 0.0.150
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 +2241 -0
- package/dist/wb3Api.js.map +1 -0
- package/dist/wb3Api.umd.cjs +79 -0
- package/dist/wb3Api.umd.cjs.map +1 -0
- package/package.json +7 -3
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
(function(l,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("uuid"),require("luxon"),require("@widget-lab/3ddashboard-utils")):typeof define=="function"&&define.amd?define(["exports","uuid","luxon","@widget-lab/3ddashboard-utils"],N):(l=typeof globalThis<"u"?globalThis:l||self,N(l["@beam3_dev/api_module"]={},l.uuid,l.luxon,l["@widget-lab/3ddashboard-utils"]))})(this,function(l,N,I,D){"use strict";function $(){return N.v4()}const R={b3M3Yellow:"#FFB300",b3AboutageBlue:"#42A5F5",b3UsinageGreen:"#689F38",b3PanneauOrange:"#ff8000",b3M350percent:"#fafa6e",b3M380percent:"#aae479",b3M390percent:"#64c987",b3M3100percent:"#23aa8f",b3M3105percent:"#00898a",b3M3110percent:"#176877",b3M3120percent:"#2a4858",b3Aboutage50percent:"#fafa6e",b3Aboutage80percent:"#aae479",b3Aboutage90percent:"#64c987",b3Aboutage100percent:"#23aa8f",b3Aboutage105percent:"#00898a",b3Aboutage110percent:"#176877",b3Aboutage120percent:"#2a4858",b3Warning:"#FF0000",b3Edit1:"#AD1457",b3Edit2:"#F4511E",b3Edit3:"#009688",b3Edit4:"#D50000",b3Edit5:"#039BE5",b3Edit6:"#9E69AF",b3Edit7:"#A79B8E",b3Edit8:"#616161",b3Edit9:"#795548"};async function Q(e,t=void 0,n=void 0){const s=parseInt(e);await fetch("https://apicarto.ign.fr/api/codes-postaux/communes/"+s,{method:"GET",headers:{Accept:"application/json"}}).then(a=>a.json()).then(a=>{t&&t(a)}).catch(a=>{n&&n(a),console.error("Erreur : "+a)})}async function Z(e,t=void 0,n=void 0){e=encodeURIComponent(e),await fetch("https://api-adresse.data.gouv.fr/search/?q="+e+"&limit=15",{method:"GET",headers:{Accept:"application/json"}}).then(s=>s.json()).then(s=>{t&&t(s)}).catch(s=>{n&&n(s),console.error("Erreur : "+s)})}async function ee(e,t=R){let n=I.DateTime.now().year;const s=e,a=[],r=i=>{for(let c in i)a.push({date:c,comment:i[c]})};for(let i=n;i<=n+1;i++)await fetch("https://calendrier.api.gouv.fr/jours-feries/metropole/"+i+".json",{method:"GET",headers:{Accept:"application/json"}}).then(c=>c.json()).then(c=>{r(c)}).catch(c=>console.error("Erreur : "+c));return(()=>{const i=s.length===0?{events:[]}:s;for(let c of a)i.events.findIndex(u=>u.start===I.DateTime.fromISO(c.date).toISODate()&&u.name==="Férié : "+c.comment)===-1&&i.events.push({name:"Férié : "+c.comment,start:I.DateTime.fromISO(c.date).toISODate(),end:I.DateTime.fromISO(c.date).toISODate(),color:t.b3BusinnessDays,timed:!1});return i})()}async function te(e,t,n=!0){const s=e.events.findIndex(a=>a.uuid===t.uuid);return s===-1?e.events.push(t):n?e.events[s]=t:e.events.splice(s,1),e.length>0&&e.sort((a,r)=>a.start-r.start),e}function f(e,t){D.requirejs(["DS/WAFData/WAFData"],n=>{n.authenticatedRequest(e,t)})}function ne(e,t,n){D.requirejs(["DS/DataDragAndDrop/DataDragAndDrop"],s=>{s.draggable(e,{data:t,start:n})})}function se(e,t=void 0){D.requirejs(["DS/TagNavigatorProxy/TagNavigatorProxy"],n=>{let s;s===void 0&&(s=n.createProxy({widgetId:D.widget.id,filteringMode:"WithFilteringServices"}),t!==void 0&&s.addEvent("onFilterSubjectsChange",t)),s.setSubjectsTags(e)})}function ie(e,t){D.requirejs(["DS/DataDragAndDrop/DataDragAndDrop"],n=>{n.droppable(e,{drop:t})})}async function ae(e,t=void 0,n=void 0){await D.requirejs(["DS/i3DXCompassServices/i3DXCompassServices"],s=>{(!e||e==="")&&(e=D.widget.getValue("PlatFormInstanceId")),(!e||e==="")&&(e=void 0),t&&t(s.getPlatformServices({platformId:e,onComplete:t,onFailure:n}))})}function M(){let e={};return D.requirejs(["DS/PlatformAPI/PlatformAPI"],t=>{const n=t.getTenant(),s=t.getUser(),a=t.getAllApplicationConfigurations(),r=t.getApplicationConfiguration("com.3ds.wp.passport.cors");e={tenant:n,user:s,appsConfiguration:a,appConf:r}}),console.log("%cRETOUR API :","color:blue",e),e}function v(e,t=void 0,n=void 0){if(e.tenant){const s=`https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;f(s,{onComplete(a){const r=typeof a=="string"?JSON.parse(a):a;if(r&&"platforms"in r){const o=r.platforms.find(i=>i.id===e.tenant.toUpperCase());t&&o?t(o):n&&n("_getServiceUrl return listServiceUrl = undefined")}else n&&n("_getServiceUrl return oResponse = undefined")},onFailure(a){n&&n(a)}})}}function oe(e,t=void 0,n=void 0){if(e.tenant){const s=`https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;f(s,{onComplete(a){const r=JSON.parse(a);if(console.log("serviceId=3dpassport",r),Array.isArray(r)&&r.length>0){const o=`${r[0].services[0].url}`;t&&t(o)}},onFailure(a){n&&n(a)}})}}function re(e,t,n){const s={base:`${e.space}`,uri:"/resources/AppsMngt/api/custom/applications",option:`?filter=${e.tenant}`},a=`${s.base}${s.uri}${s.option}`;f(a,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},onComplete(r,o,i){const c=JSON.parse(r),d=c.data.map(u=>{const p=u.attributes.name,m=u.id;return{name:p,id:m}});t&&t(d,c)},onFailure(r,o){const i=r;i.msg=o.errormsg,i.errCode=o.errorcode,n&&n(i)}})}function ce(e,t=void 0,n=void 0){let s=`${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;f(s,{onComplete(a,r,o){const i=JSON.parse(a);console.log("_AppMngt_get_users => ",i),t&&t(i)},onFailure(a,r){const o=a;o.msg=r.errormsg,o.errCode=r.errorcode,n&&n(o)}})}function de(e,t,n=void 0,s=void 0){let a=`${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;f(a,{onComplete(r,o,i){const c=JSON.parse(r);n&&n(c)},onFailure(r,o){const i=r;i.msg=o.errormsg,i.errCode=o.errorcode,s&&s(i)}})}const F={"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"};function le(e,t,n=void 0,s=void 0){const{space:a,currentUser:r}=e,i=`${a}${{URIUGr:"/3drdfpersist/resources/v1/usersgroup"}.URIUGr}`,c={groups:[{title:t.title,description:t.description,members:t.members||[r.email,"samuel.mureau@beam3.fr"],pending_members:[],sharing:t.sharing,visibility:t.visibility}]};f(i,{method:"POST",headers:F,data:JSON.stringify(c),onComplete(d){n&&n(JSON.parse(d))},onFailure(d,u){console.log(d);const p=d;p.msg=u.errormsg,p.errCode=u.errorcode,console.log("❌ sendDirectMessage => ",p),s&&s(p)}})}function ue(e,t,n=void 0,s=void 0){const{space:a,tenant:r}=e,o=a,i=`/3drdfpersist/v1/resources/${t}`,c=`?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`,d=`${o}${i}${c}`;f(d,{opts:{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"}},onComplete(m){n&&n(JSON.parse(m))},onFailure(m,g){const _=m;_.msg=g.errormsg,_.errCode=g.errorcode,s&&s(_)}})}function L(e,t=void 0,n=void 0){const{space:s,tenant:a}=e,r=s,o="/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options",i=`?tenant=dstenant:${a}`,c={method:"GET",Accept:"application/json,*/*,test/javascript"},d=`${r}${o}${i}`;f(d,{OPTsH:c,onComplete(u){t&&t(JSON.parse(u))},onFailure(u,p){const m=u;m.msg=p.errormsg,m.errCode=p.errorcode,n&&n(m)}})}function pe(e,t=void 0,n=void 0){const{space:s,currentUser:a}=e,i=`${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`,d={method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"}};try{f(i,{opts:d,onComplete(u){const p=JSON.parse(u),m={},g=p.groups.filter(_=>_.uri.startsWith("uuid:"));if(a&&Object.keys(a).length>0){const _=g.filter(y=>y.owner===a.email),S=g.filter(y=>y.members.includes(a.email)),h=_.concat(S);m.iam=h,m.UG=g,m.iamMember=S,L(e,y=>{m.rules=y,t&&t(m)},y=>{n&&n(y)})}},onFailure(u){n&&n(u)}})}catch(u){console.log(u)}}function fe(e,t){const{space:n}=e,a=`${n}/3drdfpersist/resources/v1/usersgroup/${t}`;f(a,{method:"DELETE"})}function me(e,t,n,s=void 0,a=void 0){const{space:r,tenant:o}=e,i={URITI:"/3drdfpersist/resources/v1/template-instances",URIUGr:"/3drdfpersist/resources/v1/usersgroup",nextURICh:"/characteristics",nextURIGr:"/group",nexURImem:"/members",OPTsTI:"?$mask=dsaccess:Mask.GroupUI.Properties",OPTsTenant:`tenant=dstenant:${o}`},c=n,d=`${r}${i.URIUGr}/${t}`,u=JSON.stringify(c);f(d,{headers:F,method:"PATCH",data:u,type:"json",onComplete(p){s&&s(p)},onFailure(p){a&&a(p)}})}function ge(e,t,n,s=void 0,a=void 0){const{space:r}=e,i=`${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;f(i,{method:"PATCH",headers:F,data:JSON.stringify(n),type:"json",onComplete(d){s&&s(d)},onFailure(d){a&&a(d)}})}function _e(e,t,n=void 0,s=void 0){const{space:a}=e,o=`${a}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;f(o,{opts:{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"}},onComplete(d){n&&n(JSON.parse(d))},onFailure(d){s&&s(d)}})}async function J(e,t,n){if(e.space){const s=`${e.space}/resources/v1/application/CSRF`;f(s,{onComplete(a){a=JSON.parse(a),t&&t(a.csrf)},onFailure(a,r,o){n&&n({error:a,headers:r,xhr:o})}})}}async function G(e,t=void 0,n=void 0,s=void 0){const a=e.space;if(t===void 0){console.log("Le paramètre docid est obligatoire");return}const r=a+`/resources/v1/modeler/documents/${t}`;f(r,{onComplete(o,i,c){const d=JSON.parse(o);n&&n(d)},onFailure(o){s&&s(o)}})}async function Se(e,t=void 0,n=void 0,s=void 0){const a=e.space;if(t===void 0){console.log("Le paramètre docid est obligatoire");return}const r=a+"/resources/v1/modeler/documents/ids?$fields=revision&$include=!files,!ownerInfo,!originatorInfo,versions";f(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:JSON.stringify({$ids:t.join(",")}),onComplete(o,i,c){const d=JSON.parse(o);n&&n(d)},onFailure(o){s&&s(o)}})}function k(e,t=void 0,n=void 0){if(e.objID&&e.objID!==""){let s=`${e.space}/resources/v1/modeler/documents/${e.objID}`;f(s,{onComplete(a,r,o){const i=JSON.parse(a);e.token=i?.csrf?.value,e.datas=i?.data[0],t&&t(e)},onFailure(a){n&&n(a)}})}else O(e,s=>{console.log("_3DSpace_get_csrf / _3DSpace_csrf",s),t&&t(s)},s=>{n&&n(s)})}function O(e,t=void 0,n=void 0){if(e.space){const s=e.space+"/resources/v1/application/CSRF";f(s,{onComplete(a,r,o){const i=JSON.parse(a);t&&t(i.csrf.value)},onFailure(a,r,o){n&&n({response:a,headers:r,xhr:o})}})}else n&&n("ERROR : url du 3DSpace non défini.")}function A(e,t=void 0,n=void 0){let s=e.space+`/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;k(e,a=>{f(s,{method:"PUT",headers:{ENO_CSRF_TOKEN:e.token},onComplete(r){const i=JSON.parse(r).data[0].dataelements.ticketURL;t&&t(i)},onFailure(r,o){console.warn("☠️ error => ",r,o),n&&n(r,o)}})},a=>{console.warn("_3DSpace_get_ticket / error => ",a),n&&n(a)})}function he(e,t,n,s=void 0,a=void 0){const r=`${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;n||(n=e.token),f(r,{method:"PUT",headers:{ENO_CSRF_TOKEN:n},onComplete(o){let i=JSON.parse(o);if(console.log("☠️ info => ",i),i.success===!0)try{const c=i.data[0].dataelements.ticketURL;s&&s(c)}catch(c){a&&a(c)}},onFailure(o){a&&a(o)}})}function E(e,t,n,s,a,r=void 0,o=void 0){k(e,t,i=>{x(e,t,n,s,a,i.csrf.value,r,o)})}function x(e,t,n,s,a,r,o=void 0,i=void 0){const c=e.space+`/resources/v1/modeler/documents/${t}/files/CheckinTicket`;f(c,{method:"PUT",headers:{ENO_CSRF_TOKEN:r},onComplete(d,u,p){const m=JSON.parse(d).data[0].dataelements,g=new FormData;g.append("__fcs__jobTicket",m.ticket),g.append("file_0",s,a);const _={};_.method="POST",_.data=g,_.onComplete=function(S){let h="temp_"+Date.now(),y={method:"PUT",headers:{ENO_CSRF_TOKEN:r},data:JSON.stringify({data:[{id:t,relateddata:{files:[{id:n,dataelements:{title:a,receipt:S},updateAction:"REVISE"}]},tempId:h}]}),type:"json",onComplete(w){o&&o(w)},onFailure(w){i&&i(w)}};f(e.space+"/resources/v1/modeler/documents",y)},_.onFailure=function(S){i&&i(S)},_.timeout=0,f(m.ticketURL,_)}})}async function ye(e,t,n,s,a=void 0,r=void 0){const o=e.space,i=e.token,c=e.ctx,d=new FormData,u=new Blob([JSON.stringify(t)],{type:"text/plain"}),p={url_Ticket:`${o}/resources/v1/modeler/documents/files/CheckinTicket`,url_Post:`${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`};if(!o&&o!==""){console.log("le store._3DSpace est vide");return}f(p.url_Ticket,{method:"PUT",headers:{ENO_CSRF_TOKEN:i.value},onComplete(m,g,_){const S=JSON.parse(m).data[0].dataelements;d.append("__fcs__jobTicket",S.ticket),d.append("filename",u,n);const h={method:"POST",data:d,onComplete(C){if(c!==""&&i!==""){const P={method:"POST",headers:{ENO_CSRF_TOKEN:i,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{type:"Document",dataelements:{title:`Title_${n.toLowerCase().split(" ").join("_")}`,policy:"Document Release",description:s},relateddata:{files:[{dataelements:{title:`${n}.json`,receipt:C}}]},tempId:$()}]}),type:"json",timeout:0,onComplete:y,onFailure:w};c!==""&&f(p.url_Post,P)}else console.warn("le store est vide")},onFailure:w};function y(C){console.log("Success -- response ",C.data[0]),a&&a(C)}function w(C,P){console.log("Erreur -- response ",C,`
|
|
2
|
+
headers `,P),r&&r(C)}f(S.ticketURL,h)}})}function b(e,t=void 0,n=void 0,s=void 0,a=void 0,r=void 0,o=!1){const i=`${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;f(i,{method:"GET",onComplete(c){const d=JSON.parse(c);let u="",p,m,g;if(t){let _=d.collabspaces.find(S=>S.title===t);if(_){p=t;let S=_.couples;S=S.filter((h,y,w)=>y===w.findIndex(C=>C.organization.pid===h.organization.pid&&C.role.pid===h.role.pid)),n&&(Array.isArray(n)?n.forEach(h=>{g||S.forEach(y=>{if(h===y.role.name&&s===y.organization.title)g=h,m=s;else if(h===y.role.name){let w=S.filter(C=>C.role.name===h);w.length===1?(g=w[0].role.name,m=w[0].organization.title):r(w)}})}):S.forEach(h=>{if(n===h.role.name&&s===h.organization.title)g=n,m=s;else if(n===h.role.name){let y=S.filter(w=>w.role.name===n);y.length===1?(g=y[0].role.name,m=y[0].organization.title):r(y)}}))}}p&&m&&g?(u=g+"."+m+"."+p,a(u)):d.preferredcredentials&&o?(u=d.preferredcredentials.role.name+"."+d.preferredcredentials.organization.title+"."+d.preferredcredentials.collabspace.title,a(u)):r&&(u=g+"."+m+"."+p,r(u))},onFailure(c,d){console.log("Erreur de récupération du contexte de sécurité. => ",{err:c,headers:d})}})}async function j(e,t=void 0,n=void 0){return(!e.objID||e.objID==="")&&console.warn("_3DSpace_download_doc() / Le paramètre objectId est obligatoire"),(e.space===""||!e.space)&&console.warn("_3DSpace_download_doc() / Le paramètre space est obligatoire"),(e.token===""||!e.token)&&J(e,s=>{e.token=s},s=>{console.log("☠️ error => ",s)}),new Promise((s,a)=>{A(e,r=>{f(r,{headers:{"Content-Type":"application/json",Accept:"application/json"},onComplete(i){let c;try{c=JSON.parse(i)}catch{c=i}t&&typeof t=="function"&&t(c),s(c)},onFailure(i,c,d){n&&(console.log("error http",i),n({msg:JSON.parse(i),headers:c,xhr:d}),a({msg:JSON.parse(i),headers:c,xhr:d}))}})},r=>{n&&n(r),console.log("*_3dspace_download_doc / error file URL *",r),a(r)})})}async function K(e,t,n=void 0,s=void 0){let a=[];if(typeof t<"u"&&Array.isArray(t)&&t?.length>0){for(let i=0;i<t.length;i+=80){const c=t.slice(i,i+80);a.push(c)}const o=i=>{V(e,a[i],()=>{i++,i<a.length&&o(i)},c=>{n&&n(c)})};o(0)}else console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."),s&&s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.")}function V(e,t,n=void 0,s=void 0,a=void 0){const r=[];t.forEach(c=>{r.push({id:c})});let o=JSON.stringify({csrf:{name:"ENO_CSRF_TOKEN",value:e.token},data:r});const i=`${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;f(i,{method:"PUT",data:o,type:"json",onComplete(c){const d=c.data;c.success===!0&&(n&&n(),d.forEach(u=>{try{const p=u.dataelements.fileName,m=u.dataelements.ticketURL;f(m,{onComplete:g=>{s&&s({objectId:u.id,fileName:p,data:JSON.parse(g)})},onFailure:g=>{console.log("error http",g)}})}catch(p){console.log(p),a&&a(p)}}))},onFailure(c){console.log(c),a&&a(c)}})}function we(e,t,n=void 0,s=void 0){return new Promise(a=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const r=`${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;b(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,i=>e.ctx=i,i=>{console.log("onError =>",i)});let o={method:"POST",headers:{SecurityContext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{id:t}]}),type:"json",onComplete(i){n&&n(i)},onFailure(i){s&&s(i)}};f(r,o)}})}function Te(e,t,n,s=void 0,a=void 0){return new Promise(r=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const o=`${e.space}/resources/v1/modeler/dslc/maturity/changeState`;b(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,c=>e.ctx=c,c=>{console.log("onError =>",c)});let i={method:"POST",headers:{SecurityContext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{id:t,nextState:n}]}),type:"json",onComplete(c){s&&s(c)},onFailure(c){a&&a(c)}};f(o,i)}})}function Ce(e,t,n=void 0,s=void 0){return new Promise(a=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const r=`${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;b(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,i=>e.ctx=i,i=>{console.log("onError =>",i)});let o={method:"POST",headers:{securitycontext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({graphRequests:[{id:t}]}),type:"json",onComplete(i){n&&n(i)},onFailure(i){s&&s(i)}};f(r,o)}})}function Oe(e,t,n=void 0,s=void 0){return new Promise(a=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const r=`${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;b(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,i=>e.ctx=i,i=>{console.log("onError =>",i)});let o={method:"POST",headers:{SecurityContext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{"attribute[PLMReference.V_versionComment]":null,physicalid:t,type:"Document",tenant:e.tenant,objectId:t,policy:"Document Release",availableSemantic:["E","LAST","NEW","DUP"]}]}),type:"json",onComplete(i){n&&n(i)},onFailure(i){s&&s(i)}};f(r,o)}})}function De(e,t,n,s=void 0,a=void 0){return new Promise(r=>{if(e.token===""&&O(e),t!==void 0&&t!==""&&t!==null){const o=`${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;b(e.space,"ESPACE COMMUN",["VPLMProjectLeader","VPLMCreator"],void 0,c=>e.ctx=c,c=>{console.log("onError =>",c)});let i={method:"POST",headers:{securitycontext:"ctx::"+e.ctx,ENO_CSRF_TOKEN:e.token,Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({data:[{physicalid:t,proposedRevision:n,modifiedAttributes:{revision:n}}],folderid:null,notificationTimeout:600}),type:"json",onComplete(c){s&&s(c)},onFailure(c){a&&a(c)}};f(o,i)}})}function be(e,t,n,s,a=void 0,r=void 0){return new Promise(o=>{const i=`${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;let c={attributes:{title:n,description:s,inheritedAccess:"no"}},d={items:[]};t&&(d.parentId=t),d.items.push(c);let u={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",SecurityContext:e.ctx,ENO_CSRF_TOKEN:e.token},data:JSON.stringify(d),type:"json",onComplete(p){a&&a(p)},onFailure(p){r&&r(p)}};f(i,u)})}function ve(e,t,n,s,a=void 0,r=void 0){return console.log("credentials",e),new Promise(o=>{`${e.space}`,JSON.stringify({csrf:{name:"ENO_CSRF_TOKEN",value:e.token},data:[{type:"Workspace",cestamp:"businessobject",relId:t,id:t,dataelements:{personList:n,eventsList:s},tenant:e.tenant}]})})}//!SECTION
|
|
3
|
+
function Ne(e,t=void 0,n=void 0){const s={base:`${e.space}`,uri:"/resources/bps/cspaces",optTenant:`tenant=${e.tenant}`},a=`${s.base}${s.uri}?${s.optTenant}`;f(a,{method:"GET",headers:{Accept:"application/json,text/javascript,*/*","Content-Type":"application/ds-json"},onComplete(r,o){const i=JSON.parse(r);t&&t(i,o)},onFailure(r,o,i){n&&n({response:r,headers:o,xhr:i})}})}function Ie(e,t,n,s){A(e.space,t,a=>{f(a,{header:{ENO_CSRF_TOKEN:e.token},onComplete:r=>{n&&n(r)},onFailure:r=>{console.log("error http",r),s&&s(r)}})})}async function ke(e,t,n=void 0,s=void 0){return new Promise(a=>{A(e,t,r=>{f(r,{onComplete:(o,i,c)=>(a(JSON.parse(o)),n&&n(JSON.parse(o),i,c),a),onFailure:(o,i,c)=>{s&&s(o,i,c),console.log(o,i?.errormsg)}})})})}function Ae(e,t,n,s=void 0,a=void 0){const r=new Blob([JSON.stringify(t)],{type:"text/plain"});k(e,n,o=>{const i=o.data[0].relateddata.files[0].id,c=o.data[0].dataelements.secondaryTitle!==""?o.data[0].dataelements.secondaryTitle:o.data[0].dataelements.title;E(e,n,i,r,c,d=>{s&&s(d)},d=>{a&&a(d)})})}let W,q;const B=[];async function $e(e,t=void 0,n=void 0){e.objID&&e.objID!==""?k(e,s=>{t&&t(s)},s=>{n&&n(s)}):(e.objID===null||e.objID==="")&&O(e,s=>{t&&t({rep:s,msg:"Pas d'objID, ou invalide"})},s=>{n&&n({msg:"Pas d'objID et erreur sur le Space",err:s})})}async function Fe(e,t=void 0,n=void 0){console.log("getDatasByTenant (getDocuments)",e),await j(e,s=>{const a={};a.obj=s,console.log("getDatasByTenant (getDocuments) _datas",a),t&&t?.(a)},s=>{n&&n?.(s)})}function je(e,t=void 0,n=void 0){const s=[];if(!e.objIds&&!Array.isArray(e.objIds)&&e.objIds.length===0){console.warn("la liste est vide ou n'est pas un tableau");return}e.objIds.forEach((a,r)=>{j(e,a.objID,o=>{s.push({[a.name]:o}),a.name==="dbProjets"&&(W=o.affaires.map(i=>i.objectID),X(e,q)),r===e.objIds.length-1&&(t&&t(s),delete e.objIds,delete e.datas)})})}function X(e,t,n=void 0,s=void 0){K(e,W,a=>{const r=[...t];r.find(o=>o.objectID===a.objectId).data=a.data,q=r,B.push(a.data),n&&n(B)},a=>{s&&(s(a),console.log(a))})}const Ue="FA35FB9B177A280065800EA0000F599C",Pe=["swym","3dspace","drive","usersgroup","3dplan","dashboard"],Y={how:"ds6w:how",what:"ds6w:what",when:"ds6w:when",where:"ds6w:where",who:"ds6w:who",why:"ds6w:why"},Re={objId:Ue,pred:"who",order_by:"desc",tag:"testTag"};function Me(e,t,n=void 0,s=void 0){const{space:a,tenant:r}=e,{objId:o,pred:i,tag:c}=t,d={uri:"/resources/6w/tags",otpCTX:"SecurityContext=preferred",optTenant:`tenant=${r}`},u=`${a}${d.uri}?${d.otpCTX}&${d.optTenant}`,p={tag:[{subject:[{uri:`pid://${o}`}],predicate:Y[i],object:{literal:c}}]};f(u,{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},data:JSON.stringify(p),onComplete(m){JSON.parse(m);const g={};setTimeout(()=>{G(e,o,_=>{const S=_.data[0].dataelements.title,h=_.data[0].dataelements.fileExtension!==void 0?_.data[0].dataelements.fileExtension:"",y=_.data[0].relateddata.ownerInfo[0].dataelements.name;g.name=S,g.ext=h,g.createBy=y,t.info={...g},Le(e,t,w=>{n&&n(w)},w=>{s&&s(w)})},(_,S)=>{const h=_;h.msg=S.errormsg,h.errCode=S.errorcode,console.log("❌ sendDirectMessage => ",h),s&&s(h)})},2e3)},onFailure(m,g){const _=m;_.msg=g.errormsg,_.errCode=g.errorcode,console.log("❌ sendDirectMessage => ",_),s&&s(_)}})}function Le(e,t,n=void 0,s=void 0){console.log("obj ",t);const a=t.info.name,r={baseUrl:`https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,uri:"/federated/search"},o=`${r.baseUrl}${r.uri}`,i={"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"},c=$(),d={with_indexing_date:!0,with_synthesis:!0,with_nls:!1,label:`3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,locale:"fr",select_predicate:["ds6w:label","ds6w:type","ds6w:description","ds6w:identifier","ds6w:modified","ds6w:created","ds6wg:revision","ds6w:status","ds6w:responsible","owner","ds6w:responsibleUid","ds6wg:filesize","ds6w:project","ds6w:dataSource","ds6w:community","ds6w:originator","dsgeo:referential","ds6w:lastModifiedBy","ds6w:repository","dcterms:title","dcterms:description","ds6w:containerUid"],with_synthesis_hierarchical:!0,select_file:["icon","thumbnail_2d"],query:a,specific_source_parameter:{"3dspace":{additional_query:' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'},drive:{additional_query:' AND NOT ([flattenedtaxonomies]:"types/DriveNode" AND ( [current]:"Trashed" OR [policy]:"Drive File Iteration") )'}},select_exclude_synthesis:["ds6w:what/ds6w:topic"],order_by:Re.order_by,order_field:"relevance",select_snippets:["ds6w:snippet","ds6w:label:snippet","ds6w:responsible:snippet","ds6w:community:snippet","swym:message_text:snippet"],nresults:40,start:"0",source:Pe,tenant:e.tenant,login:{"3dspace":{SecurityContext:e.ctx}}};console.log("dataPattern => ",d),f(o,{method:"POST",headers:i,data:JSON.stringify(d),onComplete(u){const p=JSON.parse(u);n(p)},onFailure(u,p){const m=u;m.msg=p.errormsg,m.errCode=p.errorcode,console.log("❌ sendDirectMessage => ",m),s&&s(m),console.log("Erreur de recuperation d'id du doc et des tags",u)}})}function Je(e,t,n=void 0,s=void 0){const{objId:a,pred:r,tag:o}=t,i={uri:"/resources/6w/tags",otpCTX:"SecurityContext=preferred",optTenant:`tenant=${e.tenant}`},c=`${e.space}${i.uri}?${i.otpCTX}&${i.optTenant}`,d={tag:[{subject:[{uri:`pid://${a}`}],predicate:Y[r],object:{literal:o}}]};f(c,{method:"DELETE",data:JSON.stringify(d),headers:{"Content-Type":"application/json",Accept:"application/json,text/javascript,*/*"},onComplete(u){n&&n(u)},onFailure(u,p){const m=u;m.msg=p.errormsg,m.errCode=p.errorcode,console.log("❌ sendDirectMessage => ",m),s&&s(m)}})}function Ge(e,t="",n=void 0,s=void 0){const{space:a}=e;if(t==="")return;const r={uri:"/resources/v1/modeler/documents"},o={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8",Accept:"application/json,text/javascript,*/*"},i=`${a}${r.uri}`,c=`$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;f(i,{method:"POST",headers:o,data:c,onComplete(d){n&&n(JSON.parse(d))},onFailure(d,u){const p=d;p.msg=u.error,s&&s(p)}})}async function T(e,t=void 0,n=void 0){const s=e.space+"/api/index/tk";return f(s,{onComplete(a,r,o){const i=JSON.parse(a);if(t)return t(i),e.token=i?.result?.ServerToken},onFailure(a){n&&n(a)}})}function Ee(e,t=void 0,n=void 0){const s=`${e.space}/api/exalead/whatsnew`,a={params:{community_id:null,hash_key:null,legacyFormat:!1,nresults:1,query:"#all",start:0}};T(e,r=>{f(s,{method:"POST",headers:{"X-DS-SWYM-CSRFTOKEN":r.result.ServerToken,"Content-type":"application/json;charset=UTF-8",Accept:"application/json"},data:JSON.stringify(a),type:"json",onComplete(o,i){t&&t(o,i)},onFailure(o,i){n&&n(o,i)}})})}function xe(e,t=void 0,n=void 0){const s=`${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`,a={params:{idsToFilterArr:[],mode:"offline",limit:30,itemType:"User",maxNbOfCommonElements:"5"}};T(e,r=>{f(s,{method:"POST",headers:{"X-DS-SWYM-CSRFTOKEN":r.result.ServerToken,"Content-type":"application/json;charset=UTF-8",Accept:"application/json"},data:JSON.stringify(a),type:"json",onComplete(o,i){const c=o.result.hits.map(d=>({login:d.login,fullName:d.name}));t&&t(c,o)},onFailure(o,i){n&&n(o,i)}})})}function Ke(e,t=void 0,n=void 0){const s={base:e.space,uri:"/api/community/listmycommunities",limit:`/limit/${e.limit?e.limit:128}`,page:`/page/${e.page?e.page:"1"}`},a=`${s.base}${s.uri}${s.limit}${s.page}`,r=[];T(e,o=>{f(a,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":o.result.ServerToken},onComplete(i,c,d){const p=JSON.parse(i).result;let m=0;p.forEach(g=>{const _={description:g.description,id:g.id,title:g.title,owner:g.owner,role:g.role,access:g.access};H(e,g.id,S=>{m++,_.members=S,r.push(_),m===p.length&&t&&t(r)},S=>n(S))})},onFailure(i,c){const d=i;d.status=c.status,d.response=c.errormsg,n&&n(d)}})})}function H(e,t,n,s){const a=`${e.space}/api/community/listmembers`,r={params:{page:e.page?e.page:1,limit:e.limit?e.limit:50,community_id:t}};T(e,o=>{f(a,{method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":o.result.ServerToken},data:JSON.stringify(r),type:"json",onComplete(i,c,d){n&&n(i)},onFailure(i,c){const d=i;d.status=c.status,d.response=c.errormsg,s&&s(d)}})})}function Ve(e,t=void 0,n=void 0){const s="YXdA5x4DSUKtlAi2wmnyTA";e.commu_id||(e.commu_id=s);const a=`${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;T(e,r=>{f(a,{method:"GET",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},onComplete(o){const i=JSON.parse(o);t&&t(i)},onFailure(o,i){const c=o;c.status=i.status,c.response=i.errormsg,n&&n(c)}})})}function We(e,t,n=void 0,s=void 0){const{listAllContacts:a,currentUser:r}=e;console.log("__listAllContacts",a.hits);const o=`${e.space}/api/directmessages`,i={users:[r.login].concat(t.receipt)},c={id_msg:"",senderId:e.currentUser.login,senderName:`${e.currentUser.first_name} ${e.currentUser.last_name}`,msg:qe(t.msg)};let d=!1;z(i.users,u=>{u!==void 0&&(c.id_msg=u.id,d=!0,U(e,c))},u=>{d=!1,console.log("_3dSwym_findCommunityToInstantMSG callback",u),s&&s(u),c.id_msg=""}),d===!1&&setTimeout(()=>{d===!1&&T(e,u=>{f(o,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":u.result.ServerToken},data:JSON.stringify(i),type:"json",onComplete(p,m,g){const _=p;_.reponse=JSON.parse(g.response),_.status=g.status,n&&n(_),c.id_msg=_.result.id,U(e,c)},onFailure(p,m,g){const _=p;_.msg=m.errormsg,_.status=m.status,s&&s(_)}})})},500)}function z(e,t,n,s){const a=`${e.space}/api/directmessages/lite?with_favorites=false`;T(e,r=>{f(a,{method:"GET",headers:{Accept:"application/json,text/javascript,*/*","X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},onComplete(o){const i=JSON.parse(o),c=[];i.result.forEach(p=>{p.users=p.users.sort((m,g)=>m.login.localeCompare(g.login)),p.users.length===t.length&&c.push(p)});const d=t.sort(),u=c.find(p=>{const m=[];return p.users.forEach(g=>{m.push(g.login)}),JSON.stringify(m)===JSON.stringify(d)});n&&u!==void 0?n(u):(s||u===void 0)&&s(u)},onFailure(o){const i=o;i.msg=headers.errormsg,i.errCode=headers.errorcode,console.log("❌ sendDirectMessageLite => ",i),s&&s(i)}})})}function U(e,t,n=void 0,s=void 0){const a={base:e.space,uri:"/api/community",id_msg:`${t.id_msg}`,endUri:"/instantmessages"},r=`${a.base}${a.uri}/${a.id_msg}${a.endUri}`,o={author:{login:t.senderId,displayName:t.senderName},accessState:null,commentUri:null,comments:null,endorsements:null,moderationState:null,parentCommentUri:null,richMessage:t.msg};console.log("_3dSwym_sendDirectMessageData url ",r),T(e,i=>{f(r,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":i.result.ServerToken},data:JSON.stringify(o),type:"json",onComplete(c,d,u){const p=c;p.status=u.status,p.response=JSON.parse(u.response),console.log("✅ _3dSwym_sendDirectMessageData => ",p),n&&n(p)},onFailure(c,d){const u=c;u.msg=d.errormsg,u.errCode=d.errorcode,console.log("❌ sendDirectMessage => ",u),s&&s(u)}})})}function qe(e){const t=new Date().toLocaleDateString(),n=new Date().toLocaleTimeString();return`<p>${e} </p>
|
|
4
|
+
<br/>
|
|
5
|
+
<hr/>
|
|
6
|
+
<p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`}const Be={title:"TEST DEV COMMUNITY IDEA",community_id:"YXdA5x4DSUKtlAi2wmnyTA",community_title:"TEST DEV COMMUNITY",idee_id:"THhRI8rlQNWKRxpv3Xqqug"};function Xe(e,t,n=void 0,s=void 0){const a=`${e.space}/api/idea/add`,r=e.swymCommunities.find(c=>c.id===t.community_id),o=e.swymCommunities.find(c=>c.title.toLowerCase()===t.community_title.toLowerCase()),i={params:{title:t.title,community_id:r?.id!==void 0?r.id:o.id,message:Qe(t.text_html),published:1}};T(e,c=>{const d={"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":c.result.ServerToken};f(a,{method:"POST",headers:d,data:JSON.stringify(i),type:"json",onComplete(u,p,m){const g=JSON.parse(u);g.status=m.status,g.response=m.response,n&&n(g)},onFailure(u,p,m){const g=u;g.status=p.status,g.response=p.errormsg,s&&s(g)}})})}function Ye(e,t,n=void 0,s=void 0){const a=`${e.space}/api/idea/delete`,r={params:{community_id:t.community_id,ideationIds:[t.idee_id]}};T(e,o=>{f(a,{method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":o.result.ServerToken},data:JSON.stringify(r),type:"json",onComplete(i,c,d){n&&n(i)},onFailure(i,c,d){const u=i;u.status=c.status,u.response=c.errormsg,s&&s(u)}})})}function He(e,t="",n=void 0,s=void 0){const a=e.tenant.toLowerCase()==="r1132101716373"?"tFtz0G4MR6qNtKgJjNfTog":e.tenant.toLowerCase()==="r1132101286859"?"Qpv3HN-tTDOsU-7_c5DnDg":"Template_d'idée_à_créer";t===""&&(t=a);const r=`${e.space}/api/idea/get`,o={params:{id:t}};T(e,i=>{f(r,{method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":i.result.ServerToken},data:JSON.stringify(o),type:"json",onComplete(c){const d=c;d.msg=d.result.message,n&&n(d)},onFailure(c){const d=c;d.status=headers.status,d.response=headers.errormsg,s&&s(d)}})})}function ze(e,t=Be,n=void 0,s=void 0){const a={uri:"/api/idea/list",comId:`/community_id/${e.tenant.toLowerCase()==="r1132101716373"?t.community_id:"bgnIsG74SUWswyGzS6NC6g"}`,limit:`/limit/${t.limit?t.limit:10}`},r=`${e.space}${a.uri}${a.comId}${a.limit}`;T(e,o=>{f(r,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":o.result.ServerToken},onComplete(i){const c=JSON.parse(i);n&&n(c)},onFailure(i,c){const d=i;d.status=c.status,d.response=c.errormsg,s&&s(d)}})})}function Qe(e){return!e||e===""?`<h2><u>INFORMATIONS AFFAIRE :</u></h2>
|
|
7
|
+
<p><u>|⚠️<em> Merci de respecter l'écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
|
|
8
|
+
<p><u><em>|spéciaux, séparation par "_" si besoin !</em></u></p>
|
|
9
|
+
<p><strong>Référence client </strong>: <em>
|
|
10
|
+
<a data-predicate="ds6w:who" data-type="internal" class="s6m-tag-link s6m-link">CLIENT</a>
|
|
11
|
+
</em></p>
|
|
12
|
+
<p><strong>Référence projet </strong>: <em>
|
|
13
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">NOM AFFAIRE</a>
|
|
14
|
+
<a data-predicate="ds6w:where" data-type="internal" class="s6m-tag-link s6m-link">VILLE</a>
|
|
15
|
+
<a data-predicate="ds6w:where" data-type="internal" class="s6m-tag-link s6m-link">DPT</a>
|
|
16
|
+
</em></p>
|
|
17
|
+
<p>📝 <strong>Base documentaire</strong> : LIEN projet</p>
|
|
18
|
+
<p>📝 <strong>Fiche COCLICO</strong> : LIEN projet<em><strong></strong>
|
|
19
|
+
</em></p>
|
|
20
|
+
<p><br /></p>
|
|
21
|
+
<table border="1">
|
|
22
|
+
<tbody>
|
|
23
|
+
<tr><td><strong>Description projet </strong>:
|
|
24
|
+
<br /><br /></td></tr>
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
27
|
+
<p><br /></p>
|
|
28
|
+
<p><br /></p>
|
|
29
|
+
<p><strong>Produit :<em> </em></strong><em>
|
|
30
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Hexapli Usiné</a>
|
|
31
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Hexapli MP</a>
|
|
32
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Lamwood</a>
|
|
33
|
+
</em></p>
|
|
34
|
+
<p><strong>Type de Bâtiment :</strong><em>
|
|
35
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Logements</a>
|
|
36
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">BUP</a>
|
|
37
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">ERP</a>
|
|
38
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Plateforme Logistique</a>
|
|
39
|
+
</em></p>
|
|
40
|
+
<p><strong>Essence :</strong> <em>
|
|
41
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">DOUGLAS</a>
|
|
42
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">PIN</a>
|
|
43
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">MIXTE</a>
|
|
44
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">EPICEA</a>
|
|
45
|
+
</em></p>
|
|
46
|
+
<p><strong>Qualité : </strong><em>
|
|
47
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">NVI</a>
|
|
48
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">VI1F</a>
|
|
49
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">VI2F</a>
|
|
50
|
+
</em><strong></strong></p>
|
|
51
|
+
<p><strong>Traitement : </strong><em>
|
|
52
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">PARKA</a>
|
|
53
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">CT2</a>
|
|
54
|
+
</em></p>
|
|
55
|
+
<p><strong>Type de Paroi : </strong><em>
|
|
56
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Murs Intérieurs</a>
|
|
57
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Murs Extérieurs</a>
|
|
58
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Planchers</a>
|
|
59
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Couverture</a>
|
|
60
|
+
</em></p>
|
|
61
|
+
<p><em>
|
|
62
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Etanchéité Accessible</a>
|
|
63
|
+
<a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Etanchéité Non-Accessible</a>
|
|
64
|
+
</em></p>
|
|
65
|
+
<p><strong>Hauteur Dernier Plancher :</strong><em><strong> </strong>
|
|
66
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">Hauteur <8m</a>
|
|
67
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">8m< Hauteur <28m</a>
|
|
68
|
+
<a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">28m< Hauteur <50m</a>
|
|
69
|
+
</em></p>
|
|
70
|
+
<h2><br /></h2>
|
|
71
|
+
<h2><u>EQUIPE PIVETEAU :</u></h2>
|
|
72
|
+
<table border="1">
|
|
73
|
+
<tbody>
|
|
74
|
+
<tr><td><strong>Chargé d'Affaires</strong></td><td><br /></td></tr>
|
|
75
|
+
<tr><td><strong>Service études de prix</strong></td><td><br /></td></tr>
|
|
76
|
+
</tbody></table>
|
|
77
|
+
<p>
|
|
78
|
+
</p>`:e}function Ze(e,t=void 0,n=void 0){const s=e.space+"/api/user/getcurrent/";T(e,a=>{f(s,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":a.result.ServerToken},onComplete(r,o,i){const c=JSON.parse(r);t&&t(c.result)},onFailure(r,o,i){const c={erreur:JSON.parse(r),headers:o,xhr:i};n&&n(c)}})})}function et(e,t,n=void 0,s=void 0){const a=e.space+"/api/user/find/login/"+t;T(e,r=>{f(a,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},onComplete(o,i,c){const d=JSON.parse(o);n&&n(d)},onFailure(o){s&&s(o)}})},s)}function tt(e,t=void 0,n=void 0){e.tenant&&v(e,s=>{console.log("serviceUrls",s);const a=s.services.find(r=>r.id==="businessprocess")?.url+"/api/v2";t&&t(a)})}function nt(e,t=void 0,n=void 0){e.tenant&&v(e,s=>{console.log("serviceUrls",s);const a=s.services.find(i=>i.id==="3dpassport")?.url,r=s.services.find(i=>i.id==="businessprocess")?.url+"/api/v2",o=`${a}/login/?service=${r}/auth/cas`;f(o,{async onComplete(i){console.log("response",i);const c=typeof i=="string"?JSON.parse(i)?.x3ds_service_redirect_url:i?.x3ds_service_redirect_url;await fetch(c,{method:"POST"}).then(d=>d.json()).then(async d=>{t&&t(d?.token)})},onFailure(i){n&&n(i)}})})}async function st(e,t,n=void 0,s=void 0){e.tenant&&v(e,a=>{const o=`${a.services.find(i=>i.id==="businessprocess")?.url+"/api/v2"}/identity/users`;fetch(`https://api.uixhome.fr/iterop/listusers?t=${t}&s=${o}`,{method:"POST"}).then(i=>i.json()).then(i=>{n&&n(i)}).catch(i=>{s&&s(i)})})}async function it(e,t,n=void 0,s=void 0){e.tenant&&v(e,a=>{const o=`${a.services.find(i=>i.id==="businessprocess")?.url+"/api/v2"}/repository/data/tables`;fetch(`https://api.uixhome.fr/iterop/repository/data/tables?t=${t}&s=${o}`,{method:"GET"}).then(i=>i.json()).then(i=>{n&&n(i)}).catch(i=>{s&&s(i)})})}async function at(e,t,n,s,a=void 0,r=void 0){e.tenant&&v(e,o=>{const i=o.services.find(d=>d.id==="businessprocess")?.url+"/api/v2",c=encodeURIComponent(`${i}`);fetch(`https://api.uixhome.fr/iterop/runtime/processes/${n}?t=${t}&s=${c}&b=${s}`,{method:"POST"}).then(d=>d.json()).then(d=>{a&&a(d)}).catch(d=>{r&&r(d)})})}function ot(e){const t="Hello "+e;return console.log(t),t}function rt(e,t=void 0,n=void 0){return console.log("credentials",e),new Promise(s=>{if(e.token===""&&O(e),!e.space||e.space===""){const o=M();console.log("platformeInfo",o)}b(e,"Common space",["VPLMProjectLeader","VPLMCreator"],void 0,o=>e.ctx=o,o=>{console.log("onError =>",o)},!0);const a=I.DateTime.now().ts,r=`https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;f(r,{onComplete(o){if(Array.isArray(JSON.parse(o))){const i=JSON.parse(o);console.log("serviceId=3dsearch",i);const c=`${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;f(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({with_indexing_date:!0,with_nls:!1,label:`3DSearch-${a}`,locale:"en",select_predicate:["ds6w:label","ds6w:type","ds6w:description","ds6w:identifier","ds6w:responsible","ds6wg:fullname"],select_file:["icon","thumbnail_2d"],query:'([ds6w:type]:(Group) AND [ds6w:status]:(Public)) OR (flattenedtaxonomies:"types/Person" AND current:"active")',order_by:"desc",order_field:"relevance",nresults:1e3,start:"0",source:["3dspace","usersgroup"],tenant:e.tenant,login:{"3dspace":{SecurityContext:`ctx::${e.ctx}`}}}),type:"json",onComplete(d){t&&t(d)},onFailure(d){n&&n(d)}})}},onFailure(o){n&&n(o)}})})}l.UUID=$,l._3DSearch_usersGroup=rt,l._3DSpace_Create_Doc=ye,l._3DSpace_bookmark_addSubsciptions=ve,l._3DSpace_bookmark_newWorkspace=be,l._3DSpace_csrf=O,l._3DSpace_download_doc=j,l._3DSpace_download_multidoc=K,l._3DSpace_file_update=E,l._3DSpace_file_update_csr=x,l._3DSpace_file_url_csr=he,l._3DSpace_get_csrf=k,l._3DSpace_get_docInfo=G,l._3DSpace_get_downloadTicket_multidoc=V,l._3DSpace_get_multiDocInfo=Se,l._3DSpace_get_securityContexts=b,l._3DSpace_get_ticket=A,l._3DSpace_lifecycle_changeRevision=De,l._3DSpace_lifecycle_changeState=Te,l._3DSpace_lifecycle_getGraph=Ce,l._3DSpace_lifecycle_getNextRevision=Oe,l._3DSpace_lifecycle_getNextStates=we,l._3DSwym_buildDirectMessage=We,l._3DSwym_deleteIdea=Ye,l._3DSwym_findCommunityToInstantMSG=z,l._3DSwym_getAllCommunities=Ke,l._3DSwym_getAllNews=Ee,l._3DSwym_getFamiliarPeople=xe,l._3DSwym_getIdeaStatusMaturity=Ve,l._3DSwym_getMembersCommunity=H,l._3DSwym_getSWYMIdea=He,l._3DSwym_get_AllSWYMIdeas=ze,l._3DSwym_get_currentUser=Ze,l._3DSwym_get_findUser=et,l._3DSwym_get_version=T,l._3DSwym_postIdea=Xe,l._3DSwym_sendMessageData=U,l._AppMngt_get_info_user=de,l._AppMngt_get_users=ce,l._Iterop_Auth_CAS=nt,l._Iterop_ListUsers=st,l._Iterop_getAllBusinessTables=it,l._Iterop_runProcess=at,l._getPlateformInfos=M,l._getPlatformServices=ae,l._getServiceUrl=v,l._getServiceUrl_3DPassport=oe,l._getServiceUrl_Iterop=tt,l._httpCallAuthenticated=f,l._setDraggable=ne,l._setDroppable=ie,l._setupTagger=se,l.addTagToDoc=Me,l.compass_getListAdditionalApps=re,l.couleurs=R,l.createUserGroups=le,l.dataMixing=X,l.deleteUserGroups=fe,l.findAdresse=Z,l.getAllContextSecurity=Ne,l.getCSRFToken=J,l.getCommunes=Q,l.getComplementUG=ue,l.getDataFrom3DSpace=Ie,l.getDataFromGouvFr=ee,l.getDatasByTenant=Fe,l.getDatasFrom3DSpace=je,l.getDownloadDocument=ke,l.getInfoDocTags=Ge,l.getUserGroupsList=pe,l.getUsersGroupRules=L,l.get_3DSpace_csrf=$e,l.patchUserGroups=me,l.patchUserGroupsControl=ge,l.pushDataIn3DSpace=Ae,l.readUserGroupControl=_e,l.removeTagToDoc=Je,l.sayHello=ot,l.updateEvent=te,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
|
79
|
+
//# sourceMappingURL=wb3Api.umd.cjs.map
|