@ovok/core 0.4.49-rc.1 → 0.4.49-rc.2
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 +27 -79
- package/dist/client/observation/measurement-fields.d.ts +1 -1
- package/dist/client/observation/methods/observationsToMeasurements.d.ts +1 -1
- package/dist/client/observation/methods/observationsToMeasurements.js +59 -59
- package/dist/client/observation/services/base-observation-service.d.ts +1 -1
- package/dist/client/observation/services/blood-oxygen.d.ts +1 -1
- package/dist/client/observation/services/blood-oxygen.js +7 -7
- package/dist/client/observation/services/blood-pressure.d.ts +1 -1
- package/dist/client/observation/services/blood-pressure.js +16 -16
- package/dist/client/observation/services/component-observation-services.d.ts +1 -1
- package/dist/client/observation/services/component-observation-services.js +3 -3
- package/dist/client/observation/services/creator.d.ts +1 -1
- package/dist/client/observation/services/creator.js +10 -10
- package/dist/client/observation/services/ecg-observation-fragments.d.ts +1 -1
- package/dist/client/observation/services/ecg.d.ts +1 -1
- package/dist/client/observation/services/ecg.js +10 -10
- package/dist/client/observation/services/lipid-panel.d.ts +1 -1
- package/dist/client/observation/services/lipid-panel.js +13 -13
- package/dist/client/observation/services/single-value-services.d.ts +1 -1
- package/dist/client/observation/services/single-value-services.js +19 -19
- package/dist/client/observation/services/step-count.d.ts +1 -1
- package/dist/client/observation/services/step-count.js +5 -5
- package/dist/client/observation/services/uric-acid-service.d.ts +1 -1
- package/dist/client/observation/services/uric-acid-service.js +7 -7
- package/dist/client/offline/offline-measurement-queue.d.ts +1 -2
- package/dist/client/signals/methods.d.ts +2 -23
- package/dist/client/signals/methods.js +10 -93
- package/dist/client/signals/types.d.ts +6 -132
- package/dist/client/wearables/types.d.ts +5 -0
- package/dist/conformance/api-requirements.js +2 -9
- package/dist/conformance/capability-requirements.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +1 -9
- package/dist/hooks/notification-invalidation.d.ts +0 -7
- package/dist/hooks/signals-hooks.d.ts +2 -23
- package/dist/hooks/signals-hooks.js +1 -15
- package/dist/next/auth/access-token.d.ts +9 -0
- package/dist/next/auth/access-token.js +18 -0
- package/dist/next/auth/client-credentials.d.ts +16 -0
- package/dist/next/auth/client-credentials.js +40 -0
- package/dist/next/auth/credentials.d.ts +5 -0
- package/dist/next/auth/credentials.js +7 -0
- package/dist/next/auth/saved-accounts-store.d.ts +26 -0
- package/dist/next/auth/saved-accounts-store.js +93 -0
- package/dist/next/auth/session-store.d.ts +12 -0
- package/dist/next/auth/session-store.js +33 -0
- package/dist/next/auth/session.d.ts +28 -0
- package/dist/next/auth/session.js +27 -0
- package/dist/next/auth/token-endpoint.d.ts +12 -0
- package/dist/next/auth/token-endpoint.js +28 -0
- package/dist/next/auth/user-session.d.ts +39 -0
- package/dist/next/auth/user-session.js +183 -0
- package/dist/next/config/ovok-config.d.ts +42 -0
- package/dist/next/config/ovok-config.js +2 -0
- package/dist/next/config/settings.d.ts +6 -0
- package/dist/next/config/settings.js +74 -0
- package/dist/next/errors/error-from-response.d.ts +2 -0
- package/dist/next/errors/error-from-response.js +35 -0
- package/dist/next/errors/ovok-account-error.d.ts +5 -0
- package/dist/next/errors/ovok-account-error.js +13 -0
- package/dist/next/errors/ovok-errors.d.ts +42 -0
- package/dist/next/errors/ovok-errors.js +74 -0
- package/dist/next/http/http-client.d.ts +36 -0
- package/dist/next/http/http-client.js +116 -0
- package/dist/next/http/retry-after.d.ts +1 -0
- package/dist/next/http/retry-after.js +16 -0
- package/dist/next/http/retry-policy.d.ts +13 -0
- package/dist/next/http/retry-policy.js +27 -0
- package/dist/next/http/transmit.d.ts +14 -0
- package/dist/next/http/transmit.js +57 -0
- package/dist/next/http/url.d.ts +6 -0
- package/dist/next/http/url.js +22 -0
- package/dist/next/index.d.ts +77 -0
- package/dist/next/index.js +35 -0
- package/dist/next/ovok.d.ts +56 -0
- package/dist/next/ovok.js +86 -0
- package/dist/next/paging/bundle-page.d.ts +4 -0
- package/dist/next/paging/bundle-page.js +25 -0
- package/dist/next/paging/cursor-pages.d.ts +7 -0
- package/dist/next/paging/cursor-pages.js +14 -0
- package/dist/next/paging/numbered-pages.d.ts +15 -0
- package/dist/next/paging/numbered-pages.js +20 -0
- package/dist/next/paging/page.d.ts +12 -0
- package/dist/next/paging/page.js +17 -0
- package/dist/next/react/context.d.ts +4 -0
- package/dist/{hooks/signals-alert-item-hooks.js → next/react/context.js} +10 -26
- package/dist/next/react/index.d.ts +14 -0
- package/dist/next/react/index.js +68 -0
- package/dist/next/react/query-hooks.d.ts +31 -0
- package/dist/next/react/query-hooks.js +160 -0
- package/dist/next/resources/accounts/accounts-resource.d.ts +8 -0
- package/dist/next/resources/accounts/accounts-resource.js +13 -0
- package/dist/next/resources/ai/ai-chat-resource.d.ts +8 -0
- package/dist/next/resources/ai/ai-chat-resource.js +12 -0
- package/dist/next/resources/ai/ai-resource.d.ts +16 -0
- package/dist/next/resources/ai/ai-resource.js +19 -0
- package/dist/next/resources/ai/chat-messages-resource.d.ts +9 -0
- package/dist/next/resources/ai/chat-messages-resource.js +18 -0
- package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
- package/dist/next/resources/ai/chat-sessions-resource.js +23 -0
- package/dist/next/resources/auth/auth-sessions-resource.d.ts +13 -0
- package/dist/next/resources/auth/auth-sessions-resource.js +25 -0
- package/dist/next/resources/auth/registration.d.ts +35 -0
- package/dist/next/resources/auth/registration.js +24 -0
- package/dist/next/resources/auth/social-login.d.ts +8 -0
- package/dist/next/resources/auth/social-login.js +7 -0
- package/dist/next/resources/auth-resource.d.ts +63 -0
- package/dist/next/resources/auth-resource.js +119 -0
- package/dist/next/resources/bots/bots-resource.d.ts +10 -0
- package/dist/next/resources/bots/bots-resource.js +15 -0
- package/dist/next/resources/cms/cms-delivery.d.ts +22 -0
- package/dist/next/resources/cms/cms-delivery.js +36 -0
- package/dist/next/resources/cms/cms-documents-resource.d.ts +11 -0
- package/dist/next/resources/cms/cms-documents-resource.js +17 -0
- package/dist/next/resources/cms/cms-resource.d.ts +17 -0
- package/dist/next/resources/cms/cms-resource.js +38 -0
- package/dist/next/resources/cms/payload-pages.d.ts +6 -0
- package/dist/next/resources/cms/payload-pages.js +15 -0
- package/dist/next/resources/cms/release-notes-resource.d.ts +10 -0
- package/dist/next/resources/cms/release-notes-resource.js +15 -0
- package/dist/next/resources/cms/translation-tree.d.ts +3 -0
- package/dist/next/resources/cms/translation-tree.js +45 -0
- package/dist/next/resources/consent/consent-resource.d.ts +23 -0
- package/dist/next/resources/consent/consent-resource.js +43 -0
- package/dist/next/resources/content/content-resource.d.ts +19 -0
- package/dist/next/resources/content/content-resource.js +41 -0
- package/dist/next/resources/documents/documents-resource.d.ts +26 -0
- package/dist/next/resources/documents/documents-resource.js +41 -0
- package/dist/next/resources/email/email-resource.d.ts +6 -0
- package/dist/next/resources/email/email-resource.js +10 -0
- package/dist/next/resources/email/email-templates-resource.d.ts +8 -0
- package/dist/next/resources/email/email-templates-resource.js +13 -0
- package/dist/next/resources/fhir-resource.d.ts +28 -0
- package/dist/next/resources/fhir-resource.js +64 -0
- package/dist/next/resources/health-resource.d.ts +17 -0
- package/dist/next/resources/health-resource.js +14 -0
- package/dist/next/resources/invites/invite-flow-resource.d.ts +12 -0
- package/dist/next/resources/invites/invite-flow-resource.js +19 -0
- package/dist/next/resources/invites/invites-resource.d.ts +22 -0
- package/dist/next/resources/invites/invites-resource.js +29 -0
- package/dist/next/resources/localization/i18next-resource.d.ts +10 -0
- package/dist/next/resources/localization/i18next-resource.js +18 -0
- package/dist/next/resources/localization/locales-resource.d.ts +9 -0
- package/dist/next/resources/localization/locales-resource.js +16 -0
- package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
- package/dist/next/resources/localization/localizations-resource.js +27 -0
- package/dist/next/resources/measurements/measurements-resource.d.ts +58 -0
- package/dist/next/resources/measurements/measurements-resource.js +98 -0
- package/dist/next/resources/measurements/observation-builder.d.ts +5 -0
- package/dist/next/resources/measurements/observation-builder.js +57 -0
- package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +22 -0
- package/dist/next/resources/measurements/offline-measurement-queue-types.js +2 -0
- package/dist/next/resources/measurements/offline-measurement-queue.d.ts +25 -0
- package/dist/next/resources/measurements/offline-measurement-queue.js +154 -0
- package/dist/next/resources/measurements/save-error.d.ts +5 -0
- package/dist/next/resources/measurements/save-error.js +18 -0
- package/dist/next/resources/measurements/signed-in-account.d.ts +11 -0
- package/dist/next/resources/measurements/signed-in-account.js +26 -0
- package/dist/next/resources/patient/fhir-records.d.ts +19 -0
- package/dist/next/resources/patient/fhir-records.js +33 -0
- package/dist/next/resources/patient/patient-resource.d.ts +21 -0
- package/dist/next/resources/patient/patient-resource.js +38 -0
- package/dist/next/resources/projects/project-features-resource.d.ts +9 -0
- package/dist/next/resources/projects/project-features-resource.js +17 -0
- package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
- package/dist/next/resources/projects/project-members-resource.js +25 -0
- package/dist/next/resources/projects/project-settings-resource.d.ts +10 -0
- package/dist/next/resources/projects/project-settings-resource.js +21 -0
- package/dist/next/resources/projects/projects-resource.d.ts +20 -0
- package/dist/next/resources/projects/projects-resource.js +21 -0
- package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +18 -0
- package/dist/next/resources/questionnaires/questionnaires-resource.js +36 -0
- package/dist/next/resources/realtime/realtime-binding.d.ts +7 -0
- package/dist/next/resources/realtime/realtime-binding.js +44 -0
- package/dist/next/resources/realtime/realtime-connection.d.ts +38 -0
- package/dist/next/resources/realtime/realtime-connection.js +167 -0
- package/dist/next/resources/realtime/realtime-resource.d.ts +13 -0
- package/dist/next/resources/realtime/realtime-resource.js +39 -0
- package/dist/next/resources/realtime/realtime-socket.d.ts +23 -0
- package/dist/next/resources/realtime/realtime-socket.js +152 -0
- package/dist/next/resources/realtime/realtime-types.d.ts +6 -0
- package/dist/next/resources/realtime/realtime-types.js +2 -0
- package/dist/next/resources/session/saved-accounts-resource.d.ts +13 -0
- package/dist/next/resources/session/saved-accounts-resource.js +44 -0
- package/dist/next/resources/session/session-resource.d.ts +12 -0
- package/dist/next/resources/session/session-resource.js +19 -0
- package/dist/next/resources/sharing/sharing-invites-resource.d.ts +9 -0
- package/dist/next/resources/sharing/sharing-invites-resource.js +17 -0
- package/dist/next/resources/sharing/sharing-resource.d.ts +10 -0
- package/dist/next/resources/sharing/sharing-resource.js +14 -0
- package/dist/next/resources/sharing/sharing-settings-resource.d.ts +9 -0
- package/dist/next/resources/sharing/sharing-settings-resource.js +16 -0
- package/dist/next/resources/sharing/sharing-shares-resource.d.ts +9 -0
- package/dist/next/resources/sharing/sharing-shares-resource.js +27 -0
- package/dist/next/resources/signals/signals-gateway-resource.d.ts +14 -0
- package/dist/next/resources/signals/signals-gateway-resource.js +44 -0
- package/dist/next/resources/signals/signals-resource.d.ts +13 -0
- package/dist/next/resources/signals/signals-resource.js +19 -0
- package/dist/next/resources/signals/undeliverable-resource.d.ts +26 -0
- package/dist/next/resources/signals/undeliverable-resource.js +18 -0
- package/dist/next/resources/slim/live-reads.d.ts +13 -0
- package/dist/next/resources/slim/live-reads.js +87 -0
- package/dist/next/resources/slim/slim-alarms-resource.d.ts +13 -0
- package/dist/next/resources/slim/slim-alarms-resource.js +25 -0
- package/dist/next/resources/slim/slim-change-history-resource.d.ts +9 -0
- package/dist/next/resources/slim/slim-change-history-resource.js +19 -0
- package/dist/next/resources/slim/slim-child-projects-resource.d.ts +17 -0
- package/dist/next/resources/slim/slim-child-projects-resource.js +22 -0
- package/dist/next/resources/slim/slim-devices-resource.d.ts +29 -0
- package/dist/next/resources/slim/slim-devices-resource.js +81 -0
- package/dist/next/resources/slim/slim-exports-resource.d.ts +8 -0
- package/dist/next/resources/slim/slim-exports-resource.js +14 -0
- package/dist/next/resources/slim/slim-locations-resource.d.ts +14 -0
- package/dist/next/resources/slim/slim-locations-resource.js +30 -0
- package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +18 -0
- package/dist/next/resources/slim/slim-medical-notifications-resource.js +46 -0
- package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-notification-notes-resource.js +34 -0
- package/dist/next/resources/slim/slim-notifications-resource.d.ts +19 -0
- package/dist/next/resources/slim/slim-notifications-resource.js +26 -0
- package/dist/next/resources/slim/slim-organizations-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-organizations-resource.js +25 -0
- package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +13 -0
- package/dist/next/resources/slim/slim-out-of-bed-resource.js +20 -0
- package/dist/next/resources/slim/slim-paths.d.ts +6 -0
- package/dist/next/resources/slim/slim-paths.js +9 -0
- package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +10 -0
- package/dist/next/resources/slim/slim-patient-thresholds-resource.js +20 -0
- package/dist/next/resources/slim/slim-patients-resource.d.ts +20 -0
- package/dist/next/resources/slim/slim-patients-resource.js +39 -0
- package/dist/next/resources/slim/slim-policies-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-policies-resource.js +29 -0
- package/dist/next/resources/slim/slim-practitioners-resource.d.ts +8 -0
- package/dist/next/resources/slim/slim-practitioners-resource.js +14 -0
- package/dist/next/resources/slim/slim-projects-resource.d.ts +16 -0
- package/dist/next/resources/slim/slim-projects-resource.js +35 -0
- package/dist/next/resources/slim/slim-queries.d.ts +34 -0
- package/dist/next/resources/slim/slim-queries.js +2 -0
- package/dist/next/resources/slim/slim-resource.d.ts +39 -0
- package/dist/next/resources/slim/slim-resource.js +44 -0
- package/dist/next/resources/slim/slim-sleep-resource.d.ts +9 -0
- package/dist/next/resources/slim/slim-sleep-resource.js +15 -0
- package/dist/next/resources/slim/slim-thresholds-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-thresholds-resource.js +18 -0
- package/dist/next/resources/slim/slim-trends-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-trends-resource.js +19 -0
- package/dist/next/resources/slim/slim-users-resource.d.ts +11 -0
- package/dist/next/resources/slim/slim-users-resource.js +15 -0
- package/dist/next/resources/slim/slim-zones-resource.d.ts +12 -0
- package/dist/next/resources/slim/slim-zones-resource.js +24 -0
- package/dist/next/resources/video-calls/video-call-access-resource.d.ts +11 -0
- package/dist/next/resources/video-calls/video-call-access-resource.js +19 -0
- package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +10 -0
- package/dist/next/resources/video-calls/video-call-appointments-resource.js +21 -0
- package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +10 -0
- package/dist/next/resources/video-calls/video-call-emails-resource.js +19 -0
- package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
- package/dist/next/resources/video-calls/video-calls-resource.js +20 -0
- package/dist/next/resources/wearables/wearable-connections-resource.d.ts +12 -0
- package/dist/next/resources/wearables/wearable-connections-resource.js +25 -0
- package/dist/next/resources/wearables/wearable-providers-resource.d.ts +12 -0
- package/dist/next/resources/wearables/wearable-providers-resource.js +27 -0
- package/dist/next/resources/wearables/wearables-resource.d.ts +8 -0
- package/dist/next/resources/wearables/wearables-resource.js +14 -0
- package/dist/next/storage/ovok-storage.d.ts +11 -0
- package/dist/next/storage/ovok-storage.js +19 -0
- package/dist/types/MeasurementTypes.d.ts +5 -0
- package/dist/types/MeasurementTypes.js +21 -0
- package/dist/types/index.d.ts +1 -5
- package/dist/types/index.js +1 -5
- package/next/index.d.ts +1 -0
- package/next/index.js +3 -0
- package/next/react/index.d.ts +1 -0
- package/next/react/index.js +1 -0
- package/package.json +14 -2
- package/dist/hooks/signals-alert-hooks.d.ts +0 -22
- package/dist/hooks/signals-alert-hooks.js +0 -166
- package/dist/hooks/signals-alert-item-hooks.d.ts +0 -19
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CreateNotificationNote, NotificationNote, NotificationNotes, NotificationTargetKind, UpdateNotificationNote } from "../../../client/notifications/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
export declare class SlimNotificationNotesResource {
|
|
5
|
+
private readonly http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
list(kind: NotificationTargetKind, targetId: string, options?: RequestOptions): Promise<NotificationNotes>;
|
|
8
|
+
create(body: CreateNotificationNote, options?: RequestOptions): Promise<NotificationNote>;
|
|
9
|
+
update(noteId: string, body: UpdateNotificationNote, options?: RequestOptions): Promise<NotificationNote>;
|
|
10
|
+
patch(noteId: string, body: UpdateNotificationNote, options?: RequestOptions): Promise<NotificationNote>;
|
|
11
|
+
delete(noteId: string, options?: RequestOptions): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimNotificationNotesResource = void 0;
|
|
4
|
+
const url_1 = require("../../http/url");
|
|
5
|
+
const slim_paths_1 = require("./slim-paths");
|
|
6
|
+
const NOTES_PATH = `${slim_paths_1.NOTIFICATIONS_PATH}/notes`;
|
|
7
|
+
const TARGET_SEGMENT = {
|
|
8
|
+
oob: "oob",
|
|
9
|
+
alarm: "alarms",
|
|
10
|
+
medical: "medical",
|
|
11
|
+
alert: "raw-alerts",
|
|
12
|
+
};
|
|
13
|
+
const notePath = (noteId) => `${NOTES_PATH}/${(0, url_1.pathSegment)(noteId)}`;
|
|
14
|
+
class SlimNotificationNotesResource {
|
|
15
|
+
constructor(http) {
|
|
16
|
+
this.http = http;
|
|
17
|
+
}
|
|
18
|
+
list(kind, targetId, options) {
|
|
19
|
+
return this.http.get(`${slim_paths_1.NOTIFICATIONS_PATH}/${TARGET_SEGMENT[kind]}/${(0, url_1.pathSegment)(targetId)}/notes`, options);
|
|
20
|
+
}
|
|
21
|
+
create(body, options) {
|
|
22
|
+
return this.http.post(NOTES_PATH, body, options);
|
|
23
|
+
}
|
|
24
|
+
update(noteId, body, options) {
|
|
25
|
+
return this.http.put(notePath(noteId), body, options);
|
|
26
|
+
}
|
|
27
|
+
patch(noteId, body, options) {
|
|
28
|
+
return this.http.patch(notePath(noteId), body, options);
|
|
29
|
+
}
|
|
30
|
+
delete(noteId, options) {
|
|
31
|
+
return this.http.delete(notePath(noteId), options);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.SlimNotificationNotesResource = SlimNotificationNotesResource;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SlimNotificationsQuery, SlimNotificationsResponse, SlimRecentNotificationsResponse } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
import { SlimAlarmsResource } from "./slim-alarms-resource";
|
|
5
|
+
import { SlimMedicalNotificationsResource } from "./slim-medical-notifications-resource";
|
|
6
|
+
import { SlimNotificationNotesResource } from "./slim-notification-notes-resource";
|
|
7
|
+
import { SlimOutOfBedResource } from "./slim-out-of-bed-resource";
|
|
8
|
+
import { SlimRecentQuery } from "./slim-queries";
|
|
9
|
+
export declare class SlimNotificationsResource {
|
|
10
|
+
private readonly http;
|
|
11
|
+
readonly alarms: SlimAlarmsResource;
|
|
12
|
+
readonly outOfBed: SlimOutOfBedResource;
|
|
13
|
+
readonly medical: SlimMedicalNotificationsResource;
|
|
14
|
+
readonly notes: SlimNotificationNotesResource;
|
|
15
|
+
constructor(http: HttpClient);
|
|
16
|
+
/** @deprecated Use outOfBed.list, alarms.list or medical.list. */
|
|
17
|
+
list(params?: SlimNotificationsQuery, options?: RequestOptions): Promise<SlimNotificationsResponse>;
|
|
18
|
+
recent(params?: SlimRecentQuery, options?: RequestOptions): Promise<SlimRecentNotificationsResponse>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimNotificationsResource = void 0;
|
|
4
|
+
const query_string_1 = require("../../../client/query-string");
|
|
5
|
+
const slim_alarms_resource_1 = require("./slim-alarms-resource");
|
|
6
|
+
const slim_medical_notifications_resource_1 = require("./slim-medical-notifications-resource");
|
|
7
|
+
const slim_notification_notes_resource_1 = require("./slim-notification-notes-resource");
|
|
8
|
+
const slim_out_of_bed_resource_1 = require("./slim-out-of-bed-resource");
|
|
9
|
+
const slim_paths_1 = require("./slim-paths");
|
|
10
|
+
class SlimNotificationsResource {
|
|
11
|
+
constructor(http) {
|
|
12
|
+
this.http = http;
|
|
13
|
+
this.alarms = new slim_alarms_resource_1.SlimAlarmsResource(http);
|
|
14
|
+
this.outOfBed = new slim_out_of_bed_resource_1.SlimOutOfBedResource(http);
|
|
15
|
+
this.medical = new slim_medical_notifications_resource_1.SlimMedicalNotificationsResource(http);
|
|
16
|
+
this.notes = new slim_notification_notes_resource_1.SlimNotificationNotesResource(http);
|
|
17
|
+
}
|
|
18
|
+
/** @deprecated Use outOfBed.list, alarms.list or medical.list. */
|
|
19
|
+
list(params = {}, options) {
|
|
20
|
+
return this.http.get(`${slim_paths_1.NOTIFICATIONS_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
21
|
+
}
|
|
22
|
+
recent(params = {}, options) {
|
|
23
|
+
return this.http.get(`${slim_paths_1.RECENT_NOTIFICATIONS_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.SlimNotificationsResource = SlimNotificationsResource;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SlimOrganization, SlimOrganizationInput } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
export declare class SlimOrganizationsResource {
|
|
5
|
+
private readonly http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
retrieve(organizationId: string, options?: RequestOptions): Promise<SlimOrganization>;
|
|
8
|
+
create(body: SlimOrganizationInput, options?: RequestOptions): Promise<SlimOrganization>;
|
|
9
|
+
update(organizationId: string, body: SlimOrganizationInput, options?: RequestOptions): Promise<SlimOrganization>;
|
|
10
|
+
delete(organizationId: string, options?: RequestOptions): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimOrganizationsResource = void 0;
|
|
4
|
+
const url_1 = require("../../http/url");
|
|
5
|
+
const slim_paths_1 = require("./slim-paths");
|
|
6
|
+
const ORGANIZATIONS_PATH = `${slim_paths_1.SLIM_PATH}/organization`;
|
|
7
|
+
const organizationPath = (organizationId) => `${ORGANIZATIONS_PATH}/${(0, url_1.pathSegment)(organizationId)}`;
|
|
8
|
+
class SlimOrganizationsResource {
|
|
9
|
+
constructor(http) {
|
|
10
|
+
this.http = http;
|
|
11
|
+
}
|
|
12
|
+
retrieve(organizationId, options) {
|
|
13
|
+
return this.http.get(organizationPath(organizationId), options);
|
|
14
|
+
}
|
|
15
|
+
create(body, options) {
|
|
16
|
+
return this.http.post(ORGANIZATIONS_PATH, body, options);
|
|
17
|
+
}
|
|
18
|
+
update(organizationId, body, options) {
|
|
19
|
+
return this.http.put(organizationPath(organizationId), body, options);
|
|
20
|
+
}
|
|
21
|
+
delete(organizationId, options) {
|
|
22
|
+
return this.http.delete(organizationPath(organizationId), options);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.SlimOrganizationsResource = SlimOrganizationsResource;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SlimRecentOutOfBed } from "../../../client/notifications/types";
|
|
2
|
+
import type { SlimNotificationsQuery, SlimNotificationsResponse } from "../../../client/slim/types";
|
|
3
|
+
import { HttpClient } from "../../http/http-client";
|
|
4
|
+
import { RequestOptions } from "../../http/transmit";
|
|
5
|
+
import { SlimRecentQuery } from "./slim-queries";
|
|
6
|
+
export type SlimOutOfBedQuery = Omit<SlimNotificationsQuery, "type">;
|
|
7
|
+
export declare class SlimOutOfBedResource {
|
|
8
|
+
private readonly http;
|
|
9
|
+
constructor(http: HttpClient);
|
|
10
|
+
/** Omitting status lists new and reviewed rows. */
|
|
11
|
+
list(params?: SlimOutOfBedQuery, options?: RequestOptions): Promise<SlimNotificationsResponse>;
|
|
12
|
+
recent(params?: SlimRecentQuery, options?: RequestOptions): Promise<SlimRecentOutOfBed>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimOutOfBedResource = void 0;
|
|
4
|
+
const query_string_1 = require("../../../client/query-string");
|
|
5
|
+
const slim_paths_1 = require("./slim-paths");
|
|
6
|
+
const OUT_OF_BED_PATH = `${slim_paths_1.NOTIFICATIONS_PATH}/oob`;
|
|
7
|
+
const RECENT_OUT_OF_BED_PATH = `${slim_paths_1.RECENT_NOTIFICATIONS_PATH}/oob`;
|
|
8
|
+
class SlimOutOfBedResource {
|
|
9
|
+
constructor(http) {
|
|
10
|
+
this.http = http;
|
|
11
|
+
}
|
|
12
|
+
/** Omitting status lists new and reviewed rows. */
|
|
13
|
+
list(params = {}, options) {
|
|
14
|
+
return this.http.get(`${OUT_OF_BED_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
15
|
+
}
|
|
16
|
+
recent(params = {}, options) {
|
|
17
|
+
return this.http.get(`${RECENT_OUT_OF_BED_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.SlimOutOfBedResource = SlimOutOfBedResource;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const SLIM_PATH = "v1/slim";
|
|
2
|
+
export declare const SLIM_V2_PATH = "v2/slim";
|
|
3
|
+
export declare const NOTIFICATIONS_PATH = "v1/slim/notifications";
|
|
4
|
+
export declare const RECENT_NOTIFICATIONS_PATH = "v1/slim/notifications/recent";
|
|
5
|
+
export declare const THRESHOLD_V2_PATH = "v2/slim/threshold";
|
|
6
|
+
export declare const PROJECT_PATH = "v1/slim/project";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PROJECT_PATH = exports.THRESHOLD_V2_PATH = exports.RECENT_NOTIFICATIONS_PATH = exports.NOTIFICATIONS_PATH = exports.SLIM_V2_PATH = exports.SLIM_PATH = void 0;
|
|
4
|
+
exports.SLIM_PATH = "v1/slim";
|
|
5
|
+
exports.SLIM_V2_PATH = "v2/slim";
|
|
6
|
+
exports.NOTIFICATIONS_PATH = `${exports.SLIM_PATH}/notifications`;
|
|
7
|
+
exports.RECENT_NOTIFICATIONS_PATH = `${exports.NOTIFICATIONS_PATH}/recent`;
|
|
8
|
+
exports.THRESHOLD_V2_PATH = `${exports.SLIM_V2_PATH}/threshold`;
|
|
9
|
+
exports.PROJECT_PATH = `${exports.SLIM_PATH}/project`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SlimPatientThresholdV2, SlimThresholdV2Update } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
export declare class SlimPatientThresholdsResource {
|
|
5
|
+
private readonly http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
retrieve(patientId: string, options?: RequestOptions): Promise<SlimPatientThresholdV2>;
|
|
8
|
+
/** Never retried: a 409 means another save for this resident is running and nothing changed. */
|
|
9
|
+
update(patientId: string, body: SlimThresholdV2Update, options?: RequestOptions): Promise<SlimPatientThresholdV2>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimPatientThresholdsResource = void 0;
|
|
4
|
+
const url_1 = require("../../http/url");
|
|
5
|
+
const slim_paths_1 = require("./slim-paths");
|
|
6
|
+
const PATIENT_THRESHOLDS_PATH = `${slim_paths_1.THRESHOLD_V2_PATH}/patient`;
|
|
7
|
+
const patientThresholdPath = (patientId) => `${PATIENT_THRESHOLDS_PATH}/${(0, url_1.pathSegment)(patientId)}`;
|
|
8
|
+
class SlimPatientThresholdsResource {
|
|
9
|
+
constructor(http) {
|
|
10
|
+
this.http = http;
|
|
11
|
+
}
|
|
12
|
+
retrieve(patientId, options) {
|
|
13
|
+
return this.http.get(patientThresholdPath(patientId), options);
|
|
14
|
+
}
|
|
15
|
+
/** Never retried: a 409 means another save for this resident is running and nothing changed. */
|
|
16
|
+
update(patientId, body, options) {
|
|
17
|
+
return this.http.send({ method: "PUT", path: patientThresholdPath(patientId), body, idempotent: false }, options);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.SlimPatientThresholdsResource = SlimPatientThresholdsResource;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SlimCreatePatient, SlimPatient, SlimPatientListItem, SlimPatientListQuery, SlimUpdatePatient } from "../../../client/slim/types";
|
|
2
|
+
import type { Bundle, Resource } from "@medplum/fhirtypes";
|
|
3
|
+
import { HttpClient } from "../../http/http-client";
|
|
4
|
+
import { RequestOptions } from "../../http/transmit";
|
|
5
|
+
import { PagePromise } from "../../paging/page";
|
|
6
|
+
import { SlimPatientThresholdsResource } from "./slim-patient-thresholds-resource";
|
|
7
|
+
export declare class SlimPatientsResource {
|
|
8
|
+
private readonly http;
|
|
9
|
+
readonly thresholds: SlimPatientThresholdsResource;
|
|
10
|
+
constructor(http: HttpClient);
|
|
11
|
+
list(params?: SlimPatientListQuery, options?: RequestOptions): PagePromise<SlimPatientListItem>;
|
|
12
|
+
retrieve(patientId: string, options?: RequestOptions): Promise<SlimPatient>;
|
|
13
|
+
create(body: SlimCreatePatient, options?: RequestOptions): Promise<SlimPatient>;
|
|
14
|
+
/** Replaces the editable fields: omitting locationId unassigns the resident's devices. */
|
|
15
|
+
update(patientId: string, body: SlimUpdatePatient, options?: RequestOptions): Promise<SlimPatient>;
|
|
16
|
+
/** 409 while the resident has a device: unassign it first with an update that omits locationId. */
|
|
17
|
+
delete(patientId: string, options?: RequestOptions): Promise<void>;
|
|
18
|
+
everything(patientId: string, options?: RequestOptions): Promise<Bundle<Resource>>;
|
|
19
|
+
currentVitals(patientId: string, options?: RequestOptions): Promise<Record<string, unknown>>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimPatientsResource = void 0;
|
|
4
|
+
const url_1 = require("../../http/url");
|
|
5
|
+
const numbered_pages_1 = require("../../paging/numbered-pages");
|
|
6
|
+
const slim_paths_1 = require("./slim-paths");
|
|
7
|
+
const slim_patient_thresholds_resource_1 = require("./slim-patient-thresholds-resource");
|
|
8
|
+
const PATIENTS_PATH = `${slim_paths_1.SLIM_PATH}/patient`;
|
|
9
|
+
const patientPath = (patientId) => `${PATIENTS_PATH}/${(0, url_1.pathSegment)(patientId)}`;
|
|
10
|
+
class SlimPatientsResource {
|
|
11
|
+
constructor(http) {
|
|
12
|
+
this.http = http;
|
|
13
|
+
this.thresholds = new slim_patient_thresholds_resource_1.SlimPatientThresholdsResource(http);
|
|
14
|
+
}
|
|
15
|
+
list(params = {}, options) {
|
|
16
|
+
return (0, numbered_pages_1.numberedRoutePages)((path) => this.http.get(path, options), PATIENTS_PATH, params);
|
|
17
|
+
}
|
|
18
|
+
retrieve(patientId, options) {
|
|
19
|
+
return this.http.get(patientPath(patientId), options);
|
|
20
|
+
}
|
|
21
|
+
create(body, options) {
|
|
22
|
+
return this.http.post(PATIENTS_PATH, body, options);
|
|
23
|
+
}
|
|
24
|
+
/** Replaces the editable fields: omitting locationId unassigns the resident's devices. */
|
|
25
|
+
update(patientId, body, options) {
|
|
26
|
+
return this.http.put(patientPath(patientId), body, options);
|
|
27
|
+
}
|
|
28
|
+
/** 409 while the resident has a device: unassign it first with an update that omits locationId. */
|
|
29
|
+
delete(patientId, options) {
|
|
30
|
+
return this.http.delete(patientPath(patientId), options);
|
|
31
|
+
}
|
|
32
|
+
everything(patientId, options) {
|
|
33
|
+
return this.http.get(`${patientPath(patientId)}/$everything`, options);
|
|
34
|
+
}
|
|
35
|
+
currentVitals(patientId, options) {
|
|
36
|
+
return this.http.get(`${patientPath(patientId)}/current-vitals`, options);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.SlimPatientsResource = SlimPatientsResource;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SlimCreatePolicy, SlimPolicyList, SlimPolicyListQuery, SlimPolicyResponse, SlimUpdatePolicy } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
export declare class SlimPoliciesResource {
|
|
5
|
+
private readonly http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
list(params?: SlimPolicyListQuery, options?: RequestOptions): Promise<SlimPolicyList>;
|
|
8
|
+
retrieve(policyId: string, options?: RequestOptions): Promise<SlimPolicyResponse>;
|
|
9
|
+
create(body: SlimCreatePolicy, options?: RequestOptions): Promise<SlimPolicyResponse>;
|
|
10
|
+
update(policyId: string, body: SlimUpdatePolicy, options?: RequestOptions): Promise<SlimPolicyResponse>;
|
|
11
|
+
delete(policyId: string, options?: RequestOptions): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimPoliciesResource = void 0;
|
|
4
|
+
const query_string_1 = require("../../../client/query-string");
|
|
5
|
+
const url_1 = require("../../http/url");
|
|
6
|
+
const slim_paths_1 = require("./slim-paths");
|
|
7
|
+
const POLICIES_PATH = `${slim_paths_1.SLIM_PATH}/policy`;
|
|
8
|
+
const policyPath = (policyId) => `${POLICIES_PATH}/${(0, url_1.pathSegment)(policyId)}`;
|
|
9
|
+
class SlimPoliciesResource {
|
|
10
|
+
constructor(http) {
|
|
11
|
+
this.http = http;
|
|
12
|
+
}
|
|
13
|
+
list(params = {}, options) {
|
|
14
|
+
return this.http.get(`${POLICIES_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
15
|
+
}
|
|
16
|
+
retrieve(policyId, options) {
|
|
17
|
+
return this.http.get(policyPath(policyId), options);
|
|
18
|
+
}
|
|
19
|
+
create(body, options) {
|
|
20
|
+
return this.http.post(POLICIES_PATH, body, options);
|
|
21
|
+
}
|
|
22
|
+
update(policyId, body, options) {
|
|
23
|
+
return this.http.put(policyPath(policyId), body, options);
|
|
24
|
+
}
|
|
25
|
+
delete(policyId, options) {
|
|
26
|
+
return this.http.delete(policyPath(policyId), options);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.SlimPoliciesResource = SlimPoliciesResource;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SlimPractitionerInviteInput, SlimPractitionerInviteResponse } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
export declare class SlimPractitionersResource {
|
|
5
|
+
private readonly http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
invite(body: SlimPractitionerInviteInput, options?: RequestOptions): Promise<SlimPractitionerInviteResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimPractitionersResource = void 0;
|
|
4
|
+
const slim_paths_1 = require("./slim-paths");
|
|
5
|
+
const INVITE_PRACTITIONER_PATH = `${slim_paths_1.SLIM_PATH}/invite/practitioner`;
|
|
6
|
+
class SlimPractitionersResource {
|
|
7
|
+
constructor(http) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
}
|
|
10
|
+
invite(body, options) {
|
|
11
|
+
return this.http.post(INVITE_PRACTITIONER_PATH, body, options);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.SlimPractitionersResource = SlimPractitionersResource;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SlimChildProjectInput, SlimProject, SlimProjectDeviceCounts, SlimProjectPatientCounts, SlimProjectUser, SlimProjectUsersQuery } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
import { PagePromise } from "../../paging/page";
|
|
5
|
+
import { SlimChildProjectsResource } from "./slim-child-projects-resource";
|
|
6
|
+
export declare class SlimProjectsResource {
|
|
7
|
+
private readonly http;
|
|
8
|
+
readonly children: SlimChildProjectsResource;
|
|
9
|
+
constructor(http: HttpClient);
|
|
10
|
+
retrieve(projectId: string, options?: RequestOptions): Promise<SlimProject>;
|
|
11
|
+
update(projectId: string, body: SlimChildProjectInput, options?: RequestOptions): Promise<SlimProject>;
|
|
12
|
+
users(projectId: string, params?: SlimProjectUsersQuery, options?: RequestOptions): PagePromise<SlimProjectUser>;
|
|
13
|
+
currentUsers(params?: SlimProjectUsersQuery, options?: RequestOptions): PagePromise<SlimProjectUser>;
|
|
14
|
+
deviceCounts(projectId: string, options?: RequestOptions): Promise<SlimProjectDeviceCounts>;
|
|
15
|
+
patientCounts(projectId: string, options?: RequestOptions): Promise<SlimProjectPatientCounts>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimProjectsResource = void 0;
|
|
4
|
+
const url_1 = require("../../http/url");
|
|
5
|
+
const numbered_pages_1 = require("../../paging/numbered-pages");
|
|
6
|
+
const slim_child_projects_resource_1 = require("./slim-child-projects-resource");
|
|
7
|
+
const slim_paths_1 = require("./slim-paths");
|
|
8
|
+
const USERS = "users";
|
|
9
|
+
const CURRENT_USERS_PATH = `${slim_paths_1.PROJECT_PATH}/${USERS}`;
|
|
10
|
+
const projectPath = (projectId) => `${slim_paths_1.PROJECT_PATH}/${(0, url_1.pathSegment)(projectId)}`;
|
|
11
|
+
class SlimProjectsResource {
|
|
12
|
+
constructor(http) {
|
|
13
|
+
this.http = http;
|
|
14
|
+
this.children = new slim_child_projects_resource_1.SlimChildProjectsResource(http);
|
|
15
|
+
}
|
|
16
|
+
retrieve(projectId, options) {
|
|
17
|
+
return this.http.get(projectPath(projectId), options);
|
|
18
|
+
}
|
|
19
|
+
update(projectId, body, options) {
|
|
20
|
+
return this.http.put(projectPath(projectId), body, options);
|
|
21
|
+
}
|
|
22
|
+
users(projectId, params = {}, options) {
|
|
23
|
+
return (0, numbered_pages_1.numberedRoutePages)((path) => this.http.get(path, options), `${projectPath(projectId)}/${USERS}`, params);
|
|
24
|
+
}
|
|
25
|
+
currentUsers(params = {}, options) {
|
|
26
|
+
return (0, numbered_pages_1.numberedRoutePages)((path) => this.http.get(path, options), CURRENT_USERS_PATH, params);
|
|
27
|
+
}
|
|
28
|
+
deviceCounts(projectId, options) {
|
|
29
|
+
return this.http.get(`${projectPath(projectId)}/device-counts`, options);
|
|
30
|
+
}
|
|
31
|
+
patientCounts(projectId, options) {
|
|
32
|
+
return this.http.get(`${projectPath(projectId)}/patient-counts`, options);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.SlimProjectsResource = SlimProjectsResource;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SlimGraphType, SlimHistoricalGraphType } from "../../../client/slim/types";
|
|
2
|
+
export type SlimRecentQuery = {
|
|
3
|
+
count?: number;
|
|
4
|
+
};
|
|
5
|
+
export type SlimTrendsQuery = {
|
|
6
|
+
patientId: string;
|
|
7
|
+
startDate: string;
|
|
8
|
+
endDate: string;
|
|
9
|
+
graphType: SlimHistoricalGraphType | readonly SlimHistoricalGraphType[];
|
|
10
|
+
};
|
|
11
|
+
export type SlimRealtimeTrendsQuery = {
|
|
12
|
+
patientId: string;
|
|
13
|
+
startTime: string;
|
|
14
|
+
endTime: string;
|
|
15
|
+
graphType: SlimGraphType | readonly SlimGraphType[];
|
|
16
|
+
};
|
|
17
|
+
export type SlimSleepStatisticsQuery = {
|
|
18
|
+
endDate: string;
|
|
19
|
+
lastDayCount?: number;
|
|
20
|
+
patientId: string;
|
|
21
|
+
};
|
|
22
|
+
export type SlimZoneListQuery = {
|
|
23
|
+
page?: number;
|
|
24
|
+
count?: number;
|
|
25
|
+
sortBy?: string;
|
|
26
|
+
orderBy?: "ASC" | "DESC";
|
|
27
|
+
search?: string;
|
|
28
|
+
};
|
|
29
|
+
export type SlimZoneDeviceCountsQuery = {
|
|
30
|
+
all?: boolean;
|
|
31
|
+
effectiveSleepStatus?: string;
|
|
32
|
+
includeUnassigned?: boolean;
|
|
33
|
+
includeEmpty?: boolean;
|
|
34
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SlimHealth } from "../../../client/slim/types";
|
|
2
|
+
import type { UserSession } from "../../auth/user-session";
|
|
3
|
+
import { HttpClient } from "../../http/http-client";
|
|
4
|
+
import { RequestOptions } from "../../http/transmit";
|
|
5
|
+
import { SlimChangeHistoryResource } from "./slim-change-history-resource";
|
|
6
|
+
import { SlimDevicesResource } from "./slim-devices-resource";
|
|
7
|
+
import { SlimExportsResource } from "./slim-exports-resource";
|
|
8
|
+
import { SlimLocationsResource } from "./slim-locations-resource";
|
|
9
|
+
import { SlimNotificationsResource } from "./slim-notifications-resource";
|
|
10
|
+
import { SlimOrganizationsResource } from "./slim-organizations-resource";
|
|
11
|
+
import { SlimPatientsResource } from "./slim-patients-resource";
|
|
12
|
+
import { SlimPoliciesResource } from "./slim-policies-resource";
|
|
13
|
+
import { SlimPractitionersResource } from "./slim-practitioners-resource";
|
|
14
|
+
import { SlimProjectsResource } from "./slim-projects-resource";
|
|
15
|
+
import { SlimSleepResource } from "./slim-sleep-resource";
|
|
16
|
+
import { SlimThresholdsResource } from "./slim-thresholds-resource";
|
|
17
|
+
import { SlimTrendsResource } from "./slim-trends-resource";
|
|
18
|
+
import { SlimUsersResource } from "./slim-users-resource";
|
|
19
|
+
import { SlimZonesResource } from "./slim-zones-resource";
|
|
20
|
+
export declare class SlimResource {
|
|
21
|
+
private readonly http;
|
|
22
|
+
readonly patients: SlimPatientsResource;
|
|
23
|
+
readonly devices: SlimDevicesResource;
|
|
24
|
+
readonly notifications: SlimNotificationsResource;
|
|
25
|
+
readonly thresholds: SlimThresholdsResource;
|
|
26
|
+
readonly trends: SlimTrendsResource;
|
|
27
|
+
readonly sleep: SlimSleepResource;
|
|
28
|
+
readonly locations: SlimLocationsResource;
|
|
29
|
+
readonly zones: SlimZonesResource;
|
|
30
|
+
readonly exports: SlimExportsResource;
|
|
31
|
+
readonly changeHistory: SlimChangeHistoryResource;
|
|
32
|
+
readonly projects: SlimProjectsResource;
|
|
33
|
+
readonly policies: SlimPoliciesResource;
|
|
34
|
+
readonly organizations: SlimOrganizationsResource;
|
|
35
|
+
readonly practitioners: SlimPractitionersResource;
|
|
36
|
+
readonly users: SlimUsersResource;
|
|
37
|
+
constructor(http: HttpClient, session?: UserSession | null);
|
|
38
|
+
health(options?: RequestOptions): Promise<SlimHealth>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimResource = void 0;
|
|
4
|
+
const slim_change_history_resource_1 = require("./slim-change-history-resource");
|
|
5
|
+
const slim_devices_resource_1 = require("./slim-devices-resource");
|
|
6
|
+
const slim_exports_resource_1 = require("./slim-exports-resource");
|
|
7
|
+
const slim_locations_resource_1 = require("./slim-locations-resource");
|
|
8
|
+
const slim_notifications_resource_1 = require("./slim-notifications-resource");
|
|
9
|
+
const slim_organizations_resource_1 = require("./slim-organizations-resource");
|
|
10
|
+
const slim_paths_1 = require("./slim-paths");
|
|
11
|
+
const slim_patients_resource_1 = require("./slim-patients-resource");
|
|
12
|
+
const slim_policies_resource_1 = require("./slim-policies-resource");
|
|
13
|
+
const slim_practitioners_resource_1 = require("./slim-practitioners-resource");
|
|
14
|
+
const slim_projects_resource_1 = require("./slim-projects-resource");
|
|
15
|
+
const slim_sleep_resource_1 = require("./slim-sleep-resource");
|
|
16
|
+
const slim_thresholds_resource_1 = require("./slim-thresholds-resource");
|
|
17
|
+
const slim_trends_resource_1 = require("./slim-trends-resource");
|
|
18
|
+
const slim_users_resource_1 = require("./slim-users-resource");
|
|
19
|
+
const slim_zones_resource_1 = require("./slim-zones-resource");
|
|
20
|
+
const HEALTH_PATH = `${slim_paths_1.SLIM_PATH}/health`;
|
|
21
|
+
class SlimResource {
|
|
22
|
+
constructor(http, session = null) {
|
|
23
|
+
this.http = http;
|
|
24
|
+
this.patients = new slim_patients_resource_1.SlimPatientsResource(http);
|
|
25
|
+
this.devices = new slim_devices_resource_1.SlimDevicesResource(http, session);
|
|
26
|
+
this.notifications = new slim_notifications_resource_1.SlimNotificationsResource(http);
|
|
27
|
+
this.thresholds = new slim_thresholds_resource_1.SlimThresholdsResource(http);
|
|
28
|
+
this.trends = new slim_trends_resource_1.SlimTrendsResource(http);
|
|
29
|
+
this.sleep = new slim_sleep_resource_1.SlimSleepResource(http);
|
|
30
|
+
this.locations = new slim_locations_resource_1.SlimLocationsResource(http);
|
|
31
|
+
this.zones = new slim_zones_resource_1.SlimZonesResource(http);
|
|
32
|
+
this.exports = new slim_exports_resource_1.SlimExportsResource(http);
|
|
33
|
+
this.changeHistory = new slim_change_history_resource_1.SlimChangeHistoryResource(http);
|
|
34
|
+
this.projects = new slim_projects_resource_1.SlimProjectsResource(http);
|
|
35
|
+
this.policies = new slim_policies_resource_1.SlimPoliciesResource(http);
|
|
36
|
+
this.organizations = new slim_organizations_resource_1.SlimOrganizationsResource(http);
|
|
37
|
+
this.practitioners = new slim_practitioners_resource_1.SlimPractitionersResource(http);
|
|
38
|
+
this.users = new slim_users_resource_1.SlimUsersResource(http);
|
|
39
|
+
}
|
|
40
|
+
health(options) {
|
|
41
|
+
return this.http.get(HEALTH_PATH, options);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.SlimResource = SlimResource;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SlimSleepStatistics } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
import { SlimSleepStatisticsQuery } from "./slim-queries";
|
|
5
|
+
export declare class SlimSleepResource {
|
|
6
|
+
private readonly http;
|
|
7
|
+
constructor(http: HttpClient);
|
|
8
|
+
statistics(params: SlimSleepStatisticsQuery, options?: RequestOptions): Promise<SlimSleepStatistics>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimSleepResource = void 0;
|
|
4
|
+
const query_string_1 = require("../../../client/query-string");
|
|
5
|
+
const slim_paths_1 = require("./slim-paths");
|
|
6
|
+
const SLEEP_STATISTICS_PATH = `${slim_paths_1.SLIM_PATH}/sleep/statistics`;
|
|
7
|
+
class SlimSleepResource {
|
|
8
|
+
constructor(http) {
|
|
9
|
+
this.http = http;
|
|
10
|
+
}
|
|
11
|
+
statistics(params, options) {
|
|
12
|
+
return this.http.get(`${SLEEP_STATISTICS_PATH}${(0, query_string_1.toQueryString)(params)}`, options);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.SlimSleepResource = SlimSleepResource;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SlimThresholdV2, SlimThresholdV2Update } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
export declare class SlimThresholdsResource {
|
|
5
|
+
private readonly http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
/** A home with no stored limits reads as the default template, not as unset. */
|
|
8
|
+
retrieve(options?: RequestOptions): Promise<SlimThresholdV2>;
|
|
9
|
+
/** Never retried: a 502 means Signals did not take every resident's limits and nothing was written. */
|
|
10
|
+
update(body: SlimThresholdV2Update, options?: RequestOptions): Promise<SlimThresholdV2>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimThresholdsResource = void 0;
|
|
4
|
+
const slim_paths_1 = require("./slim-paths");
|
|
5
|
+
class SlimThresholdsResource {
|
|
6
|
+
constructor(http) {
|
|
7
|
+
this.http = http;
|
|
8
|
+
}
|
|
9
|
+
/** A home with no stored limits reads as the default template, not as unset. */
|
|
10
|
+
retrieve(options) {
|
|
11
|
+
return this.http.get(slim_paths_1.THRESHOLD_V2_PATH, options);
|
|
12
|
+
}
|
|
13
|
+
/** Never retried: a 502 means Signals did not take every resident's limits and nothing was written. */
|
|
14
|
+
update(body, options) {
|
|
15
|
+
return this.http.send({ method: "PUT", path: slim_paths_1.THRESHOLD_V2_PATH, body, idempotent: false }, options);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.SlimThresholdsResource = SlimThresholdsResource;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SlimTrends } from "../../../client/slim/types";
|
|
2
|
+
import { HttpClient } from "../../http/http-client";
|
|
3
|
+
import { RequestOptions } from "../../http/transmit";
|
|
4
|
+
import { SlimRealtimeTrendsQuery, SlimTrendsQuery } from "./slim-queries";
|
|
5
|
+
export declare class SlimTrendsResource {
|
|
6
|
+
private readonly http;
|
|
7
|
+
constructor(http: HttpClient);
|
|
8
|
+
graphs(params: SlimTrendsQuery, options?: RequestOptions): Promise<SlimTrends>;
|
|
9
|
+
/** At most 20 calls per minute per caller: load once per view and wait retryAfterMs after a 503. */
|
|
10
|
+
realtime(params: SlimRealtimeTrendsQuery, options?: RequestOptions): Promise<SlimTrends>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlimTrendsResource = void 0;
|
|
4
|
+
const query_string_1 = require("../../../client/query-string");
|
|
5
|
+
const slim_paths_1 = require("./slim-paths");
|
|
6
|
+
const TRENDS_PATH = `${slim_paths_1.SLIM_PATH}/trends`;
|
|
7
|
+
class SlimTrendsResource {
|
|
8
|
+
constructor(http) {
|
|
9
|
+
this.http = http;
|
|
10
|
+
}
|
|
11
|
+
graphs(params, options) {
|
|
12
|
+
return this.http.get(`${TRENDS_PATH}/graphs${(0, query_string_1.toQueryString)(params)}`, options);
|
|
13
|
+
}
|
|
14
|
+
/** At most 20 calls per minute per caller: load once per view and wait retryAfterMs after a 503. */
|
|
15
|
+
realtime(params, options) {
|
|
16
|
+
return this.http.get(`${TRENDS_PATH}/realtime${(0, query_string_1.toQueryString)(params)}`, options);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.SlimTrendsResource = SlimTrendsResource;
|