@ovok/core 0.4.30 → 0.4.32
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/client/ai-fhir/methods/AIFhirResources.d.ts +2 -1
- package/dist/client/ai-fhir/methods/AIFhirResources.js +2 -2
- package/dist/client/auth/methods/appleLogin.d.ts +2 -1
- package/dist/client/auth/methods/appleLogin.js +2 -2
- package/dist/client/auth/methods/changePassword.d.ts +2 -1
- package/dist/client/auth/methods/changePassword.js +2 -2
- package/dist/client/auth/methods/getSessions.d.ts +2 -1
- package/dist/client/auth/methods/getSessions.js +2 -2
- package/dist/client/auth/methods/googleLogin.d.ts +2 -1
- package/dist/client/auth/methods/googleLogin.js +2 -2
- package/dist/client/auth/methods/index.d.ts +1 -0
- package/dist/client/auth/methods/index.js +1 -0
- package/dist/client/auth/methods/login.d.ts +6 -2
- package/dist/client/auth/methods/login.js +60 -44
- package/dist/client/auth/methods/logout.d.ts +2 -1
- package/dist/client/auth/methods/logout.js +2 -2
- package/dist/client/auth/methods/refetchProfile.d.ts +2 -1
- package/dist/client/auth/methods/refetchProfile.js +3 -4
- package/dist/client/auth/methods/register.d.ts +2 -1
- package/dist/client/auth/methods/register.js +2 -2
- package/dist/client/auth/methods/registerPractitioner.d.ts +2 -1
- package/dist/client/auth/methods/registerPractitioner.js +2 -2
- package/dist/client/auth/methods/reloadSession.d.ts +7 -0
- package/dist/client/auth/methods/reloadSession.js +23 -0
- package/dist/client/auth/methods/requestDeleteUser.d.ts +2 -1
- package/dist/client/auth/methods/requestDeleteUser.js +5 -5
- package/dist/client/auth/methods/resetPassword.d.ts +2 -1
- package/dist/client/auth/methods/resetPassword.js +2 -2
- package/dist/client/auth/methods/revokeSessions.d.ts +2 -1
- package/dist/client/auth/methods/revokeSessions.js +2 -2
- package/dist/client/auth/methods/setPasswordFromReset.d.ts +2 -1
- package/dist/client/auth/methods/setPasswordFromReset.js +2 -2
- package/dist/client/auth/types/LoginBody.d.ts +10 -20
- package/dist/client/auth/types/LoginError.d.ts +15 -0
- package/dist/client/auth/types/LoginError.js +15 -0
- package/dist/client/bot/methods/executeBot.d.ts +2 -1
- package/dist/client/bot/methods/executeBot.js +2 -2
- package/dist/client/change-history/methods.d.ts +2 -1
- package/dist/client/change-history/methods.js +2 -2
- package/dist/client/chat/ai/methods/createAiSession.d.ts +2 -1
- package/dist/client/chat/ai/methods/createAiSession.js +2 -2
- package/dist/client/cms/methods.d.ts +6 -5
- package/dist/client/cms/methods.js +10 -10
- package/dist/client/consent/methods.d.ts +5 -4
- package/dist/client/consent/methods.js +8 -8
- package/dist/client/email/methods.d.ts +2 -1
- package/dist/client/email/methods.js +2 -2
- package/dist/client/errors/ovok-error-utils.d.ts +7 -0
- package/dist/client/errors/ovok-error-utils.js +49 -5
- package/dist/client/errors/ovok-error.d.ts +4 -0
- package/dist/client/errors/ovok-error.js +17 -4
- package/dist/client/errors/rate-limit-error.js +5 -3
- package/dist/client/experience/methods.d.ts +32 -31
- package/dist/client/experience/methods.js +62 -62
- package/dist/client/invites/methods.d.ts +6 -5
- package/dist/client/invites/methods.js +11 -11
- package/dist/client/notifications/methods.d.ts +6 -5
- package/dist/client/notifications/methods.js +10 -10
- package/dist/client/notifications/types.d.ts +92 -11
- package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +2 -1
- package/dist/client/observation/methods/getLatestObservationsByCodes.js +4 -4
- package/dist/client/offline/offline-measurement-queue.d.ts +4 -3
- package/dist/client/offline/offline-measurement-queue.js +6 -6
- package/dist/client/ovok-client.d.ts +28 -11
- package/dist/client/ovok-client.js +353 -31
- package/dist/client/patient/methods.d.ts +24 -23
- package/dist/client/patient/methods.js +49 -49
- package/dist/client/patient-sharing/methods.d.ts +7 -6
- package/dist/client/patient-sharing/methods.js +12 -12
- package/dist/client/platform/methods.d.ts +24 -23
- package/dist/client/platform/methods.js +46 -46
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +2 -1
- package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +2 -2
- package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.d.ts +2 -1
- package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +2 -2
- package/dist/client/questionnaire-response/methods/populateQuestionnaire.d.ts +2 -1
- package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +2 -2
- package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.d.ts +2 -1
- package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +2 -2
- package/dist/client/signals/methods.d.ts +22 -21
- package/dist/client/signals/methods.js +42 -42
- package/dist/client/slim/methods.d.ts +93 -57
- package/dist/client/slim/methods.js +295 -108
- package/dist/client/slim/paging.d.ts +18 -0
- package/dist/client/slim/paging.js +57 -0
- package/dist/client/slim/types.d.ts +370 -3
- package/dist/conformance/api-requirements.js +22 -0
- package/dist/conformance/capability-requirements.js +1 -1
- package/dist/hooks/account-hooks.js +7 -7
- package/dist/hooks/api-hooks.d.ts +5 -2
- package/dist/hooks/api-hooks.js +39 -16
- package/dist/hooks/cms-hooks.js +3 -3
- package/dist/hooks/email-hooks.js +1 -1
- package/dist/hooks/experience-hooks.js +5 -5
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +5 -3
- package/dist/hooks/notification-ack-hooks.d.ts +2 -1
- package/dist/hooks/notification-hooks.d.ts +4 -2
- package/dist/hooks/notification-hooks.js +11 -23
- package/dist/hooks/notification-invalidation.d.ts +3 -2
- package/dist/hooks/notification-invalidation.js +10 -1
- package/dist/hooks/notification-note-hooks.js +3 -3
- package/dist/hooks/observation-hooks.d.ts +5 -1
- package/dist/hooks/observation-hooks.js +6 -6
- package/dist/hooks/patient-hooks.js +18 -18
- package/dist/hooks/patient-sharing-hooks.js +2 -2
- package/dist/hooks/platform-hooks.js +3 -3
- package/dist/hooks/poll-hooks.d.ts +14 -0
- package/dist/hooks/poll-hooks.js +127 -0
- package/dist/hooks/signals-alert-hooks.d.ts +5 -20
- package/dist/hooks/signals-alert-hooks.js +38 -34
- package/dist/hooks/signals-alert-item-hooks.d.ts +19 -0
- package/dist/hooks/signals-alert-item-hooks.js +62 -0
- package/dist/hooks/signals-hooks.js +2 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -1
- package/dist/utils/auth/exchange-code.d.ts +2 -0
- package/dist/utils/auth/exchange-code.js +2 -2
- package/dist/utils/auth/handle-tenant-code.d.ts +1 -1
- package/dist/utils/auth/handle-tenant-code.js +13 -4
- package/dist/utils/auth/start-login.d.ts +3 -1
- package/dist/utils/auth/start-login.js +3 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createAiSession = createAiSession;
|
|
4
4
|
const core_1 = require("@medplum/core");
|
|
5
|
-
async function createAiSession(props) {
|
|
5
|
+
async function createAiSession(props, requestOptions) {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
const participant = (_a = props.participant) !== null && _a !== void 0 ? _a : (0, core_1.getReferenceString)((_b = (await this.getProfileAsync())) !== null && _b !== void 0 ? _b : {});
|
|
8
8
|
if (!participant) {
|
|
@@ -13,5 +13,5 @@ async function createAiSession(props) {
|
|
|
13
13
|
title: props.title,
|
|
14
14
|
participant,
|
|
15
15
|
messages: props.messages,
|
|
16
|
-
});
|
|
16
|
+
}, undefined, requestOptions);
|
|
17
17
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MedplumRequestOptions } from "@medplum/core";
|
|
1
2
|
import { OvokClient } from "../ovok-client";
|
|
2
3
|
import { OvokCmsDocument, OvokCmsListOptions, OvokCmsOptions, OvokCmsPage, OvokTranslations } from "./types";
|
|
3
4
|
/**
|
|
@@ -6,16 +7,16 @@ import { OvokCmsDocument, OvokCmsListOptions, OvokCmsOptions, OvokCmsPage, OvokT
|
|
|
6
7
|
* `allowSignedOut` and a `tenantCode`; otherwise it rejects with
|
|
7
8
|
* `SignInRequiredError`.
|
|
8
9
|
*/
|
|
9
|
-
export declare function getCmsDocument<T extends object = OvokCmsDocument>(this: OvokClient, collection: string, slug: string, options?: OvokCmsOptions): Promise<T>;
|
|
10
|
+
export declare function getCmsDocument<T extends object = OvokCmsDocument>(this: OvokClient, collection: string, slug: string, options?: OvokCmsOptions, requestOptions?: MedplumRequestOptions): Promise<T>;
|
|
10
11
|
/**
|
|
11
12
|
* A page of a CMS collection's published documents, merged with the shared
|
|
12
13
|
* tenant's. Signed out, as `getCmsDocument`.
|
|
13
14
|
*/
|
|
14
|
-
export declare function listCmsDocuments<T extends object = OvokCmsDocument>(this: OvokClient, collection: string, options?: OvokCmsListOptions): Promise<OvokCmsPage<T>>;
|
|
15
|
+
export declare function listCmsDocuments<T extends object = OvokCmsDocument>(this: OvokClient, collection: string, options?: OvokCmsListOptions, requestOptions?: MedplumRequestOptions): Promise<OvokCmsPage<T>>;
|
|
15
16
|
/** A legal page ("terms-and-conditions", "data-privacy", …). Readable before sign-in with a tenant code. */
|
|
16
|
-
export declare function getLegalPage(this: OvokClient, slug: string, options?: OvokCmsOptions): Promise<OvokCmsDocument>;
|
|
17
|
+
export declare function getLegalPage(this: OvokClient, slug: string, options?: OvokCmsOptions, requestOptions?: MedplumRequestOptions): Promise<OvokCmsDocument>;
|
|
17
18
|
/** Release notes, newest first unless `sort` says otherwise. Needs a session. */
|
|
18
|
-
export declare function listReleaseNotes(this: OvokClient, options?: OvokCmsListOptions): Promise<OvokCmsPage>;
|
|
19
|
+
export declare function listReleaseNotes(this: OvokClient, options?: OvokCmsListOptions, requestOptions?: MedplumRequestOptions): Promise<OvokCmsPage>;
|
|
19
20
|
/**
|
|
20
21
|
* The `translations` collection as one tree: a group per document slug, and
|
|
21
22
|
* each of its `strings` rows' `value` at its `key`, nested at the dots. Rows
|
|
@@ -23,4 +24,4 @@ export declare function listReleaseNotes(this: OvokClient, options?: OvokCmsList
|
|
|
23
24
|
* sign-in with a tenant code. Nothing is kept on the device: on native the
|
|
24
25
|
* client's storage is SecureStore, read whole at every launch.
|
|
25
26
|
*/
|
|
26
|
-
export declare function getTranslations(this: OvokClient, options?: OvokCmsOptions): Promise<OvokTranslations>;
|
|
27
|
+
export declare function getTranslations(this: OvokClient, options?: OvokCmsOptions, requestOptions?: MedplumRequestOptions): Promise<OvokTranslations>;
|
|
@@ -48,30 +48,30 @@ const assertReadable = (client, collection, { allowSignedOut, tenantCode }) => {
|
|
|
48
48
|
* `allowSignedOut` and a `tenantCode`; otherwise it rejects with
|
|
49
49
|
* `SignInRequiredError`.
|
|
50
50
|
*/
|
|
51
|
-
async function getCmsDocument(collection, slug, options = {}) {
|
|
51
|
+
async function getCmsDocument(collection, slug, options = {}, requestOptions) {
|
|
52
52
|
if (!slug) {
|
|
53
53
|
throw new Error("A CMS document read needs a slug.");
|
|
54
54
|
}
|
|
55
55
|
assertReadable(this, collection, options);
|
|
56
|
-
return this.get(`${collectionPath(collection)}/${encodeURIComponent(slug)}${cmsQuery(options)}
|
|
56
|
+
return this.get(`${collectionPath(collection)}/${encodeURIComponent(slug)}${cmsQuery(options)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
59
|
* A page of a CMS collection's published documents, merged with the shared
|
|
60
60
|
* tenant's. Signed out, as `getCmsDocument`.
|
|
61
61
|
*/
|
|
62
|
-
async function listCmsDocuments(collection, options = {}) {
|
|
62
|
+
async function listCmsDocuments(collection, options = {}, requestOptions) {
|
|
63
63
|
assertReadable(this, collection, options);
|
|
64
|
-
return this.get(`${collectionPath(collection)}${cmsQuery(options)}
|
|
64
|
+
return this.get(`${collectionPath(collection)}${cmsQuery(options)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
65
65
|
}
|
|
66
66
|
/** A legal page ("terms-and-conditions", "data-privacy", …). Readable before sign-in with a tenant code. */
|
|
67
|
-
function getLegalPage(slug, options = {}) {
|
|
67
|
+
function getLegalPage(slug, options = {}, requestOptions) {
|
|
68
68
|
var _a;
|
|
69
|
-
return this.getCmsDocument("legal-pages", slug, { ...options, allowSignedOut: (_a = options.allowSignedOut) !== null && _a !== void 0 ? _a : true });
|
|
69
|
+
return this.getCmsDocument("legal-pages", slug, { ...options, allowSignedOut: (_a = options.allowSignedOut) !== null && _a !== void 0 ? _a : true }, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
70
70
|
}
|
|
71
71
|
/** Release notes, newest first unless `sort` says otherwise. Needs a session. */
|
|
72
|
-
function listReleaseNotes(options = {}) {
|
|
72
|
+
function listReleaseNotes(options = {}, requestOptions) {
|
|
73
73
|
var _a;
|
|
74
|
-
return this.listCmsDocuments("release-notes", { ...options, sort: (_a = options.sort) !== null && _a !== void 0 ? _a : "-publishedAt" });
|
|
74
|
+
return this.listCmsDocuments("release-notes", { ...options, sort: (_a = options.sort) !== null && _a !== void 0 ? _a : "-publishedAt" }, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
75
75
|
}
|
|
76
76
|
/** A translations read takes pages of 50 documents, the CMS's most, and at most this many. */
|
|
77
77
|
const MAX_TRANSLATION_PAGES = 20;
|
|
@@ -122,12 +122,12 @@ const addTranslations = (translations, docs) => {
|
|
|
122
122
|
* sign-in with a tenant code. Nothing is kept on the device: on native the
|
|
123
123
|
* client's storage is SecureStore, read whole at every launch.
|
|
124
124
|
*/
|
|
125
|
-
async function getTranslations(options = {}) {
|
|
125
|
+
async function getTranslations(options = {}, requestOptions) {
|
|
126
126
|
var _a;
|
|
127
127
|
const readOptions = { ...options, allowSignedOut: (_a = options.allowSignedOut) !== null && _a !== void 0 ? _a : true };
|
|
128
128
|
const translations = {};
|
|
129
129
|
for (let page = 1; page <= MAX_TRANSLATION_PAGES; page++) {
|
|
130
|
-
const { docs, hasNextPage } = await this.listCmsDocuments("translations", { ...readOptions, page, limit: 50 });
|
|
130
|
+
const { docs, hasNextPage } = await this.listCmsDocuments("translations", { ...readOptions, page, limit: 50 }, ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
131
131
|
addTranslations(translations, docs);
|
|
132
132
|
if (!hasNextPage) {
|
|
133
133
|
break;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { MedplumRequestOptions } from "@medplum/core";
|
|
1
2
|
import { OvokClient } from "../ovok-client";
|
|
2
3
|
import { LegalConsentResponse, MedicalConsentResponse } from "./types";
|
|
3
|
-
export declare function getLegalConsent(this: OvokClient): Promise<LegalConsentResponse>;
|
|
4
|
-
export declare function setLegalConsent(this: OvokClient, accepted: boolean): Promise<LegalConsentResponse>;
|
|
5
|
-
export declare function getMedicalConsent(this: OvokClient): Promise<MedicalConsentResponse>;
|
|
6
|
-
export declare function setMedicalConsent(this: OvokClient, accepted: boolean): Promise<MedicalConsentResponse>;
|
|
4
|
+
export declare function getLegalConsent(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<LegalConsentResponse>;
|
|
5
|
+
export declare function setLegalConsent(this: OvokClient, accepted: boolean, requestOptions?: MedplumRequestOptions): Promise<LegalConsentResponse>;
|
|
6
|
+
export declare function getMedicalConsent(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<MedicalConsentResponse>;
|
|
7
|
+
export declare function setMedicalConsent(this: OvokClient, accepted: boolean, requestOptions?: MedplumRequestOptions): Promise<MedicalConsentResponse>;
|
|
@@ -4,17 +4,17 @@ exports.getLegalConsent = getLegalConsent;
|
|
|
4
4
|
exports.setLegalConsent = setLegalConsent;
|
|
5
5
|
exports.getMedicalConsent = getMedicalConsent;
|
|
6
6
|
exports.setMedicalConsent = setMedicalConsent;
|
|
7
|
-
function getLegalConsent() {
|
|
8
|
-
return this.get("/v1/me/consent/legal");
|
|
7
|
+
function getLegalConsent(requestOptions) {
|
|
8
|
+
return this.get("/v1/me/consent/legal", ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
9
9
|
}
|
|
10
|
-
function setLegalConsent(accepted) {
|
|
10
|
+
function setLegalConsent(accepted, requestOptions) {
|
|
11
11
|
const body = { termsAndConditionsConsent: accepted };
|
|
12
|
-
return this.post("/v1/me/consent/legal", body);
|
|
12
|
+
return this.post("/v1/me/consent/legal", body, undefined, requestOptions);
|
|
13
13
|
}
|
|
14
|
-
function getMedicalConsent() {
|
|
15
|
-
return this.get("/v1/me/consent/medical");
|
|
14
|
+
function getMedicalConsent(requestOptions) {
|
|
15
|
+
return this.get("/v1/me/consent/medical", ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
16
16
|
}
|
|
17
|
-
function setMedicalConsent(accepted) {
|
|
17
|
+
function setMedicalConsent(accepted, requestOptions) {
|
|
18
18
|
const body = { medicalSettingsNotificationsConsent: accepted };
|
|
19
|
-
return this.post("/v1/me/consent/medical", body);
|
|
19
|
+
return this.post("/v1/me/consent/medical", body, undefined, requestOptions);
|
|
20
20
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MedplumRequestOptions } from "@medplum/core";
|
|
1
2
|
import { OvokClient } from "../ovok-client";
|
|
2
3
|
import { OvokEmailTemplates } from "./types";
|
|
3
|
-
export declare function getEmailTemplates(this: OvokClient): Promise<OvokEmailTemplates>;
|
|
4
|
+
export declare function getEmailTemplates(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<OvokEmailTemplates>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEmailTemplates = getEmailTemplates;
|
|
4
|
-
function getEmailTemplates() {
|
|
5
|
-
return this.get("/v1/email/templates");
|
|
4
|
+
function getEmailTemplates(requestOptions) {
|
|
5
|
+
return this.get("/v1/email/templates", ...(requestOptions === undefined ? [] : [requestOptions]));
|
|
6
6
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { ValidationError } from "../../types/ValidationError";
|
|
2
|
+
export declare const OVOK_HTTP_ERROR_EXTENSION_URL = "https://api.ovok.com/fhir/StructureDefinition/http-error-metadata";
|
|
2
3
|
export declare const asRecord: (value: unknown) => Record<string, unknown> | undefined;
|
|
3
4
|
export declare function readMessage(payload: Record<string, unknown> | undefined, error: unknown): string;
|
|
4
5
|
export declare function readFieldErrors(payload: Record<string, unknown> | undefined): ValidationError[];
|
|
5
6
|
export declare function codeValue(value: unknown): string | undefined;
|
|
6
7
|
export declare function codeFromOutcome(value: unknown): string | undefined;
|
|
7
8
|
export declare function statusFromOutcome(value: unknown): number | undefined;
|
|
9
|
+
export declare function readHttpErrorMetadata(value: unknown): {
|
|
10
|
+
status?: number;
|
|
11
|
+
requestId?: string;
|
|
12
|
+
retryAfterMs?: number;
|
|
13
|
+
response?: Record<string, unknown>;
|
|
14
|
+
};
|
|
8
15
|
export declare function numberValue(value: unknown): number | undefined;
|
|
9
16
|
export declare function stringValue(value: unknown): string | undefined;
|
|
10
17
|
export declare function parseJson(value: unknown): unknown;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asRecord = void 0;
|
|
3
|
+
exports.asRecord = exports.OVOK_HTTP_ERROR_EXTENSION_URL = void 0;
|
|
4
4
|
exports.readMessage = readMessage;
|
|
5
5
|
exports.readFieldErrors = readFieldErrors;
|
|
6
6
|
exports.codeValue = codeValue;
|
|
7
7
|
exports.codeFromOutcome = codeFromOutcome;
|
|
8
8
|
exports.statusFromOutcome = statusFromOutcome;
|
|
9
|
+
exports.readHttpErrorMetadata = readHttpErrorMetadata;
|
|
9
10
|
exports.numberValue = numberValue;
|
|
10
11
|
exports.stringValue = stringValue;
|
|
11
12
|
exports.parseJson = parseJson;
|
|
13
|
+
exports.OVOK_HTTP_ERROR_EXTENSION_URL = "https://api.ovok.com/fhir/StructureDefinition/http-error-metadata";
|
|
12
14
|
const asRecord = (value) => value && typeof value === "object" ? value : undefined;
|
|
13
15
|
exports.asRecord = asRecord;
|
|
14
16
|
function readMessage(payload, error) {
|
|
@@ -59,8 +61,9 @@ function readFieldErrors(payload) {
|
|
|
59
61
|
const outcome = Array.isArray(payload === null || payload === void 0 ? void 0 : payload.issue) ? payload.issue : [];
|
|
60
62
|
const nestedEnvelopeErrors = outcome.flatMap((value) => {
|
|
61
63
|
var _a;
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
+
const issue = (0, exports.asRecord)(value);
|
|
65
|
+
const details = (0, exports.asRecord)(issue === null || issue === void 0 ? void 0 : issue.details);
|
|
66
|
+
const nested = (_a = (0, exports.asRecord)(parseJson(details === null || details === void 0 ? void 0 : details.text))) !== null && _a !== void 0 ? _a : (0, exports.asRecord)(parseJson(issue === null || issue === void 0 ? void 0 : issue.diagnostics));
|
|
64
67
|
return nested ? readFieldErrors(nested) : [];
|
|
65
68
|
});
|
|
66
69
|
const outcomeErrors = outcome.flatMap((value) => {
|
|
@@ -113,8 +116,9 @@ function codeFromOutcome(value) {
|
|
|
113
116
|
return undefined;
|
|
114
117
|
}
|
|
115
118
|
function statusFromOutcome(value) {
|
|
116
|
-
var _a, _b;
|
|
119
|
+
var _a, _b, _c;
|
|
117
120
|
const outcome = (0, exports.asRecord)(value);
|
|
121
|
+
const metadata = readHttpErrorMetadata(value);
|
|
118
122
|
const issues = Array.isArray(outcome === null || outcome === void 0 ? void 0 : outcome.issue) ? outcome.issue : [];
|
|
119
123
|
const statusByIssue = {
|
|
120
124
|
conflict: 409,
|
|
@@ -123,14 +127,54 @@ function statusFromOutcome(value) {
|
|
|
123
127
|
"too-many-requests": 429,
|
|
124
128
|
throttled: 429,
|
|
125
129
|
};
|
|
130
|
+
if (metadata.status !== undefined) {
|
|
131
|
+
return metadata.status;
|
|
132
|
+
}
|
|
133
|
+
const statusById = {
|
|
134
|
+
"bad-request": 400,
|
|
135
|
+
unauthorized: 401,
|
|
136
|
+
forbidden: 403,
|
|
137
|
+
"not-found": 404,
|
|
138
|
+
conflict: 409,
|
|
139
|
+
"too-many-requests": 429,
|
|
140
|
+
"internal-server-error": 500,
|
|
141
|
+
"service-unavailable": 503,
|
|
142
|
+
};
|
|
143
|
+
const statusFromId = statusById[String((_a = outcome === null || outcome === void 0 ? void 0 : outcome.id) !== null && _a !== void 0 ? _a : "")];
|
|
144
|
+
if (statusFromId !== undefined) {
|
|
145
|
+
return statusFromId;
|
|
146
|
+
}
|
|
126
147
|
for (const issue of issues) {
|
|
127
|
-
const status = statusByIssue[String((
|
|
148
|
+
const status = statusByIssue[String((_c = (_b = (0, exports.asRecord)(issue)) === null || _b === void 0 ? void 0 : _b.code) !== null && _c !== void 0 ? _c : "")];
|
|
128
149
|
if (status) {
|
|
129
150
|
return status;
|
|
130
151
|
}
|
|
131
152
|
}
|
|
132
153
|
return undefined;
|
|
133
154
|
}
|
|
155
|
+
function readHttpErrorMetadata(value) {
|
|
156
|
+
const outcome = (0, exports.asRecord)(value);
|
|
157
|
+
const extensions = Array.isArray(outcome === null || outcome === void 0 ? void 0 : outcome.extension) ? outcome.extension : [];
|
|
158
|
+
const metadata = extensions
|
|
159
|
+
.map(exports.asRecord)
|
|
160
|
+
.find((extension) => (extension === null || extension === void 0 ? void 0 : extension.url) === exports.OVOK_HTTP_ERROR_EXTENSION_URL);
|
|
161
|
+
const nested = Array.isArray(metadata === null || metadata === void 0 ? void 0 : metadata.extension) ? metadata.extension : [];
|
|
162
|
+
const readNumber = (name) => {
|
|
163
|
+
const entry = nested.map(exports.asRecord).find((extension) => (extension === null || extension === void 0 ? void 0 : extension.url) === name);
|
|
164
|
+
return numberValue(entry === null || entry === void 0 ? void 0 : entry.valueInteger);
|
|
165
|
+
};
|
|
166
|
+
const readString = (name) => {
|
|
167
|
+
const entry = nested.map(exports.asRecord).find((extension) => (extension === null || extension === void 0 ? void 0 : extension.url) === name);
|
|
168
|
+
return stringValue(entry === null || entry === void 0 ? void 0 : entry.valueString);
|
|
169
|
+
};
|
|
170
|
+
const response = (0, exports.asRecord)(parseJson(readString("response")));
|
|
171
|
+
return {
|
|
172
|
+
status: readNumber("status"),
|
|
173
|
+
requestId: readString("requestId"),
|
|
174
|
+
retryAfterMs: readNumber("retryAfterMs"),
|
|
175
|
+
...(response === undefined ? {} : { response }),
|
|
176
|
+
};
|
|
177
|
+
}
|
|
134
178
|
function numberValue(value) {
|
|
135
179
|
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
136
180
|
}
|
|
@@ -7,6 +7,8 @@ export type ParsedOvokError = {
|
|
|
7
7
|
export type OvokErrorDetails = ParsedOvokError & {
|
|
8
8
|
status: number | undefined;
|
|
9
9
|
code: string | undefined;
|
|
10
|
+
requestId?: string;
|
|
11
|
+
retryAfterMs?: number;
|
|
10
12
|
missing: string[];
|
|
11
13
|
};
|
|
12
14
|
/** Reads the error details Medplum preserves from Ovok's non-FHIR responses. */
|
|
@@ -17,6 +19,8 @@ export declare class OvokApiError extends Error {
|
|
|
17
19
|
readonly code: string | undefined;
|
|
18
20
|
readonly fieldErrors: ValidationError[];
|
|
19
21
|
readonly missing: string[];
|
|
22
|
+
readonly requestId: string | undefined;
|
|
23
|
+
readonly retryAfterMs: number | undefined;
|
|
20
24
|
readonly cause: unknown;
|
|
21
25
|
constructor(details: OvokErrorDetails, cause: unknown);
|
|
22
26
|
}
|
|
@@ -26,11 +26,13 @@ const HTTP_REASON_PHRASES = new Set([
|
|
|
26
26
|
]);
|
|
27
27
|
/** Reads the error details Medplum preserves from Ovok's non-FHIR responses. */
|
|
28
28
|
const readOvokError = (error) => {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
30
30
|
if (error instanceof OvokApiError) {
|
|
31
31
|
return {
|
|
32
32
|
status: error.status,
|
|
33
33
|
code: error.code,
|
|
34
|
+
...(error.requestId === undefined ? {} : { requestId: error.requestId }),
|
|
35
|
+
...(error.retryAfterMs === undefined ? {} : { retryAfterMs: error.retryAfterMs }),
|
|
34
36
|
message: error.message,
|
|
35
37
|
fieldErrors: error.fieldErrors,
|
|
36
38
|
missing: error.missing,
|
|
@@ -41,7 +43,9 @@ const readOvokError = (error) => {
|
|
|
41
43
|
const messagePayload = error instanceof Error
|
|
42
44
|
? (0, ovok_error_utils_1.parseJson)(error.message)
|
|
43
45
|
: (0, ovok_error_utils_1.parseJson)(error);
|
|
44
|
-
const
|
|
46
|
+
const outcome = (0, ovok_error_utils_1.asRecord)(root === null || root === void 0 ? void 0 : root.outcome);
|
|
47
|
+
const metadata = (0, ovok_error_utils_1.readHttpErrorMetadata)(outcome);
|
|
48
|
+
const payload = (_g = (_f = (_e = (_d = (_c = (_b = (_a = metadata.response) !== null && _a !== void 0 ? _a : (0, ovok_error_utils_1.asRecord)(messagePayload)) !== null && _b !== void 0 ? _b : (0, ovok_error_utils_1.asRecord)(root === null || root === void 0 ? void 0 : root.body)) !== null && _c !== void 0 ? _c : (0, ovok_error_utils_1.asRecord)(root === null || root === void 0 ? void 0 : root.data)) !== null && _d !== void 0 ? _d : (0, ovok_error_utils_1.asRecord)(response === null || response === void 0 ? void 0 : response.data)) !== null && _e !== void 0 ? _e : (0, ovok_error_utils_1.asRecord)(response === null || response === void 0 ? void 0 : response.body)) !== null && _f !== void 0 ? _f : outcome) !== null && _g !== void 0 ? _g : root;
|
|
45
49
|
const nestedError = (0, ovok_error_utils_1.asRecord)(payload === null || payload === void 0 ? void 0 : payload.error);
|
|
46
50
|
const bareMessage = typeof error === "string"
|
|
47
51
|
? error
|
|
@@ -52,15 +56,22 @@ const readOvokError = (error) => {
|
|
|
52
56
|
&& !HTTP_REASON_PHRASES.has(bareMessage.toLowerCase())
|
|
53
57
|
? bareMessage
|
|
54
58
|
: undefined;
|
|
55
|
-
const code = (
|
|
56
|
-
const status = (_t = (_r = (_q = (_p = (_o =
|
|
59
|
+
const code = (_l = (_k = (_j = (_h = (0, ovok_error_utils_1.stringValue)(payload === null || payload === void 0 ? void 0 : payload.code)) !== null && _h !== void 0 ? _h : (0, ovok_error_utils_1.stringValue)(nestedError === null || nestedError === void 0 ? void 0 : nestedError.code)) !== null && _j !== void 0 ? _j : (0, ovok_error_utils_1.codeValue)(payload === null || payload === void 0 ? void 0 : payload.error)) !== null && _k !== void 0 ? _k : bareCode) !== null && _l !== void 0 ? _l : (0, ovok_error_utils_1.codeFromOutcome)((_m = payload === null || payload === void 0 ? void 0 : payload.outcome) !== null && _m !== void 0 ? _m : payload);
|
|
60
|
+
const status = (_v = (_t = (_s = (_r = (_q = (_p = (_o = metadata.status) !== null && _o !== void 0 ? _o : (0, ovok_error_utils_1.numberValue)(root === null || root === void 0 ? void 0 : root.status)) !== null && _p !== void 0 ? _p : (0, ovok_error_utils_1.numberValue)(root === null || root === void 0 ? void 0 : root.statusCode)) !== null && _q !== void 0 ? _q : (0, ovok_error_utils_1.numberValue)(response === null || response === void 0 ? void 0 : response.status)) !== null && _r !== void 0 ? _r : (0, ovok_error_utils_1.numberValue)(payload === null || payload === void 0 ? void 0 : payload.status)) !== null && _s !== void 0 ? _s : (0, ovok_error_utils_1.numberValue)(payload === null || payload === void 0 ? void 0 : payload.statusCode)) !== null && _t !== void 0 ? _t : (0, ovok_error_utils_1.statusFromOutcome)((_u = payload === null || payload === void 0 ? void 0 : payload.outcome) !== null && _u !== void 0 ? _u : payload)) !== null && _v !== void 0 ? _v : (code ? STATUS_BY_BARE_CODE[code] : undefined);
|
|
57
61
|
const fieldErrors = (0, ovok_error_utils_1.readFieldErrors)(payload);
|
|
58
62
|
const missing = Array.isArray(payload === null || payload === void 0 ? void 0 : payload.missing)
|
|
59
63
|
? payload.missing.filter((entry) => typeof entry === "string")
|
|
60
64
|
: [];
|
|
65
|
+
const retryAfterMs = (_x = (_w = metadata.retryAfterMs) !== null && _w !== void 0 ? _w : (0, ovok_error_utils_1.numberValue)(payload === null || payload === void 0 ? void 0 : payload.retryAfterMs)) !== null && _x !== void 0 ? _x : ((0, ovok_error_utils_1.numberValue)(payload === null || payload === void 0 ? void 0 : payload.retryAfterSec) === undefined
|
|
66
|
+
? undefined
|
|
67
|
+
: (0, ovok_error_utils_1.numberValue)(payload === null || payload === void 0 ? void 0 : payload.retryAfterSec) * 1000);
|
|
61
68
|
return {
|
|
62
69
|
status,
|
|
63
70
|
code,
|
|
71
|
+
...(((_y = metadata.requestId) !== null && _y !== void 0 ? _y : (0, ovok_error_utils_1.stringValue)(payload === null || payload === void 0 ? void 0 : payload.requestId)) === undefined
|
|
72
|
+
? {}
|
|
73
|
+
: { requestId: (_z = metadata.requestId) !== null && _z !== void 0 ? _z : (0, ovok_error_utils_1.stringValue)(payload === null || payload === void 0 ? void 0 : payload.requestId) }),
|
|
74
|
+
...(retryAfterMs === undefined ? {} : { retryAfterMs }),
|
|
64
75
|
message: (0, ovok_error_utils_1.readMessage)(payload, error),
|
|
65
76
|
fieldErrors,
|
|
66
77
|
missing,
|
|
@@ -77,6 +88,8 @@ class OvokApiError extends Error {
|
|
|
77
88
|
this.code = details.code;
|
|
78
89
|
this.fieldErrors = details.fieldErrors;
|
|
79
90
|
this.missing = details.missing;
|
|
91
|
+
this.requestId = details.requestId;
|
|
92
|
+
this.retryAfterMs = details.retryAfterMs;
|
|
80
93
|
Object.defineProperty(this, "cause", {
|
|
81
94
|
configurable: true,
|
|
82
95
|
enumerable: false,
|
|
@@ -29,14 +29,16 @@ function isRateLimitError(error) {
|
|
|
29
29
|
}
|
|
30
30
|
/** Converts Medplum's untyped throttling outcome to the Core error contract. */
|
|
31
31
|
function mapRateLimitError(error) {
|
|
32
|
+
var _a;
|
|
32
33
|
if (isRateLimitError(error)) {
|
|
33
34
|
return error;
|
|
34
35
|
}
|
|
35
36
|
if (error instanceof core_1.OperationOutcomeError && isRateLimitOutcome(error.outcome)) {
|
|
36
|
-
return new RateLimitError(rateLimitResetFromOutcome(error.outcome), { cause: error });
|
|
37
|
+
return new RateLimitError((_a = (0, ovok_error_1.readOvokError)(error).retryAfterMs) !== null && _a !== void 0 ? _a : rateLimitResetFromOutcome(error.outcome), { cause: error });
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
const details = (0, ovok_error_1.readOvokError)(error);
|
|
40
|
+
if (details.status === 429) {
|
|
41
|
+
return new RateLimitError(details.retryAfterMs, { cause: error });
|
|
40
42
|
}
|
|
41
43
|
return error;
|
|
42
44
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { MedplumRequestOptions } from "@medplum/core";
|
|
1
2
|
import { OvokClient } from "../ovok-client";
|
|
2
3
|
import { OvokChatMessage, OvokChatMessageInput, OvokChatMessageQuery, OvokChatMessagesResponse, OvokChatSession, OvokChatSessionQuery, OvokChatSessionsResponse, OvokConsentSignatureResponse, OvokContent, OvokContentBody, OvokContentQuery, OvokContentSearchResponse, OvokCreateChatSession, OvokDocumentFile, OvokDocumentMetadataUpdate, OvokDocumentReplacement, OvokDocumentSearchQuery, OvokDocumentSearchResponse, OvokDocumentUploadRequest, OvokMappedContentSearchResponse, OvokTranslationRequest, OvokTranslationResponse, OvokVideoCallAccess, OvokVideoCallAppointment, OvokVideoCallAppointmentInput, OvokVideoCallAppointmentQuery, OvokVideoCallGuestAccess, OvokVideoCallMailRequest, OvokVideoCallMailResponse } from "./types";
|
|
3
|
-
export declare function requestConsentSignature(this: OvokClient, consentId: string): Promise<OvokConsentSignatureResponse>;
|
|
4
|
-
export declare function createDocumentUpload(this: OvokClient, body: OvokDocumentUploadRequest): Promise<OvokDocumentFile>;
|
|
5
|
-
export declare function listDocuments(this: OvokClient, params?: OvokDocumentSearchQuery): Promise<OvokDocumentSearchResponse>;
|
|
4
|
+
export declare function requestConsentSignature(this: OvokClient, consentId: string, requestOptions?: MedplumRequestOptions): Promise<OvokConsentSignatureResponse>;
|
|
5
|
+
export declare function createDocumentUpload(this: OvokClient, body: OvokDocumentUploadRequest, requestOptions?: MedplumRequestOptions): Promise<OvokDocumentFile>;
|
|
6
|
+
export declare function listDocuments(this: OvokClient, params?: OvokDocumentSearchQuery, requestOptions?: MedplumRequestOptions): Promise<OvokDocumentSearchResponse>;
|
|
6
7
|
/** Returns the authenticated document endpoint; navigating/fetching it follows the backend redirect. */
|
|
7
8
|
export declare function getDocumentDownloadUrl(this: OvokClient, documentId: string, params?: {
|
|
8
9
|
width?: string | number;
|
|
@@ -15,39 +16,39 @@ export declare function getPublicDocumentDownloadUrl(this: OvokClient, token: st
|
|
|
15
16
|
height?: string | number;
|
|
16
17
|
fit?: string;
|
|
17
18
|
}): Promise<string>;
|
|
18
|
-
export declare function deleteDocument(this: OvokClient, documentId: string): Promise<{
|
|
19
|
+
export declare function deleteDocument(this: OvokClient, documentId: string, requestOptions?: MedplumRequestOptions): Promise<{
|
|
19
20
|
message: string;
|
|
20
21
|
}>;
|
|
21
|
-
export declare function updateDocumentMetadata(this: OvokClient, documentId: string, body: OvokDocumentMetadataUpdate): Promise<OvokDocumentFile>;
|
|
22
|
-
export declare function generateDocumentReplacementUpload(this: OvokClient, documentId: string, body: OvokDocumentReplacement): Promise<OvokDocumentFile>;
|
|
23
|
-
export declare function searchMappedContent(this: OvokClient, type: string, language: string, params?: OvokContentQuery): Promise<OvokMappedContentSearchResponse>;
|
|
24
|
-
export declare function copyContentsFromParent(this: OvokClient, type: string, language: string): Promise<{
|
|
22
|
+
export declare function updateDocumentMetadata(this: OvokClient, documentId: string, body: OvokDocumentMetadataUpdate, requestOptions?: MedplumRequestOptions): Promise<OvokDocumentFile>;
|
|
23
|
+
export declare function generateDocumentReplacementUpload(this: OvokClient, documentId: string, body: OvokDocumentReplacement, requestOptions?: MedplumRequestOptions): Promise<OvokDocumentFile>;
|
|
24
|
+
export declare function searchMappedContent(this: OvokClient, type: string, language: string, params?: OvokContentQuery, requestOptions?: MedplumRequestOptions): Promise<OvokMappedContentSearchResponse>;
|
|
25
|
+
export declare function copyContentsFromParent(this: OvokClient, type: string, language: string, requestOptions?: MedplumRequestOptions): Promise<{
|
|
25
26
|
success: boolean;
|
|
26
27
|
}>;
|
|
27
|
-
export declare function copyContentFromParent(this: OvokClient, type: string, language: string, key: string): Promise<{
|
|
28
|
+
export declare function copyContentFromParent(this: OvokClient, type: string, language: string, key: string, requestOptions?: MedplumRequestOptions): Promise<{
|
|
28
29
|
success: boolean;
|
|
29
30
|
}>;
|
|
30
|
-
export declare function createContent(this: OvokClient, type: string, language: string, body: OvokContentBody): Promise<OvokContent>;
|
|
31
|
-
export declare function updateContent(this: OvokClient, type: string, language: string, key: string, body: OvokContentBody): Promise<OvokContent>;
|
|
32
|
-
export declare function getContent(this: OvokClient, type: string, language: string, key: string): Promise<OvokContent>;
|
|
33
|
-
export declare function deleteContent(this: OvokClient, type: string, language: string, key: string): Promise<void>;
|
|
34
|
-
export declare function searchContent(this: OvokClient, type: string, language: string, params?: OvokContentQuery): Promise<OvokContentSearchResponse>;
|
|
35
|
-
export declare function createVideoCallAppointment(this: OvokClient, body: OvokVideoCallAppointmentInput): Promise<OvokVideoCallAppointment>;
|
|
36
|
-
export declare function updateVideoCallAppointment(this: OvokClient, appointmentId: string, body: OvokVideoCallAppointmentInput): Promise<OvokVideoCallAppointment>;
|
|
37
|
-
export declare function listVideoCallAppointments(this: OvokClient, params?: OvokVideoCallAppointmentQuery): Promise<OvokVideoCallAppointment[]>;
|
|
38
|
-
export declare function getVideoCallAccessPermission(this: OvokClient, appointmentId: string): Promise<Record<string, unknown>>;
|
|
39
|
-
export declare function createVideoCallGuestAccess(this: OvokClient, appointmentId: string, body: OvokVideoCallGuestAccess): Promise<OvokVideoCallAccess>;
|
|
40
|
-
export declare function createVideoCallUserAccess(this: OvokClient, appointmentId: string): Promise<OvokVideoCallAccess>;
|
|
41
|
-
export declare function sendVideoCallInvite(this: OvokClient, body: OvokVideoCallMailRequest): Promise<OvokVideoCallMailResponse>;
|
|
42
|
-
export declare function sendVideoCallUpdate(this: OvokClient, body: OvokVideoCallMailRequest): Promise<OvokVideoCallMailResponse>;
|
|
43
|
-
export declare function sendVideoCallCancellation(this: OvokClient, body: OvokVideoCallMailRequest): Promise<OvokVideoCallMailResponse>;
|
|
44
|
-
export declare function sendVideoCallActiveNotification(this: OvokClient, appointmentId: string): Promise<Record<string, unknown>>;
|
|
45
|
-
export declare function translate(this: OvokClient, body: OvokTranslationRequest): Promise<OvokTranslationResponse>;
|
|
46
|
-
export declare function createChatSession(this: OvokClient, body: OvokCreateChatSession): Promise<OvokChatSession>;
|
|
47
|
-
export declare function sendChatMessage(this: OvokClient, sessionId: string, body: OvokChatMessageInput): Promise<OvokChatMessage>;
|
|
48
|
-
export declare function listChatSessions(this: OvokClient, params?: OvokChatSessionQuery): Promise<OvokChatSessionsResponse>;
|
|
31
|
+
export declare function createContent(this: OvokClient, type: string, language: string, body: OvokContentBody, requestOptions?: MedplumRequestOptions): Promise<OvokContent>;
|
|
32
|
+
export declare function updateContent(this: OvokClient, type: string, language: string, key: string, body: OvokContentBody, requestOptions?: MedplumRequestOptions): Promise<OvokContent>;
|
|
33
|
+
export declare function getContent(this: OvokClient, type: string, language: string, key: string, requestOptions?: MedplumRequestOptions): Promise<OvokContent>;
|
|
34
|
+
export declare function deleteContent(this: OvokClient, type: string, language: string, key: string, requestOptions?: MedplumRequestOptions): Promise<void>;
|
|
35
|
+
export declare function searchContent(this: OvokClient, type: string, language: string, params?: OvokContentQuery, requestOptions?: MedplumRequestOptions): Promise<OvokContentSearchResponse>;
|
|
36
|
+
export declare function createVideoCallAppointment(this: OvokClient, body: OvokVideoCallAppointmentInput, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAppointment>;
|
|
37
|
+
export declare function updateVideoCallAppointment(this: OvokClient, appointmentId: string, body: OvokVideoCallAppointmentInput, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAppointment>;
|
|
38
|
+
export declare function listVideoCallAppointments(this: OvokClient, params?: OvokVideoCallAppointmentQuery, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAppointment[]>;
|
|
39
|
+
export declare function getVideoCallAccessPermission(this: OvokClient, appointmentId: string, requestOptions?: MedplumRequestOptions): Promise<Record<string, unknown>>;
|
|
40
|
+
export declare function createVideoCallGuestAccess(this: OvokClient, appointmentId: string, body: OvokVideoCallGuestAccess, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAccess>;
|
|
41
|
+
export declare function createVideoCallUserAccess(this: OvokClient, appointmentId: string, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAccess>;
|
|
42
|
+
export declare function sendVideoCallInvite(this: OvokClient, body: OvokVideoCallMailRequest, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallMailResponse>;
|
|
43
|
+
export declare function sendVideoCallUpdate(this: OvokClient, body: OvokVideoCallMailRequest, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallMailResponse>;
|
|
44
|
+
export declare function sendVideoCallCancellation(this: OvokClient, body: OvokVideoCallMailRequest, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallMailResponse>;
|
|
45
|
+
export declare function sendVideoCallActiveNotification(this: OvokClient, appointmentId: string, requestOptions?: MedplumRequestOptions): Promise<Record<string, unknown>>;
|
|
46
|
+
export declare function translate(this: OvokClient, body: OvokTranslationRequest, requestOptions?: MedplumRequestOptions): Promise<OvokTranslationResponse>;
|
|
47
|
+
export declare function createChatSession(this: OvokClient, body: OvokCreateChatSession, requestOptions?: MedplumRequestOptions): Promise<OvokChatSession>;
|
|
48
|
+
export declare function sendChatMessage(this: OvokClient, sessionId: string, body: OvokChatMessageInput, requestOptions?: MedplumRequestOptions): Promise<OvokChatMessage>;
|
|
49
|
+
export declare function listChatSessions(this: OvokClient, params?: OvokChatSessionQuery, requestOptions?: MedplumRequestOptions): Promise<OvokChatSessionsResponse>;
|
|
49
50
|
export declare function getChatSession(this: OvokClient, sessionId: string, params?: {
|
|
50
51
|
messageCount?: number;
|
|
51
|
-
}): Promise<OvokChatSession>;
|
|
52
|
-
export declare function listChatMessages(this: OvokClient, sessionId: string, params?: OvokChatMessageQuery): Promise<OvokChatMessagesResponse>;
|
|
53
|
-
export declare function searchAIFhir(this: OvokClient, request: Record<string, unknown
|
|
52
|
+
}, requestOptions?: MedplumRequestOptions): Promise<OvokChatSession>;
|
|
53
|
+
export declare function listChatMessages(this: OvokClient, sessionId: string, params?: OvokChatMessageQuery, requestOptions?: MedplumRequestOptions): Promise<OvokChatMessagesResponse>;
|
|
54
|
+
export declare function searchAIFhir(this: OvokClient, request: Record<string, unknown>, requestOptions?: MedplumRequestOptions): Promise<Record<string, unknown>>;
|