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