@hipnation-truth/sdk 0.19.0 → 0.20.0
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/react.d.ts +6 -0
- package/dist/react.js +20 -0
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -196,6 +196,8 @@ interface ConversationMessageRow {
|
|
|
196
196
|
toNumber: string | null;
|
|
197
197
|
voicemailLink: string | null;
|
|
198
198
|
duration: number | null;
|
|
199
|
+
/** Voicemail/call transcript — Dialpad delivers `{ text }` (B5). */
|
|
200
|
+
transcript: unknown | null;
|
|
199
201
|
text: string | null;
|
|
200
202
|
mms: boolean;
|
|
201
203
|
mmsUrl: string | null;
|
|
@@ -654,6 +656,8 @@ interface ConversationMessage {
|
|
|
654
656
|
toNumber: string | null;
|
|
655
657
|
voicemailLink: string | null;
|
|
656
658
|
duration: number | null;
|
|
659
|
+
/** Voicemail/call transcript — Dialpad delivers `{ text }` (B5). */
|
|
660
|
+
transcript: unknown | null;
|
|
657
661
|
text: string | null;
|
|
658
662
|
mms: boolean;
|
|
659
663
|
mmsUrl: string | null;
|
|
@@ -944,6 +948,8 @@ interface PatientSearchResult {
|
|
|
944
948
|
/** Hint patient id — present when the row originates from Hint. */
|
|
945
949
|
hintId: string | undefined;
|
|
946
950
|
firstName: string;
|
|
951
|
+
/** Middle name — surfaced so the picker renders the full legal name (B9). */
|
|
952
|
+
middleName: string | undefined;
|
|
947
953
|
lastName: string;
|
|
948
954
|
/** ISO date string (YYYY-MM-DD) — undefined when not available. */
|
|
949
955
|
dob: string | undefined;
|
package/dist/react.js
CHANGED
|
@@ -2390,6 +2390,10 @@ function TruthProvider({
|
|
|
2390
2390
|
const convexClient = (0, import_react6.useMemo)(() => new import_react5.ConvexReactClient(url), [url]);
|
|
2391
2391
|
const truthClient = (0, import_react6.useMemo)(
|
|
2392
2392
|
() => new TruthClient({
|
|
2393
|
+
// Pin the resource client to the SAME deployment the React hooks
|
|
2394
|
+
// use; without this it falls back to CONVEX_URLS[environment] and a
|
|
2395
|
+
// caller-supplied `convexUrl` would split hooks vs. client methods.
|
|
2396
|
+
convexUrl: url,
|
|
2393
2397
|
apiKey: resolvedApiKey,
|
|
2394
2398
|
environment,
|
|
2395
2399
|
apiBaseUrl: resolvedApiBaseUrl,
|
|
@@ -2399,6 +2403,7 @@ function TruthProvider({
|
|
|
2399
2403
|
autoInitServiceWorker: false
|
|
2400
2404
|
}),
|
|
2401
2405
|
[
|
|
2406
|
+
url,
|
|
2402
2407
|
resolvedApiKey,
|
|
2403
2408
|
resolvedApiBaseUrl,
|
|
2404
2409
|
environment,
|
|
@@ -2413,6 +2418,8 @@ function TruthProvider({
|
|
|
2413
2418
|
if (_activeClient === truthClient) {
|
|
2414
2419
|
_activeClient = null;
|
|
2415
2420
|
}
|
|
2421
|
+
void truthClient.destroy().catch(() => {
|
|
2422
|
+
});
|
|
2416
2423
|
};
|
|
2417
2424
|
}, [truthClient]);
|
|
2418
2425
|
const sdkContext = (0, import_react6.useMemo)(
|
|
@@ -2799,6 +2806,9 @@ function useNotifications(options) {
|
|
|
2799
2806
|
return { ok: false, reason: "no_native_token" };
|
|
2800
2807
|
}
|
|
2801
2808
|
setDevicePushToken(nativeToken);
|
|
2809
|
+
if (!apiBaseUrl || !apiKey) {
|
|
2810
|
+
return { ok: false, reason: "missing_truth_config" };
|
|
2811
|
+
}
|
|
2802
2812
|
const res = yield fetch(
|
|
2803
2813
|
`${apiBaseUrl}/api/notifications/devices/register`,
|
|
2804
2814
|
{
|
|
@@ -2960,6 +2970,11 @@ function useNotificationsActions() {
|
|
|
2960
2970
|
const apiKey = (_b = sdkContext == null ? void 0 : sdkContext.apiKey) != null ? _b : "";
|
|
2961
2971
|
const post = (0, import_react9.useCallback)(
|
|
2962
2972
|
(path, body) => __async(null, null, function* () {
|
|
2973
|
+
if (!apiBaseUrl || !apiKey) {
|
|
2974
|
+
throw new Error(
|
|
2975
|
+
"useNotificationsActions: missing apiBaseUrl/apiKey \u2014 wrap in <TruthProvider> or pass options"
|
|
2976
|
+
);
|
|
2977
|
+
}
|
|
2963
2978
|
const res = yield fetch(`${apiBaseUrl}/api${path}`, {
|
|
2964
2979
|
method: "POST",
|
|
2965
2980
|
headers: {
|
|
@@ -3318,6 +3333,11 @@ function useUserSync(input) {
|
|
|
3318
3333
|
return;
|
|
3319
3334
|
}
|
|
3320
3335
|
const key = [
|
|
3336
|
+
// Include the resolved config so a first mount with missing creds
|
|
3337
|
+
// (sync no-ops as "missing_truth_config") doesn't pin the key and
|
|
3338
|
+
// permanently skip the valid retry once creds arrive.
|
|
3339
|
+
apiBaseUrl,
|
|
3340
|
+
apiKey,
|
|
3321
3341
|
input.userId,
|
|
3322
3342
|
(_a2 = input.email) != null ? _a2 : "",
|
|
3323
3343
|
(_b2 = input.name) != null ? _b2 : "",
|