@ovok/core 0.4.6 → 0.4.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/README.md CHANGED
@@ -16,7 +16,7 @@ Core TypeScript SDK for healthcare applications. Provides authentication, AI-FHI
16
16
  - 📥 Opt-in durable offline measurement queue with idempotent retries
17
17
  - 🧭 Runtime discovery of the backend FHIR and public API capabilities
18
18
  - 🧩 Typed accounts, projects, localization, and patient-observation APIs
19
- - 🏥 Typed CareHub patient, device, telemetry, notification, and monitoring APIs
19
+ - 🏥 Typed Slim patient, device, telemetry, notification, and monitoring APIs
20
20
  - 🚨 Typed Signals thresholds, alerts, and project settings APIs
21
21
 
22
22
  ## Installation
@@ -295,20 +295,20 @@ caller's project and the residents their access policy allows: an alert outside
295
295
  404, and acknowledging needs `signals_alerts:update` and update access to the resident (403 when the
296
296
  caller can only read them).
297
297
 
298
- ## CareHub APIs
298
+ ## Slim APIs
299
299
 
300
- CareHub methods cover the verified `/v1/slim/*` and `/v2/slim/*` application routes for
300
+ Slim methods cover the verified `/v1/slim/*` and `/v2/slim/*` application routes for
301
301
  patients, devices, telemetry, notifications, thresholds, trends, sleep, locations, zones, and
302
- PDF export. These routes require the backend's bearer session and CareHub permissions.
302
+ PDF export. These routes require the backend's bearer session and Slim permissions.
303
303
 
304
304
  ```typescript
305
- const residents = await client.listCarehubPatients({ residentState: "active" });
306
- const devices = await client.listCarehubDevices({ active: true });
307
- const telemetry = await client.getCarehubDeviceTelemetry(deviceId);
308
- const alerts = await client.listCarehubMedicalNotifications({ count: 25 });
305
+ const residents = await client.listSlimPatients({ residentState: "active" });
306
+ const devices = await client.listSlimDevices({ active: true });
307
+ const telemetry = await client.getSlimDeviceTelemetry(deviceId);
308
+ const alerts = await client.listSlimMedicalNotifications({ count: 25 });
309
309
  ```
310
310
 
311
- CareHub is intentionally represented as typed application APIs rather than changing the FHIR
311
+ Slim is intentionally represented as typed application APIs rather than changing the FHIR
312
312
  observation save/offline behavior used by native integrations.
313
313
 
314
314
  ## Application APIs
@@ -338,12 +338,12 @@ download elements; the backend remains responsible for authorization and signed
338
338
  ## React hooks
339
339
 
340
340
  The package exports additive hooks for capability discovery, project configuration, patient profile
341
- and health data, questionnaires, scheduling resources, CareHub lists, telemetry, notifications,
341
+ and health data, questionnaires, scheduling resources, Slim lists, telemetry, notifications,
342
342
  documents, content, video consultations, and localization. Every request hook returns `data`,
343
343
  `loading`, `error`, and `reload`; mutations expose `data`, `loading`, `error`, `mutate`, and `reset`.
344
344
 
