generio-sdk 1.0.6 → 1.0.8
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 -6
- package/dist/index.js +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -74,7 +74,6 @@ interface SignInInputModel {
|
|
|
74
74
|
//#region src/models/SignInOutputModel.d.ts
|
|
75
75
|
interface SignInOutputModel {
|
|
76
76
|
isSuccess: boolean;
|
|
77
|
-
message?: string;
|
|
78
77
|
}
|
|
79
78
|
//#endregion
|
|
80
79
|
//#region src/index.d.ts
|
|
@@ -84,16 +83,13 @@ type HandlerType = (event: {
|
|
|
84
83
|
data: any;
|
|
85
84
|
}) => Promise<void>;
|
|
86
85
|
declare const GENERIO_ORIGIN = "https://gener.io";
|
|
87
|
-
declare function recognizeExamination(model: RecognizeExaminationInputModel
|
|
86
|
+
declare function recognizeExamination(model: RecognizeExaminationInputModel): Promise<RecognizeExaminationOutputModel>;
|
|
88
87
|
declare function setExtParams(model: SetExtParamsInputModel, win: Window): Promise<SetExtParamsOutputModel>;
|
|
89
88
|
declare function sendMeasurements(model: SendMeasurementsInputModel, win: Window): Promise<SendMeasurementsOutputModel>;
|
|
90
89
|
declare function getExtParamValueByStudyInstanceUId(model: GetExtParamValueByStudyInstanceUIdInputModel, win: Window): Promise<GetExtParamValueByStudyInstanceUIdOutputModel>;
|
|
91
90
|
declare function getExaminationMessage(win: Window): Promise<GetExaminationMessageOutputModel>;
|
|
92
91
|
declare function signIn(model: SignInInputModel): Promise<SignInOutputModel>;
|
|
93
|
-
declare function isSignedIn(): Promise<boolean>;
|
|
94
|
-
declare function signOut(): void;
|
|
95
|
-
declare function getUserEmail(): string | null;
|
|
96
92
|
declare function setupGenerioReadyListener(handler: HandlerType): void;
|
|
97
93
|
declare const generioReadyHandler: HandlerType;
|
|
98
94
|
//#endregion
|
|
99
|
-
export { GENERIO_ORIGIN, GetExaminationMessageOutputModel, GetExtParamValueByStudyInstanceUIdInputModel, GetExtParamValueByStudyInstanceUIdOutputModel, KeyValueModel, MeasurementModel, RecognizeExaminationInputModel, RecognizeExaminationOutputModel, SendMeasurementsInputModel, SendMeasurementsOutputModel, SetExtParamsInputModel, SetExtParamsOutputModel, SignInInputModel, SignInOutputModel, generioReadyHandler, getExaminationMessage, getExtParamValueByStudyInstanceUId,
|
|
95
|
+
export { GENERIO_ORIGIN, GetExaminationMessageOutputModel, GetExtParamValueByStudyInstanceUIdInputModel, GetExtParamValueByStudyInstanceUIdOutputModel, KeyValueModel, MeasurementModel, RecognizeExaminationInputModel, RecognizeExaminationOutputModel, SendMeasurementsInputModel, SendMeasurementsOutputModel, SetExtParamsInputModel, SetExtParamsOutputModel, SignInInputModel, SignInOutputModel, generioReadyHandler, getExaminationMessage, getExtParamValueByStudyInstanceUId, recognizeExamination, sendMeasurements, setExtParams, setupGenerioReadyListener, signIn };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"post-robot";const t=`https://gener.io`;async function n(
|
|
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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generio-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "SDK library for generio integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"build": "tsdown",
|
|
27
27
|
"dev": "tsdown --watch",
|
|
28
28
|
"test": "vitest",
|
|
29
|
-
"typecheck": "tsc --noEmit"
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"npm-release": "npm run build && npm version patch && npm publish --access public"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@types/node": "^24.9.1",
|