generio-sdk 1.0.19 → 1.0.21
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.d.ts +2 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -95,7 +95,8 @@ declare function getExtParamValueByStudyInstanceUId(model: GetExtParamValueByStu
|
|
|
95
95
|
declare function getExaminationMessage(win: Window): Promise<GetExaminationMessageOutputModel>;
|
|
96
96
|
declare function login(model: LoginInputModel): Promise<LoginOutputModel>;
|
|
97
97
|
declare function logout(): Promise<LogoutOutputModel>;
|
|
98
|
+
declare function getLoggedInEmail(): string | null;
|
|
98
99
|
declare function setupGenerioReadyListener(handler: HandlerType): void;
|
|
99
100
|
declare const generioReadyHandler: HandlerType;
|
|
100
101
|
//#endregion
|
|
101
|
-
export { GENERIO_ORIGIN, GetExaminationMessageOutputModel, GetExtParamValueByStudyInstanceUIdInputModel, GetExtParamValueByStudyInstanceUIdOutputModel, KeyValueModel, LoginInputModel, LoginOutputModel, LogoutOutputModel, MeasurementModel, RecognizeExaminationInputModel, RecognizeExaminationOutputModel, SendMeasurementsInputModel, SendMeasurementsOutputModel, SetExtParamsInputModel, SetExtParamsOutputModel, generioReadyHandler, getExaminationMessage, getExtParamValueByStudyInstanceUId, login, logout, recognizeExamination, sendMeasurements, setExtParams, setupGenerioReadyListener };
|
|
102
|
+
export { GENERIO_ORIGIN, GetExaminationMessageOutputModel, GetExtParamValueByStudyInstanceUIdInputModel, GetExtParamValueByStudyInstanceUIdOutputModel, KeyValueModel, LoginInputModel, LoginOutputModel, LogoutOutputModel, MeasurementModel, RecognizeExaminationInputModel, RecognizeExaminationOutputModel, SendMeasurementsInputModel, SendMeasurementsOutputModel, SetExtParamsInputModel, SetExtParamsOutputModel, generioReadyHandler, getExaminationMessage, getExtParamValueByStudyInstanceUId, getLoggedInEmail, login, logout, recognizeExamination, sendMeasurements, setExtParams, setupGenerioReadyListener };
|
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`,credentials:`include`,body:JSON.stringify(e),headers:{"Content-Type":`application/json`}});return n.ok?n.json():{isSuccess:!1}}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/login`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok?{isSuccess:!0}:{isSuccess:!1}}async function c(){return(await fetch(t+`/api/cookiesAuth/logout`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`}})).ok?{isSuccess:!0}:{isSuccess:!1}}function l(n){e.on(`generioReady`,{domain:t},e=>n(e))}const
|
|
1
|
+
import*as 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`}});return n.ok?n.json():{isSuccess:!1}}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/login`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok?(localStorage.setItem(`generio_logged_in_email`,e.email),{isSuccess:!0}):{isSuccess:!1}}async function c(){return(await fetch(t+`/api/cookiesAuth/logout`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`}})).ok?(localStorage.removeItem(`generio_logged_in_email`),{isSuccess:!0}):{isSuccess:!1}}function l(){return localStorage.getItem(`generio_logged_in_email`)}function u(n){e.on(`generioReady`,{domain:t},e=>n(e))}const d=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,d as generioReadyHandler,o as getExaminationMessage,a as getExtParamValueByStudyInstanceUId,l as getLoggedInEmail,s as login,c as logout,n as recognizeExamination,i as sendMeasurements,r as setExtParams,u as setupGenerioReadyListener};
|