@everfur/sdk 0.18.3 → 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/CHANGELOG.md +141 -0
- package/dist/{Chat.d-CKKuXVw5.d.ts → Chat.d-D61LLPJh.d.ts} +1 -1
- package/dist/{Chat.d-BEbRI8FZ.d.cts → Chat.d-IpxKa9gS.d.cts} +1 -1
- package/dist/{DepthViews.d-CiU4f98J.d.ts → DepthViews.d-C8EsR8Gq.d.ts} +1 -1
- package/dist/{DepthViews.d-BiePRa3Z.d.cts → DepthViews.d-CDIL4mPa.d.cts} +1 -1
- package/dist/{DepthViews.d-Chn2xwZu.d.cts → DepthViews.d-Q1nqdH8n.d.cts} +1 -1
- package/dist/{DepthViews.d-_WMIpymE.d.ts → DepthViews.d-w2o4Nf7r.d.ts} +1 -1
- package/dist/{RecordsPage.d-CtNzoxre.d.cts → RecordsPage.d-BSjZOHu8.d.cts} +11 -5
- package/dist/{RecordsPage.d-CRRJM35Q.d.ts → RecordsPage.d-DqhM_rCr.d.ts} +11 -5
- 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-BLEOCUU7.d.cts → attachments.d-BviU_Tja.d.cts} +2 -2
- package/dist/{attachments.d-DRkqNR-o.d.ts → attachments.d-DZVfHHnY.d.ts} +2 -2
- package/dist/{bookingCopy.d-CrUufdoE.d.ts → bookingCopy.d-5V3erfXD.d.ts} +2 -2
- package/dist/{bookingCopy.d-CoiNXrY8.d.cts → bookingCopy.d-DlzUPsFE.d.cts} +2 -2
- package/dist/{casesRepository.d-OyZOSNNv.d.cts → casesRepository.d-7Us2O-z8.d.cts} +1 -1
- package/dist/{casesRepository.d-DhI69yuj.d.ts → casesRepository.d-Dqg-KbpA.d.ts} +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-CeXw6R7_.d.cts → chatHandoffToken.d-B9pjkEfl.d.cts} +33 -9
- package/dist/{attachments.d-d1rWAw9K.d.ts → chatHandoffToken.d-TYcD8NIi.d.ts} +33 -9
- package/dist/{ports.d-CIfa_XF6.d.ts → chatTypes.d-DPALEQoW.d.ts} +41 -52
- package/dist/{ports.d--OjPUqPb.d.cts → chatTypes.d-RnQ5R4zP.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-C6MzLj3X.d.cts} +3 -3
- package/dist/{clinicBatch.d-CcqnQ7-d.d.ts → clinicBatch.d-t9hkown2.d.ts} +3 -3
- package/dist/{clinicRequestProps.d-CjsMg_OD.d.ts → clinicRequestProps.d-BuMuGoVZ.d.ts} +1 -1
- package/dist/{clinicRequestProps.d-1dCtouGA.d.cts → clinicRequestProps.d-DjzUdDFx.d.cts} +1 -1
- package/dist/{config.d-KX-EkQ9j.d.ts → config.d-BnZkxI5a.d.ts} +1 -1
- package/dist/{config.d-Z_fyOZke.d.cts → config.d-DoC-XaJ0.d.cts} +1 -1
- package/dist/consent/index.cjs +2 -95
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +2 -95
- package/dist/{context.d-DV5E_2Fs.d.cts → context.d-BAh7C7T4.d.cts} +7 -6
- package/dist/{context.d-DY6d4qXG.d.ts → context.d-z2zIjKEb.d.ts} +7 -6
- package/dist/{copy.d-CMY9OoCC.d.cts → copy.d-BkX6G-Ws.d.cts} +2 -2
- package/dist/{copy.d-BPzpKGGc.d.ts → copy.d-DLxgHsZZ.d.ts} +2 -2
- package/dist/core/index.cjs +6 -99
- package/dist/core/index.d.cts +15 -14
- package/dist/core/index.d.ts +15 -14
- package/dist/core/index.js +6 -99
- package/dist/{depth.d-qVYPByPb.d.cts → depth.d-aXddCjyh.d.cts} +3 -3
- package/dist/{depth.d-B_qNSgXr.d.ts → depth.d-z2FlzY3x.d.ts} +3 -3
- package/dist/{entitlementRepository.d-CwTVi7he.d.cts → entitlementRepository.d-CDCF8eFx.d.cts} +2 -2
- package/dist/{entitlementRepository.d-BXDWPyP8.d.ts → entitlementRepository.d-Cgmy4Opa.d.ts} +2 -2
- package/dist/{focus.d-BPofD7ow.d.ts → focus.d-C2fd_5MW.d.ts} +2 -2
- package/dist/{focus.d-DJD4lWFB.d.cts → focus.d-q_sXGhLn.d.cts} +2 -2
- package/dist/health-plan/index.cjs +1 -94
- package/dist/health-plan/index.d.cts +10 -10
- package/dist/health-plan/index.d.ts +10 -10
- package/dist/health-plan/index.js +1 -94
- package/dist/{idempotency.d-BmYuCb-n.d.cts → idempotency.d-Bqdyv_yn.d.cts} +1 -1
- package/dist/{idempotency.d-BVO0mU2R.d.ts → idempotency.d-DlAPAxD5.d.ts} +1 -1
- package/dist/{identity.d-CRVNfZzQ.d.ts → identity.d-BWZiaByn.d.ts} +1 -1
- package/dist/{identity.d-3ROlHbnP.d.cts → identity.d-CooKscNj.d.cts} +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-C8bDDiK6.d.cts} +1 -1
- package/dist/{introEvents.d-cvMxJfYd.d.ts → introEvents.d-baVM016i.d.ts} +1 -1
- package/dist/{models.d-BSqvbTE1.d.cts → models.d-BN53M9sU.d.cts} +52 -1
- package/dist/{models.d-DOwnr8fi.d.ts → models.d-Bhq9p6Wa.d.ts} +52 -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-C04aX0Hs.d.ts} +2 -2
- package/dist/{optInView.d-CU1U_K-B.d.cts → optInView.d-D_D7fs6C.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-BRsbR8QU.d.ts → pets.d-CkFNO-x-.d.ts} +1 -1
- package/dist/{pets.d-5SMtOAwB.d.cts → pets.d-oJ2OIY22.d.cts} +1 -1
- package/dist/{petsRepository.d-DWsChqAS.d.ts → petsRepository.d-CKCi6rtp.d.ts} +1 -1
- package/dist/{petsRepository.d-DEnoZn92.d.cts → petsRepository.d-VWMyIeIJ.d.cts} +1 -1
- package/dist/photo/index.cjs +1 -94
- package/dist/photo/index.js +1 -94
- package/dist/records/depth/index.cjs +2 -95
- package/dist/records/depth/index.d.cts +11 -11
- package/dist/records/depth/index.d.ts +11 -11
- package/dist/records/depth/index.js +2 -95
- package/dist/records/index.cjs +17 -108
- package/dist/records/index.d.cts +47 -17
- package/dist/records/index.d.ts +47 -17
- package/dist/records/index.js +17 -108
- package/dist/{requestFunnel.d-CQX_Z1Hi.d.cts → requestFunnel.d-By0-I8Cp.d.cts} +2 -2
- package/dist/{requestFunnel.d-DSvCGf4J.d.ts → requestFunnel.d-DVCytzTE.d.ts} +2 -2
- package/dist/{parse.d-icynBIS-.d.ts → route.d-Ay-lRct1.d.ts} +90 -53
- package/dist/{parse.d-GzZJYu__.d.cts → route.d-DQDX6QFn.d.cts} +90 -53
- package/dist/{runtimeTypes.d-Be_vhOER.d.ts → runtimeTypes.d-C49Cgb9c.d.ts} +39 -5
- package/dist/{runtimeTypes.d-sXpNYnJp.d.cts → runtimeTypes.d-DUVNpR6g.d.cts} +39 -5
- package/dist/{screenProps.d-DpMK2_gi.d.ts → screenProps.d-B_arD3Lh.d.ts} +2 -2
- package/dist/{screenProps.d-BW6PZh5k.d.cts → screenProps.d-BgxlmfG5.d.cts} +2 -2
- 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/{sheetSeam.d-BBuEIVsa.d.cts → sheetSeam.d-B9iQqG_I.d.cts} +2 -2
- package/dist/{sheetSeam.d-B09jf4YC.d.ts → sheetSeam.d-CtuKILqp.d.ts} +2 -2
- 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 +8 -8
- package/dist/tabs/index.d.ts +8 -8
- 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 +9 -8
- package/dist/testing/rn/index.d.ts +9 -8
- package/dist/testing/rn/index.js +1 -94
- package/dist/testing/web/index.cjs +1 -94
- package/dist/testing/web/index.d.cts +10 -9
- package/dist/testing/web/index.d.ts +10 -9
- 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-Cbhjjb9_.d.ts} +2 -2
- package/dist/{threadOptions.d-Csmb-XgL.d.cts → threadOptions.d-pZXzsd2d.d.cts} +2 -2
- package/dist/{timelineRows.d-B0XZevKx.d.ts → timelineRows.d-BHxMeZzl.d.ts} +1 -1
- package/dist/{timelineRows.d-Kllr7Mcu.d.cts → timelineRows.d-DlMs82N1.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-BoC7H85G.d.ts} +2 -2
- package/dist/{useHealthPlanSubscription.d-C-c_mQ4u.d.cts → useHealthPlanSubscription.d-CZn06-lu.d.cts} +2 -2
- package/dist/useInboxUnread.d-DW0dpWdv.d.cts +206 -0
- package/dist/useInboxUnread.d-vYpOXVRv.d.ts +206 -0
- package/dist/{usePresentation.d-CmQgbrZr.d.ts → usePresentation.d-CgvwGb2A.d.ts} +2 -2
- package/dist/{usePresentation.d-BHKhBKQn.d.cts → usePresentation.d-CyCEJ6nj.d.cts} +2 -2
- package/dist/{useRecords.d-BYNX01El.d.cts → useRecords.d-BMSW4aRD.d.cts} +46 -3
- package/dist/{useRecords.d-DWk61a4c.d.ts → useRecords.d-Cv1nhZrv.d.ts} +46 -3
- package/dist/{useRecordsDepth.d-BilHZaR4.d.ts → useRecordsDepth.d-CbXhWbx7.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-WW_2cWwU.d.cts → useRecordsDepth.d-CcbL98FD.d.cts} +1 -1
- package/dist/{appStateLifecycle.d-JuPhh7Oy.d.ts → useUnread.d-BsZKbLp9.d.ts} +49 -14
- package/dist/{appStateLifecycle.d-BQcy4J5O.d.cts → useUnread.d-CfF2Cx-q.d.cts} +49 -14
- package/dist/video/index.cjs +1 -94
- package/dist/video/index.js +1 -94
- package/dist/{view.d-BTnjZu2S.d.cts → view.d-CF3AP3T7.d.cts} +5 -5
- package/dist/{view.d-BtN_L_UF.d.ts → view.d-DdyOf0T0.d.ts} +5 -5
- package/dist/web/consent/index.cjs +2 -95
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/consent/index.js +2 -95
- package/dist/web/health-plan/index.cjs +1 -94
- package/dist/web/health-plan/index.d.cts +12 -12
- package/dist/web/health-plan/index.d.ts +12 -12
- 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 +80 -40
- package/dist/web/index.d.ts +80 -40
- package/dist/web/index.js +28 -118
- package/dist/web/intro/index.cjs +3 -96
- package/dist/web/intro/index.d.cts +8 -8
- package/dist/web/intro/index.d.ts +8 -8
- 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 +2 -95
- package/dist/web/records/depth/index.d.cts +11 -11
- package/dist/web/records/depth/index.d.ts +11 -11
- package/dist/web/records/depth/index.js +2 -95
- package/dist/web/records/index.cjs +16 -107
- package/dist/web/records/index.d.cts +43 -19
- package/dist/web/records/index.d.ts +43 -19
- package/dist/web/records/index.js +16 -107
- package/dist/web/records-sheet/index.cjs +2 -95
- package/dist/web/records-sheet/index.d.cts +4 -4
- package/dist/web/records-sheet/index.d.ts +4 -4
- 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-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-CooKscNj.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 };
|
|
@@ -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-BWZiaByn.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 };
|
|
@@ -1,10 +1,10 @@
|
|
|
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-C2fd_5MW.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';
|
|
6
6
|
import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
|
|
7
|
-
import {
|
|
7
|
+
import { e as RecordsRequestView, g as RecordsView } from './models.d-Bhq9p6Wa.js';
|
|
8
8
|
import { c as EverfurChatTopCardRow, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.js';
|
|
9
9
|
import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-Bs8xQ4gD.js';
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
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-q_sXGhLn.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';
|
|
6
6
|
import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
|
|
7
|
-
import {
|
|
7
|
+
import { e as RecordsRequestView, g as RecordsView } from './models.d-BN53M9sU.cjs';
|
|
8
8
|
import { c as EverfurChatTopCardRow, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.cjs';
|
|
9
9
|
import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-Bs8xQ4gD.cjs';
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
|
4
4
|
import { R as RecordsRequestId, P as PetRef } from './ids.d-B2GAAifq.cjs';
|
|
5
5
|
import { F as FileHandle, U as UploadTransport } from './ports.d-BX4f4UsB.cjs';
|
|
6
6
|
import { a as RecordsFeatures, b as RecordsUploadContentType } from './features.d-DrQxTw3-.cjs';
|
|
7
|
-
import { C as CreateUploadRequestInput,
|
|
7
|
+
import { C as CreateUploadRequestInput, e as RecordsRequestView, U as UploadedDocument, g as RecordsView, h as ConsentState, G as GrantConsentInput, M as MemberConsentState, i as GrantConsentAllPetsInput, j as RevokeConsentAllPetsInput, c as RecordsConsentScope, k as RecordsDenialReason } from './models.d-BN53M9sU.cjs';
|
|
8
8
|
|
|
9
9
|
interface UploadDocumentInput {
|
|
10
10
|
readonly requestId: RecordsRequestId;
|
|
@@ -29,6 +29,25 @@ interface RecordsController {
|
|
|
29
29
|
grantConsent(input: GrantConsentInput): Promise<EverfurResult<ConsentState>>;
|
|
30
30
|
/** Revoke consent (prospective). Drops any cached record for the pet from memory. Idempotent. */
|
|
31
31
|
revokeConsent(pet: PetRef): Promise<EverfurResult<ConsentState>>;
|
|
32
|
+
/**
|
|
33
|
+
* `GET /widget/v1/records/consent`: the member-wide consent and its per-pet read-back. OPTIONAL so a host's
|
|
34
|
+
* own controller still satisfies this interface.
|
|
35
|
+
*/
|
|
36
|
+
getMemberConsent?(): Promise<EverfurResult<MemberConsentState>>;
|
|
37
|
+
/**
|
|
38
|
+
* Grant records consent for ALL the member's current pets in one decision (`PUT /widget/v1/records/consent`);
|
|
39
|
+
* a pet added later is not covered by it. On an older backend that 404s the route, it records the grant pet by pet
|
|
40
|
+
* over the per-pet route instead (`input.listPetRefs`, always including `input.petRef`); a pet whose grant fails
|
|
41
|
+
* there is named in the result's `failed`. OPTIONAL, as above.
|
|
42
|
+
*/
|
|
43
|
+
grantConsentAllPets?(input: GrantConsentAllPetsInput): Promise<EverfurResult<MemberConsentState>>;
|
|
44
|
+
/**
|
|
45
|
+
* Withdraw records consent for ALL the member's pets (`DELETE /widget/v1/records/consent`), with the same
|
|
46
|
+
* per-pet fallback. Drops every cached record from memory. Fail-closed: on the fallback it settles `ok` only when
|
|
47
|
+
* every pet confirmed the withdrawal; a failed or unknown pet list, or any pet that fails, is an error (each pet
|
|
48
|
+
* that was withdrawn is still reported through `input.onRevoked`). OPTIONAL, as above.
|
|
49
|
+
*/
|
|
50
|
+
revokeConsentAllPets?(input: RevokeConsentAllPetsInput): Promise<EverfurResult<MemberConsentState>>;
|
|
32
51
|
/** The last record read for a pet, held in memory only; cleared on revoke. Null when none. */
|
|
33
52
|
peekCachedRecord(pet: PetRef): RecordsView | null;
|
|
34
53
|
/** Emit `records.capability.denied` (the rn CapabilityGate disabled surface calls this once, R12). */
|
|
@@ -67,6 +86,11 @@ interface UseEverfurRecordsState {
|
|
|
67
86
|
/** the most-recent request, whose timeline the populated state renders. */
|
|
68
87
|
readonly activeRequest: RecordsRequestView | null;
|
|
69
88
|
readonly consent: ConsentState | null;
|
|
89
|
+
/**
|
|
90
|
+
* What `grantConsent` and `revokeConsent` cover: `'pet'` (the default), or `'all_pets'` when the hook was opened
|
|
91
|
+
* with it and the controller can both grant and withdraw for all pets. The consent gate states `'all_pets'`.
|
|
92
|
+
*/
|
|
93
|
+
readonly consentScope: RecordsConsentScope;
|
|
70
94
|
readonly error: EverfurError | null;
|
|
71
95
|
/** drives the recovery affordance: consent CTA / establish-session CTA / disabled. */
|
|
72
96
|
readonly denialReason: RecordsDenialReason | null;
|
|
@@ -92,10 +116,23 @@ interface UseEverfurRecordsState {
|
|
|
92
116
|
* any request is created, so no quota is charged for it. Resolves with the settled rows.
|
|
93
117
|
*/
|
|
94
118
|
uploadDocuments(requestId: RecordsRequestView['id'], files: readonly FileHandle[]): Promise<readonly UploadQueueItem[]>;
|
|
95
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Grant content-exposure consent, then fetch the record. Covers this pet only, unless `consentScope` is
|
|
121
|
+
* `'all_pets'`, which covers ALL the member's current pets. Settles to this pet's state; a per-pet
|
|
122
|
+
* fallback grant that missed another pet settles to that pet's error, so the member can retry.
|
|
123
|
+
*/
|
|
96
124
|
grantConsent(consentVersion: string, idempotencyKey: string): Promise<EverfurResult<ConsentState>>;
|
|
97
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Revoke consent (prospective); drops the record from view. Under `consentScope: 'all_pets'` it withdraws for ALL
|
|
127
|
+
* the member's pets, exactly as `revokeConsentAllPets` does, so it always undoes what `grantConsent` recorded.
|
|
128
|
+
*/
|
|
98
129
|
revokeConsent(): Promise<EverfurResult<ConsentState>>;
|
|
130
|
+
/**
|
|
131
|
+
* Revoke consent for ALL the member's pets (prospective); drops every withdrawn pet's record from view. Falls
|
|
132
|
+
* back to a per-pet withdrawal on an older backend without the member-wide route. Fail-closed: settles `ok` only
|
|
133
|
+
* when every pet confirmed it, and to an error on a controller without `revokeConsentAllPets`.
|
|
134
|
+
*/
|
|
135
|
+
revokeConsentAllPets(): Promise<EverfurResult<MemberConsentState>>;
|
|
99
136
|
/**
|
|
100
137
|
* Re-run the surface fetch (error retry, pull to refresh). Settles once the reads it started have landed, so a
|
|
101
138
|
* pull-to-refresh spinner can stay up until then; a caller that does not need that can ignore the promise.
|
|
@@ -117,6 +154,12 @@ declare function useEverfurRecords(opts: {
|
|
|
117
154
|
* none leaves it off and issues no read.
|
|
118
155
|
*/
|
|
119
156
|
readonly readUploadFeatures?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* What `grantConsent` covers. `'pet'` (the default) records it for this pet only, as before; `'all_pets'` is one
|
|
159
|
+
* consent for every pet the member has now. Opt in only with consent text, and a new
|
|
160
|
+
* `consentVersion`, that say so.
|
|
161
|
+
*/
|
|
162
|
+
readonly consentScope?: RecordsConsentScope;
|
|
120
163
|
}): UseEverfurRecordsState;
|
|
121
164
|
|
|
122
165
|
export { type RecordsController as R, type UseEverfurRecordsState as U, type RecordsStatus as a, type UploadDocumentInput as b, type UploadQueueItem as c, type UploadSkipReason as d, useEverfurRecords as u };
|
|
@@ -4,7 +4,7 @@ import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
|
4
4
|
import { R as RecordsRequestId, P as PetRef } from './ids.d-B2GAAifq.js';
|
|
5
5
|
import { F as FileHandle, U as UploadTransport } from './ports.d-BX4f4UsB.js';
|
|
6
6
|
import { a as RecordsFeatures, b as RecordsUploadContentType } from './features.d-DrQxTw3-.js';
|
|
7
|
-
import { C as CreateUploadRequestInput,
|
|
7
|
+
import { C as CreateUploadRequestInput, e as RecordsRequestView, U as UploadedDocument, g as RecordsView, h as ConsentState, G as GrantConsentInput, M as MemberConsentState, i as GrantConsentAllPetsInput, j as RevokeConsentAllPetsInput, c as RecordsConsentScope, k as RecordsDenialReason } from './models.d-Bhq9p6Wa.js';
|
|
8
8
|
|
|
9
9
|
interface UploadDocumentInput {
|
|
10
10
|
readonly requestId: RecordsRequestId;
|
|
@@ -29,6 +29,25 @@ interface RecordsController {
|
|
|
29
29
|
grantConsent(input: GrantConsentInput): Promise<EverfurResult<ConsentState>>;
|
|
30
30
|
/** Revoke consent (prospective). Drops any cached record for the pet from memory. Idempotent. */
|
|
31
31
|
revokeConsent(pet: PetRef): Promise<EverfurResult<ConsentState>>;
|
|
32
|
+
/**
|
|
33
|
+
* `GET /widget/v1/records/consent`: the member-wide consent and its per-pet read-back. OPTIONAL so a host's
|
|
34
|
+
* own controller still satisfies this interface.
|
|
35
|
+
*/
|
|
36
|
+
getMemberConsent?(): Promise<EverfurResult<MemberConsentState>>;
|
|
37
|
+
/**
|
|
38
|
+
* Grant records consent for ALL the member's current pets in one decision (`PUT /widget/v1/records/consent`);
|
|
39
|
+
* a pet added later is not covered by it. On an older backend that 404s the route, it records the grant pet by pet
|
|
40
|
+
* over the per-pet route instead (`input.listPetRefs`, always including `input.petRef`); a pet whose grant fails
|
|
41
|
+
* there is named in the result's `failed`. OPTIONAL, as above.
|
|
42
|
+
*/
|
|
43
|
+
grantConsentAllPets?(input: GrantConsentAllPetsInput): Promise<EverfurResult<MemberConsentState>>;
|
|
44
|
+
/**
|
|
45
|
+
* Withdraw records consent for ALL the member's pets (`DELETE /widget/v1/records/consent`), with the same
|
|
46
|
+
* per-pet fallback. Drops every cached record from memory. Fail-closed: on the fallback it settles `ok` only when
|
|
47
|
+
* every pet confirmed the withdrawal; a failed or unknown pet list, or any pet that fails, is an error (each pet
|
|
48
|
+
* that was withdrawn is still reported through `input.onRevoked`). OPTIONAL, as above.
|
|
49
|
+
*/
|
|
50
|
+
revokeConsentAllPets?(input: RevokeConsentAllPetsInput): Promise<EverfurResult<MemberConsentState>>;
|
|
32
51
|
/** The last record read for a pet, held in memory only; cleared on revoke. Null when none. */
|
|
33
52
|
peekCachedRecord(pet: PetRef): RecordsView | null;
|
|
34
53
|
/** Emit `records.capability.denied` (the rn CapabilityGate disabled surface calls this once, R12). */
|
|
@@ -67,6 +86,11 @@ interface UseEverfurRecordsState {
|
|
|
67
86
|
/** the most-recent request, whose timeline the populated state renders. */
|
|
68
87
|
readonly activeRequest: RecordsRequestView | null;
|
|
69
88
|
readonly consent: ConsentState | null;
|
|
89
|
+
/**
|
|
90
|
+
* What `grantConsent` and `revokeConsent` cover: `'pet'` (the default), or `'all_pets'` when the hook was opened
|
|
91
|
+
* with it and the controller can both grant and withdraw for all pets. The consent gate states `'all_pets'`.
|
|
92
|
+
*/
|
|
93
|
+
readonly consentScope: RecordsConsentScope;
|
|
70
94
|
readonly error: EverfurError | null;
|
|
71
95
|
/** drives the recovery affordance: consent CTA / establish-session CTA / disabled. */
|
|
72
96
|
readonly denialReason: RecordsDenialReason | null;
|
|
@@ -92,10 +116,23 @@ interface UseEverfurRecordsState {
|
|
|
92
116
|
* any request is created, so no quota is charged for it. Resolves with the settled rows.
|
|
93
117
|
*/
|
|
94
118
|
uploadDocuments(requestId: RecordsRequestView['id'], files: readonly FileHandle[]): Promise<readonly UploadQueueItem[]>;
|
|
95
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Grant content-exposure consent, then fetch the record. Covers this pet only, unless `consentScope` is
|
|
121
|
+
* `'all_pets'`, which covers ALL the member's current pets. Settles to this pet's state; a per-pet
|
|
122
|
+
* fallback grant that missed another pet settles to that pet's error, so the member can retry.
|
|
123
|
+
*/
|
|
96
124
|
grantConsent(consentVersion: string, idempotencyKey: string): Promise<EverfurResult<ConsentState>>;
|
|
97
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Revoke consent (prospective); drops the record from view. Under `consentScope: 'all_pets'` it withdraws for ALL
|
|
127
|
+
* the member's pets, exactly as `revokeConsentAllPets` does, so it always undoes what `grantConsent` recorded.
|
|
128
|
+
*/
|
|
98
129
|
revokeConsent(): Promise<EverfurResult<ConsentState>>;
|
|
130
|
+
/**
|
|
131
|
+
* Revoke consent for ALL the member's pets (prospective); drops every withdrawn pet's record from view. Falls
|
|
132
|
+
* back to a per-pet withdrawal on an older backend without the member-wide route. Fail-closed: settles `ok` only
|
|
133
|
+
* when every pet confirmed it, and to an error on a controller without `revokeConsentAllPets`.
|
|
134
|
+
*/
|
|
135
|
+
revokeConsentAllPets(): Promise<EverfurResult<MemberConsentState>>;
|
|
99
136
|
/**
|
|
100
137
|
* Re-run the surface fetch (error retry, pull to refresh). Settles once the reads it started have landed, so a
|
|
101
138
|
* pull-to-refresh spinner can stay up until then; a caller that does not need that can ignore the promise.
|
|
@@ -117,6 +154,12 @@ declare function useEverfurRecords(opts: {
|
|
|
117
154
|
* none leaves it off and issues no read.
|
|
118
155
|
*/
|
|
119
156
|
readonly readUploadFeatures?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* What `grantConsent` covers. `'pet'` (the default) records it for this pet only, as before; `'all_pets'` is one
|
|
159
|
+
* consent for every pet the member has now. Opt in only with consent text, and a new
|
|
160
|
+
* `consentVersion`, that say so.
|
|
161
|
+
*/
|
|
162
|
+
readonly consentScope?: RecordsConsentScope;
|
|
120
163
|
}): UseEverfurRecordsState;
|
|
121
164
|
|
|
122
165
|
export { type RecordsController as R, type UseEverfurRecordsState as U, type RecordsStatus as a, type UploadDocumentInput as b, type UploadQueueItem as c, type UploadSkipReason as d, useEverfurRecords as u };
|
|
@@ -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-z2FlzY3x.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. */
|
|
@@ -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-aXddCjyh.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. */
|