generio-sdk 1.0.16 → 1.0.18
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 +12 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -65,14 +65,19 @@ interface GetExaminationMessageOutputModel {
|
|
|
65
65
|
examinationMessage: string;
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
|
-
//#region src/models/
|
|
69
|
-
interface
|
|
68
|
+
//#region src/models/LoginInputModel.d.ts
|
|
69
|
+
interface LoginInputModel {
|
|
70
70
|
email: string;
|
|
71
71
|
password: string;
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
|
-
//#region src/models/
|
|
75
|
-
interface
|
|
74
|
+
//#region src/models/LoginOutputModel.d.ts
|
|
75
|
+
interface LoginOutputModel {
|
|
76
|
+
isSuccess: boolean;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/models/LogoutOutputModel.d.ts
|
|
80
|
+
interface LogoutOutputModel {
|
|
76
81
|
isSuccess: boolean;
|
|
77
82
|
}
|
|
78
83
|
//#endregion
|
|
@@ -88,8 +93,9 @@ declare function setExtParams(model: SetExtParamsInputModel, win: Window): Promi
|
|
|
88
93
|
declare function sendMeasurements(model: SendMeasurementsInputModel, win: Window): Promise<SendMeasurementsOutputModel>;
|
|
89
94
|
declare function getExtParamValueByStudyInstanceUId(model: GetExtParamValueByStudyInstanceUIdInputModel, win: Window): Promise<GetExtParamValueByStudyInstanceUIdOutputModel>;
|
|
90
95
|
declare function getExaminationMessage(win: Window): Promise<GetExaminationMessageOutputModel>;
|
|
91
|
-
declare function
|
|
96
|
+
declare function login(model: LoginInputModel): Promise<LoginOutputModel>;
|
|
97
|
+
declare function logout(): Promise<LogoutOutputModel>;
|
|
92
98
|
declare function setupGenerioReadyListener(handler: HandlerType): void;
|
|
93
99
|
declare const generioReadyHandler: HandlerType;
|
|
94
100
|
//#endregion
|
|
95
|
-
export { GENERIO_ORIGIN, GetExaminationMessageOutputModel, GetExtParamValueByStudyInstanceUIdInputModel, GetExtParamValueByStudyInstanceUIdOutputModel, KeyValueModel, MeasurementModel, RecognizeExaminationInputModel, RecognizeExaminationOutputModel, SendMeasurementsInputModel, SendMeasurementsOutputModel, SetExtParamsInputModel, SetExtParamsOutputModel,
|
|
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 };
|
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/
|
|
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/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 u=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,u as generioReadyHandler,o as getExaminationMessage,a as getExtParamValueByStudyInstanceUId,s as login,c as logout,n as recognizeExamination,i as sendMeasurements,r as setExtParams,l as setupGenerioReadyListener};
|