@hipnation-truth/sdk 0.26.16 → 0.26.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +32 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -5
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.ts +28 -2
- package/dist/react.js +87 -16
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -215,7 +215,14 @@ var AttachmentsResource = class {
|
|
|
215
215
|
return __async(this, null, function* () {
|
|
216
216
|
const res = yield fetch(`${this.baseUrl}/api${path}`, {
|
|
217
217
|
method: "POST",
|
|
218
|
-
|
|
218
|
+
// PHI (patient photos / MMS media) — REQUIRE the user JWT. The server
|
|
219
|
+
// hardens these routes to `verifiedUserProcedure`, so degrading to
|
|
220
|
+
// key-only would 401. `requireUserToken` retries across the Clerk-
|
|
221
|
+
// hydration gap and throws rather than silently sending key-only.
|
|
222
|
+
headers: yield buildAuthHeaders(this.auth, {
|
|
223
|
+
json: true,
|
|
224
|
+
requireUserToken: true
|
|
225
|
+
}),
|
|
219
226
|
body: JSON.stringify(body)
|
|
220
227
|
});
|
|
221
228
|
if (!res.ok) {
|
|
@@ -931,7 +938,13 @@ var EhrProviderProxy = class {
|
|
|
931
938
|
}
|
|
932
939
|
const response = yield fetch(url.toString(), {
|
|
933
940
|
method,
|
|
934
|
-
|
|
941
|
+
// PHI (EHR/Elation proxy) — REQUIRE the user JWT. The server hardens the
|
|
942
|
+
// EHR proxy routes to `verifiedUserProcedure`, so degrading to key-only
|
|
943
|
+
// would 401.
|
|
944
|
+
headers: yield buildAuthHeaders(this.auth, {
|
|
945
|
+
json: body !== void 0,
|
|
946
|
+
requireUserToken: true
|
|
947
|
+
}),
|
|
935
948
|
body: body !== void 0 ? JSON.stringify(body) : void 0
|
|
936
949
|
});
|
|
937
950
|
if (!response.ok) {
|
|
@@ -1024,7 +1037,12 @@ var _NotesResource = class _NotesResource {
|
|
|
1024
1037
|
try {
|
|
1025
1038
|
res = yield fetch(`${this.baseUrl}/api${path}`, {
|
|
1026
1039
|
method: "POST",
|
|
1027
|
-
|
|
1040
|
+
// PHI (clinical notes) — REQUIRE the user JWT. The server hardens these
|
|
1041
|
+
// routes to `verifiedUserProcedure`, so degrading to key-only would 401.
|
|
1042
|
+
headers: yield buildAuthHeaders(this.auth, {
|
|
1043
|
+
json: true,
|
|
1044
|
+
requireUserToken: true
|
|
1045
|
+
}),
|
|
1028
1046
|
body: JSON.stringify(body),
|
|
1029
1047
|
signal: controller.signal
|
|
1030
1048
|
});
|
|
@@ -1267,7 +1285,15 @@ var PatientDetailsResource = class {
|
|
|
1267
1285
|
return __async(this, null, function* () {
|
|
1268
1286
|
const res = yield fetch(`${this.baseUrl}/api${path}`, {
|
|
1269
1287
|
method: "POST",
|
|
1270
|
-
|
|
1288
|
+
// PHI (patient chart) — REQUIRE the user JWT. The server hardens these
|
|
1289
|
+
// routes to `verifiedUserProcedure`, so degrading to key-only would 401.
|
|
1290
|
+
// `requireUserToken` retries token resolution across the Clerk-hydration
|
|
1291
|
+
// gap and throws a clear auth error if none is obtainable, rather than
|
|
1292
|
+
// silently sending key-only.
|
|
1293
|
+
headers: yield buildAuthHeaders(this.auth, {
|
|
1294
|
+
json: true,
|
|
1295
|
+
requireUserToken: true
|
|
1296
|
+
}),
|
|
1271
1297
|
body: JSON.stringify(body)
|
|
1272
1298
|
});
|
|
1273
1299
|
if (!res.ok) {
|
|
@@ -1497,7 +1523,8 @@ var RemindersResource = class {
|
|
|
1497
1523
|
conversationId: input.conversationId,
|
|
1498
1524
|
remindAt,
|
|
1499
1525
|
note: input.note,
|
|
1500
|
-
createdBy: input.createdBy
|
|
1526
|
+
createdBy: input.createdBy,
|
|
1527
|
+
createdByClerkId: input.createdByClerkId
|
|
1501
1528
|
}
|
|
1502
1529
|
);
|
|
1503
1530
|
return result;
|