@beam3_dev/api_module 0.0.337 → 0.0.339

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.
@@ -75,7 +75,7 @@ function He(e,n=void 0,t=void 0){const i={base:`${e.space}`,uri:"/resources/bps/
75
75
  <tr><td><strong>Service études de prix</strong></td><td><br /></td></tr>
76
76
  </tbody></table>
77
77
  <p>
78
- </p>`:e}function bt(e,n=void 0,t=void 0){const{tenant:i,_3DSwym:s,_3DSwym_token:r,community_id:a,idea_id:o}=e;if(i&&s&&r&&a&&o){const c=`${s}/api/idea/forward`;g(c,{method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":r},data:JSON.stringify({community_uri:`swym:prd:${i.toUpperCase()}:community:${a}`,content_uri:`swym:prd:${i.toUpperCase()}:idea:${o}`,timeout:3e4}),type:"json",onComplete(d){n&&n(d)},onFailure(d,u){const l=d;l.status=u.status,l.response=u.errormsg,t&&t(l)}})}else t&&t({status:"error",msg:"Credentials incomplet !",attend:"tenant, _3DSwym , _3DSwym_token, community_id, idea_id",credentials:e})}function Ot(e,n=void 0,t=void 0){return new Promise((i,s)=>{try{let r;if(e._3DDashboard){const a=e._3DDashboard+"/api/users/current";g(a,{method:"GET",onComplete(o,c,d){let u=o.replace(/\"\[/g,"[").replace(/\]\"/g,"]").replace(/\"{/g,"{").replace(/}\"/g,"}").replace(/\\/g,"");u=u.replace(/\"\[/g,"[").replace(/\]\"/g,"]").replace(/\"{/g,"{").replace(/}\"/g,"}").replace(/\\/g,"");let l={};try{l=JSON.parse(u)}catch(m){s("ERROR | _3DSwym_get_currentUser => JSON.Parse()",m)}l.first_name=l?.firstName?l.firstName:"",l.last_name=l?.lastName?l.lastName:"",r=l,i(l)},onFailure(o){s("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current",o)}})}r?i(r):s("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null")}catch(r){s("ERROR | _3DSwym_get_currentUser => ",r)}})}function Dt(e,n,t=void 0,i=void 0){const s=e.space+"/api/user/find/login/"+n;T(e,r=>{g(s,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},onComplete(a,o,c){const d=JSON.parse(a);t&&t(d)},onFailure(a){i&&i(a)}})},i)}function $t(e,n=void 0,t=void 0){const{_3DSwym:i,_3DSwym_token:s,subjectUri:r,richMessage:a}=e,o=`${i}/commentproxy/subjects/${r}/comments`,d={method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":s},data:JSON.stringify({richMessage:a}),type:"json",onComplete(u,l,m){const f={response:typeof u=="string"?JSON.parse(u):u};f.status=m.status,n&&n(f)},onFailure(u){t&&t(u)}};g(o,d)}function Ut(e,n=void 0,t=void 0){e.tenant&&k(e,i=>{const s=i.services.find(r=>r.id==="businessprocess")?.url+"/api/v2";return n&&n(s),s})}function It(e,n=void 0,t=void 0){e.tenant?k(e,i=>{const s=i.services.find(o=>o.id==="3dpassport")?.url,r=i.services.find(o=>o.id==="businessprocess")?.url+"/api/v2",a=`${s}/login/?cors=false&service=${r}/auth/cas`;g(a,{async onComplete(o){const c=typeof o=="string"?JSON.parse(o)?.x3ds_service_redirect_url:o?.x3ds_service_redirect_url;await fetch(c,{method:"POST"}).then(d=>d.json()).then(async d=>{n&&n(d?.token)})},onFailure(o){t&&t(o)}})}):t&&t("No tenant")}function Rt(e,n=void 0,t=void 0){if(e.tenant){const i=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${i}/iterop/jwtuser`,{method:"POST",headers:{"Access-Control-Allow-Origin":"*"}}).then(s=>s.json()).then(s=>{n&&n(s)}).catch(s=>{t&&t(s)})}}async function Ft(e,n,t=void 0,i=void 0){if(e.tenant){const s=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${s}/iterop/repository/data/tables?t=${n}`,{method:"GET"}).then(r=>r.json()).then(r=>{t&&t(r)}).catch(r=>{i&&i(r)})}}function Nt(e,n,t,i=void 0,s=void 0){if(e.tenant){const r=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/one/${t}?t=${n}`,{method:"POST"}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s(a)})}}async function vt(e,n,t,i=void 0,s=void 0){if(e.tenant){const r=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/rows/${t}/?t=${n}`,{method:"POST"}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s(a)})}}async function At(e,n,t,i,s=void 0,r=void 0){if(e.tenant){const a=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${t}/?t=${n}&b=${i}`,{method:"POST"}).then(o=>o.json()).then(o=>{s&&s(o)}).catch(o=>{r&&r(o,t,i)})}}async function jt(e,n,t,i,s,r=void 0,a=void 0){if(e.tenant){const o=`https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${t}?t=${n}&c=${encodeURIComponent(i)}&b=${encodeURIComponent(s)}`;fetch(o,{method:"POST"}).then(c=>c.json()).then(c=>{c.url=o,r&&r(c)}).catch(c=>{a&&a({error:c,tableId:t,columns:i,body:s})})}}async function kt(e,n,t,i,s=void 0,r=void 0){if(e.tenant){const a=`https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${t}?t=${n}&b=${encodeURIComponent(i)}`;fetch(a,{method:"POST"}).then(o=>o.json()).then(o=>{s&&s(o)}).catch(o=>{r&&r({error:o,url:a})})}}async function Pt(e,n,t,i=void 0,s=void 0){if(e.tenant){const r=`https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${n}&b=${encodeURIComponent(t)}`;fetch(r,{method:"POST"}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s({error:a,url:r})})}}async function Lt(e,n,t,i,s=void 0,r=void 0){if(e.tenant){const a=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${a}/iterop/runtime/processes/${t}?t=${n}&b=${i}`,{method:"POST"}).then(o=>o.json()).then(o=>{console.log("_Iterop_runProcess : OK"),s&&s(o)}).catch(o=>{r&&r(o)})}}async function Mt(e,n,t,i=void 0,s=void 0){if(console.log("_Iterop_GetOneDependencyTable | Run"),e.tenant){const r=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${r}/iterop/dependencytable/one/${t}/?t=${n}`,{method:"POST"}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s(a)})}}async function Jt(e,n,t,i,s,r=void 0,a=void 0){if(e.tenant){const o=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${t}/?t=${n}&cli=${i}&b=${s}`,{method:"POST"}).then(c=>c.json()).then(c=>{r&&r(c)}).catch(c=>{a&&a(c)})}}async function xt(e,n,t,i,s=void 0,r=void 0){if(e.tenant){const a=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${a}/iterop/dependencytable/put/${t}/?t=${n}&b=${i}`,{method:"POST"}).then(o=>o.json()).then(o=>{s&&s(o)}).catch(o=>{r&&r(o)})}}//!SECTION
78
+ </p>`:e}function bt(e,n=void 0,t=void 0){const{tenant:i,_3DSwym:s,_3DSwym_token:r,community_id:a,idea_id:o}=e;if(i&&s&&r&&a&&o){const c=`${s}/api/idea/forward`;g(c,{method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":r},data:JSON.stringify({community_uri:`swym:prd:${i.toUpperCase()}:community:${a}`,content_uri:`swym:prd:${i.toUpperCase()}:idea:${o}`,timeout:3e4}),type:"json",onComplete(d){n&&n(d)},onFailure(d,u){const l=d;l.status=u.status,l.response=u.errormsg,t&&t(l)}})}else t&&t({status:"error",msg:"Credentials incomplet !",attend:"tenant, _3DSwym , _3DSwym_token, community_id, idea_id",credentials:e})}function Ot(e,n=void 0,t=void 0){return new Promise((i,s)=>{try{let r;if(e._3DDashboard){const a=e._3DDashboard+"/api/users/current";g(a,{method:"GET",onComplete(o,c,d){let u=o.replace(/\"\[/g,"[").replace(/\]\"/g,"]").replace(/\"{/g,"{").replace(/}\"/g,"}").replace(/\\/g,"");u=u.replace(/\"\[/g,"[").replace(/\]\"/g,"]").replace(/\"{/g,"{").replace(/}\"/g,"}").replace(/\\/g,"");let l={};try{l=JSON.parse(u)}catch(m){s("ERROR | _3DSwym_get_currentUser => JSON.Parse()",m)}l.first_name=l?.firstName?l.firstName:"",l.last_name=l?.lastName?l.lastName:"",r=l,i(l)},onFailure(o){s("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current",o)}})}r?i(r):s("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null")}catch(r){s("ERROR | _3DSwym_get_currentUser => ",r)}})}function Dt(e,n,t=void 0,i=void 0){const s=e.space+"/api/user/find/login/"+n;T(e,r=>{g(s,{method:"GET",headers:{"X-DS-SWYM-CSRFTOKEN":r.result.ServerToken},onComplete(a,o,c){const d=JSON.parse(a);t&&t(d)},onFailure(a){i&&i(a)}})},i)}function $t(e,n=void 0,t=void 0){const{_3DSwym:i,_3DSwym_token:s,subjectUri:r,richMessage:a}=e,o=`${i}/commentproxy/subjects/${r}/comments`,d={method:"POST",headers:{"Content-type":"application/json;charset=UTF-8",Accept:"application/json","X-DS-SWYM-CSRFTOKEN":s},data:JSON.stringify({richMessage:a}),type:"json",onComplete(u,l,m){const f={response:typeof u=="string"?JSON.parse(u):u};f.status=m.status,n&&n(f)},onFailure(u){t&&t(u)}};g(o,d)}function Ut(e,n=void 0,t=void 0){e.tenant&&k(e,i=>{const s=i.services.find(r=>r.id==="businessprocess")?.url+"/api/v2";return n&&n(s),s})}function It(e,n=void 0,t=void 0){e.tenant?k(e,i=>{const s=i.services.find(o=>o.id==="3dpassport")?.url,r=i.services.find(o=>o.id==="businessprocess")?.url+"/api/v2",a=`${s}/login/?cors=false&service=${r}/auth/cas`;g(a,{async onComplete(o){const c=typeof o=="string"?JSON.parse(o)?.x3ds_service_redirect_url:o?.x3ds_service_redirect_url;await fetch(c,{method:"POST"}).then(d=>d.json()).then(async d=>{n&&n(d?.token)})},onFailure(o){t&&t(o)}})}):t&&t("No tenant")}function Rt(e,n=void 0,t=void 0){if(e.tenant){const i=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${i}/iterop/jwtuser`,{method:"POST"}).then(s=>s.json()).then(s=>{n&&n(s)}).catch(s=>{t&&t(s)})}}async function Ft(e,n,t=void 0,i=void 0){if(e.tenant){const s=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${s}/iterop/repository/data/tables?t=${n}`,{method:"GET"}).then(r=>r.json()).then(r=>{t&&t(r)}).catch(r=>{i&&i(r)})}}function Nt(e,n,t,i=void 0,s=void 0){if(e.tenant){const r=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/one/${t}?t=${n}`,{method:"POST"}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s(a)})}}async function vt(e,n,t,i=void 0,s=void 0){if(e.tenant){const r=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/rows/${t}/?t=${n}`,{method:"POST",headers:{"Access-Control-Allow-Origin":"*"}}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s(a)})}}async function At(e,n,t,i,s=void 0,r=void 0){if(e.tenant){const a=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${t}/?t=${n}&b=${i}`,{method:"POST"}).then(o=>o.json()).then(o=>{s&&s(o)}).catch(o=>{r&&r(o,t,i)})}}async function jt(e,n,t,i,s,r=void 0,a=void 0){if(e.tenant){const o=`https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${t}?t=${n}&c=${encodeURIComponent(i)}&b=${encodeURIComponent(s)}`;fetch(o,{method:"POST"}).then(c=>c.json()).then(c=>{c.url=o,r&&r(c)}).catch(c=>{a&&a({error:c,tableId:t,columns:i,body:s})})}}async function kt(e,n,t,i,s=void 0,r=void 0){if(e.tenant){const a=`https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${t}?t=${n}&b=${encodeURIComponent(i)}`;fetch(a,{method:"POST"}).then(o=>o.json()).then(o=>{s&&s(o)}).catch(o=>{r&&r({error:o,url:a})})}}async function Pt(e,n,t,i=void 0,s=void 0){if(e.tenant){const r=`https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${n}&b=${encodeURIComponent(t)}`;fetch(r,{method:"POST"}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s({error:a,url:r})})}}async function Lt(e,n,t,i,s=void 0,r=void 0){if(e.tenant){const a=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${a}/iterop/runtime/processes/${t}?t=${n}&b=${i}`,{method:"POST"}).then(o=>o.json()).then(o=>{console.log("_Iterop_runProcess : OK"),s&&s(o)}).catch(o=>{r&&r(o)})}}async function Mt(e,n,t,i=void 0,s=void 0){if(console.log("_Iterop_GetOneDependencyTable | Run"),e.tenant){const r=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${r}/iterop/dependencytable/one/${t}/?t=${n}`,{method:"POST"}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s(a)})}}async function Jt(e,n,t,i,s,r=void 0,a=void 0){if(e.tenant){const o=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${t}/?t=${n}&cli=${i}&b=${s}`,{method:"POST"}).then(c=>c.json()).then(c=>{r&&r(c)}).catch(c=>{a&&a(c)})}}async function xt(e,n,t,i,s=void 0,r=void 0){if(e.tenant){const a=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${a}/iterop/dependencytable/put/${t}/?t=${n}&b=${i}`,{method:"POST"}).then(o=>o.json()).then(o=>{s&&s(o)}).catch(o=>{r&&r(o)})}}//!SECTION
79
79
  async function Gt(e,n,t,i=void 0,s=void 0){if(e.tenant){const r=e.tenant.toLowerCase();fetch(`https://api.uixhome.fr/${r}/iterop/list/one/${t}/?t=${n}`,{method:"POST"}).then(a=>a.json()).then(a=>{i&&i(a)}).catch(a=>{s&&s(a)})}}//!SECTION
