generio-sdk 1.0.16 → 1.0.17
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/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"post-robot";const t=`https://gener.io`;async function n(e){t+``;let n=await fetch(`https://gener.io/api/generioApp/recognizeExaminationByUserContext`,{method:`POST`,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}});if(n.ok)return n.json();throw Error(`Error recognizing examination: ${n.status} ${n.statusText}`)}async function r(n,r){let{data:i}=await e.send(r,`setExtParams`,n,{domain:t});return i}async function i(n,r){let{data:i}=await e.send(r,`sendMeasurements`,n,{domain:t});return i}async function a(n,r){let{data:i}=await e.send(r,`getExtParamValueByStudyInstanceUId`,n,{domain:t});return i}async function o(n){let{data:r}=await e.send(n,`getExaminationMessage`,void 0,{domain:t});return r}async function s(e){return(await fetch(t+`/api/cookiesAuth/signIn`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok?{isSuccess:!0}:{isSuccess:!1}}function c(n){e.on(`generioReady`,{domain:t},e=>n(e))}const l=async({source:e,origin:t,data:n})=>{console.log(`Generio is ready:`,t,n),await r({keyValues:[{key:`mr_protocol`,value:`mr_protocol test`}]},e)};export{t as GENERIO_ORIGIN,l as generioReadyHandler,o as getExaminationMessage,a as getExtParamValueByStudyInstanceUId,n as recognizeExamination,i as sendMeasurements,r as setExtParams,c as setupGenerioReadyListener,s as signIn};
|
|
1
|
+
import e from"post-robot";const t=`https://gener.io`;async function n(e){t+``;let n=await fetch(`https://gener.io/api/generioApp/recognizeExaminationByUserContext`,{method:`POST`,credentials:`include`,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}});if(n.ok)return n.json();throw Error(`Error recognizing examination: ${n.status} ${n.statusText}`)}async function r(n,r){let{data:i}=await e.send(r,`setExtParams`,n,{domain:t});return i}async function i(n,r){let{data:i}=await e.send(r,`sendMeasurements`,n,{domain:t});return i}async function a(n,r){let{data:i}=await e.send(r,`getExtParamValueByStudyInstanceUId`,n,{domain:t});return i}async function o(n){let{data:r}=await e.send(n,`getExaminationMessage`,void 0,{domain:t});return r}async function s(e){return(await fetch(t+`/api/cookiesAuth/signIn`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok?{isSuccess:!0}:{isSuccess:!1}}function c(n){e.on(`generioReady`,{domain:t},e=>n(e))}const l=async({source:e,origin:t,data:n})=>{console.log(`Generio is ready:`,t,n),await r({keyValues:[{key:`mr_protocol`,value:`mr_protocol test`}]},e)};export{t as GENERIO_ORIGIN,l as generioReadyHandler,o as getExaminationMessage,a as getExtParamValueByStudyInstanceUId,n as recognizeExamination,i as sendMeasurements,r as setExtParams,c as setupGenerioReadyListener,s as signIn};
|