@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
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { b as EverfurErrorCode } from './EverfurError.d-8NHtlgzA.cjs';
|
|
3
3
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
4
4
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
5
|
-
import { d as EverfurRequest, F as Frame } from './config.d-
|
|
6
|
-
import { A as AuthContext } from './identity.d-
|
|
5
|
+
import { d as EverfurRequest, F as Frame } from './config.d-DoC-XaJ0.cjs';
|
|
6
|
+
import { A as AuthContext } from './identity.d-CooKscNj.cjs';
|
|
7
7
|
|
|
8
8
|
/** Why the funnel stopped, or kept going. Every settle and every retry names one. */
|
|
9
9
|
type FunnelRetryReason = 'ok' | 'aborted' | 'terminal-code' | 'attempts-exhausted' | 'daily-quota-exhausted' | 'burst-throttle' | 'retryable-code' | 'server-reset-beyond-budget';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { b as EverfurErrorCode } from './EverfurError.d-8NHtlgzA.js';
|
|
3
3
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
4
4
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
5
|
-
import { d as EverfurRequest, F as Frame } from './config.d-
|
|
6
|
-
import { A as AuthContext } from './identity.d-
|
|
5
|
+
import { d as EverfurRequest, F as Frame } from './config.d-BnZkxI5a.js';
|
|
6
|
+
import { A as AuthContext } from './identity.d-BWZiaByn.js';
|
|
7
7
|
|
|
8
8
|
/** Why the funnel stopped, or kept going. Every settle and every retry names one. */
|
|
9
9
|
type FunnelRetryReason = 'ok' | 'aborted' | 'terminal-code' | 'attempts-exhausted' | 'daily-quota-exhausted' | 'burst-throttle' | 'retryable-code' | 'server-reset-beyond-budget';
|
|
@@ -2,9 +2,11 @@
|
|
|
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 { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
5
|
-
import { A as AuthContext } from './identity.d-
|
|
6
|
-
import { U as UserRef,
|
|
5
|
+
import { A as AuthContext } from './identity.d-BWZiaByn.js';
|
|
6
|
+
import { U as UserRef, P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.js';
|
|
7
|
+
import { a as ChatCheckinTarget } from './chatTypes.d-DPALEQoW.js';
|
|
7
8
|
import { V as VetVisitIntent } from './visitIntent.d-D7_yVp1I.js';
|
|
9
|
+
import { d as EverfurNotification, g as EverfurNotificationTarget } from './parse.d-Do0sdAgm.js';
|
|
8
10
|
|
|
9
11
|
/** The push providers the registration route accepts. `apns` is refused with `provider_unsupported` until APNs direct lands. */
|
|
10
12
|
type PushProvider = 'expo' | 'fcm' | 'apns';
|
|
@@ -21,6 +23,18 @@ interface RegisterDeviceInput {
|
|
|
21
23
|
readonly platform: DevicePlatform;
|
|
22
24
|
/** Your own stable id for this install, if you keep one (1 to 128 characters). Echoed back, never interpreted. */
|
|
23
25
|
readonly installationId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The device's IANA time zone (`America/Chicago`, at most 64 characters), so Everfur holds pushes to the member's
|
|
28
|
+
* own quiet hours. Absent, null, or not a zone name, nothing is sent and Everfur uses your tenant's time zone.
|
|
29
|
+
*/
|
|
30
|
+
readonly timezone?: string | null;
|
|
31
|
+
/** The device's BCP 47 language tag (`en-US`, at most 35 characters). Absent, null, or malformed, nothing is sent. */
|
|
32
|
+
readonly locale?: string | null;
|
|
33
|
+
}
|
|
34
|
+
/** What `readDeviceLocale` read off the device: null for what it could not read. */
|
|
35
|
+
interface DeviceLocale {
|
|
36
|
+
readonly timezone: string | null;
|
|
37
|
+
readonly locale: string | null;
|
|
24
38
|
}
|
|
25
39
|
/** The device row as Everfur stored it. The token itself is never echoed. */
|
|
26
40
|
interface RegisteredDevice {
|
|
@@ -94,6 +108,11 @@ type NotificationsReasonCode = 'provider_unsupported' | 'token_invalid' | 'devic
|
|
|
94
108
|
declare const NOTIFICATIONS_REASON_MESSAGES: Readonly<Record<NotificationsReasonCode, string>>;
|
|
95
109
|
/** The developer-facing sentence for an error's `reasonCode`, or null when it carries none this surface knows. */
|
|
96
110
|
declare function explainNotificationsReason(error: EverfurError): string | null;
|
|
111
|
+
/**
|
|
112
|
+
* The device's time zone and language, read from `Intl` (the browser's, or Hermes' on React Native): null for either
|
|
113
|
+
* one it cannot read or that is not a well-formed name. Pass them to `registerDevice`; never throws.
|
|
114
|
+
*/
|
|
115
|
+
declare function readDeviceLocale(): DeviceLocale;
|
|
97
116
|
/**
|
|
98
117
|
* The client over the runtime under your provider (`useEverfurContext().runtime`). Auth is read at call time, so the
|
|
99
118
|
* client can be built once and reused across sign-ins; a disposed runtime settles every verb without a request.
|
|
@@ -113,6 +132,11 @@ interface EverfurNotificationsOptions {
|
|
|
113
132
|
readonly platform: DevicePlatform;
|
|
114
133
|
/** Your own stable id for this install, if you keep one. */
|
|
115
134
|
readonly installationId?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Send the device's time zone and language (`readDeviceLocale`) with each registration, so Everfur holds pushes to
|
|
137
|
+
* the member's own quiet hours. Default false: the registration carries the token, provider and platform only.
|
|
138
|
+
*/
|
|
139
|
+
readonly sendDeviceLocale?: boolean;
|
|
116
140
|
}
|
|
117
141
|
/**
|
|
118
142
|
* `signed_out`: no signed-in user on the provider (nothing to register). `no_token`: a user, no token yet.
|
|
@@ -145,67 +169,80 @@ declare function useEverfurNotificationsClient(): NotificationsClient;
|
|
|
145
169
|
*/
|
|
146
170
|
declare function useEverfurNotifications(options: EverfurNotificationsOptions): EverfurNotificationsState;
|
|
147
171
|
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
|
|
152
|
-
/** One target kind. */
|
|
153
|
-
type EverfurNotificationTargetKind = (typeof EVERFUR_NOTIFICATION_TARGET_KINDS)[number];
|
|
154
|
-
/**
|
|
155
|
-
* The event types Everfur builds a push target for (`partner_target.py` TARGET_BUILDERS), in its order. The member
|
|
156
|
-
* events, the urgency verdict and the endpoint test event reach the partner's webhook only and never a device, and
|
|
157
|
-
* `visit.completed`, `visit.rescheduled` and `visit.ended` carry no consumer copy, so they are never pushed either;
|
|
158
|
-
* they are listed because the platform builds their target.
|
|
159
|
-
*/
|
|
160
|
-
declare const EVERFUR_NOTIFICATION_EVENT_TYPES: readonly ["record_request.updated", "record.ready", "pet.vaccination.due", "visit.booked", "visit.cancelled", "visit.completed", "visit.no_show", "visit.rescheduled", "visit.reminder", "visit.followup_sent", "visit.message_received", "visit.ended", "chat.follow_up_due", "chat.reminder_due", "record.activation"];
|
|
161
|
-
/** One pushed event type. */
|
|
162
|
-
type EverfurNotificationEventType = (typeof EVERFUR_NOTIFICATION_EVENT_TYPES)[number];
|
|
163
|
-
/** What a tapped notification is about, keyed on `kind`. The optional references are null when the push carried none. */
|
|
164
|
-
type EverfurNotificationTarget = {
|
|
165
|
-
/**
|
|
166
|
-
* A records request (`record_request.updated`, `record.ready`, and `record.activation`, which says what the
|
|
167
|
-
* request's parse found): open that request.
|
|
168
|
-
*/
|
|
169
|
-
readonly kind: 'record_request';
|
|
170
|
-
readonly requestId: RecordsRequestId;
|
|
172
|
+
/** An SDK surface a tapped push opens, and what to hand it. Your navigation opens the screen that hosts it. */
|
|
173
|
+
type EverfurNotificationSurfaceRoute = {
|
|
174
|
+
/** `EverfurChat` on `petRef`, with `checkinTarget` (null: chat as it opens). */
|
|
175
|
+
readonly surface: 'chat';
|
|
171
176
|
readonly petRef: PetRef | null;
|
|
177
|
+
readonly checkinTarget: ChatCheckinTarget | null;
|
|
172
178
|
} | {
|
|
173
|
-
/**
|
|
174
|
-
readonly
|
|
175
|
-
readonly petRef: PetRef;
|
|
179
|
+
/** `EverfurRecords` on `petRef`, or `EverfurRecordsRequest` for `requestId` when the push named one. */
|
|
180
|
+
readonly surface: 'records';
|
|
181
|
+
readonly petRef: PetRef | null;
|
|
182
|
+
readonly requestId: RecordsRequestId | null;
|
|
176
183
|
} | {
|
|
177
|
-
/**
|
|
178
|
-
|
|
179
|
-
* `intent` is what to open for it, derived from the event type with the consumer app's routing (the push
|
|
180
|
-
* itself carries none): `visit` for a booking or a change to it, `join` for a reminder, `messages` for the
|
|
181
|
-
* vet's reply or the follow-up, `summary` for a completed visit. Pass both to `useVetVisit().openVisit`.
|
|
182
|
-
* `null` for a cancelled or missed visit: there is nothing left to open, so route to a new booking.
|
|
183
|
-
*/
|
|
184
|
-
readonly kind: 'visit';
|
|
184
|
+
/** The visit: `useVetVisit().openVisit(visitRef, intent)`; `intent` null means book a new one. */
|
|
185
|
+
readonly surface: 'visit';
|
|
185
186
|
readonly visitRef: string;
|
|
186
|
-
readonly petRef: PetRef | null;
|
|
187
187
|
readonly intent: VetVisitIntent | null;
|
|
188
|
+
readonly petRef: PetRef | null;
|
|
188
189
|
} | {
|
|
189
|
-
/**
|
|
190
|
-
readonly
|
|
191
|
-
readonly caseRef: string;
|
|
192
|
-
readonly conversationId: ConversationId | null;
|
|
190
|
+
/** `EverfurHealthPlan`, on `petRef` when the push named one. */
|
|
191
|
+
readonly surface: 'health_plan';
|
|
193
192
|
readonly petRef: PetRef | null;
|
|
194
193
|
};
|
|
195
|
-
/**
|
|
196
|
-
interface
|
|
197
|
-
|
|
194
|
+
/** What the inbox is asked to open: the item `itemId`, or the inbox itself when it is null. */
|
|
195
|
+
interface EverfurInboxRequest {
|
|
196
|
+
readonly itemId: string | null;
|
|
197
|
+
/** The push's event id, for an inbox that finds the item by its event when the push named none. */
|
|
198
198
|
readonly eventId: string;
|
|
199
|
-
readonly
|
|
200
|
-
|
|
199
|
+
readonly notification: EverfurNotification;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* The seam the member's inbox plugs into. `open` answers true when it took the tap (it may load the item after
|
|
203
|
+
* answering), false when it cannot open anything.
|
|
204
|
+
*/
|
|
205
|
+
interface EverfurInboxRouter {
|
|
206
|
+
open(request: EverfurInboxRequest): boolean;
|
|
207
|
+
}
|
|
208
|
+
/** No inbox: opens nothing, so a tap no other step took is `unrouted`. The default. */
|
|
209
|
+
declare const NO_INBOX_ROUTER: EverfurInboxRouter;
|
|
210
|
+
/**
|
|
211
|
+
* The inbox router for an app that mounts `EverfurInbox`: `openInbox` moves your navigation to the screen that hosts
|
|
212
|
+
* it, passing `itemId` as its `initialItemId` and, when `itemId` is null, `request.eventId` as its `initialEventId`
|
|
213
|
+
* (a native push names no item; the inbox finds it by its event, else shows the list). It takes every tap it is asked
|
|
214
|
+
* about.
|
|
215
|
+
*/
|
|
216
|
+
declare function createEverfurInboxRouter(openInbox: (itemId: string | null, request: EverfurInboxRequest) => void): EverfurInboxRouter;
|
|
217
|
+
interface EverfurNotificationRouterOptions {
|
|
218
|
+
/**
|
|
219
|
+
* Open one of the SDK's surfaces: move your navigation to the screen that hosts it, with what the route names.
|
|
220
|
+
* Absent, those targets go to `onTarget` like the rest.
|
|
221
|
+
*/
|
|
222
|
+
readonly onSurface?: (route: EverfurNotificationSurfaceRoute, notification: EverfurNotification) => void;
|
|
223
|
+
/**
|
|
224
|
+
* Your handler for a target the SDK has no surface for (`medication` and the `care.*` pet reminders, `order`,
|
|
225
|
+
* `walk`, `weather`, `pack`, `mood`, `card`, `membership`, `support`, `offer`), a kind this release does not know
|
|
226
|
+
* (`unknown`), and every target when there is no `onSurface`. Return true when you opened something for it. Any
|
|
227
|
+
* other answer (false, or nothing at all) passes the tap on to the inbox, so a handler that only routes some kinds
|
|
228
|
+
* never swallows the rest.
|
|
229
|
+
*/
|
|
230
|
+
readonly onTarget?: (target: EverfurNotificationTarget, notification: EverfurNotification) => boolean;
|
|
231
|
+
/** Where the member's inbox lives. Default `NO_INBOX_ROUTER`. */
|
|
232
|
+
readonly inbox?: EverfurInboxRouter;
|
|
201
233
|
}
|
|
234
|
+
/** Where a tap went. `unrouted`: no step took it (no handler for it and no inbox). */
|
|
235
|
+
type EverfurNotificationRouteOutcome = 'surface' | 'partner' | 'inbox' | 'unrouted';
|
|
236
|
+
/**
|
|
237
|
+
* The SDK surface a push's target opens, or null when the SDK has none for it (the partner's handler or the inbox
|
|
238
|
+
* takes it). Pure.
|
|
239
|
+
*/
|
|
240
|
+
declare function surfaceForNotification(notification: EverfurNotification): EverfurNotificationSurfaceRoute | null;
|
|
202
241
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* Pass the object your notification library gave you: an expo-notifications `Notification` or `NotificationResponse`,
|
|
207
|
-
* an FCM `RemoteMessage`, or its `data` map. Route on `target.kind`; `eventType` says why the push was sent.
|
|
242
|
+
* Route a parsed push: the SDK's surface for its target (`onSurface`), else your handler (`onTarget`), else the inbox
|
|
243
|
+
* item the push names, or the inbox (`inbox`). An `inbox` target goes to the inbox first. Settles to where the tap
|
|
244
|
+
* went; never throws.
|
|
208
245
|
*/
|
|
209
|
-
declare function
|
|
246
|
+
declare function routeEverfurNotification(notification: EverfurNotification, options?: EverfurNotificationRouterOptions): EverfurNotificationRouteOutcome;
|
|
210
247
|
|
|
211
|
-
export { type
|
|
248
|
+
export { type DeviceLocale as D, type EverfurNotificationsOptions as E, NOTIFICATIONS_REASON_MESSAGES as N, type PushProvider as P, type RegisterDeviceInput as R, type EverfurNotificationsState as a, type DevicePlatform as b, type EverfurInboxRequest as c, type EverfurInboxRouter as d, type EverfurNotificationRouteOutcome as e, type EverfurNotificationRouterOptions as f, type EverfurNotificationSurfaceRoute as g, type EverfurNotificationsStatus as h, NO_INBOX_ROUTER as i, type NotificationPreferences as j, type NotificationPreferencesInput as k, type NotificationsClient as l, type NotificationsReasonCode as m, type NotificationsRuntime as n, type RegisteredDevice as o, createEverfurInboxRouter as p, createNotificationsClient as q, explainNotificationsReason as r, readDeviceLocale as s, routeEverfurNotification as t, surfaceForNotification as u, useEverfurNotificationsClient as v, useEverfurNotifications as w };
|
|
@@ -2,9 +2,11 @@
|
|
|
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 { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
5
|
-
import { A as AuthContext } from './identity.d-
|
|
6
|
-
import { U as UserRef,
|
|
5
|
+
import { A as AuthContext } from './identity.d-CooKscNj.cjs';
|
|
6
|
+
import { U as UserRef, P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.cjs';
|
|
7
|
+
import { a as ChatCheckinTarget } from './chatTypes.d-RnQ5R4zP.cjs';
|
|
7
8
|
import { V as VetVisitIntent } from './visitIntent.d-D7_yVp1I.cjs';
|
|
9
|
+
import { d as EverfurNotification, g as EverfurNotificationTarget } from './parse.d-DYsx1Q2V.cjs';
|
|
8
10
|
|
|
9
11
|
/** The push providers the registration route accepts. `apns` is refused with `provider_unsupported` until APNs direct lands. */
|
|
10
12
|
type PushProvider = 'expo' | 'fcm' | 'apns';
|
|
@@ -21,6 +23,18 @@ interface RegisterDeviceInput {
|
|
|
21
23
|
readonly platform: DevicePlatform;
|
|
22
24
|
/** Your own stable id for this install, if you keep one (1 to 128 characters). Echoed back, never interpreted. */
|
|
23
25
|
readonly installationId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The device's IANA time zone (`America/Chicago`, at most 64 characters), so Everfur holds pushes to the member's
|
|
28
|
+
* own quiet hours. Absent, null, or not a zone name, nothing is sent and Everfur uses your tenant's time zone.
|
|
29
|
+
*/
|
|
30
|
+
readonly timezone?: string | null;
|
|
31
|
+
/** The device's BCP 47 language tag (`en-US`, at most 35 characters). Absent, null, or malformed, nothing is sent. */
|
|
32
|
+
readonly locale?: string | null;
|
|
33
|
+
}
|
|
34
|
+
/** What `readDeviceLocale` read off the device: null for what it could not read. */
|
|
35
|
+
interface DeviceLocale {
|
|
36
|
+
readonly timezone: string | null;
|
|
37
|
+
readonly locale: string | null;
|
|
24
38
|
}
|
|
25
39
|
/** The device row as Everfur stored it. The token itself is never echoed. */
|
|
26
40
|
interface RegisteredDevice {
|
|
@@ -94,6 +108,11 @@ type NotificationsReasonCode = 'provider_unsupported' | 'token_invalid' | 'devic
|
|
|
94
108
|
declare const NOTIFICATIONS_REASON_MESSAGES: Readonly<Record<NotificationsReasonCode, string>>;
|
|
95
109
|
/** The developer-facing sentence for an error's `reasonCode`, or null when it carries none this surface knows. */
|
|
96
110
|
declare function explainNotificationsReason(error: EverfurError): string | null;
|
|
111
|
+
/**
|
|
112
|
+
* The device's time zone and language, read from `Intl` (the browser's, or Hermes' on React Native): null for either
|
|
113
|
+
* one it cannot read or that is not a well-formed name. Pass them to `registerDevice`; never throws.
|
|
114
|
+
*/
|
|
115
|
+
declare function readDeviceLocale(): DeviceLocale;
|
|
97
116
|
/**
|
|
98
117
|
* The client over the runtime under your provider (`useEverfurContext().runtime`). Auth is read at call time, so the
|
|
99
118
|
* client can be built once and reused across sign-ins; a disposed runtime settles every verb without a request.
|
|
@@ -113,6 +132,11 @@ interface EverfurNotificationsOptions {
|
|
|
113
132
|
readonly platform: DevicePlatform;
|
|
114
133
|
/** Your own stable id for this install, if you keep one. */
|
|
115
134
|
readonly installationId?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Send the device's time zone and language (`readDeviceLocale`) with each registration, so Everfur holds pushes to
|
|
137
|
+
* the member's own quiet hours. Default false: the registration carries the token, provider and platform only.
|
|
138
|
+
*/
|
|
139
|
+
readonly sendDeviceLocale?: boolean;
|
|
116
140
|
}
|
|
117
141
|
/**
|
|
118
142
|
* `signed_out`: no signed-in user on the provider (nothing to register). `no_token`: a user, no token yet.
|
|
@@ -145,67 +169,80 @@ declare function useEverfurNotificationsClient(): NotificationsClient;
|
|
|
145
169
|
*/
|
|
146
170
|
declare function useEverfurNotifications(options: EverfurNotificationsOptions): EverfurNotificationsState;
|
|
147
171
|
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
|
|
152
|
-
/** One target kind. */
|
|
153
|
-
type EverfurNotificationTargetKind = (typeof EVERFUR_NOTIFICATION_TARGET_KINDS)[number];
|
|
154
|
-
/**
|
|
155
|
-
* The event types Everfur builds a push target for (`partner_target.py` TARGET_BUILDERS), in its order. The member
|
|
156
|
-
* events, the urgency verdict and the endpoint test event reach the partner's webhook only and never a device, and
|
|
157
|
-
* `visit.completed`, `visit.rescheduled` and `visit.ended` carry no consumer copy, so they are never pushed either;
|
|
158
|
-
* they are listed because the platform builds their target.
|
|
159
|
-
*/
|
|
160
|
-
declare const EVERFUR_NOTIFICATION_EVENT_TYPES: readonly ["record_request.updated", "record.ready", "pet.vaccination.due", "visit.booked", "visit.cancelled", "visit.completed", "visit.no_show", "visit.rescheduled", "visit.reminder", "visit.followup_sent", "visit.message_received", "visit.ended", "chat.follow_up_due", "chat.reminder_due", "record.activation"];
|
|
161
|
-
/** One pushed event type. */
|
|
162
|
-
type EverfurNotificationEventType = (typeof EVERFUR_NOTIFICATION_EVENT_TYPES)[number];
|
|
163
|
-
/** What a tapped notification is about, keyed on `kind`. The optional references are null when the push carried none. */
|
|
164
|
-
type EverfurNotificationTarget = {
|
|
165
|
-
/**
|
|
166
|
-
* A records request (`record_request.updated`, `record.ready`, and `record.activation`, which says what the
|
|
167
|
-
* request's parse found): open that request.
|
|
168
|
-
*/
|
|
169
|
-
readonly kind: 'record_request';
|
|
170
|
-
readonly requestId: RecordsRequestId;
|
|
172
|
+
/** An SDK surface a tapped push opens, and what to hand it. Your navigation opens the screen that hosts it. */
|
|
173
|
+
type EverfurNotificationSurfaceRoute = {
|
|
174
|
+
/** `EverfurChat` on `petRef`, with `checkinTarget` (null: chat as it opens). */
|
|
175
|
+
readonly surface: 'chat';
|
|
171
176
|
readonly petRef: PetRef | null;
|
|
177
|
+
readonly checkinTarget: ChatCheckinTarget | null;
|
|
172
178
|
} | {
|
|
173
|
-
/**
|
|
174
|
-
readonly
|
|
175
|
-
readonly petRef: PetRef;
|
|
179
|
+
/** `EverfurRecords` on `petRef`, or `EverfurRecordsRequest` for `requestId` when the push named one. */
|
|
180
|
+
readonly surface: 'records';
|
|
181
|
+
readonly petRef: PetRef | null;
|
|
182
|
+
readonly requestId: RecordsRequestId | null;
|
|
176
183
|
} | {
|
|
177
|
-
/**
|
|
178
|
-
|
|
179
|
-
* `intent` is what to open for it, derived from the event type with the consumer app's routing (the push
|
|
180
|
-
* itself carries none): `visit` for a booking or a change to it, `join` for a reminder, `messages` for the
|
|
181
|
-
* vet's reply or the follow-up, `summary` for a completed visit. Pass both to `useVetVisit().openVisit`.
|
|
182
|
-
* `null` for a cancelled or missed visit: there is nothing left to open, so route to a new booking.
|
|
183
|
-
*/
|
|
184
|
-
readonly kind: 'visit';
|
|
184
|
+
/** The visit: `useVetVisit().openVisit(visitRef, intent)`; `intent` null means book a new one. */
|
|
185
|
+
readonly surface: 'visit';
|
|
185
186
|
readonly visitRef: string;
|
|
186
|
-
readonly petRef: PetRef | null;
|
|
187
187
|
readonly intent: VetVisitIntent | null;
|
|
188
|
+
readonly petRef: PetRef | null;
|
|
188
189
|
} | {
|
|
189
|
-
/**
|
|
190
|
-
readonly
|
|
191
|
-
readonly caseRef: string;
|
|
192
|
-
readonly conversationId: ConversationId | null;
|
|
190
|
+
/** `EverfurHealthPlan`, on `petRef` when the push named one. */
|
|
191
|
+
readonly surface: 'health_plan';
|
|
193
192
|
readonly petRef: PetRef | null;
|
|
194
193
|
};
|
|
195
|
-
/**
|
|
196
|
-
interface
|
|
197
|
-
|
|
194
|
+
/** What the inbox is asked to open: the item `itemId`, or the inbox itself when it is null. */
|
|
195
|
+
interface EverfurInboxRequest {
|
|
196
|
+
readonly itemId: string | null;
|
|
197
|
+
/** The push's event id, for an inbox that finds the item by its event when the push named none. */
|
|
198
198
|
readonly eventId: string;
|
|
199
|
-
readonly
|
|
200
|
-
|
|
199
|
+
readonly notification: EverfurNotification;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* The seam the member's inbox plugs into. `open` answers true when it took the tap (it may load the item after
|
|
203
|
+
* answering), false when it cannot open anything.
|
|
204
|
+
*/
|
|
205
|
+
interface EverfurInboxRouter {
|
|
206
|
+
open(request: EverfurInboxRequest): boolean;
|
|
207
|
+
}
|
|
208
|
+
/** No inbox: opens nothing, so a tap no other step took is `unrouted`. The default. */
|
|
209
|
+
declare const NO_INBOX_ROUTER: EverfurInboxRouter;
|
|
210
|
+
/**
|
|
211
|
+
* The inbox router for an app that mounts `EverfurInbox`: `openInbox` moves your navigation to the screen that hosts
|
|
212
|
+
* it, passing `itemId` as its `initialItemId` and, when `itemId` is null, `request.eventId` as its `initialEventId`
|
|
213
|
+
* (a native push names no item; the inbox finds it by its event, else shows the list). It takes every tap it is asked
|
|
214
|
+
* about.
|
|
215
|
+
*/
|
|
216
|
+
declare function createEverfurInboxRouter(openInbox: (itemId: string | null, request: EverfurInboxRequest) => void): EverfurInboxRouter;
|
|
217
|
+
interface EverfurNotificationRouterOptions {
|
|
218
|
+
/**
|
|
219
|
+
* Open one of the SDK's surfaces: move your navigation to the screen that hosts it, with what the route names.
|
|
220
|
+
* Absent, those targets go to `onTarget` like the rest.
|
|
221
|
+
*/
|
|
222
|
+
readonly onSurface?: (route: EverfurNotificationSurfaceRoute, notification: EverfurNotification) => void;
|
|
223
|
+
/**
|
|
224
|
+
* Your handler for a target the SDK has no surface for (`medication` and the `care.*` pet reminders, `order`,
|
|
225
|
+
* `walk`, `weather`, `pack`, `mood`, `card`, `membership`, `support`, `offer`), a kind this release does not know
|
|
226
|
+
* (`unknown`), and every target when there is no `onSurface`. Return true when you opened something for it. Any
|
|
227
|
+
* other answer (false, or nothing at all) passes the tap on to the inbox, so a handler that only routes some kinds
|
|
228
|
+
* never swallows the rest.
|
|
229
|
+
*/
|
|
230
|
+
readonly onTarget?: (target: EverfurNotificationTarget, notification: EverfurNotification) => boolean;
|
|
231
|
+
/** Where the member's inbox lives. Default `NO_INBOX_ROUTER`. */
|
|
232
|
+
readonly inbox?: EverfurInboxRouter;
|
|
201
233
|
}
|
|
234
|
+
/** Where a tap went. `unrouted`: no step took it (no handler for it and no inbox). */
|
|
235
|
+
type EverfurNotificationRouteOutcome = 'surface' | 'partner' | 'inbox' | 'unrouted';
|
|
236
|
+
/**
|
|
237
|
+
* The SDK surface a push's target opens, or null when the SDK has none for it (the partner's handler or the inbox
|
|
238
|
+
* takes it). Pure.
|
|
239
|
+
*/
|
|
240
|
+
declare function surfaceForNotification(notification: EverfurNotification): EverfurNotificationSurfaceRoute | null;
|
|
202
241
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* Pass the object your notification library gave you: an expo-notifications `Notification` or `NotificationResponse`,
|
|
207
|
-
* an FCM `RemoteMessage`, or its `data` map. Route on `target.kind`; `eventType` says why the push was sent.
|
|
242
|
+
* Route a parsed push: the SDK's surface for its target (`onSurface`), else your handler (`onTarget`), else the inbox
|
|
243
|
+
* item the push names, or the inbox (`inbox`). An `inbox` target goes to the inbox first. Settles to where the tap
|
|
244
|
+
* went; never throws.
|
|
208
245
|
*/
|
|
209
|
-
declare function
|
|
246
|
+
declare function routeEverfurNotification(notification: EverfurNotification, options?: EverfurNotificationRouterOptions): EverfurNotificationRouteOutcome;
|
|
210
247
|
|
|
211
|
-
export { type
|
|
248
|
+
export { type DeviceLocale as D, type EverfurNotificationsOptions as E, NOTIFICATIONS_REASON_MESSAGES as N, type PushProvider as P, type RegisterDeviceInput as R, type EverfurNotificationsState as a, type DevicePlatform as b, type EverfurInboxRequest as c, type EverfurInboxRouter as d, type EverfurNotificationRouteOutcome as e, type EverfurNotificationRouterOptions as f, type EverfurNotificationSurfaceRoute as g, type EverfurNotificationsStatus as h, NO_INBOX_ROUTER as i, type NotificationPreferences as j, type NotificationPreferencesInput as k, type NotificationsClient as l, type NotificationsReasonCode as m, type NotificationsRuntime as n, type RegisteredDevice as o, createEverfurInboxRouter as p, createNotificationsClient as q, explainNotificationsReason as r, readDeviceLocale as s, routeEverfurNotification as t, surfaceForNotification as u, useEverfurNotificationsClient as v, useEverfurNotifications as w };
|
|
@@ -1,14 +1,15 @@
|
|
|
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
2
|
import { E as EntitlementDecision, C as CapabilityName } from './resolve.d-BTC3b6FW.js';
|
|
3
|
-
import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-
|
|
3
|
+
import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-CKCi6rtp.js';
|
|
4
4
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
5
5
|
import { E as EverfurThemeInput, C as ClientBranding } from './branding.d-DpNGEdDL.js';
|
|
6
|
-
import { A as AuthContext, T as TokenProvider } from './identity.d-
|
|
6
|
+
import { A as AuthContext, T as TokenProvider } from './identity.d-BWZiaByn.js';
|
|
7
7
|
import { U as UserRef, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.js';
|
|
8
|
-
import { T as TransportPort } from './config.d-
|
|
8
|
+
import { T as TransportPort } from './config.d-BnZkxI5a.js';
|
|
9
9
|
import { I as ImageCachePort, K as KvPort } from './cacheEpoch.d-DknKn3S0.js';
|
|
10
10
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
11
|
-
import {
|
|
11
|
+
import { o as ChatController } from './chatTypes.d-DPALEQoW.js';
|
|
12
|
+
import { U as UploadPort, a as UnreadStore } from './unreadStore.d-gCsleb6l.js';
|
|
12
13
|
import { C as CameraPort } from './CameraPort.d-Cv31Pz7g.js';
|
|
13
14
|
import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.js';
|
|
14
15
|
import { U as UploadTransport } from './ports.d-BX4f4UsB.js';
|
|
@@ -66,6 +67,33 @@ type EverfurClientEvent = {
|
|
|
66
67
|
} | {
|
|
67
68
|
readonly type: 'conversation_started';
|
|
68
69
|
readonly conversationId: string;
|
|
70
|
+
} | {
|
|
71
|
+
readonly type: 'unread_changed';
|
|
72
|
+
/** The pet whose chat list was read; null for the member's list across pets. */
|
|
73
|
+
readonly petRef: string | null;
|
|
74
|
+
/** The newest thread, the one the count is for; null when the member has none. */
|
|
75
|
+
readonly conversationId: string | null;
|
|
76
|
+
/** Unread messages in that thread, as the server counted them. */
|
|
77
|
+
readonly unreadCount: number;
|
|
78
|
+
readonly hasUnread: boolean;
|
|
79
|
+
} | {
|
|
80
|
+
readonly type: 'inbox_unread_changed';
|
|
81
|
+
/** Unread items in the member's inbox. */
|
|
82
|
+
readonly unreadCount: number;
|
|
83
|
+
} | {
|
|
84
|
+
readonly type: 'inbox_item_opened';
|
|
85
|
+
/** The inbox item (`inb_...`). */
|
|
86
|
+
readonly itemId: string;
|
|
87
|
+
/** The notification event it came from (`evt_...`), or null. */
|
|
88
|
+
readonly eventId: string | null;
|
|
89
|
+
/** The partner event type (`chat.vet_replied`), or null. */
|
|
90
|
+
readonly eventType: string | null;
|
|
91
|
+
readonly petRef: string | null;
|
|
92
|
+
/** Where it points: `kind` and its string fields, as the push envelope's `target` carries them; null for none. */
|
|
93
|
+
readonly target: {
|
|
94
|
+
readonly kind: string;
|
|
95
|
+
readonly [field: string]: string | null;
|
|
96
|
+
} | null;
|
|
69
97
|
};
|
|
70
98
|
/** The partner's handler. It may throw; the SDK reports and swallows it. */
|
|
71
99
|
type EverfurEventHandler = (event: EverfurClientEvent) => void;
|
|
@@ -115,7 +143,8 @@ interface EverfurRuntimeConfig {
|
|
|
115
143
|
/** Structured, redacted LogPort events when true. */
|
|
116
144
|
readonly debug?: boolean;
|
|
117
145
|
/**
|
|
118
|
-
* Lifecycle events (`ready`, `error`, `session_expired`, `conversation_started`; see `EverfurClientEvent`).
|
|
146
|
+
* Lifecycle events (`ready`, `error`, `session_expired`, `conversation_started`, `unread_changed`; see `EverfurClientEvent`).
|
|
147
|
+
* `unread_changed` arrives only while `useEverfurUnread` is mounted.
|
|
119
148
|
* Delivered asynchronously, never during a render; a throwing handler is reported and ignored. Best effort at
|
|
120
149
|
* teardown: an event still queued when the runtime is disposed is dropped, and a refusal during `logout()` is
|
|
121
150
|
* not reported.
|
|
@@ -303,6 +332,11 @@ interface EverfurRuntime {
|
|
|
303
332
|
*/
|
|
304
333
|
readonly scopeEpoch: number;
|
|
305
334
|
readonly entitlements: EntitlementStore;
|
|
335
|
+
/**
|
|
336
|
+
* Whether the member has unread Everfur chat, per pet, for your own badge (`useEverfurUnread` binds it). Fed
|
|
337
|
+
* by every read of a pet's chat list, the chat's own included; a re-scope forgets it.
|
|
338
|
+
*/
|
|
339
|
+
readonly unread: UnreadStore;
|
|
306
340
|
/** null => logout: drops the cached bearer and re-scopes every open capability. */
|
|
307
341
|
setUser(user: RuntimeUser | null): void;
|
|
308
342
|
/**
|
|
@@ -1,14 +1,15 @@
|
|
|
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
2
|
import { E as EntitlementDecision, C as CapabilityName } from './resolve.d-BTC3b6FW.cjs';
|
|
3
|
-
import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-
|
|
3
|
+
import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-VWMyIeIJ.cjs';
|
|
4
4
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
5
5
|
import { E as EverfurThemeInput, C as ClientBranding } from './branding.d-BFauULV6.cjs';
|
|
6
|
-
import { A as AuthContext, T as TokenProvider } from './identity.d-
|
|
6
|
+
import { A as AuthContext, T as TokenProvider } from './identity.d-CooKscNj.cjs';
|
|
7
7
|
import { U as UserRef, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.cjs';
|
|
8
|
-
import { T as TransportPort } from './config.d-
|
|
8
|
+
import { T as TransportPort } from './config.d-DoC-XaJ0.cjs';
|
|
9
9
|
import { I as ImageCachePort, K as KvPort } from './cacheEpoch.d-DknKn3S0.cjs';
|
|
10
10
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
11
|
-
import {
|
|
11
|
+
import { o as ChatController } from './chatTypes.d-RnQ5R4zP.cjs';
|
|
12
|
+
import { U as UploadPort, a as UnreadStore } from './unreadStore.d-w5x6lEpR.cjs';
|
|
12
13
|
import { C as CameraPort } from './CameraPort.d-Cv31Pz7g.cjs';
|
|
13
14
|
import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.cjs';
|
|
14
15
|
import { U as UploadTransport } from './ports.d-BX4f4UsB.cjs';
|
|
@@ -66,6 +67,33 @@ type EverfurClientEvent = {
|
|
|
66
67
|
} | {
|
|
67
68
|
readonly type: 'conversation_started';
|
|
68
69
|
readonly conversationId: string;
|
|
70
|
+
} | {
|
|
71
|
+
readonly type: 'unread_changed';
|
|
72
|
+
/** The pet whose chat list was read; null for the member's list across pets. */
|
|
73
|
+
readonly petRef: string | null;
|
|
74
|
+
/** The newest thread, the one the count is for; null when the member has none. */
|
|
75
|
+
readonly conversationId: string | null;
|
|
76
|
+
/** Unread messages in that thread, as the server counted them. */
|
|
77
|
+
readonly unreadCount: number;
|
|
78
|
+
readonly hasUnread: boolean;
|
|
79
|
+
} | {
|
|
80
|
+
readonly type: 'inbox_unread_changed';
|
|
81
|
+
/** Unread items in the member's inbox. */
|
|
82
|
+
readonly unreadCount: number;
|
|
83
|
+
} | {
|
|
84
|
+
readonly type: 'inbox_item_opened';
|
|
85
|
+
/** The inbox item (`inb_...`). */
|
|
86
|
+
readonly itemId: string;
|
|
87
|
+
/** The notification event it came from (`evt_...`), or null. */
|
|
88
|
+
readonly eventId: string | null;
|
|
89
|
+
/** The partner event type (`chat.vet_replied`), or null. */
|
|
90
|
+
readonly eventType: string | null;
|
|
91
|
+
readonly petRef: string | null;
|
|
92
|
+
/** Where it points: `kind` and its string fields, as the push envelope's `target` carries them; null for none. */
|
|
93
|
+
readonly target: {
|
|
94
|
+
readonly kind: string;
|
|
95
|
+
readonly [field: string]: string | null;
|
|
96
|
+
} | null;
|
|
69
97
|
};
|
|
70
98
|
/** The partner's handler. It may throw; the SDK reports and swallows it. */
|
|
71
99
|
type EverfurEventHandler = (event: EverfurClientEvent) => void;
|
|
@@ -115,7 +143,8 @@ interface EverfurRuntimeConfig {
|
|
|
115
143
|
/** Structured, redacted LogPort events when true. */
|
|
116
144
|
readonly debug?: boolean;
|
|
117
145
|
/**
|
|
118
|
-
* Lifecycle events (`ready`, `error`, `session_expired`, `conversation_started`; see `EverfurClientEvent`).
|
|
146
|
+
* Lifecycle events (`ready`, `error`, `session_expired`, `conversation_started`, `unread_changed`; see `EverfurClientEvent`).
|
|
147
|
+
* `unread_changed` arrives only while `useEverfurUnread` is mounted.
|
|
119
148
|
* Delivered asynchronously, never during a render; a throwing handler is reported and ignored. Best effort at
|
|
120
149
|
* teardown: an event still queued when the runtime is disposed is dropped, and a refusal during `logout()` is
|
|
121
150
|
* not reported.
|
|
@@ -303,6 +332,11 @@ interface EverfurRuntime {
|
|
|
303
332
|
*/
|
|
304
333
|
readonly scopeEpoch: number;
|
|
305
334
|
readonly entitlements: EntitlementStore;
|
|
335
|
+
/**
|
|
336
|
+
* Whether the member has unread Everfur chat, per pet, for your own badge (`useEverfurUnread` binds it). Fed
|
|
337
|
+
* by every read of a pet's chat list, the chat's own included; a re-scope forgets it.
|
|
338
|
+
*/
|
|
339
|
+
readonly unread: UnreadStore;
|
|
306
340
|
/** null => logout: drops the cached bearer and re-scopes every open capability. */
|
|
307
341
|
setUser(user: RuntimeUser | null): void;
|
|
308
342
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
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
2
|
import { P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.js';
|
|
3
|
-
import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-
|
|
4
|
-
import { C as CaptureRecordsSignature, R as RecordsClinicController } from './clinicRequestProps.d-
|
|
3
|
+
import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-t9hkown2.js';
|
|
4
|
+
import { C as CaptureRecordsSignature, R as RecordsClinicController } from './clinicRequestProps.d-BuMuGoVZ.js';
|
|
5
5
|
import { R as RecordsClinic, c as RecordsClinicSearchInput } from './clinicModels.d-CaS64-P-.js';
|
|
6
6
|
import { a as RecordsAskHandler } from './recordsAsk.d-C5CGSi3j.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
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
2
|
import { P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.cjs';
|
|
3
|
-
import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-
|
|
4
|
-
import { C as CaptureRecordsSignature, R as RecordsClinicController } from './clinicRequestProps.d-
|
|
3
|
+
import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-C6MzLj3X.cjs';
|
|
4
|
+
import { C as CaptureRecordsSignature, R as RecordsClinicController } from './clinicRequestProps.d-DjzUdDFx.cjs';
|
|
5
5
|
import { R as RecordsClinic, c as RecordsClinicSearchInput } from './clinicModels.d-BXgKZqDb.cjs';
|
|
6
6
|
import { a as RecordsAskHandler } from './recordsAsk.d-C5CGSi3j.cjs';
|
|
7
7
|
|