@ovok/core 0.2.47
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/README.md +40 -0
- package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +14 -0
- package/dist/client/ai-fhir/methods/AIFhirResources.js +16 -0
- package/dist/client/ai-fhir/methods/index.d.ts +1 -0
- package/dist/client/ai-fhir/methods/index.js +17 -0
- package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +6 -0
- package/dist/client/ai-fhir/types/AIFhirPlan.js +2 -0
- package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +5 -0
- package/dist/client/ai-fhir/types/AIFhirPlanRequest.js +2 -0
- package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +7 -0
- package/dist/client/ai-fhir/types/AIFhirRequest.js +2 -0
- package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +18 -0
- package/dist/client/ai-fhir/types/AIFhirResponse.js +2 -0
- package/dist/client/ai-fhir/types/index.d.ts +4 -0
- package/dist/client/ai-fhir/types/index.js +20 -0
- package/dist/client/auth/methods/appleLogin.d.ts +4 -0
- package/dist/client/auth/methods/appleLogin.js +11 -0
- package/dist/client/auth/methods/changePassword.d.ts +4 -0
- package/dist/client/auth/methods/changePassword.js +6 -0
- package/dist/client/auth/methods/googleLogin.d.ts +4 -0
- package/dist/client/auth/methods/googleLogin.js +11 -0
- package/dist/client/auth/methods/index.d.ts +8 -0
- package/dist/client/auth/methods/index.js +24 -0
- package/dist/client/auth/methods/login.d.ts +4 -0
- package/dist/client/auth/methods/login.js +38 -0
- package/dist/client/auth/methods/refetchProfile.d.ts +2 -0
- package/dist/client/auth/methods/refetchProfile.js +9 -0
- package/dist/client/auth/methods/register.d.ts +4 -0
- package/dist/client/auth/methods/register.js +15 -0
- package/dist/client/auth/methods/requestDeleteUser.d.ts +11 -0
- package/dist/client/auth/methods/requestDeleteUser.js +13 -0
- package/dist/client/auth/methods/resetPassword.d.ts +13 -0
- package/dist/client/auth/methods/resetPassword.js +19 -0
- package/dist/client/auth/types/AppleLoginBody.d.ts +68 -0
- package/dist/client/auth/types/AppleLoginBody.js +17 -0
- package/dist/client/auth/types/AuthResponse.d.ts +15 -0
- package/dist/client/auth/types/AuthResponse.js +2 -0
- package/dist/client/auth/types/ChangePasswordBody.d.ts +5 -0
- package/dist/client/auth/types/ChangePasswordBody.js +2 -0
- package/dist/client/auth/types/GoogleLoginBody.d.ts +26 -0
- package/dist/client/auth/types/GoogleLoginBody.js +2 -0
- package/dist/client/auth/types/LoginBody.d.ts +26 -0
- package/dist/client/auth/types/LoginBody.js +2 -0
- package/dist/client/auth/types/RegisterBody.d.ts +8 -0
- package/dist/client/auth/types/RegisterBody.js +2 -0
- package/dist/client/auth/types/RequestDeleteUserBody.d.ts +11 -0
- package/dist/client/auth/types/RequestDeleteUserBody.js +2 -0
- package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +12 -0
- package/dist/client/auth/types/RequestDeleteUserResponse.js +2 -0
- package/dist/client/auth/types/ResetPasswordBody.d.ts +14 -0
- package/dist/client/auth/types/ResetPasswordBody.js +2 -0
- package/dist/client/auth/types/StartLoginResponse.d.ts +34 -0
- package/dist/client/auth/types/StartLoginResponse.js +2 -0
- package/dist/client/bot/methods/executeBot.d.ts +10 -0
- package/dist/client/bot/methods/executeBot.js +14 -0
- package/dist/client/bot/methods/index.d.ts +1 -0
- package/dist/client/bot/methods/index.js +17 -0
- package/dist/client/chat/ai/methods/createAiSession.d.ts +4 -0
- package/dist/client/chat/ai/methods/createAiSession.js +17 -0
- package/dist/client/chat/ai/methods/index.d.ts +1 -0
- package/dist/client/chat/ai/methods/index.js +17 -0
- package/dist/client/chat/ai/types/CreateAiSessionProps.d.ts +51 -0
- package/dist/client/chat/ai/types/CreateAiSessionProps.js +2 -0
- package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +21 -0
- package/dist/client/chat/ai/types/CreateAiSessionResponse.js +2 -0
- package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
- package/dist/client/chat/ai/types/SessionMessagesResponse.js +2 -0
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +4 -0
- package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +40 -0
- package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +4 -0
- package/dist/client/observation/methods/getLatestObservationsByCodes.js +19 -0
- package/dist/client/observation/methods/index.d.ts +2 -0
- package/dist/client/observation/methods/index.js +18 -0
- package/dist/client/observation/services/base-observation-service.d.ts +22 -0
- package/dist/client/observation/services/base-observation-service.js +70 -0
- package/dist/client/observation/services/blood-glucose.d.ts +12 -0
- package/dist/client/observation/services/blood-glucose.js +36 -0
- package/dist/client/observation/services/blood-oxygen.d.ts +14 -0
- package/dist/client/observation/services/blood-oxygen.js +57 -0
- package/dist/client/observation/services/blood-pressure.d.ts +15 -0
- package/dist/client/observation/services/blood-pressure.js +72 -0
- package/dist/client/observation/services/body-temperature.d.ts +13 -0
- package/dist/client/observation/services/body-temperature.js +36 -0
- package/dist/client/observation/services/body-weight.d.ts +13 -0
- package/dist/client/observation/services/body-weight.js +36 -0
- package/dist/client/observation/services/creator.d.ts +10 -0
- package/dist/client/observation/services/creator.js +54 -0
- package/dist/client/observation/services/ecg.d.ts +16 -0
- package/dist/client/observation/services/ecg.js +110 -0
- package/dist/client/observation/services/heart-rate-variability.d.ts +13 -0
- package/dist/client/observation/services/heart-rate-variability.js +38 -0
- package/dist/client/observation/services/heart-rate.d.ts +13 -0
- package/dist/client/observation/services/heart-rate.js +39 -0
- package/dist/client/observation/services/index.d.ts +1 -0
- package/dist/client/observation/services/index.js +17 -0
- package/dist/client/observation/services/respiratory-rate.d.ts +13 -0
- package/dist/client/observation/services/respiratory-rate.js +38 -0
- package/dist/client/observation/services/resting-heart-rate.d.ts +13 -0
- package/dist/client/observation/services/resting-heart-rate.js +38 -0
- package/dist/client/observation/services/step-count.d.ts +15 -0
- package/dist/client/observation/services/step-count.js +55 -0
- package/dist/client/observation/services/uric-acid-service.d.ts +21 -0
- package/dist/client/observation/services/uric-acid-service.js +120 -0
- package/dist/client/observation/services/vo2-max.d.ts +13 -0
- package/dist/client/observation/services/vo2-max.js +38 -0
- package/dist/client/observation/services/walking-heart-rate-average.d.ts +12 -0
- package/dist/client/observation/services/walking-heart-rate-average.js +38 -0
- package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +9 -0
- package/dist/client/observation/types/GetLatestObservationsByCodeParams.js +2 -0
- package/dist/client/observation/types/IObservationService.d.ts +15 -0
- package/dist/client/observation/types/IObservationService.js +2 -0
- package/dist/client/observation/types/MeasurementTypeKey.d.ts +20 -0
- package/dist/client/observation/types/MeasurementTypeKey.js +24 -0
- package/dist/client/observation/types/ObservationCode.d.ts +37 -0
- package/dist/client/observation/types/ObservationCode.js +41 -0
- package/dist/client/observation/types/generate-measurement/HealthConnectTypes.d.ts +641 -0
- package/dist/client/observation/types/generate-measurement/HealthConnectTypes.js +45 -0
- package/dist/client/observation/types/generate-measurement/Sample.d.ts +32 -0
- package/dist/client/observation/types/generate-measurement/Sample.js +2 -0
- package/dist/client/observation/types/generate-observation-body/BodyWeightValueParams.d.ts +1 -0
- package/dist/client/observation/types/generate-observation-body/BodyWeightValueParams.js +2 -0
- package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +7 -0
- package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.js +2 -0
- package/dist/client/observation/types/generate-observation-body/ObservationValue.d.ts +14 -0
- package/dist/client/observation/types/generate-observation-body/ObservationValue.js +2 -0
- package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
- package/dist/client/observation/types/measurement/BloodPressureMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +7 -0
- package/dist/client/observation/types/measurement/BloodPressureStates.js +11 -0
- package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +7 -0
- package/dist/client/observation/types/measurement/BodyWeightMeasurmement.js +2 -0
- package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +15 -0
- package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +19 -0
- package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +13 -0
- package/dist/client/observation/types/measurement/EcgMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/HeartRateMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/Measurement.d.ts +4 -0
- package/dist/client/observation/types/measurement/Measurement.js +2 -0
- package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +7 -0
- package/dist/client/observation/types/measurement/MeasurementDevice.js +2 -0
- package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +9 -0
- package/dist/client/observation/types/measurement/PulseOximeterMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +21 -0
- package/dist/client/observation/types/measurement/SpirometryMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +8 -0
- package/dist/client/observation/types/measurement/StepCountMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +23 -0
- package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/Vo2MaxMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +6 -0
- package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.js +2 -0
- package/dist/client/observation/types/measurement/index.d.ts +11 -0
- package/dist/client/observation/types/measurement/index.js +27 -0
- package/dist/client/observation/types/service/ObservationMetadata.d.ts +8 -0
- package/dist/client/observation/types/service/ObservationMetadata.js +2 -0
- package/dist/client/observation/utils/getDeviceObject.d.ts +3 -0
- package/dist/client/observation/utils/getDeviceObject.js +34 -0
- package/dist/client/observation/utils/getObservationValueDisplay.d.ts +15 -0
- package/dist/client/observation/utils/getObservationValueDisplay.js +25 -0
- package/dist/client/observation/utils/index.d.ts +1 -0
- package/dist/client/observation/utils/index.js +17 -0
- package/dist/client/ovok-client.d.ts +35 -0
- package/dist/client/ovok-client.js +85 -0
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +28 -0
- package/dist/client/questionnaire-response/methods/index.d.ts +1 -0
- package/dist/client/questionnaire-response/methods/index.js +17 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +58 -0
- package/dist/index.d.ts +666 -0
- package/dist/index.js +49 -0
- package/dist/types/ValidationError.d.ts +6 -0
- package/dist/types/ValidationError.js +2 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/index.js +38 -0
- package/dist/utils/auth/exchange-code.d.ts +14 -0
- package/dist/utils/auth/exchange-code.js +17 -0
- package/dist/utils/auth/generate-code-challenge-and-verifier.d.ts +6 -0
- package/dist/utils/auth/generate-code-challenge-and-verifier.js +45 -0
- package/dist/utils/auth/handle-tenant-code.d.ts +6 -0
- package/dist/utils/auth/handle-tenant-code.js +21 -0
- package/dist/utils/auth/sha256.d.ts +8 -0
- package/dist/utils/auth/sha256.js +300 -0
- package/dist/utils/auth/start-login.d.ts +10 -0
- package/dist/utils/auth/start-login.js +19 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/patch/getPatchOperationType.d.ts +2 -0
- package/dist/utils/patch/getPatchOperationType.js +16 -0
- package/package.json +83 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.OvokClient = void 0;
|
|
37
|
+
/* eslint-disable @typescript-eslint/no-unsafe-function-type */ // TODO: fix this whenever find time
|
|
38
|
+
const core_1 = require("@medplum/core");
|
|
39
|
+
const aiFhirMethods = __importStar(require("./ai-fhir/methods"));
|
|
40
|
+
const authMethods = __importStar(require("./auth/methods"));
|
|
41
|
+
const botMethods = __importStar(require("./bot/methods"));
|
|
42
|
+
const aiMethods = __importStar(require("./chat/ai/methods"));
|
|
43
|
+
const observationMethods = __importStar(require("./observation/methods"));
|
|
44
|
+
const questionnaireResponseMethods = __importStar(require("./questionnaire-response/methods"));
|
|
45
|
+
class OvokClient extends core_1.MedplumClient {
|
|
46
|
+
/**
|
|
47
|
+
* @param config - The configuration for the client.
|
|
48
|
+
* @param config.socialLoginClientId - The social login client id to use for the client.
|
|
49
|
+
*/
|
|
50
|
+
constructor(config) {
|
|
51
|
+
var _a;
|
|
52
|
+
super(config);
|
|
53
|
+
this.socialLoginClientId = "";
|
|
54
|
+
this.socialLoginClientId = (_a = config.socialLoginClientId) !== null && _a !== void 0 ? _a : "";
|
|
55
|
+
this.bindMethods(authMethods);
|
|
56
|
+
this.bindMethods(observationMethods);
|
|
57
|
+
this.bindMethods(questionnaireResponseMethods);
|
|
58
|
+
this.bindMethods(aiMethods);
|
|
59
|
+
this.bindMethods(aiFhirMethods);
|
|
60
|
+
this.bindMethods(botMethods);
|
|
61
|
+
this.clientStorage = config.storage;
|
|
62
|
+
}
|
|
63
|
+
bindMethods(methods) {
|
|
64
|
+
for (const [name, method] of Object.entries(methods)) {
|
|
65
|
+
this[name] = method.bind(this);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Gets the `SubscriptionManager` for WebSocket subscriptions.
|
|
70
|
+
*
|
|
71
|
+
* @category Subscriptions
|
|
72
|
+
* @returns the `SubscriptionManager` for this client.
|
|
73
|
+
*/
|
|
74
|
+
getSubscriptionManager() {
|
|
75
|
+
// @ts-expect-error - subscriptionManager is private and only accessible within class 'MedplumClient'
|
|
76
|
+
if (!this.subscriptionManager) {
|
|
77
|
+
const fhirBaseUrl = this.getBaseUrl().replace("api.", "fhir.");
|
|
78
|
+
// @ts-expect-error - subscriptionManager is private and only accessible within class 'MedplumClient'
|
|
79
|
+
this.subscriptionManager = new core_1.SubscriptionManager(this, (0, core_1.getWebSocketUrl)(fhirBaseUrl, "/ws/subscriptions-r4"));
|
|
80
|
+
}
|
|
81
|
+
// @ts-expect-error - subscriptionManager is private and only accessible within class 'MedplumClient'
|
|
82
|
+
return this.subscriptionManager;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.OvokClient = OvokClient;
|
package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Bundle, Observation, QuestionnaireResponse } from "@medplum/fhirtypes";
|
|
2
|
+
import { OvokClient } from "../../ovok-client";
|
|
3
|
+
export declare function createQuestionnaireResponseWithObservations(this: OvokClient, questionnaireResponse: QuestionnaireResponse, observations: Observation[]): Promise<Bundle<import("@medplum/fhirtypes").Resource>>;
|
package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createQuestionnaireResponseWithObservations = createQuestionnaireResponseWithObservations;
|
|
4
|
+
async function createQuestionnaireResponseWithObservations(questionnaireResponse, observations) {
|
|
5
|
+
const bundle = {
|
|
6
|
+
resourceType: "Bundle",
|
|
7
|
+
type: "transaction",
|
|
8
|
+
entry: [
|
|
9
|
+
{
|
|
10
|
+
fullUrl: questionnaireResponse.id,
|
|
11
|
+
request: {
|
|
12
|
+
method: "POST",
|
|
13
|
+
url: "QuestionnaireResponse",
|
|
14
|
+
},
|
|
15
|
+
resource: questionnaireResponse,
|
|
16
|
+
},
|
|
17
|
+
...observations.map((observation) => ({
|
|
18
|
+
fullUrl: observation.id,
|
|
19
|
+
request: {
|
|
20
|
+
method: "POST",
|
|
21
|
+
url: "Observation",
|
|
22
|
+
},
|
|
23
|
+
resource: observation,
|
|
24
|
+
})),
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
return this.executeBatch(bundle);
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./createQuestionnaireResponseWithObservations";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./createQuestionnaireResponseWithObservations"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { OvokClient } from "../client/ovok-client";
|
|
3
|
+
export { useMedplumContext, useMedplumNavigate, useMedplumProfile, usePrevious, useResource, useSearch, useSearchOne, useSearchResources, useSubscription, reactContext, useCachedBinaryUrl, } from "@medplum/react-hooks";
|
|
4
|
+
export declare const useClient: () => OvokClient;
|
|
5
|
+
export declare const OvokProvider: (props: React.PropsWithChildren<{
|
|
6
|
+
client: OvokClient;
|
|
7
|
+
}>) => React.JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.OvokProvider = exports.useClient = exports.useCachedBinaryUrl = exports.reactContext = exports.useSubscription = exports.useSearchResources = exports.useSearchOne = exports.useSearch = exports.useResource = exports.usePrevious = exports.useMedplumProfile = exports.useMedplumNavigate = exports.useMedplumContext = void 0;
|
|
37
|
+
const react_hooks_1 = require("@medplum/react-hooks");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
var react_hooks_2 = require("@medplum/react-hooks");
|
|
40
|
+
Object.defineProperty(exports, "useMedplumContext", { enumerable: true, get: function () { return react_hooks_2.useMedplumContext; } });
|
|
41
|
+
Object.defineProperty(exports, "useMedplumNavigate", { enumerable: true, get: function () { return react_hooks_2.useMedplumNavigate; } });
|
|
42
|
+
Object.defineProperty(exports, "useMedplumProfile", { enumerable: true, get: function () { return react_hooks_2.useMedplumProfile; } });
|
|
43
|
+
Object.defineProperty(exports, "usePrevious", { enumerable: true, get: function () { return react_hooks_2.usePrevious; } });
|
|
44
|
+
Object.defineProperty(exports, "useResource", { enumerable: true, get: function () { return react_hooks_2.useResource; } });
|
|
45
|
+
Object.defineProperty(exports, "useSearch", { enumerable: true, get: function () { return react_hooks_2.useSearch; } });
|
|
46
|
+
Object.defineProperty(exports, "useSearchOne", { enumerable: true, get: function () { return react_hooks_2.useSearchOne; } });
|
|
47
|
+
Object.defineProperty(exports, "useSearchResources", { enumerable: true, get: function () { return react_hooks_2.useSearchResources; } });
|
|
48
|
+
Object.defineProperty(exports, "useSubscription", { enumerable: true, get: function () { return react_hooks_2.useSubscription; } });
|
|
49
|
+
Object.defineProperty(exports, "reactContext", { enumerable: true, get: function () { return react_hooks_2.reactContext; } });
|
|
50
|
+
Object.defineProperty(exports, "useCachedBinaryUrl", { enumerable: true, get: function () { return react_hooks_2.useCachedBinaryUrl; } });
|
|
51
|
+
const useClient = () => {
|
|
52
|
+
return (0, react_hooks_1.useMedplum)();
|
|
53
|
+
};
|
|
54
|
+
exports.useClient = useClient;
|
|
55
|
+
const OvokProvider = (props) => {
|
|
56
|
+
return (React.createElement(react_hooks_1.MedplumProvider, { medplum: props.client }, props.children));
|
|
57
|
+
};
|
|
58
|
+
exports.OvokProvider = OvokProvider;
|