@hipnation-truth/sdk 0.26.15 → 0.26.17
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 +39 -2
- package/dist/react.js +83 -5
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1072,7 +1072,21 @@ interface ScheduleReminderInput {
|
|
|
1072
1072
|
conversationId: string;
|
|
1073
1073
|
remindAt: string | Date;
|
|
1074
1074
|
note?: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* Who scheduled the reminder. May be the end user's email — the backend
|
|
1077
|
+
* translates it to a Clerk id for push targeting. Prefer also passing
|
|
1078
|
+
* `createdByClerkId` when known so the reminder push lands on the right
|
|
1079
|
+
* device-bearing identity.
|
|
1080
|
+
*/
|
|
1075
1081
|
createdBy: string;
|
|
1082
|
+
/**
|
|
1083
|
+
* Optional pre-resolved Clerk id of the creator. Push devices + the push
|
|
1084
|
+
* tenancy gate are keyed by Clerk id, so passing it lets the reminder push
|
|
1085
|
+
* (and its conversation deep-link) target the right identity directly
|
|
1086
|
+
* instead of relying on an email→user lookup at fire time. When omitted the
|
|
1087
|
+
* backend resolves it from `createdBy`.
|
|
1088
|
+
*/
|
|
1089
|
+
createdByClerkId?: string;
|
|
1076
1090
|
}
|
|
1077
1091
|
interface ScheduleReminderResult {
|
|
1078
1092
|
reminderId: string;
|
|
@@ -1153,8 +1167,11 @@ interface ConversationTaskMarkSeenInput {
|
|
|
1153
1167
|
* TasksResource — create, update status, list, get tasks.
|
|
1154
1168
|
*
|
|
1155
1169
|
* Backed by Convex. Replaces CommHub's createTaskWithNotification +
|
|
1156
|
-
* updateTaskStatusWithNotification actions.
|
|
1157
|
-
* is emitted
|
|
1170
|
+
* updateTaskStatusWithNotification actions. The push notification side-effect
|
|
1171
|
+
* is NOT emitted via Kinesis: the Convex task mutation enqueues a
|
|
1172
|
+
* `notificationJobs` row and schedules `notificationScheduler.runJob`, which
|
|
1173
|
+
* HTTP-fetches the Truth Lambda push endpoint (Truth API → Convex scheduler →
|
|
1174
|
+
* push). See apps/web/convex/lib/taskPush.ts.
|
|
1158
1175
|
*/
|
|
1159
1176
|
|
|
1160
1177
|
declare class TasksResource {
|
package/dist/index.d.ts
CHANGED
|
@@ -1072,7 +1072,21 @@ interface ScheduleReminderInput {
|
|
|
1072
1072
|
conversationId: string;
|
|
1073
1073
|
remindAt: string | Date;
|
|
1074
1074
|
note?: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* Who scheduled the reminder. May be the end user's email — the backend
|
|
1077
|
+
* translates it to a Clerk id for push targeting. Prefer also passing
|
|
1078
|
+
* `createdByClerkId` when known so the reminder push lands on the right
|
|
1079
|
+
* device-bearing identity.
|
|
1080
|
+
*/
|
|
1075
1081
|
createdBy: string;
|
|
1082
|
+
/**
|
|
1083
|
+
* Optional pre-resolved Clerk id of the creator. Push devices + the push
|
|
1084
|
+
* tenancy gate are keyed by Clerk id, so passing it lets the reminder push
|
|
1085
|
+
* (and its conversation deep-link) target the right identity directly
|
|
1086
|
+
* instead of relying on an email→user lookup at fire time. When omitted the
|
|
1087
|
+
* backend resolves it from `createdBy`.
|
|
1088
|
+
*/
|
|
1089
|
+
createdByClerkId?: string;
|
|
1076
1090
|
}
|
|
1077
1091
|
interface ScheduleReminderResult {
|
|
1078
1092
|
reminderId: string;
|
|
@@ -1153,8 +1167,11 @@ interface ConversationTaskMarkSeenInput {
|
|
|
1153
1167
|
* TasksResource — create, update status, list, get tasks.
|
|
1154
1168
|
*
|
|
1155
1169
|
* Backed by Convex. Replaces CommHub's createTaskWithNotification +
|
|
1156
|
-
* updateTaskStatusWithNotification actions.
|
|
1157
|
-
* is emitted
|
|
1170
|
+
* updateTaskStatusWithNotification actions. The push notification side-effect
|
|
1171
|
+
* is NOT emitted via Kinesis: the Convex task mutation enqueues a
|
|
1172
|
+
* `notificationJobs` row and schedules `notificationScheduler.runJob`, which
|
|
1173
|
+
* HTTP-fetches the Truth Lambda push endpoint (Truth API → Convex scheduler →
|
|
1174
|
+
* push). See apps/web/convex/lib/taskPush.ts.
|
|
1158
1175
|
*/
|
|
1159
1176
|
|
|
1160
1177
|
declare class TasksResource {
|
package/dist/index.js
CHANGED
|
@@ -280,7 +280,14 @@ var AttachmentsResource = class {
|
|
|
280
280
|
return __async(this, null, function* () {
|
|
281
281
|
const res = yield fetch(`${this.baseUrl}/api${path}`, {
|
|
282
282
|
method: "POST",
|
|
283
|
-
|
|
283
|
+
// PHI (patient photos / MMS media) — REQUIRE the user JWT. The server
|
|
284
|
+
// hardens these routes to `verifiedUserProcedure`, so degrading to
|
|
285
|
+
// key-only would 401. `requireUserToken` retries across the Clerk-
|
|
286
|
+
// hydration gap and throws rather than silently sending key-only.
|
|
287
|
+
headers: yield buildAuthHeaders(this.auth, {
|
|
288
|
+
json: true,
|
|
289
|
+
requireUserToken: true
|
|
290
|
+
}),
|
|
284
291
|
body: JSON.stringify(body)
|
|
285
292
|
});
|
|
286
293
|
if (!res.ok) {
|
|
@@ -996,7 +1003,13 @@ var EhrProviderProxy = class {
|
|
|
996
1003
|
}
|
|
997
1004
|
const response = yield fetch(url.toString(), {
|
|
998
1005
|
method,
|
|
999
|
-
|
|
1006
|
+
// PHI (EHR/Elation proxy) — REQUIRE the user JWT. The server hardens the
|
|
1007
|
+
// EHR proxy routes to `verifiedUserProcedure`, so degrading to key-only
|
|
1008
|
+
// would 401.
|
|
1009
|
+
headers: yield buildAuthHeaders(this.auth, {
|
|
1010
|
+
json: body !== void 0,
|
|
1011
|
+
requireUserToken: true
|
|
1012
|
+
}),
|
|
1000
1013
|
body: body !== void 0 ? JSON.stringify(body) : void 0
|
|
1001
1014
|
});
|
|
1002
1015
|
if (!response.ok) {
|
|
@@ -1089,7 +1102,12 @@ var _NotesResource = class _NotesResource {
|
|
|
1089
1102
|
try {
|
|
1090
1103
|
res = yield fetch(`${this.baseUrl}/api${path}`, {
|
|
1091
1104
|
method: "POST",
|
|
1092
|
-
|
|
1105
|
+
// PHI (clinical notes) — REQUIRE the user JWT. The server hardens these
|
|
1106
|
+
// routes to `verifiedUserProcedure`, so degrading to key-only would 401.
|
|
1107
|
+
headers: yield buildAuthHeaders(this.auth, {
|
|
1108
|
+
json: true,
|
|
1109
|
+
requireUserToken: true
|
|
1110
|
+
}),
|
|
1093
1111
|
body: JSON.stringify(body),
|
|
1094
1112
|
signal: controller.signal
|
|
1095
1113
|
});
|
|
@@ -1332,7 +1350,15 @@ var PatientDetailsResource = class {
|
|
|
1332
1350
|
return __async(this, null, function* () {
|
|
1333
1351
|
const res = yield fetch(`${this.baseUrl}/api${path}`, {
|
|
1334
1352
|
method: "POST",
|
|
1335
|
-
|
|
1353
|
+
// PHI (patient chart) — REQUIRE the user JWT. The server hardens these
|
|
1354
|
+
// routes to `verifiedUserProcedure`, so degrading to key-only would 401.
|
|
1355
|
+
// `requireUserToken` retries token resolution across the Clerk-hydration
|
|
1356
|
+
// gap and throws a clear auth error if none is obtainable, rather than
|
|
1357
|
+
// silently sending key-only.
|
|
1358
|
+
headers: yield buildAuthHeaders(this.auth, {
|
|
1359
|
+
json: true,
|
|
1360
|
+
requireUserToken: true
|
|
1361
|
+
}),
|
|
1336
1362
|
body: JSON.stringify(body)
|
|
1337
1363
|
});
|
|
1338
1364
|
if (!res.ok) {
|
|
@@ -1562,7 +1588,8 @@ var RemindersResource = class {
|
|
|
1562
1588
|
conversationId: input.conversationId,
|
|
1563
1589
|
remindAt,
|
|
1564
1590
|
note: input.note,
|
|
1565
|
-
createdBy: input.createdBy
|
|
1591
|
+
createdBy: input.createdBy,
|
|
1592
|
+
createdByClerkId: input.createdByClerkId
|
|
1566
1593
|
}
|
|
1567
1594
|
);
|
|
1568
1595
|
return result;
|