345
345
  ```tsx
346
- const { data: patients, loading, error } = useCarehubPatients({
346
+ const { data: patients, loading, error } = useSlimPatients({
347
347
  residentState: "active",
348
348
  });
349
349
 
@@ -362,6 +362,42 @@ const { data: translations } = useLocalizations("en-US");
362
362
  Hooks are additive to the existing `OvokProvider`, observation hooks, auth methods, and offline
363
363
  queue. Billing remains outside the SDK contract.
364
364
 
365
+ ## CMS content
366
+
367
+ Published Ovok CMS documents (legal pages, release notes, or any other collection) are read with
368
+ `getCmsDocument(collection, slug)` and `listCmsDocuments(collection)`, or the `useCmsDocument`,
369
+ `useCmsDocuments`, `useLegalPage`, and `useReleaseNotes` hooks. They are separate from the older
370
+ `searchContent` and `useContent` reads.
371
+
372
+ ```tsx
373
+ const { data: terms, error } = useLegalPage("terms-and-conditions", { tenantCode });
374
+ const { data: notes } = useReleaseNotes({ limit: 10 });
375
+ const faq = await client.listCmsDocuments("faq", { page: 2 });
376
+ ```
377
+
378
+ The backend allows three kinds of read:
379
+
380
+ - **Signed in**: the session reads its own tenant's content with no API key. Naming another
381
+ tenant without a key is refused with 403.
382
+ - **Legal pages**: no key and no session are needed. Before sign-in, pass the tenant's `tenantCode`.
383
+ - **Anything else**: it needs the public API key, and is a 401 without one. This SDK does not
384
+ send a key.
385
+
386
+ Signed out, every read except a legal page with a `tenantCode` rejects with
387
+ `SignInRequiredError` (`isSignInRequiredError(error)`) before any request is sent. This matters
388
+ because `MedplumClient` answers any 401 by clearing its storage and calling `onUnauthenticated`.
389
+ A hook that rendered before sign-in needs `reload()` once the session exists.
390
+
391
+ `locale` takes an app language or a CMS locale (`en`, `de`, `fr`, `es`). `toCmsLocale` maps
392
+ `de-CH` to `de`, and a language the CMS does not carry to `en`. The hooks default to the
393
+ runtime's language (`defaultCmsLocale()`), and `""` counts as unset. A change of language that
394
+ maps to the same CMS locale does not read again. Lists use the CMS envelope (`OvokCmsPage`):
395
+ `prevPage` and `nextPage` are `null` at either end, and `limit` is at most 50. Release notes are
396
+ newest first unless `sort` says otherwise. The backend merges in a shared tenant's documents.
397
+
398
+ These routes ship with an Ovok Core backend release. Deploy that backend before releasing this
399
+ SDK version.
400
+
365
401
  ## Offline measurements
366
402
 
367
403
  Pass a durable Medplum storage adapter and opt in to queue measurements while offline:
@@ -494,7 +530,7 @@ changing only practitioner sharing, send the current `enabled` value too.
494
530
  turning it off does not revoke existing shares. A project admin can toggle it
495
531
  through `PUT /v1/patient-sharing/settings`; concurrent settings changes return
496
532
  409 and should be reloaded, and non-admins receive 403. Do not enable it for a project
497
- whose practitioners use the Carehub dashboard. Map the email templates
533
+ whose practitioners use the Slim dashboard. Map the email templates
498
534
  `PATIENT_INVITE`, `PATIENT_ASSIGNMENT_REQUEST`,
499
535
  `PRACTITIONER_INVITED_BY_PATIENT`, and `PRACTITIONER_PATIENT_SHARED` before
500
536
  turning the feature on; an unmapped email can still produce the uniform 202
@@ -0,0 +1,3 @@
1
+ export * from "./locale";
2
+ export * from "./methods";
3
+ export * from "./types";
@@ -0,0 +1,19 @@
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("./locale"), exports);
18
+ __exportStar(require("./methods"), exports);
19
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,11 @@
1
+ /** The Ovok CMS locales (the CMS's `CMS_LOCALES`); `en` is its default and fallback. */
2
+ export declare const OVOK_CMS_LOCALES: readonly ["en", "de", "fr", "es"];
3
+ export type OvokCmsLocale = (typeof OVOK_CMS_LOCALES)[number];
4
+ export declare const OVOK_CMS_DEFAULT_LOCALE: OvokCmsLocale;
5
+ /**
6
+ * The CMS locale for an app language: "de-DE" and "de_CH" read "de"; a
7
+ * language the CMS doesn't carry reads its default, "en".
8
+ */
9
+ export declare function toCmsLocale(language?: string | null): OvokCmsLocale;
10
+ /** The runtime's language (browser, device or server), as a CMS locale. */
11
+ export declare function defaultCmsLocale(): OvokCmsLocale;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OVOK_CMS_DEFAULT_LOCALE = exports.OVOK_CMS_LOCALES = void 0;
4
+ exports.toCmsLocale = toCmsLocale;
5
+ exports.defaultCmsLocale = defaultCmsLocale;
6
+ /** The Ovok CMS locales (the CMS's `CMS_LOCALES`); `en` is its default and fallback. */
7
+ exports.OVOK_CMS_LOCALES = ["en", "de", "fr", "es"];
8
+ exports.OVOK_CMS_DEFAULT_LOCALE = "en";
9
+ /**
10
+ * The CMS locale for an app language: "de-DE" and "de_CH" read "de"; a
11
+ * language the CMS doesn't carry reads its default, "en".
12
+ */
13
+ function toCmsLocale(language) {
14
+ const primary = (language !== null && language !== void 0 ? language : "").split(/[-_]/)[0].toLowerCase();
15
+ return exports.OVOK_CMS_LOCALES.includes(primary)
16
+ ? primary
17
+ : exports.OVOK_CMS_DEFAULT_LOCALE;
18
+ }
19
+ /** The runtime's language (browser, device or server), as a CMS locale. */
20
+ function defaultCmsLocale() {
21
+ try {
22
+ return toCmsLocale(Intl.DateTimeFormat().resolvedOptions().locale);
23
+ }
24
+ catch (_a) {
25
+ return exports.OVOK_CMS_DEFAULT_LOCALE;
26
+ }
27
+ }
@@ -0,0 +1,17 @@
1
+ import { OvokClient } from "../ovok-client";
2
+ import { OvokCmsDocument, OvokCmsListOptions, OvokCmsOptions, OvokCmsPage } from "./types";
3
+ /**
4
+ * A published document of a CMS collection by slug, the shared tenant's when
5
+ * the tenant has none of its own. Signed out, only legal pages with a
6
+ * `tenantCode` are read; anything else rejects with `SignInRequiredError`.
7
+ */
8
+ export declare function getCmsDocument<T extends object = OvokCmsDocument>(this: OvokClient, collection: string, slug: string, options?: OvokCmsOptions): Promise<T>;
9
+ /**
10
+ * A page of a CMS collection's published documents, merged with the shared
11
+ * tenant's. Signed out, as `getCmsDocument`.
12
+ */
13
+ export declare function listCmsDocuments<T extends object = OvokCmsDocument>(this: OvokClient, collection: string, options?: OvokCmsListOptions): Promise<OvokCmsPage<T>>;
14
+ /** A legal page ("terms-and-conditions", "data-privacy", …). Readable before sign-in with a tenant code. */
15
+ export declare function getLegalPage(this: OvokClient, slug: string, options?: OvokCmsOptions): Promise<OvokCmsDocument>;
16
+ /** Release notes, newest first unless `sort` says otherwise. Needs a session. */
17
+ export declare function listReleaseNotes(this: OvokClient, options?: OvokCmsListOptions): Promise<OvokCmsPage>;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCmsDocument = getCmsDocument;
4
+ exports.listCmsDocuments = listCmsDocuments;
5
+ exports.getLegalPage = getLegalPage;
6
+ exports.listReleaseNotes = listReleaseNotes;
7
+ const sign_in_required_error_1 = require("../errors/sign-in-required-error");
8
+ const locale_1 = require("./locale");
9
+ const collectionPath = (collection) => `/v1/public/cms/collections/${encodeURIComponent(collection)}/items`;
10
+ const cmsQuery = ({ locale, tenantCode, environment, page, limit, sort }) => {
11
+ const params = new URLSearchParams();
12
+ if (locale) {
13
+ params.set("locale", (0, locale_1.toCmsLocale)(locale));
14
+ }
15
+ if (tenantCode) {
16
+ params.set("tenant", tenantCode);
17
+ }
18
+ if (environment) {
19
+ params.set("environment", environment);
20
+ }
21
+ if (page !== undefined) {
22
+ params.set("page", String(page));
23
+ }
24
+ if (limit !== undefined) {
25
+ params.set("limit", String(limit));
26
+ }
27
+ if (sort) {
28
+ params.set("sort", sort);
29
+ }
30
+ const query = params.toString();
31
+ return query ? `?${query}` : "";
32
+ };
33
+ /**
34
+ * Signed out, the backend serves only legal pages read by tenant code; any
35
+ * other read is a 401, which MedplumClient answers by clearing its storage.
36
+ * That read is refused here, before a request.
37
+ */
38
+ const assertReadable = (client, collection, tenantCode) => {
39
+ if (!client.getActiveLogin() && !(collection === "legal-pages" && tenantCode)) {
40
+ throw new sign_in_required_error_1.SignInRequiredError(`Sign in to read the CMS collection "${collection}".`);
41
+ }
42
+ };
43
+ /**
44
+ * A published document of a CMS collection by slug, the shared tenant's when
45
+ * the tenant has none of its own. Signed out, only legal pages with a
46
+ * `tenantCode` are read; anything else rejects with `SignInRequiredError`.
47
+ */
48
+ async function getCmsDocument(collection, slug, options = {}) {
49
+ if (!slug) {
50
+ throw new Error("A CMS document read needs a slug.");
51
+ }
52
+ assertReadable(this, collection, options.tenantCode);
53
+ return this.get(`${collectionPath(collection)}/${encodeURIComponent(slug)}${cmsQuery(options)}`);
54
+ }
55
+ /**
56
+ * A page of a CMS collection's published documents, merged with the shared
57
+ * tenant's. Signed out, as `getCmsDocument`.
58
+ */
59
+ async function listCmsDocuments(collection, options = {}) {
60
+ assertReadable(this, collection, options.tenantCode);
61
+ return this.get(`${collectionPath(collection)}${cmsQuery(options)}`);
62
+ }
63
+ /** A legal page ("terms-and-conditions", "data-privacy", …). Readable before sign-in with a tenant code. */
64
+ function getLegalPage(slug, options = {}) {
65
+ return this.getCmsDocument("legal-pages", slug, options);
66
+ }
67
+ /** Release notes, newest first unless `sort` says otherwise. Needs a session. */
68
+ function listReleaseNotes(options = {}) {
69
+ var _a;
70
+ return this.listCmsDocuments("release-notes", { ...options, sort: (_a = options.sort) !== null && _a !== void 0 ? _a : "-publishedAt" });
71
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * A published document of an Ovok CMS collection (`legal-pages`,
3
+ * `release-notes`, …). Fields beyond these depend on the collection.
4
+ */
5
+ export type OvokCmsDocument = {
6
+ id: number | string;
7
+ slug?: string | null;
8
+ title?: string | null;
9
+ excerpt?: string | null;
10
+ /** Lexical rich text (JSON), as the CMS stores it. */
11
+ body?: unknown;
12
+ tags?: string[] | null;
13
+ status: string;
14
+ publishedAt?: string | null;
15
+ effectiveAt?: string | null;
16
+ updatedAt?: string | null;
17
+ [field: string]: unknown;
18
+ };
19
+ /** A page of published documents (the CMS list envelope). */
20
+ export type OvokCmsPage<T = OvokCmsDocument> = {
21
+ docs: T[];
22
+ totalDocs: number;
23
+ limit: number;
24
+ totalPages: number;
25
+ page: number;
26
+ /** The 1-based position of this page's first document in the whole list. */
27
+ pagingCounter: number;
28
+ hasPrevPage: boolean;
29
+ hasNextPage: boolean;
30
+ /** `null` on the first page. */
31
+ prevPage: number | null;
32
+ /** `null` on the last page. */
33
+ nextPage: number | null;
34
+ };
35
+ export type OvokCmsOptions = {
36
+ /**
37
+ * An app language ("de-DE") or a CMS locale ("de"), mapped with
38
+ * `toCmsLocale`. Omitted or "", the CMS answers in its default locale; the
39
+ * hooks send the runtime's language instead.
40
+ */
41
+ locale?: string;
42
+ /**
43
+ * The tenant's code. Signed out, legal pages are the only readable
44
+ * collection, and only with this. Signed in, the session's own tenant is
45
+ * read; naming another tenant is refused (403).
46
+ */
47
+ tenantCode?: string;
48
+ /** Omitted, the backend's own. */
49
+ environment?: "dev" | "staging" | "prod";
50
+ };
51
+ export type OvokCmsListOptions = OvokCmsOptions & {
52
+ page?: number;
53
+ /** At most 50. */
54
+ limit?: number;
55
+ /** A top-level field, "-" for descending, e.g. "-publishedAt". */
56
+ sort?: string;
57
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A typed error for a read that needs a signed-in session when there is none.
3
+ * It is thrown before any request: MedplumClient answers a 401 by clearing
4
+ * its storage and calling `onUnauthenticated`.
5
+ */
6
+ export declare class SignInRequiredError extends Error {
7
+ readonly code: "sign_in_required";
8
+ constructor(message: string);
9
+ }
10
+ export declare function isSignInRequiredError(error: unknown): error is SignInRequiredError;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignInRequiredError = void 0;
4
+ exports.isSignInRequiredError = isSignInRequiredError;
5
+ /**
6
+ * A typed error for a read that needs a signed-in session when there is none.
7
+ * It is thrown before any request: MedplumClient answers a 401 by clearing
8
+ * its storage and calling `onUnauthenticated`.
9
+ */
10
+ class SignInRequiredError extends Error {
11
+ constructor(message) {
12
+ super(message);
13
+ this.code = "sign_in_required";
14
+ this.name = "SignInRequiredError";
15
+ }
16
+ }
17
+ exports.SignInRequiredError = SignInRequiredError;
18
+ function isSignInRequiredError(error) {
19
+ return error instanceof SignInRequiredError;
20
+ }
@@ -4,8 +4,8 @@ import { OvokPublicApiEndpoint } from "../conformance/capability";
4
4
  import * as aiFhirMethods from "./ai-fhir/methods";
5
5
  import * as authMethods from "./auth/methods";
6
6
  import * as botMethods from "./bot/methods";
7
- import * as carehubMethods from "./carehub/methods";
8
7
  import * as aiMethods from "./chat/ai/methods";
8
+ import * as cmsMethods from "./cms/methods";
9
9
  import * as emailMethods from "./email";
10
10
  import * as experienceMethods from "./experience/methods";
11
11
  import * as inviteMethods from "./invites/methods";
@@ -17,6 +17,7 @@ import * as patientSharingMethods from "./patient-sharing/methods";
17
17
  import * as platformMethods from "./platform/methods";
18
18
  import * as questionnaireResponseMethods from "./questionnaire-response/methods";
19
19
  import * as signalsMethods from "./signals/methods";
20
+ import * as slimMethods from "./slim/methods";
20
21
  export declare const MAX_CONDITIONAL_OBSERVATION_ENTRIES = 8;
21
22
  export { MAX_OBSERVATION_BUNDLE_BYTES } from "./observation/observation-bundle-utils";
22
23
  export type SaveObservationsResult = {
@@ -62,7 +63,7 @@ export declare class OvokClient extends MedplumClient {
62
63
  */
63
64
  getSubscriptionManager(): SubscriptionManager;
64
65
  }
65
- type Methods = typeof authMethods & typeof observationMethods & typeof questionnaireResponseMethods & typeof aiMethods & typeof aiFhirMethods & typeof botMethods & typeof carehubMethods & typeof emailMethods & typeof platformMethods & typeof experienceMethods & typeof inviteMethods & typeof patientMethods & typeof patientSharingMethods & typeof signalsMethods;
66
+ type Methods = typeof authMethods & typeof observationMethods & typeof questionnaireResponseMethods & typeof aiMethods & typeof aiFhirMethods & typeof botMethods & typeof slimMethods & typeof emailMethods & typeof cmsMethods & typeof platformMethods & typeof experienceMethods & typeof inviteMethods & typeof patientMethods & typeof patientSharingMethods & typeof signalsMethods;
66
67
  type Omitted<T> = Omit<T, "executeBot">;
67
68
  declare module "./ovok-client" {
68
69
  interface OvokClient extends Omitted<Methods> {
@@ -40,8 +40,8 @@ const capability_1 = require("../conformance/capability");
40
40
  const aiFhirMethods = __importStar(require("./ai-fhir/methods"));
41
41
  const authMethods = __importStar(require("./auth/methods"));
42
42
  const botMethods = __importStar(require("./bot/methods"));
43
- const carehubMethods = __importStar(require("./carehub/methods"));
44
43
  const aiMethods = __importStar(require("./chat/ai/methods"));
44
+ const cmsMethods = __importStar(require("./cms/methods"));
45
45
  const emailMethods = __importStar(require("./email"));
46
46
  const rate_limit_error_1 = require("./errors/rate-limit-error");
47
47
  const experienceMethods = __importStar(require("./experience/methods"));
@@ -55,6 +55,7 @@ const platformMethods = __importStar(require("./platform/methods"));
55
55
  const questionnaireResponseMethods = __importStar(require("./questionnaire-response/methods"));
56
56
  const errors_1 = require("./signals/errors");
57
57
  const signalsMethods = __importStar(require("./signals/methods"));
58
+ const slimMethods = __importStar(require("./slim/methods"));
58
59
  exports.MAX_CONDITIONAL_OBSERVATION_ENTRIES = 8;
59
60
  var observation_bundle_utils_2 = require("./observation/observation-bundle-utils");
60
61
  Object.defineProperty(exports, "MAX_OBSERVATION_BUNDLE_BYTES", { enumerable: true, get: function () { return observation_bundle_utils_2.MAX_OBSERVATION_BUNDLE_BYTES; } });
@@ -74,8 +75,9 @@ class OvokClient extends core_1.MedplumClient {
74
75
  this.bindMethods(aiMethods);
75
76
  this.bindMethods(aiFhirMethods);
76
77
  this.bindMethods(botMethods);
77
- this.bindMethods(carehubMethods);
78
+ this.bindMethods(slimMethods);
78
79
  this.bindMethods(emailMethods);
80
+ this.bindMethods(cmsMethods);
79
81
  this.bindMethods(platformMethods);
80
82
  this.bindMethods(experienceMethods);
81
83
  this.bindMethods(inviteMethods);
@@ -0,0 +1,71 @@
1
+ import { Bundle, Resource } from "@medplum/fhirtypes";
2
+ import { OvokClient } from "../ovok-client";
3
+ import { SlimAssignDevice, SlimCreateDevice, SlimCreateLocation, SlimCreatePatient, SlimDevice, SlimDeviceListItem, SlimDeviceListQuery, SlimDeviceTelemetry, SlimExportPdf, SlimExportPdfRequest, SlimLiveQuery, SlimLiveTelemetry, SlimLocation, SlimLocationQuery, SlimNotification, SlimNotificationsQuery, SlimNotificationsResponse, SlimObservationIds, SlimPage, SlimPatient, SlimPatientListItem, SlimPatientListQuery, SlimRecentNotificationsResponse, SlimSleepStatistics, SlimThreshold, SlimTrends, SlimUpdateDevice, SlimUpdateLocation, SlimUpdatePatient, SlimZone, SlimZoneDetail } from "./types";
4
+ export declare function listSlimPatients(this: OvokClient, params?: SlimPatientListQuery): Promise<SlimPage<SlimPatientListItem>>;
5
+ export declare function getSlimPatient(this: OvokClient, patientId: string): Promise<SlimPatient>;
6
+ export declare function getSlimPatientEverything(this: OvokClient, patientId: string): Promise<Bundle<Resource>>;
7
+ export declare function getSlimPatientCurrentVitals(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
8
+ export declare function createSlimPatient(this: OvokClient, body: SlimCreatePatient): Promise<SlimPatient>;
9
+ export declare function updateSlimPatient(this: OvokClient, patientId: string, body: SlimUpdatePatient): Promise<SlimPatient>;
10
+ export declare function deleteSlimPatient(this: OvokClient, patientId: string): Promise<void>;
11
+ export declare function listSlimDevices(this: OvokClient, params?: SlimDeviceListQuery): Promise<SlimPage<SlimDeviceListItem>>;
12
+ export declare function getSlimDevice(this: OvokClient, deviceId: string): Promise<SlimDevice>;
13
+ export declare function createSlimDevice(this: OvokClient, body: SlimCreateDevice): Promise<SlimDevice>;
14
+ export declare function updateSlimDevice(this: OvokClient, deviceId: string, body: SlimUpdateDevice): Promise<SlimDevice>;
15
+ export declare function deleteSlimDevice(this: OvokClient, deviceId: string): Promise<void>;
16
+ export declare function assignSlimDeviceToProject(this: OvokClient, body: SlimAssignDevice): Promise<SlimDevice>;
17
+ export declare function listSlimLiveDevices(this: OvokClient, params?: SlimLiveQuery): Promise<SlimPage<Record<string, unknown>>>;
18
+ export declare function listSlimLiveTelemetry(this: OvokClient, params?: SlimLiveQuery): Promise<SlimLiveTelemetry>;
19
+ export declare function getSlimDeviceSleepStatus(this: OvokClient, deviceId: string): Promise<Record<string, unknown>>;
20
+ export declare function getSlimDeviceTelemetry(this: OvokClient, deviceId: string): Promise<SlimDeviceTelemetry>;
21
+ export declare function listSlimEffectiveObservationIds(this: OvokClient): Promise<Record<string, SlimObservationIds>>;
22
+ export declare function listSlimLastObservationIds(this: OvokClient): Promise<Record<string, SlimObservationIds>>;
23
+ export declare function getSlimDeviceEffectiveObservationIds(this: OvokClient, deviceId: string): Promise<Omit<SlimObservationIds, "batch">>;
24
+ export declare function getSlimDeviceLastObservationIds(this: OvokClient, deviceId: string): Promise<SlimObservationIds>;
25
+ export declare function listSlimNotifications(this: OvokClient, params?: SlimNotificationsQuery): Promise<SlimNotificationsResponse>;
26
+ export declare function getRecentSlimNotifications(this: OvokClient, count?: number): Promise<SlimRecentNotificationsResponse>;
27
+ export declare function listSlimOutOfBedNotifications(this: OvokClient, params?: Omit<SlimNotificationsQuery, "type">): Promise<SlimNotificationsResponse>;
28
+ export declare function listSlimMedicalNotifications(this: OvokClient, params?: SlimNotificationsQuery): Promise<SlimNotificationsResponse>;
29
+ export declare function getRecentSlimMedicalNotifications(this: OvokClient, count?: number): Promise<SlimRecentNotificationsResponse>;
30
+ export declare function getSlimMedicalNotification(this: OvokClient, episodeId: string): Promise<SlimNotification>;
31
+ export declare function acknowledgeSlimMedicalNotification(this: OvokClient, episodeId: string): Promise<SlimNotification>;
32
+ export declare function acknowledgeSlimNotification(this: OvokClient, notificationId: string): Promise<SlimNotification>;
33
+ export declare function getSlimThreshold(this: OvokClient): Promise<SlimThreshold>;
34
+ export declare function updateSlimThreshold(this: OvokClient, body: Record<string, unknown>): Promise<SlimThreshold>;
35
+ export declare function getSlimPatientThreshold(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
36
+ export declare function updateSlimPatientThreshold(this: OvokClient, patientId: string, body: Record<string, unknown>): Promise<Record<string, unknown>>;
37
+ export declare function getSlimThresholdV2(this: OvokClient): Promise<Record<string, unknown>>;
38
+ export declare function updateSlimThresholdV2(this: OvokClient, body: Record<string, unknown>): Promise<Record<string, unknown>>;
39
+ export declare function getSlimPatientThresholdV2(this: OvokClient, patientId: string): Promise<Record<string, unknown>>;
40
+ export declare function updateSlimPatientThresholdV2(this: OvokClient, patientId: string, body: Record<string, unknown>): Promise<Record<string, unknown>>;
41
+ export declare function getSlimTrends(this: OvokClient, params: {
42
+ patientId: string;
43
+ startDate: string;
44
+ endDate: string;
45
+ graphType: string;
46
+ }): Promise<SlimTrends>;
47
+ export declare function getSlimSleepStatistics(this: OvokClient, params: {
48
+ endDate: string;
49
+ lastDayCount?: number;
50
+ patientId: string;
51
+ }): Promise<SlimSleepStatistics>;
52
+ export declare function listSlimLocations(this: OvokClient, params?: SlimLocationQuery): Promise<SlimPage<SlimLocation>>;
53
+ export declare function getSlimLocation(this: OvokClient, locationId: string): Promise<SlimLocation>;
54
+ export declare function createSlimLocation(this: OvokClient, body: SlimCreateLocation): Promise<SlimLocation>;
55
+ export declare function updateSlimLocation(this: OvokClient, locationId: string, body: SlimUpdateLocation): Promise<SlimLocation>;
56
+ export declare function deleteSlimLocation(this: OvokClient, locationId: string): Promise<void>;
57
+ export declare function listSlimZones(this: OvokClient, params?: {
58
+ page?: number;
59
+ count?: number;
60
+ sortBy?: string;
61
+ orderBy?: "ASC" | "DESC";
62
+ search?: string;
63
+ }): Promise<SlimPage<SlimZone>>;
64
+ export declare function getSlimZone(this: OvokClient, zoneId: string): Promise<SlimZoneDetail>;
65
+ export declare function getSlimZoneDeviceCounts(this: OvokClient, params?: {
66
+ all?: boolean;
67
+ effectiveSleepStatus?: string;
68
+ includeUnassigned?: boolean;
69
+ includeEmpty?: boolean;
70
+ }): Promise<Record<string, unknown>>;
71
+ export declare function exportSlimPatientPdf(this: OvokClient, body: SlimExportPdfRequest): Promise<SlimExportPdf>;