80
80
  function Bt(e){const n="Hello "+e;return console.log(n),n}function Et(e,n=void 0,t=void 0){return console.log("credentials",e),new Promise(i=>{if(e.token===""&&b(e),!e.space||e.space===""){const a=q();console.log("platformeInfo",a)}v(e,"Common space",["VPLMProjectLeader","VPLMCreator"],void 0,a=>e.ctx=a,a=>{console.log("onError =>",a)},!0);const s=D.DateTime.now().ts,r=`https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;g(r,{onComplete(a){if(Array.isArray(JSON.parse(a))){const o=JSON.parse(a);console.log("serviceId=3dsearch",o);const c=`${o[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;g(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},data:JSON.stringify({with_indexing_date:!0,with_nls:!1,label:`3DSearch-${s}`,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){n&&n(d)},onFailure(d){t&&t(d)}})}},onFailure(a){t&&t(a)}})})}p.UUID=G,p._3DSearch_usersGroup=Et,p._3DSpace_Create_Doc=Me,p._3DSpace_Update_Doc=Le,p._3DSpace_Upload_File=Pe,p._3DSpace_bookmark_addSubsciptions=Ye,p._3DSpace_bookmark_newWorkspace=Ve,p._3DSpace_csrf=b,p._3DSpace_download_doc=M,p._3DSpace_download_multidoc=Y,p._3DSpace_file_update=L,p._3DSpace_file_update_csr=W,p._3DSpace_file_url_csr=je,p._3DSpace_get_csrf=N,p._3DSpace_get_docInfo=P,p._3DSpace_get_downloadTicket_multidoc=H,p._3DSpace_get_multiDocInfo=Ae,p._3DSpace_get_securityContexts=v,p._3DSpace_get_ticket=A,p._3DSpace_lifecycle_changeRevision=Ke,p._3DSpace_lifecycle_changeState=Be,p._3DSpace_lifecycle_getGraph=Ee,p._3DSpace_lifecycle_getNextRevision=qe,p._3DSpace_lifecycle_getNextStates=Ge,p._3DSpace_lifecycle_getRevisions=We,p._3DSpace_put_docInfo=ke,p._3DSwym_ForwardIdea=bt,p._3DSwym_addComment=$t,p._3DSwym_buildDirectMessage=mt,p._3DSwym_deleteIdea=yt,p._3DSwym_editIdea=wt,p._3DSwym_findCommunityToInstantMSG=se,p._3DSwym_getAllCommunities=lt,p._3DSwym_getAllListIdeas=Ct,p._3DSwym_getAllNews=ut,p._3DSwym_getFamiliarPeople=pt,p._3DSwym_getIdeaStatusMaturity=ft,p._3DSwym_getMembersCommunity=ne,p._3DSwym_getOneIdea=St,p._3DSwym_get_Token=T,p._3DSwym_get_currentUser=Ot,p._3DSwym_get_findUser=Dt,p._3DSwym_postIdea=ht,p._3DSwym_postIdeaTemplate=_t,p._3DSwym_sendMessageData=J,p._AppMngt_get_info_user=we,p._AppMngt_get_users=Se,p._Iterop_AddOrRemoveRows=At,p._Iterop_Auth_CAS=It,p._Iterop_GetOneDependencyTable=Mt,p._Iterop_GetOneList=Gt,p._Iterop_PatchDependencyTable=Jt,p._Iterop_PutDependencyTable=xt,p._Iterop_businessTableSearchInRows=jt,p._Iterop_createBusinessTable=Pt,p._Iterop_getAllBusinessTables=Ft,p._Iterop_getOneBusinessTable=Nt,p._Iterop_getOneBusinessTableRows=vt,p._Iterop_jwtUser=Rt,p._Iterop_runProcess=Lt,p._Iterop_updateBusinessTable=kt,p._Registry_getServicesUrl=he,p._getMe=ge,p._getPlateformInfos=q,p._getPlatformServices=me,p._getServiceUrl=k,p._getServiceUrl_3DPassport=_e,p._getServiceUrl_Iterop=Ut,p._httpCallAuthenticated=g,p._setDraggable=pe,p._setDroppable=fe,p._setupTagger=le,p.addTagToDoc=ot,p.chunkArray=E,p.compass_getListAdditionalApps=ye,p.couleurs=B,p.createUserGroups=Ce,p.dataMixing=ee,p.deleteUserGroups=$e,p.findAdresse=re,p.getAllContextSecurity=He,p.getCSRFToken=X,p.getCommunes=oe,p.getComplementUG=Te,p.getDataFrom3DSpace=ze,p.getDataFromGouvFr=ce,p.getDatasByTenant=tt,p.getDatasFrom3DSpace=nt,p.getDownloadDocument=Qe,p.getInfoDocTags=dt,p.getUserGroupsByEmailList=De,p.getUserGroupsByURIList=Oe,p.getUserGroupsList=be,p.getUsersGroupRules=K,p.get_3DSpace_csrf=et,p.patchUserGroups=Ue,p.patchUserGroupsControl=Ie,p.pushDataIn3DSpace=Ze,p.readUserGroupControl=Re,p.removeTagToDoc=ct,p.sayHello=Bt,p.updateEvent=ue,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
81
81
  //# sourceMappingURL=wb3Api.umd.cjs.map