@everfur/sdk 0.18.3 → 0.19.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/CHANGELOG.md +112 -0
- package/dist/{Chat.d-CKKuXVw5.d.ts → Chat.d-BHovj6Ku.d.ts} +1 -1
- package/dist/{Chat.d-BEbRI8FZ.d.cts → Chat.d-BO-XtVYe.d.cts} +1 -1
- package/dist/{DepthViews.d-BiePRa3Z.d.cts → DepthViews.d-BwIkdmWZ.d.cts} +1 -1
- package/dist/{DepthViews.d-Chn2xwZu.d.cts → DepthViews.d-Bx85LeiP.d.cts} +1 -1
- package/dist/{DepthViews.d-_WMIpymE.d.ts → DepthViews.d-CBUunxP1.d.ts} +1 -1
- package/dist/{DepthViews.d-CiU4f98J.d.ts → DepthViews.d-DKoZgF8l.d.ts} +1 -1
- package/dist/{RecordsPage.d-CRRJM35Q.d.ts → RecordsPage.d-CsvBhU0f.d.ts} +1 -1
- package/dist/{RecordsPage.d-CtNzoxre.d.cts → RecordsPage.d-DRFp2LXH.d.cts} +1 -1
- package/dist/animations/index.cjs +1 -94
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/animations/index.js +1 -94
- package/dist/{attachments.d-DRkqNR-o.d.ts → attachments.d-DOZjCdkb.d.ts} +2 -2
- package/dist/{attachments.d-BLEOCUU7.d.cts → attachments.d-DWUsHPf9.d.cts} +2 -2
- package/dist/{bookingCopy.d-CrUufdoE.d.ts → bookingCopy.d-BlMWlvgv.d.ts} +2 -2
- package/dist/{bookingCopy.d-CoiNXrY8.d.cts → bookingCopy.d-tvO7y6MK.d.cts} +2 -2
- package/dist/{casesRepository.d-DhI69yuj.d.ts → casesRepository.d-C7qbrOL-.d.ts} +1 -1
- package/dist/{casesRepository.d-OyZOSNNv.d.cts → casesRepository.d-sSo6oakf.d.cts} +1 -1
- package/dist/chat/index.cjs +29 -119
- package/dist/chat/index.d.cts +11 -10
- package/dist/chat/index.d.ts +11 -10
- package/dist/chat/index.js +30 -120
- package/dist/chat/lite/index.cjs +29 -119
- package/dist/chat/lite/index.d.cts +11 -10
- package/dist/chat/lite/index.d.ts +11 -10
- package/dist/chat/lite/index.js +30 -120
- package/dist/{attachments.d-d1rWAw9K.d.ts → chatHandoffToken.d-C4tEyuCT.d.ts} +33 -9
- package/dist/{attachments.d-CeXw6R7_.d.cts → chatHandoffToken.d-D6GUoBvs.d.cts} +33 -9
- package/dist/{ports.d-CIfa_XF6.d.ts → chatTypes.d-BI4vidgu.d.ts} +41 -52
- package/dist/{ports.d--OjPUqPb.d.cts → chatTypes.d-CSyw9em_.d.cts} +41 -52
- package/dist/client/index.cjs +2 -95
- package/dist/client/index.d.cts +7 -7
- package/dist/client/index.d.ts +7 -7
- package/dist/client/index.js +2 -95
- package/dist/{clinicBatch.d-DVahpaN3.d.cts → clinicBatch.d-BxA_uGBb.d.cts} +2 -2
- package/dist/{clinicBatch.d-CcqnQ7-d.d.ts → clinicBatch.d-T5oSAhY-.d.ts} +2 -2
- package/dist/{config.d-KX-EkQ9j.d.ts → config.d-N5Xzy53V.d.ts} +1 -1
- package/dist/{config.d-Z_fyOZke.d.cts → config.d-jCmrhM4a.d.cts} +1 -1
- package/dist/consent/index.cjs +1 -94
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +1 -94
- package/dist/{context.d-DY6d4qXG.d.ts → context.d-BJEpEERH.d.ts} +7 -6
- package/dist/{context.d-DV5E_2Fs.d.cts → context.d-l4HkFJI8.d.cts} +7 -6
- package/dist/{copy.d-BPzpKGGc.d.ts → copy.d-hFRaovog.d.ts} +2 -2
- package/dist/{copy.d-CMY9OoCC.d.cts → copy.d-hS49oJ4w.d.cts} +2 -2
- package/dist/core/index.cjs +6 -99
- package/dist/core/index.d.cts +14 -13
- package/dist/core/index.d.ts +14 -13
- package/dist/core/index.js +6 -99
- package/dist/{depth.d-qVYPByPb.d.cts → depth.d-BYwddMNU.d.cts} +2 -2
- package/dist/{depth.d-B_qNSgXr.d.ts → depth.d-C99_xup2.d.ts} +2 -2
- package/dist/{entitlementRepository.d-CwTVi7he.d.cts → entitlementRepository.d-CiU_QIPL.d.cts} +2 -2
- package/dist/{entitlementRepository.d-BXDWPyP8.d.ts → entitlementRepository.d-qZAlET7C.d.ts} +2 -2
- package/dist/{focus.d-BPofD7ow.d.ts → focus.d-CG6KhDBK.d.ts} +2 -2
- package/dist/{focus.d-DJD4lWFB.d.cts → focus.d-RJMXplJc.d.cts} +2 -2
- package/dist/health-plan/index.cjs +1 -94
- package/dist/health-plan/index.d.cts +9 -9
- package/dist/health-plan/index.d.ts +9 -9
- package/dist/health-plan/index.js +1 -94
- package/dist/{idempotency.d-BVO0mU2R.d.ts → idempotency.d-D-ZWpO9p.d.ts} +1 -1
- package/dist/{idempotency.d-BmYuCb-n.d.cts → idempotency.d-DJyOZDPb.d.cts} +1 -1
- package/dist/{identity.d-3ROlHbnP.d.cts → identity.d-CA7mW59I.d.cts} +1 -1
- package/dist/{identity.d-CRVNfZzQ.d.ts → identity.d-DIOnFzXL.d.ts} +1 -1
- package/dist/index.cjs +30 -120
- package/dist/index.d.cts +14 -13
- package/dist/index.d.ts +14 -13
- package/dist/index.js +31 -121
- package/dist/{introEvents.d-DGQDEPJi.d.cts → introEvents.d-7wNDMhEF.d.cts} +1 -1
- package/dist/{introEvents.d-cvMxJfYd.d.ts → introEvents.d-BjqfFgE1.d.ts} +1 -1
- package/dist/notifications/inbox/index.cjs +44 -0
- package/dist/notifications/inbox/index.d.cts +50 -0
- package/dist/notifications/inbox/index.d.ts +50 -0
- package/dist/notifications/inbox/index.js +44 -0
- package/dist/notifications/index.cjs +18 -98
- package/dist/notifications/index.d.cts +12 -6
- package/dist/notifications/index.d.ts +12 -6
- package/dist/notifications/index.js +18 -98
- package/dist/{optInView.d-DIGu47Lz.d.ts → optInView.d-B5v4cDDW.d.ts} +2 -2
- package/dist/{optInView.d-CU1U_K-B.d.cts → optInView.d-BQhHPleh.d.cts} +2 -2
- package/dist/parse.d-DYsx1Q2V.d.cts +168 -0
- package/dist/parse.d-Do0sdAgm.d.ts +168 -0
- package/dist/{pets.d-5SMtOAwB.d.cts → pets.d-DRqMaP8A.d.cts} +1 -1
- package/dist/{pets.d-BRsbR8QU.d.ts → pets.d-DVrOb-Bj.d.ts} +1 -1
- package/dist/{petsRepository.d-DWsChqAS.d.ts → petsRepository.d-CpYWRWFq.d.ts} +1 -1
- package/dist/{petsRepository.d-DEnoZn92.d.cts → petsRepository.d-tZADfKA1.d.cts} +1 -1
- package/dist/photo/index.cjs +1 -94
- package/dist/photo/index.js +1 -94
- package/dist/records/depth/index.cjs +1 -94
- package/dist/records/depth/index.d.cts +9 -9
- package/dist/records/depth/index.d.ts +9 -9
- package/dist/records/depth/index.js +1 -94
- package/dist/records/index.cjs +2 -95
- package/dist/records/index.d.cts +10 -10
- package/dist/records/index.d.ts +10 -10
- package/dist/records/index.js +2 -95
- package/dist/{requestFunnel.d-DSvCGf4J.d.ts → requestFunnel.d-B8OVGh0p.d.ts} +2 -2
- package/dist/{requestFunnel.d-CQX_Z1Hi.d.cts → requestFunnel.d-C4abgvt9.d.cts} +2 -2
- package/dist/{parse.d-icynBIS-.d.ts → route.d-BAZqGLfl.d.ts} +90 -53
- package/dist/{parse.d-GzZJYu__.d.cts → route.d-CTf8h9vS.d.cts} +90 -53
- package/dist/{runtimeTypes.d-sXpNYnJp.d.cts → runtimeTypes.d-DbaQKGLv.d.cts} +39 -5
- package/dist/{runtimeTypes.d-Be_vhOER.d.ts → runtimeTypes.d-DrIz5e6L.d.ts} +39 -5
- package/dist/{screenProps.d-DpMK2_gi.d.ts → screenProps.d-BP8LAZWn.d.ts} +1 -1
- package/dist/{screenProps.d-BW6PZh5k.d.cts → screenProps.d-Di3wYGCn.d.cts} +1 -1
- package/dist/server/events/index.cjs +2 -95
- package/dist/server/events/index.d.cts +92 -5
- package/dist/server/events/index.d.ts +92 -5
- package/dist/server/events/index.js +2 -95
- package/dist/server/index.cjs +2 -95
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +2 -95
- package/dist/shop/index.d.cts +3 -3
- package/dist/shop/index.d.ts +3 -3
- package/dist/tabs/index.cjs +3 -96
- package/dist/tabs/index.d.cts +6 -6
- package/dist/tabs/index.d.ts +6 -6
- package/dist/tabs/index.js +3 -96
- package/dist/televet/booking/index.cjs +1 -94
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/televet/booking/index.js +1 -94
- package/dist/televet/index.cjs +1 -94
- package/dist/televet/index.js +1 -94
- package/dist/testing/index.cjs +1 -94
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -94
- package/dist/testing/rn/index.cjs +1 -94
- package/dist/testing/rn/index.d.cts +8 -7
- package/dist/testing/rn/index.d.ts +8 -7
- package/dist/testing/rn/index.js +1 -94
- package/dist/testing/web/index.cjs +1 -94
- package/dist/testing/web/index.d.cts +8 -7
- package/dist/testing/web/index.d.ts +8 -7
- package/dist/testing/web/index.js +1 -94
- package/dist/texting/index.cjs +1 -94
- package/dist/texting/index.d.cts +5 -5
- package/dist/texting/index.d.ts +5 -5
- package/dist/texting/index.js +1 -94
- package/dist/{threadOptions.d-DMOn3mmj.d.ts → threadOptions.d-Cwmyu8pc.d.ts} +2 -2
- package/dist/{threadOptions.d-Csmb-XgL.d.cts → threadOptions.d-REwBuXAY.d.cts} +2 -2
- package/dist/{timelineRows.d-B0XZevKx.d.ts → timelineRows.d-CTlGQTB0.d.ts} +1 -1
- package/dist/{timelineRows.d-Kllr7Mcu.d.cts → timelineRows.d-CongJG58.d.cts} +1 -1
- package/dist/unreadStore.d-gCsleb6l.d.ts +74 -0
- package/dist/unreadStore.d-w5x6lEpR.d.cts +74 -0
- package/dist/{useHealthPlanSubscription.d-bNRntgWe.d.ts → useHealthPlanSubscription.d-BSo5kFT9.d.ts} +2 -2
- package/dist/{useHealthPlanSubscription.d-C-c_mQ4u.d.cts → useHealthPlanSubscription.d-Br7GKHTt.d.cts} +2 -2
- package/dist/useInboxUnread.d-Blxu00eY.d.ts +206 -0
- package/dist/useInboxUnread.d-pi6FNnK-.d.cts +206 -0
- package/dist/{usePresentation.d-BHKhBKQn.d.cts → usePresentation.d-C6ci1s3j.d.cts} +1 -1
- package/dist/{usePresentation.d-CmQgbrZr.d.ts → usePresentation.d-yd9Gh4GB.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-WW_2cWwU.d.cts → useRecordsDepth.d-BIDVPfx7.d.cts} +1 -1
- package/dist/{useRecordsDepth.d-BilHZaR4.d.ts → useRecordsDepth.d-C5snbNxR.d.ts} +1 -1
- package/dist/{appStateLifecycle.d-BQcy4J5O.d.cts → useUnread.d-CORommFJ.d.cts} +49 -14
- package/dist/{appStateLifecycle.d-JuPhh7Oy.d.ts → useUnread.d-w0dKMnx7.d.ts} +49 -14
- package/dist/video/index.cjs +1 -94
- package/dist/video/index.js +1 -94
- package/dist/{view.d-BtN_L_UF.d.ts → view.d-CK2UN4qn.d.ts} +3 -3
- package/dist/{view.d-BTnjZu2S.d.cts → view.d-DUhKppyl.d.cts} +3 -3
- package/dist/web/consent/index.cjs +1 -94
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/consent/index.js +1 -94
- package/dist/web/health-plan/index.cjs +1 -94
- package/dist/web/health-plan/index.d.cts +11 -11
- package/dist/web/health-plan/index.d.ts +11 -11
- package/dist/web/health-plan/index.js +1 -94
- package/dist/web/inbox/index.cjs +49 -0
- package/dist/web/inbox/index.d.cts +191 -0
- package/dist/web/inbox/index.d.ts +191 -0
- package/dist/web/inbox/index.js +49 -0
- package/dist/web/index.cjs +28 -118
- package/dist/web/index.d.cts +76 -36
- package/dist/web/index.d.ts +76 -36
- package/dist/web/index.js +28 -118
- package/dist/web/intro/index.cjs +3 -96
- package/dist/web/intro/index.d.cts +6 -6
- package/dist/web/intro/index.d.ts +6 -6
- package/dist/web/intro/index.js +3 -96
- package/dist/web/notifications/index.cjs +16 -96
- package/dist/web/notifications/index.d.cts +8 -3
- package/dist/web/notifications/index.d.ts +8 -3
- package/dist/web/notifications/index.js +16 -96
- package/dist/web/records/depth/index.cjs +1 -94
- package/dist/web/records/depth/index.d.cts +9 -9
- package/dist/web/records/depth/index.d.ts +9 -9
- package/dist/web/records/depth/index.js +1 -94
- package/dist/web/records/index.cjs +1 -94
- package/dist/web/records/index.d.cts +11 -11
- package/dist/web/records/index.d.ts +11 -11
- package/dist/web/records/index.js +1 -94
- package/dist/web/records-sheet/index.cjs +2 -95
- package/dist/web/records-sheet/index.js +2 -95
- package/dist/web/shop/index.d.cts +3 -3
- package/dist/web/shop/index.d.ts +3 -3
- package/dist/web/televet/booking/index.cjs +1 -94
- package/dist/web/televet/booking/index.d.cts +6 -6
- package/dist/web/televet/booking/index.d.ts +6 -6
- package/dist/web/televet/booking/index.js +1 -94
- package/dist/web/televet/index.cjs +1 -94
- package/dist/web/televet/index.js +1 -94
- package/dist/web/texting/index.cjs +1 -94
- package/dist/web/texting/index.d.cts +5 -5
- package/dist/web/texting/index.d.ts +5 -5
- package/dist/web/texting/index.js +1 -94
- package/notifications/inbox/package.json +8 -0
- package/package.json +29 -1
- package/web/inbox/native-blocked.cjs +12 -0
- package/web/inbox/package.json +8 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
+
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
3
|
+
import { P as PetRef, U as UserRef } from './ids.d-B2GAAifq.js';
|
|
4
|
+
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
|
|
5
|
+
import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
|
|
6
|
+
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
7
|
+
import { A as AuthContext } from './identity.d-DIOnFzXL.js';
|
|
8
|
+
import { d as EverfurNotification } from './parse.d-Do0sdAgm.js';
|
|
9
|
+
|
|
10
|
+
/** The words of the inbox. Every key is a plain string. */
|
|
11
|
+
interface EverfurInboxCopy {
|
|
12
|
+
/** The list's heading and accessible name. */
|
|
13
|
+
readonly title: string;
|
|
14
|
+
/** The loading state's accessible name. */
|
|
15
|
+
readonly loading: string;
|
|
16
|
+
readonly emptyTitle: string;
|
|
17
|
+
readonly emptyBody: string;
|
|
18
|
+
/** The list failed to load. */
|
|
19
|
+
readonly errorTitle: string;
|
|
20
|
+
readonly errorBody: string;
|
|
21
|
+
readonly retry: string;
|
|
22
|
+
/** A row whose title arrived empty. */
|
|
23
|
+
readonly rowFallbackTitle: string;
|
|
24
|
+
/** Before an unread row's accessible name. */
|
|
25
|
+
readonly unreadPrefix: string;
|
|
26
|
+
/** After a relative time in an accessible name ("2h ago"). */
|
|
27
|
+
readonly timeAgoSuffix: string;
|
|
28
|
+
/** A time under a minute ago. */
|
|
29
|
+
readonly now: string;
|
|
30
|
+
/** Read the next older page. */
|
|
31
|
+
readonly more: string;
|
|
32
|
+
/** One item failed to load. */
|
|
33
|
+
readonly detailErrorTitle: string;
|
|
34
|
+
readonly detailErrorBody: string;
|
|
35
|
+
/** One item is gone (expired after 90 days, or removed). */
|
|
36
|
+
readonly notFoundTitle: string;
|
|
37
|
+
readonly notFoundBody: string;
|
|
38
|
+
/** Back from one item to the list. */
|
|
39
|
+
readonly back: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* What an inbox item is about, as the wire names it: `kind`, then the item's references under their wire keys
|
|
44
|
+
* (`pet_ref`, `visit_ref`, `intent`...). Values are short opaque strings or null; route on `kind` and treat a kind
|
|
45
|
+
* you do not know as "open the item".
|
|
46
|
+
*/
|
|
47
|
+
interface EverfurInboxTarget {
|
|
48
|
+
readonly kind: string;
|
|
49
|
+
readonly [key: string]: string | null;
|
|
50
|
+
}
|
|
51
|
+
/** One inbox item. */
|
|
52
|
+
interface EverfurInboxItem {
|
|
53
|
+
/** Everfur's id for the item (`inb_...`). */
|
|
54
|
+
readonly id: string;
|
|
55
|
+
/** The notification type's settings key (`playbook.C07`, `partner.record.ready`...). */
|
|
56
|
+
readonly typeKey: string;
|
|
57
|
+
/** The partner event type when there is one (`record.ready`), else null. */
|
|
58
|
+
readonly eventType: string | null;
|
|
59
|
+
/** The event id (`evt_...`) the same message carried on push, when there is one. */
|
|
60
|
+
readonly eventId: string | null;
|
|
61
|
+
/** The words Everfur wrote for the member. Plain text: render it as text, never as markup. */
|
|
62
|
+
readonly title: string;
|
|
63
|
+
readonly body: string;
|
|
64
|
+
/** Your pet reference the item is about, or null. */
|
|
65
|
+
readonly petRef: PetRef | null;
|
|
66
|
+
/** What the item is about, or null when it is a message with nothing to open. */
|
|
67
|
+
readonly target: EverfurInboxTarget | null;
|
|
68
|
+
/** ISO 8601. */
|
|
69
|
+
readonly createdAt: string;
|
|
70
|
+
/** ISO 8601, or null while unread. */
|
|
71
|
+
readonly readAt: string | null;
|
|
72
|
+
}
|
|
73
|
+
/** One page of the inbox, newest first. */
|
|
74
|
+
interface EverfurInboxPage {
|
|
75
|
+
readonly items: readonly EverfurInboxItem[];
|
|
76
|
+
/** Pass it back as `cursor` for the next (older) page; null on the last page. */
|
|
77
|
+
readonly nextCursor: string | null;
|
|
78
|
+
/** The member's unread items across the whole inbox. */
|
|
79
|
+
readonly unreadCount: number;
|
|
80
|
+
}
|
|
81
|
+
/** What `listPage` reads. Every field is optional. */
|
|
82
|
+
interface EverfurInboxQuery {
|
|
83
|
+
/** Items per page, 1 to 50 (default 20). */
|
|
84
|
+
readonly limit?: number;
|
|
85
|
+
/** The `nextCursor` of the page before. */
|
|
86
|
+
readonly cursor?: string;
|
|
87
|
+
/** Only the items about this pet. */
|
|
88
|
+
readonly petRef?: PetRef;
|
|
89
|
+
/** Only the item of this event (`evt_...`): how a tapped web push finds its item. */
|
|
90
|
+
readonly eventId?: string;
|
|
91
|
+
}
|
|
92
|
+
/** A tapped item, ready to route: the item, and the typed routing block when the item carries one. */
|
|
93
|
+
interface EverfurInboxOpen {
|
|
94
|
+
readonly item: EverfurInboxItem;
|
|
95
|
+
/**
|
|
96
|
+
* The item's target read the way `parseEverfurNotification` reads a tapped push, or null when the item names no
|
|
97
|
+
* event or its target is malformed (a kind this release does not know parses as `unknown`, as on a push). Route on
|
|
98
|
+
* `notification.target.kind` when present;
|
|
99
|
+
* otherwise on `item.target`, or show the item itself.
|
|
100
|
+
*/
|
|
101
|
+
readonly notification: EverfurNotification | null;
|
|
102
|
+
}
|
|
103
|
+
interface EverfurInboxClient {
|
|
104
|
+
/** `GET /widget/v1/inbox`. Settles `ok(EverfurInboxPage)`; the not-found error while the inbox is off for your tenant. */
|
|
105
|
+
listPage(query?: EverfurInboxQuery, opts?: {
|
|
106
|
+
readonly signal?: AbortSignal;
|
|
107
|
+
}): Promise<EverfurResult<EverfurInboxPage>>;
|
|
108
|
+
/** `GET /widget/v1/inbox/{item_id}`. An unknown, expired or another member's item is the not-found error. */
|
|
109
|
+
getItem(itemId: string, opts?: {
|
|
110
|
+
readonly signal?: AbortSignal;
|
|
111
|
+
}): Promise<EverfurResult<EverfurInboxItem>>;
|
|
112
|
+
/** `POST /widget/v1/inbox/read` with these ids (1 to 100). Idempotent. Settles the unread count after it. */
|
|
113
|
+
markRead(itemIds: readonly string[]): Promise<EverfurResult<number>>;
|
|
114
|
+
/** `POST /widget/v1/inbox/read` with `all`. Idempotent. Settles the unread count after it (0). */
|
|
115
|
+
markAllRead(): Promise<EverfurResult<number>>;
|
|
116
|
+
/** `GET /widget/v1/inbox/unread-count`. */
|
|
117
|
+
unreadCount(opts?: {
|
|
118
|
+
readonly signal?: AbortSignal;
|
|
119
|
+
}): Promise<EverfurResult<number>>;
|
|
120
|
+
}
|
|
121
|
+
/** The part of the runtime this client needs, read at call time. Any `EverfurRuntime` satisfies it. */
|
|
122
|
+
interface InboxRuntime {
|
|
123
|
+
readonly isDisposed: boolean;
|
|
124
|
+
readonly registry: {
|
|
125
|
+
readonly services: {
|
|
126
|
+
authFor(userRef: UserRef | null): AuthContext;
|
|
127
|
+
readonly errorPolicy: ErrorPolicyPort | undefined;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The client over the runtime under your provider (`useEverfurContext().runtime`). Auth is read at call time, so the
|
|
133
|
+
* client can be built once and reused across sign-ins; a disposed runtime settles every verb without a request.
|
|
134
|
+
*/
|
|
135
|
+
declare function createInboxClient(runtime: InboxRuntime): EverfurInboxClient;
|
|
136
|
+
|
|
137
|
+
/** Where the inbox stands. `off`: the inbox is not switched on for your tenant. */
|
|
138
|
+
type EverfurInboxStatus = 'idle' | 'loading' | 'ready' | 'off' | 'error';
|
|
139
|
+
interface EverfurInboxSnapshot {
|
|
140
|
+
readonly status: EverfurInboxStatus;
|
|
141
|
+
/** Every item read so far, newest first. */
|
|
142
|
+
readonly items: readonly EverfurInboxItem[];
|
|
143
|
+
/** The member's unread items across the inbox; null until a read answered. */
|
|
144
|
+
readonly unreadCount: number | null;
|
|
145
|
+
/** True while there are older items to read (`loadMore`). */
|
|
146
|
+
readonly hasMore: boolean;
|
|
147
|
+
/** A `refresh` is reading the first page again. */
|
|
148
|
+
readonly refreshing: boolean;
|
|
149
|
+
/** A `loadMore` is reading an older page. */
|
|
150
|
+
readonly loadingMore: boolean;
|
|
151
|
+
/** The last read's failure, or null. `error.displayMessage` is safe to show. */
|
|
152
|
+
readonly error: EverfurError | null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
interface UseEverfurInboxOptions {
|
|
156
|
+
/** Only this pet's items. Absent, every item of the member (the inbox is the member's, not one pet's). */
|
|
157
|
+
readonly petRef?: PetRef | null;
|
|
158
|
+
/** Items per page, 1 to 50 (default 20). */
|
|
159
|
+
readonly pageSize?: number;
|
|
160
|
+
/**
|
|
161
|
+
* When to read again. Absent, the host's own signals (the page becoming visible again on the web, and a push
|
|
162
|
+
* Everfur's service worker received; the app returning to the foreground on React Native); pass your port to add
|
|
163
|
+
* your own push announcement (`onAnnounced`), or `null` to read on mount only.
|
|
164
|
+
*/
|
|
165
|
+
readonly lifecycle?: LifecyclePort | null;
|
|
166
|
+
}
|
|
167
|
+
interface EverfurInboxState extends EverfurInboxSnapshot {
|
|
168
|
+
/** Read the first page again now (a retry, a pull to refresh). Settles; never throws. */
|
|
169
|
+
refresh(): Promise<void>;
|
|
170
|
+
/** Read the next older page. */
|
|
171
|
+
loadMore(): Promise<void>;
|
|
172
|
+
markRead(itemId: string): Promise<EverfurResult<void>>;
|
|
173
|
+
markAllRead(): Promise<EverfurResult<void>>;
|
|
174
|
+
/** The item ready to route (read from Everfur when it is not on screen), marked read. */
|
|
175
|
+
open(ref: {
|
|
176
|
+
readonly itemId?: string;
|
|
177
|
+
readonly eventId?: string;
|
|
178
|
+
}): Promise<EverfurResult<EverfurInboxOpen>>;
|
|
179
|
+
}
|
|
180
|
+
/** The inbox client bound to the runtime under your provider. */
|
|
181
|
+
declare function useEverfurInboxClient(): EverfurInboxClient;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Called with a tapped item, already marked read. Route `open.notification?.target` (or `open.item.target`) as you
|
|
185
|
+
* route a tapped push. Return `false` to have the inbox show the item itself instead. A throw is swallowed.
|
|
186
|
+
*/
|
|
187
|
+
type EverfurInboxOpenHandler = (open: EverfurInboxOpen) => boolean | void;
|
|
188
|
+
|
|
189
|
+
interface UseEverfurInboxUnreadOptions {
|
|
190
|
+
/**
|
|
191
|
+
* When to read again. Absent, the host's own signals (as `useEverfurInbox`); pass your port to add your own push
|
|
192
|
+
* announcement (`onAnnounced`), or `null` to read on mount only.
|
|
193
|
+
*/
|
|
194
|
+
readonly lifecycle?: LifecyclePort | null;
|
|
195
|
+
}
|
|
196
|
+
interface EverfurInboxUnread {
|
|
197
|
+
/**
|
|
198
|
+
* The member's unread inbox items across pets, shared with `EverfurInbox`; null until read, while signed out, and
|
|
199
|
+
* while the inbox is off for your tenant.
|
|
200
|
+
*/
|
|
201
|
+
readonly unreadCount: number | null;
|
|
202
|
+
/** Read the count again now, for example from your own push handler. Settles; never throws. */
|
|
203
|
+
readonly refresh: () => Promise<void>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export { type EverfurInboxOpenHandler as E, type InboxRuntime as I, type UseEverfurInboxOptions as U, type EverfurInboxCopy as a, type EverfurInboxState as b, type UseEverfurInboxUnreadOptions as c, type EverfurInboxUnread as d, type EverfurInboxClient as e, type EverfurInboxItem as f, type EverfurInboxOpen as g, type EverfurInboxPage as h, type EverfurInboxQuery as i, type EverfurInboxSnapshot as j, type EverfurInboxStatus as k, type EverfurInboxTarget as l, createInboxClient as m, useEverfurInboxClient as u };
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
+
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
3
|
+
import { P as PetRef, U as UserRef } from './ids.d-B2GAAifq.cjs';
|
|
4
|
+
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
|
|
5
|
+
import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
|
|
6
|
+
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
7
|
+
import { A as AuthContext } from './identity.d-CA7mW59I.cjs';
|
|
8
|
+
import { d as EverfurNotification } from './parse.d-DYsx1Q2V.cjs';
|
|
9
|
+
|
|
10
|
+
/** The words of the inbox. Every key is a plain string. */
|
|
11
|
+
interface EverfurInboxCopy {
|
|
12
|
+
/** The list's heading and accessible name. */
|
|
13
|
+
readonly title: string;
|
|
14
|
+
/** The loading state's accessible name. */
|
|
15
|
+
readonly loading: string;
|
|
16
|
+
readonly emptyTitle: string;
|
|
17
|
+
readonly emptyBody: string;
|
|
18
|
+
/** The list failed to load. */
|
|
19
|
+
readonly errorTitle: string;
|
|
20
|
+
readonly errorBody: string;
|
|
21
|
+
readonly retry: string;
|
|
22
|
+
/** A row whose title arrived empty. */
|
|
23
|
+
readonly rowFallbackTitle: string;
|
|
24
|
+
/** Before an unread row's accessible name. */
|
|
25
|
+
readonly unreadPrefix: string;
|
|
26
|
+
/** After a relative time in an accessible name ("2h ago"). */
|
|
27
|
+
readonly timeAgoSuffix: string;
|
|
28
|
+
/** A time under a minute ago. */
|
|
29
|
+
readonly now: string;
|
|
30
|
+
/** Read the next older page. */
|
|
31
|
+
readonly more: string;
|
|
32
|
+
/** One item failed to load. */
|
|
33
|
+
readonly detailErrorTitle: string;
|
|
34
|
+
readonly detailErrorBody: string;
|
|
35
|
+
/** One item is gone (expired after 90 days, or removed). */
|
|
36
|
+
readonly notFoundTitle: string;
|
|
37
|
+
readonly notFoundBody: string;
|
|
38
|
+
/** Back from one item to the list. */
|
|
39
|
+
readonly back: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* What an inbox item is about, as the wire names it: `kind`, then the item's references under their wire keys
|
|
44
|
+
* (`pet_ref`, `visit_ref`, `intent`...). Values are short opaque strings or null; route on `kind` and treat a kind
|
|
45
|
+
* you do not know as "open the item".
|
|
46
|
+
*/
|
|
47
|
+
interface EverfurInboxTarget {
|
|
48
|
+
readonly kind: string;
|
|
49
|
+
readonly [key: string]: string | null;
|
|
50
|
+
}
|
|
51
|
+
/** One inbox item. */
|
|
52
|
+
interface EverfurInboxItem {
|
|
53
|
+
/** Everfur's id for the item (`inb_...`). */
|
|
54
|
+
readonly id: string;
|
|
55
|
+
/** The notification type's settings key (`playbook.C07`, `partner.record.ready`...). */
|
|
56
|
+
readonly typeKey: string;
|
|
57
|
+
/** The partner event type when there is one (`record.ready`), else null. */
|
|
58
|
+
readonly eventType: string | null;
|
|
59
|
+
/** The event id (`evt_...`) the same message carried on push, when there is one. */
|
|
60
|
+
readonly eventId: string | null;
|
|
61
|
+
/** The words Everfur wrote for the member. Plain text: render it as text, never as markup. */
|
|
62
|
+
readonly title: string;
|
|
63
|
+
readonly body: string;
|
|
64
|
+
/** Your pet reference the item is about, or null. */
|
|
65
|
+
readonly petRef: PetRef | null;
|
|
66
|
+
/** What the item is about, or null when it is a message with nothing to open. */
|
|
67
|
+
readonly target: EverfurInboxTarget | null;
|
|
68
|
+
/** ISO 8601. */
|
|
69
|
+
readonly createdAt: string;
|
|
70
|
+
/** ISO 8601, or null while unread. */
|
|
71
|
+
readonly readAt: string | null;
|
|
72
|
+
}
|
|
73
|
+
/** One page of the inbox, newest first. */
|
|
74
|
+
interface EverfurInboxPage {
|
|
75
|
+
readonly items: readonly EverfurInboxItem[];
|
|
76
|
+
/** Pass it back as `cursor` for the next (older) page; null on the last page. */
|
|
77
|
+
readonly nextCursor: string | null;
|
|
78
|
+
/** The member's unread items across the whole inbox. */
|
|
79
|
+
readonly unreadCount: number;
|
|
80
|
+
}
|
|
81
|
+
/** What `listPage` reads. Every field is optional. */
|
|
82
|
+
interface EverfurInboxQuery {
|
|
83
|
+
/** Items per page, 1 to 50 (default 20). */
|
|
84
|
+
readonly limit?: number;
|
|
85
|
+
/** The `nextCursor` of the page before. */
|
|
86
|
+
readonly cursor?: string;
|
|
87
|
+
/** Only the items about this pet. */
|
|
88
|
+
readonly petRef?: PetRef;
|
|
89
|
+
/** Only the item of this event (`evt_...`): how a tapped web push finds its item. */
|
|
90
|
+
readonly eventId?: string;
|
|
91
|
+
}
|
|
92
|
+
/** A tapped item, ready to route: the item, and the typed routing block when the item carries one. */
|
|
93
|
+
interface EverfurInboxOpen {
|
|
94
|
+
readonly item: EverfurInboxItem;
|
|
95
|
+
/**
|
|
96
|
+
* The item's target read the way `parseEverfurNotification` reads a tapped push, or null when the item names no
|
|
97
|
+
* event or its target is malformed (a kind this release does not know parses as `unknown`, as on a push). Route on
|
|
98
|
+
* `notification.target.kind` when present;
|
|
99
|
+
* otherwise on `item.target`, or show the item itself.
|
|
100
|
+
*/
|
|
101
|
+
readonly notification: EverfurNotification | null;
|
|
102
|
+
}
|
|
103
|
+
interface EverfurInboxClient {
|
|
104
|
+
/** `GET /widget/v1/inbox`. Settles `ok(EverfurInboxPage)`; the not-found error while the inbox is off for your tenant. */
|
|
105
|
+
listPage(query?: EverfurInboxQuery, opts?: {
|
|
106
|
+
readonly signal?: AbortSignal;
|
|
107
|
+
}): Promise<EverfurResult<EverfurInboxPage>>;
|
|
108
|
+
/** `GET /widget/v1/inbox/{item_id}`. An unknown, expired or another member's item is the not-found error. */
|
|
109
|
+
getItem(itemId: string, opts?: {
|
|
110
|
+
readonly signal?: AbortSignal;
|
|
111
|
+
}): Promise<EverfurResult<EverfurInboxItem>>;
|
|
112
|
+
/** `POST /widget/v1/inbox/read` with these ids (1 to 100). Idempotent. Settles the unread count after it. */
|
|
113
|
+
markRead(itemIds: readonly string[]): Promise<EverfurResult<number>>;
|
|
114
|
+
/** `POST /widget/v1/inbox/read` with `all`. Idempotent. Settles the unread count after it (0). */
|
|
115
|
+
markAllRead(): Promise<EverfurResult<number>>;
|
|
116
|
+
/** `GET /widget/v1/inbox/unread-count`. */
|
|
117
|
+
unreadCount(opts?: {
|
|
118
|
+
readonly signal?: AbortSignal;
|
|
119
|
+
}): Promise<EverfurResult<number>>;
|
|
120
|
+
}
|
|
121
|
+
/** The part of the runtime this client needs, read at call time. Any `EverfurRuntime` satisfies it. */
|
|
122
|
+
interface InboxRuntime {
|
|
123
|
+
readonly isDisposed: boolean;
|
|
124
|
+
readonly registry: {
|
|
125
|
+
readonly services: {
|
|
126
|
+
authFor(userRef: UserRef | null): AuthContext;
|
|
127
|
+
readonly errorPolicy: ErrorPolicyPort | undefined;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The client over the runtime under your provider (`useEverfurContext().runtime`). Auth is read at call time, so the
|
|
133
|
+
* client can be built once and reused across sign-ins; a disposed runtime settles every verb without a request.
|
|
134
|
+
*/
|
|
135
|
+
declare function createInboxClient(runtime: InboxRuntime): EverfurInboxClient;
|
|
136
|
+
|
|
137
|
+
/** Where the inbox stands. `off`: the inbox is not switched on for your tenant. */
|
|
138
|
+
type EverfurInboxStatus = 'idle' | 'loading' | 'ready' | 'off' | 'error';
|
|
139
|
+
interface EverfurInboxSnapshot {
|
|
140
|
+
readonly status: EverfurInboxStatus;
|
|
141
|
+
/** Every item read so far, newest first. */
|
|
142
|
+
readonly items: readonly EverfurInboxItem[];
|
|
143
|
+
/** The member's unread items across the inbox; null until a read answered. */
|
|
144
|
+
readonly unreadCount: number | null;
|
|
145
|
+
/** True while there are older items to read (`loadMore`). */
|
|
146
|
+
readonly hasMore: boolean;
|
|
147
|
+
/** A `refresh` is reading the first page again. */
|
|
148
|
+
readonly refreshing: boolean;
|
|
149
|
+
/** A `loadMore` is reading an older page. */
|
|
150
|
+
readonly loadingMore: boolean;
|
|
151
|
+
/** The last read's failure, or null. `error.displayMessage` is safe to show. */
|
|
152
|
+
readonly error: EverfurError | null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
interface UseEverfurInboxOptions {
|
|
156
|
+
/** Only this pet's items. Absent, every item of the member (the inbox is the member's, not one pet's). */
|
|
157
|
+
readonly petRef?: PetRef | null;
|
|
158
|
+
/** Items per page, 1 to 50 (default 20). */
|
|
159
|
+
readonly pageSize?: number;
|
|
160
|
+
/**
|
|
161
|
+
* When to read again. Absent, the host's own signals (the page becoming visible again on the web, and a push
|
|
162
|
+
* Everfur's service worker received; the app returning to the foreground on React Native); pass your port to add
|
|
163
|
+
* your own push announcement (`onAnnounced`), or `null` to read on mount only.
|
|
164
|
+
*/
|
|
165
|
+
readonly lifecycle?: LifecyclePort | null;
|
|
166
|
+
}
|
|
167
|
+
interface EverfurInboxState extends EverfurInboxSnapshot {
|
|
168
|
+
/** Read the first page again now (a retry, a pull to refresh). Settles; never throws. */
|
|
169
|
+
refresh(): Promise<void>;
|
|
170
|
+
/** Read the next older page. */
|
|
171
|
+
loadMore(): Promise<void>;
|
|
172
|
+
markRead(itemId: string): Promise<EverfurResult<void>>;
|
|
173
|
+
markAllRead(): Promise<EverfurResult<void>>;
|
|
174
|
+
/** The item ready to route (read from Everfur when it is not on screen), marked read. */
|
|
175
|
+
open(ref: {
|
|
176
|
+
readonly itemId?: string;
|
|
177
|
+
readonly eventId?: string;
|
|
178
|
+
}): Promise<EverfurResult<EverfurInboxOpen>>;
|
|
179
|
+
}
|
|
180
|
+
/** The inbox client bound to the runtime under your provider. */
|
|
181
|
+
declare function useEverfurInboxClient(): EverfurInboxClient;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Called with a tapped item, already marked read. Route `open.notification?.target` (or `open.item.target`) as you
|
|
185
|
+
* route a tapped push. Return `false` to have the inbox show the item itself instead. A throw is swallowed.
|
|
186
|
+
*/
|
|
187
|
+
type EverfurInboxOpenHandler = (open: EverfurInboxOpen) => boolean | void;
|
|
188
|
+
|
|
189
|
+
interface UseEverfurInboxUnreadOptions {
|
|
190
|
+
/**
|
|
191
|
+
* When to read again. Absent, the host's own signals (as `useEverfurInbox`); pass your port to add your own push
|
|
192
|
+
* announcement (`onAnnounced`), or `null` to read on mount only.
|
|
193
|
+
*/
|
|
194
|
+
readonly lifecycle?: LifecyclePort | null;
|
|
195
|
+
}
|
|
196
|
+
interface EverfurInboxUnread {
|
|
197
|
+
/**
|
|
198
|
+
* The member's unread inbox items across pets, shared with `EverfurInbox`; null until read, while signed out, and
|
|
199
|
+
* while the inbox is off for your tenant.
|
|
200
|
+
*/
|
|
201
|
+
readonly unreadCount: number | null;
|
|
202
|
+
/** Read the count again now, for example from your own push handler. Settles; never throws. */
|
|
203
|
+
readonly refresh: () => Promise<void>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export { type EverfurInboxOpenHandler as E, type InboxRuntime as I, type UseEverfurInboxOptions as U, type EverfurInboxCopy as a, type EverfurInboxState as b, type UseEverfurInboxUnreadOptions as c, type EverfurInboxUnread as d, type EverfurInboxClient as e, type EverfurInboxItem as f, type EverfurInboxOpen as g, type EverfurInboxPage as h, type EverfurInboxQuery as i, type EverfurInboxSnapshot as j, type EverfurInboxStatus as k, type EverfurInboxTarget as l, createInboxClient as m, useEverfurInboxClient as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { s as HealthPlanReasonKind, b as HealthPlanItem, p as HealthPlan, q as HealthPlanRepository, t as HealthPlanPagePet, c as HealthPlanFocusDesign, H as HealthPlanPage } from './focus.d-
|
|
2
|
+
import { s as HealthPlanReasonKind, b as HealthPlanItem, p as HealthPlan, q as HealthPlanRepository, t as HealthPlanPagePet, c as HealthPlanFocusDesign, H as HealthPlanPage } from './focus.d-RJMXplJc.cjs';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
|
|
5
5
|
import { P as PetRef } from './ids.d-B2GAAifq.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { s as HealthPlanReasonKind, b as HealthPlanItem, p as HealthPlan, q as HealthPlanRepository, t as HealthPlanPagePet, c as HealthPlanFocusDesign, H as HealthPlanPage } from './focus.d-
|
|
2
|
+
import { s as HealthPlanReasonKind, b as HealthPlanItem, p as HealthPlan, q as HealthPlanRepository, t as HealthPlanPagePet, c as HealthPlanFocusDesign, H as HealthPlanPage } from './focus.d-CG6KhDBK.js';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
|
|
5
5
|
import { P as PetRef } from './ids.d-B2GAAifq.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
|
|
3
3
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
4
4
|
import { P as PetRef } from './ids.d-B2GAAifq.cjs';
|
|
5
|
-
import { l as RecordsDepthClient } from './depth.d-
|
|
5
|
+
import { l as RecordsDepthClient } from './depth.d-BYwddMNU.cjs';
|
|
6
6
|
|
|
7
7
|
type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
|
|
8
8
|
/** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
|
|
3
3
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
4
4
|
import { P as PetRef } from './ids.d-B2GAAifq.js';
|
|
5
|
-
import { l as RecordsDepthClient } from './depth.d-
|
|
5
|
+
import { l as RecordsDepthClient } from './depth.d-C99_xup2.js';
|
|
6
6
|
|
|
7
7
|
type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
|
|
8
8
|
/** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */
|
|
@@ -3,11 +3,11 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
4
|
import { P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.cjs';
|
|
5
5
|
import { i as EverfurPresentationInput } from './presentation.d-Bs8xQ4gD.cjs';
|
|
6
|
-
import { a as ChatCheckinTarget } from './
|
|
7
|
-
import { W as WidgetPet, P as PetProfileInput } from './petsRepository.d-
|
|
6
|
+
import { a as ChatCheckinTarget } from './chatTypes.d-CSyw9em_.cjs';
|
|
7
|
+
import { W as WidgetPet, P as PetProfileInput } from './petsRepository.d-tZADfKA1.cjs';
|
|
8
8
|
import { E as EverfurStarterPrompt } from './quickPrompts.d-NM_81Jc1.cjs';
|
|
9
9
|
import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
|
|
10
|
-
import { U as UrgencyDisplayLevel, E as EverfurChatDraftStore, b as ChatFollowUpPolicy } from './
|
|
10
|
+
import { U as UrgencyDisplayLevel, E as EverfurChatDraftStore, b as ChatFollowUpPolicy, i as UseEverfurUnreadOptions, d as EverfurUnreadState } from './chatHandoffToken.d-D6GUoBvs.cjs';
|
|
11
11
|
import { F as FileHandle } from './ports.d-BX4f4UsB.cjs';
|
|
12
12
|
import { g as EverfurChatOpeningCard, a as EverfurChatAnswerCards, f as EverfurChatHistorySheet, e as EverfurChatHistoryBar, c as EverfurChatEmptyState } from './threadOptions.d-bEAFkIsC.cjs';
|
|
13
13
|
import { E as EverfurChatEmptyHeaderContext, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.cjs';
|
|
@@ -52,7 +52,10 @@ interface EverfurChatProps {
|
|
|
52
52
|
* copy control; absent, no copy control renders (the SDK depends on no clipboard module).
|
|
53
53
|
*/
|
|
54
54
|
readonly onCopy?: (text: string) => Promise<void> | void;
|
|
55
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Called after the user picked another pet in the header switcher, or a `checkinTarget` moved the chat to its
|
|
57
|
+
* pet, and the provider re-scoped to it.
|
|
58
|
+
*/
|
|
56
59
|
readonly onPetChange?: (petRef: PetRef) => void;
|
|
57
60
|
/**
|
|
58
61
|
* Your vet-visit preparation screen. Given, the empty thread's `Help me prep for {pet}’s vet visit` chip
|
|
@@ -83,11 +86,21 @@ interface EverfurChatProps {
|
|
|
83
86
|
*/
|
|
84
87
|
readonly onAddPet?: () => void;
|
|
85
88
|
/**
|
|
86
|
-
* The
|
|
87
|
-
* opens that thread
|
|
88
|
-
* sees instead of something they would have to find in the
|
|
89
|
+
* The thread a tapped Everfur push is about: the `case` or `chat` target `parseEverfurNotification` returned.
|
|
90
|
+
* Chat opens that thread once per target, after it has finished opening, so a due follow-up question or a
|
|
91
|
+
* message Everfur left is the first thing the member sees instead of something they would have to find in the
|
|
92
|
+
* history drawer. A target without a conversation opens the newest thread of its pet, and reading that pet's
|
|
93
|
+
* list is what places the message in it. Without your own `petRef`, a target for another pet first switches
|
|
94
|
+
* the chat to that pet, as the header's switcher does (`onPetChange` is called). Absent, chat opens as usual.
|
|
89
95
|
*/
|
|
90
96
|
readonly checkinTarget?: ChatCheckinTarget;
|
|
97
|
+
/**
|
|
98
|
+
* The token of a chat handoff link Everfur texted the member (`#efch=` on your app link): read it with
|
|
99
|
+
* `chatHandoffTokenFromUrl(url)` and pass it here. Chat redeems it with the member's session and opens that conversation, on its
|
|
100
|
+
* pet, once. A link that is no longer valid (expired, already replaced, another member's) opens chat as usual
|
|
101
|
+
* and shows nothing about the link. A `checkinTarget` wins over it. Never store or log the token.
|
|
102
|
+
*/
|
|
103
|
+
readonly handoffToken?: string;
|
|
91
104
|
/**
|
|
92
105
|
* A question to ask on arrival, in a conversation of its own: the prompt one of your own screens built
|
|
93
106
|
* (an Everfur records "Ask Everfur" pill hands you one). It is asked once, after chat has finished
|
|
@@ -116,6 +129,12 @@ interface EverfurChatProps {
|
|
|
116
129
|
* case chat refreshes only when the user does something.
|
|
117
130
|
*/
|
|
118
131
|
readonly lifecycle?: LifecyclePort | null;
|
|
132
|
+
/**
|
|
133
|
+
* With no thread open (a blank chat), let a refresh (your app coming back, connectivity returning, a push you
|
|
134
|
+
* announce through `lifecycle`) open the newest thread when it has an unread reply, as the chat already does when
|
|
135
|
+
* it mounts. Default false: a blank chat stays blank until the member opens a thread.
|
|
136
|
+
*/
|
|
137
|
+
readonly openUnreadOnRefresh?: boolean;
|
|
119
138
|
/**
|
|
120
139
|
* Your own storage for an unsent draft. Given, what the user typed and did not send survives leaving this
|
|
121
140
|
* screen; absent, the draft lives in memory for as long as the surface is mounted and nowhere else.
|
|
@@ -140,13 +159,22 @@ interface EverfurChatProps {
|
|
|
140
159
|
*/
|
|
141
160
|
readonly vetPrefer?: 'in-app' | 'redirect';
|
|
142
161
|
/**
|
|
143
|
-
* Your opener for a web page chat links to:
|
|
144
|
-
* deck (`kind` `'citation'
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* `(url) => Linking.openURL(url)` for the Everfur
|
|
162
|
+
* Your opener for a web page chat links to, always an https URL: the source page behind a card in an answer's
|
|
163
|
+
* sources deck (`kind` `'citation'`), or a link in a message when `linkHosts` turns those on (`kind` `'message'`).
|
|
164
|
+
* Absent (the default), a source card is read-only (its title, meta line and excerpt show) and a message link
|
|
165
|
+
* opens in the system browser (`Linking.openURL`). Given, the card is a link too, and a tap on either goes here,
|
|
166
|
+
* so you can show the page in your own in-app browser; pass `(url) => Linking.openURL(url)` for the Everfur
|
|
167
|
+
* app's system browser. A throw or a rejection is contained.
|
|
148
168
|
*/
|
|
149
|
-
readonly onOpenUrl?: (url: string, kind: 'citation') => void | Promise<void>;
|
|
169
|
+
readonly onOpenUrl?: (url: string, kind: 'citation' | 'message') => void | Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* Turns links in messages on. Absent (the default), every address in a reply stays plain text, as before this
|
|
172
|
+
* option existed. Given, an https address in a settled reply is a link when its host is Everfur's own (everfur.com
|
|
173
|
+
* and its subdomains) or one listed here; pass `[]` for Everfur's own alone. An entry is a host matched exactly
|
|
174
|
+
* (`shop.example.com`) or `*.` and a host for its subdomains (`*.example.com`). Any other address, and anything
|
|
175
|
+
* that is not https, stays plain text.
|
|
176
|
+
*/
|
|
177
|
+
readonly linkHosts?: readonly string[];
|
|
150
178
|
/**
|
|
151
179
|
* How far the top of the view that holds this chat sits below the top of the screen, in points: React
|
|
152
180
|
* Native's `KeyboardAvoidingView` prop of the same name, which the chat's own avoiding view receives, so the
|
|
@@ -253,4 +281,11 @@ declare function registerEverfurDictation(next: EverfurDictationLoader | null):
|
|
|
253
281
|
/** The app's foreground edge for EverfurChat: AppState going from `background` back to `active`. */
|
|
254
282
|
declare function createAppStateLifecycle(): LifecyclePort;
|
|
255
283
|
|
|
256
|
-
|
|
284
|
+
/**
|
|
285
|
+
* Whether the member has unread Everfur chat for a pet (absent, the provider's active pet). Reads the pet's chat
|
|
286
|
+
* list on mount and when the app returns to the foreground; a mounted `EverfurChat` keeps it current too. Every
|
|
287
|
+
* field is null until the first read answers, and while signed out.
|
|
288
|
+
*/
|
|
289
|
+
declare function useEverfurUnread(options?: UseEverfurUnreadOptions): EverfurUnreadState;
|
|
290
|
+
|
|
291
|
+
export { type AttachmentSource as A, type EverfurChatAttachments as E, type RenderVetAction as R, type EverfurChatProps as a, type EverfurDictationLoader as b, createAppStateLifecycle as c, registerEverfurDictation as r, useEverfurUnread as u };
|