@ovok/core 0.4.0 → 0.4.1

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
@@ -153,7 +153,7 @@ const slots = await client.listPatientSlots({
153
153
 
154
154
  ## CareHub APIs
155
155
 
156
- CareHub methods cover the verified `/v1/carehub/*` and `/v2/carehub/*` application routes for
156
+ CareHub methods cover the verified `/v1/slim/*` and `/v2/slim/*` application routes for
157
157
  patients, devices, telemetry, notifications, thresholds, trends, sleep, locations, zones, and
158
158
  PDF export. These routes require the backend's bearer session and CareHub permissions.
159
159
 
@@ -60,146 +60,146 @@ const query = (params) => {
60
60
  };
61
61
  const segment = (value) => encodeURIComponent(value);
62
62
  async function listCarehubPatients(params = {}) {
63
- return this.get(`/v1/carehub/patient${query(params)}`);
63
+ return this.get(`/v1/slim/patient${query(params)}`);
64
64
  }
65
65
  async function getCarehubPatient(patientId) {
66
- return this.get(`/v1/carehub/patient/${segment(patientId)}`);
66
+ return this.get(`/v1/slim/patient/${segment(patientId)}`);
67
67
  }
68
68
  async function getCarehubPatientEverything(patientId) {
69
- return this.get(`/v1/carehub/patient/${segment(patientId)}/$everything`);
69
+ return this.get(`/v1/slim/patient/${segment(patientId)}/$everything`);
70
70
  }
71
71
  async function getCarehubPatientCurrentVitals(patientId) {
72
- return this.get(`/v1/carehub/patient/${segment(patientId)}/current-vitals`);
72
+ return this.get(`/v1/slim/patient/${segment(patientId)}/current-vitals`);
73
73
  }
74
74
  async function createCarehubPatient(body) {
75
- return this.post("/v1/carehub/patient", body);
75
+ return this.post("/v1/slim/patient", body);
76
76
  }
77
77
  async function updateCarehubPatient(patientId, body) {
78
- return (await this.put(`/v1/carehub/patient/${segment(patientId)}`, body));
78
+ return (await this.put(`/v1/slim/patient/${segment(patientId)}`, body));
79
79
  }
80
80
  async function deleteCarehubPatient(patientId) {
81
- await this.delete(`/v1/carehub/patient/${segment(patientId)}`);
81
+ await this.delete(`/v1/slim/patient/${segment(patientId)}`);
82
82
  }
83
83
  async function listCarehubDevices(params = {}) {
84
- return this.get(`/v1/carehub/device${query(params)}`);
84
+ return this.get(`/v1/slim/device${query(params)}`);
85
85
  }
86
86
  async function getCarehubDevice(deviceId) {
87
- return this.get(`/v1/carehub/device/${segment(deviceId)}`);
87
+ return this.get(`/v1/slim/device/${segment(deviceId)}`);
88
88
  }
89
89
  async function createCarehubDevice(body) {
90
- return this.post("/v1/carehub/device", body);
90
+ return this.post("/v1/slim/device", body);
91
91
  }
92
92
  async function updateCarehubDevice(deviceId, body) {
93
- return (await this.put(`/v1/carehub/device/${segment(deviceId)}`, body));
93
+ return (await this.put(`/v1/slim/device/${segment(deviceId)}`, body));
94
94
  }
95
95
  async function deleteCarehubDevice(deviceId) {
96
- await this.delete(`/v1/carehub/device/${segment(deviceId)}`);
96
+ await this.delete(`/v1/slim/device/${segment(deviceId)}`);
97
97
  }
98
98
  async function assignCarehubDeviceToProject(body) {
99
- return (await this.put("/v1/carehub/device/assign/project", body));
99
+ return (await this.put("/v1/slim/device/assign/project", body));
100
100
  }
101
101
  async function listCarehubLiveDevices(params = {}) {
102
- return this.get(`/v1/carehub/device/live${query(params)}`);
102
+ return this.get(`/v1/slim/device/live${query(params)}`);
103
103
  }
104
104
  async function listCarehubLiveTelemetry(params = {}) {
105
- return this.get(`/v1/carehub/device/live/telemetry${query(params)}`);
105
+ return this.get(`/v1/slim/device/live/telemetry${query(params)}`);
106
106
  }
107
107
  async function getCarehubDeviceSleepStatus(deviceId) {
108
- return this.get(`/v1/carehub/device/live/cloudwatch/${segment(deviceId)}`);
108
+ return this.get(`/v1/slim/device/live/cloudwatch/${segment(deviceId)}`);
109
109
  }
110
110
  async function getCarehubDeviceTelemetry(deviceId) {
111
- return this.get(`/v1/carehub/telemetry/${segment(deviceId)}`);
111
+ return this.get(`/v1/slim/telemetry/${segment(deviceId)}`);
112
112
  }
113
113
  async function listCarehubEffectiveObservationIds() {
114
- return this.get("/v1/carehub/telemetry/effectiveIds");
114
+ return this.get("/v1/slim/telemetry/effectiveIds");
115
115
  }
116
116
  async function listCarehubLastObservationIds() {
117
- return this.get("/v1/carehub/telemetry/lastIds");
117
+ return this.get("/v1/slim/telemetry/lastIds");
118
118
  }
119
119
  async function getCarehubDeviceEffectiveObservationIds(deviceId) {
120
- return this.get(`/v1/carehub/telemetry/${segment(deviceId)}/effectiveIds`);
120
+ return this.get(`/v1/slim/telemetry/${segment(deviceId)}/effectiveIds`);
121
121
  }
122
122
  async function getCarehubDeviceLastObservationIds(deviceId) {
123
- return this.get(`/v1/carehub/telemetry/${segment(deviceId)}/lastIds`);
123
+ return this.get(`/v1/slim/telemetry/${segment(deviceId)}/lastIds`);
124
124
  }
125
125
  async function listCarehubNotifications(params = {}) {
126
- return this.get(`/v1/carehub/notifications${query(params)}`);
126
+ return this.get(`/v1/slim/notifications${query(params)}`);
127
127
  }
128
128
  async function getRecentCarehubNotifications(count) {
129
- return this.get(`/v1/carehub/notifications/recent${query({ count })}`);
129
+ return this.get(`/v1/slim/notifications/recent${query({ count })}`);
130
130
  }
131
131
  async function listCarehubOutOfBedNotifications(params = {}) {
132
- return this.get(`/v1/carehub/notifications/oob${query(params)}`);
132
+ return this.get(`/v1/slim/notifications/oob${query(params)}`);
133
133
  }
134
134
  async function listCarehubMedicalNotifications(params = {}) {
135
- return this.get(`/v1/carehub/notifications/medical${query(params)}`);
135
+ return this.get(`/v1/slim/notifications/medical${query(params)}`);
136
136
  }
137
137
  async function getRecentCarehubMedicalNotifications(count) {
138
- return this.get(`/v1/carehub/notifications/recent/medical${query({ count })}`);
138
+ return this.get(`/v1/slim/notifications/recent/medical${query({ count })}`);
139
139
  }
140
140
  async function getCarehubMedicalNotification(episodeId) {
141
- return this.get(`/v1/carehub/notifications/medical/${segment(episodeId)}`);
141
+ return this.get(`/v1/slim/notifications/medical/${segment(episodeId)}`);
142
142
  }
143
143
  async function acknowledgeCarehubMedicalNotification(episodeId) {
144
- return this.post(`/v1/carehub/notifications/medical/${segment(episodeId)}/ack`);
144
+ return this.post(`/v1/slim/notifications/medical/${segment(episodeId)}/ack`);
145
145
  }
146
146
  async function acknowledgeCarehubNotification(notificationId) {
147
- return (await this.patch(`/v1/carehub/notifications/${segment(notificationId)}/ack`, []));
147
+ return (await this.patch(`/v1/slim/notifications/${segment(notificationId)}/ack`, []));
148
148
  }
149
149
  async function getCarehubThreshold() {
150
- return this.get("/v1/carehub/threshold");
150
+ return this.get("/v1/slim/threshold");
151
151
  }
152
152
  async function updateCarehubThreshold(body) {
153
- return (await this.put("/v1/carehub/threshold", body));
153
+ return (await this.put("/v1/slim/threshold", body));
154
154
  }
155
155
  async function getCarehubPatientThreshold(patientId) {
156
- return this.get(`/v1/carehub/threshold/patient/${segment(patientId)}`);
156
+ return this.get(`/v1/slim/threshold/patient/${segment(patientId)}`);
157
157
  }
158
158
  async function updateCarehubPatientThreshold(patientId, body) {
159
- return (await this.put(`/v1/carehub/threshold/patient/${segment(patientId)}`, body));
159
+ return (await this.put(`/v1/slim/threshold/patient/${segment(patientId)}`, body));
160
160
  }
161
161
  async function getCarehubThresholdV2() {
162
- return this.get("/v2/carehub/threshold");
162
+ return this.get("/v2/slim/threshold");
163
163
  }
164
164
  async function updateCarehubThresholdV2(body) {
165
- return (await this.put("/v2/carehub/threshold", body));
165
+ return (await this.put("/v2/slim/threshold", body));
166
166
  }
167
167
  async function getCarehubPatientThresholdV2(patientId) {
168
- return this.get(`/v2/carehub/threshold/patient/${segment(patientId)}`);
168
+ return this.get(`/v2/slim/threshold/patient/${segment(patientId)}`);
169
169
  }
170
170
  async function updateCarehubPatientThresholdV2(patientId, body) {
171
- return (await this.put(`/v2/carehub/threshold/patient/${segment(patientId)}`, body));
171
+ return (await this.put(`/v2/slim/threshold/patient/${segment(patientId)}`, body));
172
172
  }
173
173
  async function getCarehubTrends(params) {
174
- return this.get(`/v1/carehub/trends/graphs${query(params)}`);
174
+ return this.get(`/v1/slim/trends/graphs${query(params)}`);
175
175
  }
176
176
  async function getCarehubSleepStatistics(params) {
177
- return this.get(`/v1/carehub/sleep/statistics${query(params)}`);
177
+ return this.get(`/v1/slim/sleep/statistics${query(params)}`);
178
178
  }
179
179
  async function listCarehubLocations(params = {}) {
180
- return this.get(`/v1/carehub/location${query(params)}`);
180
+ return this.get(`/v1/slim/location${query(params)}`);
181
181
  }
182
182
  async function getCarehubLocation(locationId) {
183
- return this.get(`/v1/carehub/location/${segment(locationId)}`);
183
+ return this.get(`/v1/slim/location/${segment(locationId)}`);
184
184
  }
185
185
  async function createCarehubLocation(body) {
186
- return this.post("/v1/carehub/location", body);
186
+ return this.post("/v1/slim/location", body);
187
187
  }
188
188
  async function updateCarehubLocation(locationId, body) {
189
- return (await this.put(`/v1/carehub/location/${segment(locationId)}`, body));
189
+ return (await this.put(`/v1/slim/location/${segment(locationId)}`, body));
190
190
  }
191
191
  async function deleteCarehubLocation(locationId) {
192
- await this.delete(`/v1/carehub/location/${segment(locationId)}`);
192
+ await this.delete(`/v1/slim/location/${segment(locationId)}`);
193
193
  }
194
194
  async function listCarehubZones(params = {}) {
195
- return this.get(`/v1/carehub/zones${query(params)}`);
195
+ return this.get(`/v1/slim/zones${query(params)}`);
196
196
  }
197
197
  async function getCarehubZone(zoneId) {
198
- return this.get(`/v1/carehub/zones/${segment(zoneId)}`);
198
+ return this.get(`/v1/slim/zones/${segment(zoneId)}`);
199
199
  }
200
200
  async function getCarehubZoneDeviceCounts(params = {}) {
201
- return this.get(`/v1/carehub/zones/device-counts${query(params)}`);
201
+ return this.get(`/v1/slim/zones/device-counts${query(params)}`);
202
202
  }
203
203
  async function exportCarehubPatientPdf(body) {
204
- return this.post("/v1/carehub/export/pdf", body);
204
+ return this.post("/v1/slim/export/pdf", body);
205
205
  }
@@ -93,53 +93,53 @@ exports.OVOK_CORE_API_REQUIREMENTS = {
93
93
  { method: "GET", path: "/fhir/Device/:id/telemetry/history", group: "Patient" },
94
94
  { method: "POST", path: "/fhir/Questionnaire/:id/$populate", group: "Questionnaire" },
95
95
  { method: "POST", path: "/fhir/QuestionnaireResponse/:id/$extract", group: "Questionnaire" },
96
- { method: "GET", path: "/v1/carehub/patient", group: "Carehub/Patient" },
97
- { method: "GET", path: "/v1/carehub/patient/:id", group: "Carehub/Patient" },
98
- { method: "GET", path: "/v1/carehub/patient/:id/$everything", group: "Carehub/Patient" },
99
- { method: "GET", path: "/v1/carehub/patient/:id/current-vitals", group: "Carehub/Patient" },
100
- { method: "POST", path: "/v1/carehub/patient", group: "Carehub/Patient" },
101
- { method: "PUT", path: "/v1/carehub/patient/:id", group: "Carehub/Patient" },
102
- { method: "DELETE", path: "/v1/carehub/patient/:id", group: "Carehub/Patient" },
103
- { method: "GET", path: "/v1/carehub/device", group: "Carehub/Device" },
104
- { method: "GET", path: "/v1/carehub/device/:id", group: "Carehub/Device" },
105
- { method: "POST", path: "/v1/carehub/device", group: "Carehub/Device" },
106
- { method: "PUT", path: "/v1/carehub/device/:id", group: "Carehub/Device" },
107
- { method: "DELETE", path: "/v1/carehub/device/:id", group: "Carehub/Device" },
108
- { method: "PUT", path: "/v1/carehub/device/assign/project", group: "Carehub/Device" },
109
- { method: "GET", path: "/v1/carehub/device/live", group: "Carehub/Device" },
110
- { method: "GET", path: "/v1/carehub/device/live/telemetry", group: "Carehub/Device" },
111
- { method: "GET", path: "/v1/carehub/device/live/cloudwatch/:deviceId", group: "Carehub/Device" },
112
- { method: "GET", path: "/v1/carehub/telemetry/:deviceId", group: "Carehub/Telemetry" },
113
- { method: "GET", path: "/v1/carehub/telemetry/effectiveIds", group: "Carehub/Telemetry" },
114
- { method: "GET", path: "/v1/carehub/telemetry/lastIds", group: "Carehub/Telemetry" },
115
- { method: "GET", path: "/v1/carehub/telemetry/:deviceId/effectiveIds", group: "Carehub/Telemetry" },
116
- { method: "GET", path: "/v1/carehub/telemetry/:deviceId/lastIds", group: "Carehub/Telemetry" },
117
- { method: "GET", path: "/v1/carehub/notifications", group: "Carehub/Notifications" },
118
- { method: "GET", path: "/v1/carehub/notifications/recent", group: "Carehub/Notifications" },
119
- { method: "GET", path: "/v1/carehub/notifications/oob", group: "Carehub/Notifications" },
120
- { method: "GET", path: "/v1/carehub/notifications/medical", group: "Carehub/Notifications" },
121
- { method: "GET", path: "/v1/carehub/notifications/recent/medical", group: "Carehub/Notifications" },
122
- { method: "GET", path: "/v1/carehub/notifications/medical/:episodeId", group: "Carehub/Notifications" },
123
- { method: "POST", path: "/v1/carehub/notifications/medical/:episodeId/ack", group: "Carehub/Notifications" },
124
- { method: "PATCH", path: "/v1/carehub/notifications/:id/ack", group: "Carehub/Notifications" },
125
- { method: "GET", path: "/v1/carehub/threshold", group: "Carehub/Threshold" },
126
- { method: "PUT", path: "/v1/carehub/threshold", group: "Carehub/Threshold" },
127
- { method: "GET", path: "/v1/carehub/threshold/patient/:patientId", group: "Carehub/Threshold" },
128
- { method: "PUT", path: "/v1/carehub/threshold/patient/:patientId", group: "Carehub/Threshold" },
129
- { method: "GET", path: "/v2/carehub/threshold", group: "Carehub/Threshold" },
130
- { method: "PUT", path: "/v2/carehub/threshold", group: "Carehub/Threshold" },
131
- { method: "GET", path: "/v2/carehub/threshold/patient/:patientId", group: "Carehub/Threshold" },
132
- { method: "PUT", path: "/v2/carehub/threshold/patient/:patientId", group: "Carehub/Threshold" },
133
- { method: "GET", path: "/v1/carehub/trends/graphs", group: "Carehub/Trends" },
134
- { method: "GET", path: "/v1/carehub/sleep/statistics", group: "Carehub/Sleep" },
135
- { method: "GET", path: "/v1/carehub/location", group: "Carehub/Location" },
136
- { method: "GET", path: "/v1/carehub/location/:id", group: "Carehub/Location" },
137
- { method: "POST", path: "/v1/carehub/location", group: "Carehub/Location" },
138
- { method: "PUT", path: "/v1/carehub/location/:id", group: "Carehub/Location" },
139
- { method: "DELETE", path: "/v1/carehub/location/:id", group: "Carehub/Location" },
140
- { method: "GET", path: "/v1/carehub/zones", group: "Carehub/Zones" },
141
- { method: "GET", path: "/v1/carehub/zones/:zoneId", group: "Carehub/Zones" },
142
- { method: "GET", path: "/v1/carehub/zones/device-counts", group: "Carehub/Zones" },
143
- { method: "POST", path: "/v1/carehub/export/pdf", group: "Carehub/Export" },
96
+ { method: "GET", path: "/v1/slim/patient", group: "Slim/Patient" },
97
+ { method: "GET", path: "/v1/slim/patient/:id", group: "Slim/Patient" },
98
+ { method: "GET", path: "/v1/slim/patient/:id/$everything", group: "Slim/Patient" },
99
+ { method: "GET", path: "/v1/slim/patient/:id/current-vitals", group: "Slim/Patient" },
100
+ { method: "POST", path: "/v1/slim/patient", group: "Slim/Patient" },
101
+ { method: "PUT", path: "/v1/slim/patient/:id", group: "Slim/Patient" },
102
+ { method: "DELETE", path: "/v1/slim/patient/:id", group: "Slim/Patient" },
103
+ { method: "GET", path: "/v1/slim/device", group: "Slim/Device" },
104
+ { method: "GET", path: "/v1/slim/device/:id", group: "Slim/Device" },
105
+ { method: "POST", path: "/v1/slim/device", group: "Slim/Device" },
106
+ { method: "PUT", path: "/v1/slim/device/:id", group: "Slim/Device" },
107
+ { method: "DELETE", path: "/v1/slim/device/:id", group: "Slim/Device" },
108
+ { method: "PUT", path: "/v1/slim/device/assign/project", group: "Slim/Device" },
109
+ { method: "GET", path: "/v1/slim/device/live", group: "Slim/Device" },
110
+ { method: "GET", path: "/v1/slim/device/live/telemetry", group: "Slim/Device" },
111
+ { method: "GET", path: "/v1/slim/device/live/cloudwatch/:deviceId", group: "Slim/Device" },
112
+ { method: "GET", path: "/v1/slim/telemetry/:deviceId", group: "Slim/Telemetry" },
113
+ { method: "GET", path: "/v1/slim/telemetry/effectiveIds", group: "Slim/Telemetry" },
114
+ { method: "GET", path: "/v1/slim/telemetry/lastIds", group: "Slim/Telemetry" },
115
+ { method: "GET", path: "/v1/slim/telemetry/:deviceId/effectiveIds", group: "Slim/Telemetry" },
116
+ { method: "GET", path: "/v1/slim/telemetry/:deviceId/lastIds", group: "Slim/Telemetry" },
117
+ { method: "GET", path: "/v1/slim/notifications", group: "Slim/Notifications" },
118
+ { method: "GET", path: "/v1/slim/notifications/recent", group: "Slim/Notifications" },
119
+ { method: "GET", path: "/v1/slim/notifications/oob", group: "Slim/Notifications" },
120
+ { method: "GET", path: "/v1/slim/notifications/medical", group: "Slim/Notifications" },
121
+ { method: "GET", path: "/v1/slim/notifications/recent/medical", group: "Slim/Notifications" },
122
+ { method: "GET", path: "/v1/slim/notifications/medical/:episodeId", group: "Slim/Notifications" },
123
+ { method: "POST", path: "/v1/slim/notifications/medical/:episodeId/ack", group: "Slim/Notifications" },
124
+ { method: "PATCH", path: "/v1/slim/notifications/:id/ack", group: "Slim/Notifications" },
125
+ { method: "GET", path: "/v1/slim/threshold", group: "Slim/Threshold" },
126
+ { method: "PUT", path: "/v1/slim/threshold", group: "Slim/Threshold" },
127
+ { method: "GET", path: "/v1/slim/threshold/patient/:patientId", group: "Slim/Threshold" },
128
+ { method: "PUT", path: "/v1/slim/threshold/patient/:patientId", group: "Slim/Threshold" },
129
+ { method: "GET", path: "/v2/slim/threshold", group: "Slim/Threshold" },
130
+ { method: "PUT", path: "/v2/slim/threshold", group: "Slim/Threshold" },
131
+ { method: "GET", path: "/v2/slim/threshold/patient/:patientId", group: "Slim/Threshold" },
132
+ { method: "PUT", path: "/v2/slim/threshold/patient/:patientId", group: "Slim/Threshold" },
133
+ { method: "GET", path: "/v1/slim/trends/graphs", group: "Slim/Trends" },
134
+ { method: "GET", path: "/v1/slim/sleep/statistics", group: "Slim/Sleep" },
135
+ { method: "GET", path: "/v1/slim/location", group: "Slim/Location" },
136
+ { method: "GET", path: "/v1/slim/location/:id", group: "Slim/Location" },
137
+ { method: "POST", path: "/v1/slim/location", group: "Slim/Location" },
138
+ { method: "PUT", path: "/v1/slim/location/:id", group: "Slim/Location" },
139
+ { method: "DELETE", path: "/v1/slim/location/:id", group: "Slim/Location" },
140
+ { method: "GET", path: "/v1/slim/zones", group: "Slim/Zones" },
141
+ { method: "GET", path: "/v1/slim/zones/:zoneId", group: "Slim/Zones" },
142
+ { method: "GET", path: "/v1/slim/zones/device-counts", group: "Slim/Zones" },
143
+ { method: "POST", path: "/v1/slim/export/pdf", group: "Slim/Export" },
144
144
  ],
145
145
  };
@@ -48,7 +48,7 @@ exports.OVOK_CORE_REQUIREMENTS = {
48
48
  description: "The FHIR surface a server must provide for the @ovok/core client library's own methods to function.",
49
49
  software: {
50
50
  name: "@ovok/core",
51
- version: "0.4.0",
51
+ version: "0.4.1",
52
52
  },
53
53
  fhirVersion: "4.0.1",
54
54
  format: ["json"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/core",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -79,7 +79,9 @@
79
79
  },
80
80
  "plugins": {
81
81
  "@release-it/conventional-changelog": {
82
- "preset": "angular"
82
+ "preset": "angular",
83
+ "infile": "CHANGELOG.md",
84
+ "header": "# Changelog"
83
85
  }
84
86
  }
85
87
  }