@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
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,147 @@ changes that has not been earned by any production integration yet.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.20.0] - 2026-11-12
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **One records consent can cover all of a member's pets (opt in).** Pass `consentScope="all_pets"` to any
|
|
18
|
+
records screen, or `consentScope: 'all_pets'` to `useEverfurRecords`, and the consent gate (React Native and web)
|
|
19
|
+
records a single consent for every pet the member has now (`PUT /widget/v1/records/consent`), and states that
|
|
20
|
+
above `Allow`. A pet added later is not covered by that grant; a withdrawal for all pets does cover it. The
|
|
21
|
+
default stays `'pet'`, one consent per pet, so an upgrade never widens what your reviewed `consentText` and
|
|
22
|
+
`consentVersion` cover. **This widens the consent's scope:** opt in only with consent text that says it covers
|
|
23
|
+
all the member's pets, and a new `consentVersion`. On a backend that does not serve the member-wide route yet
|
|
24
|
+
(a 404 or 405), the grant and the withdrawal are recorded pet by pet over the per-pet route.
|
|
25
|
+
- Under `'all_pets'`, `revokeConsent()` withdraws for every pet, so it always undoes what `grantConsent()`
|
|
26
|
+
recorded. Withdrawal is fail-closed: on the per-pet fallback it settles `ok` only when every pet confirmed it,
|
|
27
|
+
and a failed or unknown pet list, or any pet that fails, is an error (every pet that was withdrawn still leaves
|
|
28
|
+
the screen). A fallback grant that missed a pet settles to that pet's error, so the gate stays up and `Allow`
|
|
29
|
+
tries again. The prebuilt screens draw no withdraw control: give the member one that calls `revokeConsent()`.
|
|
30
|
+
- `RecordsController.getMemberConsent`, `grantConsentAllPets` and `revokeConsentAllPets` (optional on the
|
|
31
|
+
interface), `useEverfurRecords().revokeConsentAllPets` and `consentScope`, and the types
|
|
32
|
+
`RecordsConsentScope`, `MemberConsentState`, `RecordsConsentPetFailure`, `GrantConsentAllPetsInput` and
|
|
33
|
+
`RevokeConsentAllPetsInput`.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- **Web push ends on sign-out.** `useEverfurWebPush` now ends the member's subscription on logout, `setUser(null)`
|
|
38
|
+
or a member switch even when the push button is no longer mounted, and `web-push.js` drops the earlier member's
|
|
39
|
+
subscription on Everfur's side (not only in the browser) when `init` runs for another member. In frame mode, call
|
|
40
|
+
`EverfurWebPush.signOut()` when the member signs out, as before.
|
|
41
|
+
|
|
42
|
+
## [0.19.0] - 2026-11-11
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- **Links in chat replies, off by default.** Pass the new `linkHosts` prop (web, React Native, and the frame loader
|
|
47
|
+
option) to make an https link in a reply tappable: `[]` for Everfur's own hosts, or your own hosts added. Every
|
|
48
|
+
other address stays text, and without `linkHosts` replies render as they did in 0.18.0. The hosted handoff page
|
|
49
|
+
turns them on for Everfur's hosts. See `17-NOTIFICATIONS.md`.
|
|
50
|
+
- **Open an unread thread on refresh, off by default.** With `openUnreadOnRefresh` on `EverfurChat` (web and React
|
|
51
|
+
Native), a refresh of a blank chat opens the newest thread when it has an unread reply.
|
|
52
|
+
`refreshActiveThread({ openUnreadHead: true })` does the same from the hook. Frame mode has no option for it.
|
|
53
|
+
- **Inbox.** `EverfurInbox`, `useEverfurInbox` and `useEverfurInboxUnread` on two new subpaths,
|
|
54
|
+
`@everfur/sdk/notifications/inbox` (React Native) and `@everfur/sdk/web/inbox` (web): the member's messages with
|
|
55
|
+
every state, mark read, and a tapped item handed to `onOpen` with the same routing block a push carries. Frame
|
|
56
|
+
mode adds `surface: 'inbox'` (`inbox.html`) with the `onEvent` events `inbox_item_opened` and
|
|
57
|
+
`inbox_unread_changed`. Nothing changes for code that does not import them. See `33-INBOX-AND-WEB-PUSH.md`.
|
|
58
|
+
- **Web push.** `useEverfurWebPush` (permission only from your own click, subscribe, unsubscribe, sign-out) and
|
|
59
|
+
`useEverfurNotificationOpen` with `takeEverfurNotificationEventId` (a tap focuses an open tab or opens
|
|
60
|
+
`open_url#efn=`, scrubbed before routing) on `@everfur/sdk/web/inbox`. The CDN adds `push-sw.js` (the partner
|
|
61
|
+
hosts a one-line `/everfur-sw.js` that imports it) and `web-push.js` (`EverfurWebPush.init`) for frame-mode
|
|
62
|
+
pages.
|
|
63
|
+
- **Unread badge.** `useEverfurUnread({ petRef })` (web and React Native) gives `hasUnread`, `unreadCount`,
|
|
64
|
+
`conversationId` and `refresh()` without the chat on screen. While it is mounted, a change also raises
|
|
65
|
+
`unread_changed` on `onEvent`; frame mode adds the loader option `onUnreadChange`, and only with it does the
|
|
66
|
+
loader's `onEvent` receive `unread_changed`.
|
|
67
|
+
- **Engagement pushes.** `parseEverfurNotification` reads `chat.engagement_message` and a new target kind `chat`
|
|
68
|
+
(`petRef`, optional `conversationId`); pass it to `EverfurChat` as `checkinTarget`. Chat opens that thread once it
|
|
69
|
+
has finished opening, and when you pass no `petRef`, switches to the target's pet first (`onPetChange` is
|
|
70
|
+
called). `ChatCheckinTarget` gains an optional `kind`. A `case` target opens as before.
|
|
71
|
+
- **Chat links in texted replies.** `handoffToken` on `EverfurChat` (web and React Native) opens the thread of a
|
|
72
|
+
texted `#efch=` link for the signed-in member. Read it with `takeChatHandoffToken()` (web) or
|
|
73
|
+
`chatHandoffTokenFromUrl(url)`; frame mode adds the loader option `chatHandoff`. A hosted page,
|
|
74
|
+
`sdk.everfur.com/v1/chat-handoff.html`, opens the thread for a partner with no app link, once the member taps
|
|
75
|
+
Continue to chat.
|
|
76
|
+
- **Every push target, and a tap router.** `parseEverfurNotification` reads the wire spec v1 target kinds `records`,
|
|
77
|
+
`vaccine`, `medication`, `labs`, `order`, `health_plan`, `tip`, `walk`, `weather`, `pack`, `mood`, `card`,
|
|
78
|
+
`membership`, `support`, `offer` and `inbox`, a visit `pushIntent` (`prep`, `waiting`, `notes`) and an optional
|
|
79
|
+
`inboxItemId`. The new `routeEverfurNotification` sends a tap to the SDK surface for it (`onSurface`), else your
|
|
80
|
+
handler (`onTarget`, which takes the tap only when it returns `true`; `false` or no return value passes it on),
|
|
81
|
+
else the inbox through `EverfurInboxRouter` (default `NO_INBOX_ROUTER`, which opens nothing;
|
|
82
|
+
`createEverfurInboxRouter` opens your `EverfurInbox` screen on the item with `initialItemId`, which now also opens
|
|
83
|
+
a different item passed while the inbox is on screen, or by event with `initialEventId`). Care reminders
|
|
84
|
+
(`care.*` on a `pet` target) and `medication` have no SDK surface and go to your handler, then the inbox.
|
|
85
|
+
`surfaceForNotification` gives the surface alone. Today's payloads parse exactly as before.
|
|
86
|
+
- **Inbox: open by event, and an error over the list.** `initialEventId` on `EverfurInbox` (web and React Native)
|
|
87
|
+
opens the item of a tapped push that named no item. A failed re-read with items on screen shows an inline error
|
|
88
|
+
with **Try again** over the rows instead of hiding them. On React Native, screen readers move to Back when an item
|
|
89
|
+
opens.
|
|
90
|
+
- **Web push taps without an inbox item.** A push kept in no inbox (an answer ready in chat) still routes:
|
|
91
|
+
`EverfurNotificationOpen` gains `target`, the push's own target, set only when `inbox` is null; frame mode's
|
|
92
|
+
`EverfurWebPush.init` hands the same `target` to `onOpen` beside `item`. A push that named only its inbox item
|
|
93
|
+
opens it. The service worker writes the new `efi` and `eft` address fragments next to `efn`, and the hook scrubs
|
|
94
|
+
all three before routing; `eft` is read only when there is no `efi`. A target that came off the address is
|
|
95
|
+
deep-link input anyone can link to: the screen it opens checks access on your server. A tap that marks its item
|
|
96
|
+
read updates `useEverfurInboxUnread` at once.
|
|
97
|
+
- **A tap kept across a sign-in redirect keeps its target.** `takeEverfurNotificationOpen()` (with the types
|
|
98
|
+
`EverfurNotificationTap` and `EverfurNotificationRoute`) takes the whole tap off the address as plain JSON; keep
|
|
99
|
+
it in session storage and pass it as `useEverfurNotificationOpen`'s `eventId`, which now takes a tap as well as
|
|
100
|
+
an event id. The SDK checks a kept tap again.
|
|
101
|
+
- **Device time zone and language, off by default.** `sendDeviceLocale` on `useEverfurNotifications` sends
|
|
102
|
+
`timezone` and `locale` from `Intl` with the device token; `readDeviceLocale()` returns them. `registerDevice`
|
|
103
|
+
accepts both and leaves out a malformed value. With it on, a registered device registers again when the app
|
|
104
|
+
returns to the foreground in another time zone. A web push subscription always carries both. If the API refuses
|
|
105
|
+
them with a 400, the SDK sends the registration (or subscription) once more without them. Ask Everfur before
|
|
106
|
+
turning it on.
|
|
107
|
+
- **`chat.engagement_message` webhook type** in `@everfur/sdk/server/events`, with `ChatEngagementMessagePayload`
|
|
108
|
+
and `EverfurChatEngagementKind`. See `15-EVENTS-AND-WEBHOOKS.md`.
|
|
109
|
+
|
|
110
|
+
### Breaking
|
|
111
|
+
|
|
112
|
+
Measured against 0.18.0 with the api-extractor reports: no export was removed or renamed. Unknown push event types
|
|
113
|
+
and target kinds now parse (as `kind: 'unknown'`) instead of failing, so these unions are wider, and code that
|
|
114
|
+
switches over one of them exhaustively, with a `never` check in its `default` branch, stops compiling until it
|
|
115
|
+
handles the new members. These are the changes a 0.18 integration can notice, with one migration line each.
|
|
116
|
+
|
|
117
|
+
- **`EverfurNotificationTarget` gains the new target kinds and `kind: 'unknown'`** (`wireKind`, `fields`). Migration:
|
|
118
|
+
handle the kinds you route and give the switch a `default` branch for the rest (send them to your inbox).
|
|
119
|
+
- **`EverfurNotification.eventType` is now `EverfurNotificationEventName`**: any well-formed event name, not a
|
|
120
|
+
closed list. Migration: a `switch` or a `Record` keyed on the old list needs a `default` branch (or `Partial`).
|
|
121
|
+
- **`parseEverfurNotification` returns a notification, not `null`, for a payload with new kinds or keys.**
|
|
122
|
+
Migration: code that used `null` to mean "not a payload my app handles" checks `target.kind` instead.
|
|
123
|
+
- **`onOpenUrl`'s `kind` on `EverfurChat` gains `'message'`.** Migration: a `default` branch, or handle `'message'`
|
|
124
|
+
(it is only ever passed with `linkHosts` set).
|
|
125
|
+
- **`EverfurClientEvent` gains `unread_changed`, `inbox_unread_changed` and `inbox_item_opened`.** Migration: an
|
|
126
|
+
`onEvent` that switches over every type needs a `default` branch, as the type's own comment asks.
|
|
127
|
+
|
|
128
|
+
### Changed
|
|
129
|
+
|
|
130
|
+
- **`onOpenUrl` on `EverfurChat`**: its `kind` is now `'citation' | 'message'`. It is called with `'message'` only
|
|
131
|
+
when `linkHosts` turns links on, so without it nothing changes at run time.
|
|
132
|
+
- **`onEvent` has a new event type, `unread_changed`, raised only for an integration that asks for unread.** In a
|
|
133
|
+
page or app of your own it arrives while `useEverfurUnread` is mounted; in frame mode only when you pass
|
|
134
|
+
`onUnreadChange` to `Everfur.init`. An integration that uses neither sees no new event at run time. One that
|
|
135
|
+
does, and treats an event type it does not know as an error, should ignore unknown types instead.
|
|
136
|
+
- **Push payloads newer than the SDK parse instead of failing.** Unknown top-level and target keys are ignored, an
|
|
137
|
+
unknown target kind parses as `kind: 'unknown'` (`wireKind`, `fields`), and `eventType` is any well-formed event
|
|
138
|
+
name (`EverfurNotificationEventName`). An exhaustive `switch` on `target.kind` needs a `default` (see Breaking).
|
|
139
|
+
- **Bundle budgets** raised for these features; figures in `27-BUNDLE-SIZES.md`.
|
|
140
|
+
|
|
141
|
+
### Fixed
|
|
142
|
+
|
|
143
|
+
- **A refresh shows a message Everfur queued** (an engagement line, a check-in) on the first try: chat reads the
|
|
144
|
+
conversation list before the thread.
|
|
145
|
+
- **Web push not set up reads as `unavailable`, not `failed`.** The API's 503 `web_push_unavailable` settles
|
|
146
|
+
`unavailable`. Once `state()` has seen it (`useEverfurWebPush` reads the state on mount; with `web-push.js`, call
|
|
147
|
+
`state()` first), `enable()` settles `unavailable` before the browser's prompt, so a member is not asked for
|
|
148
|
+
something that cannot work. A direct `enable()` with no `state()` first still shows the prompt (it must, inside
|
|
149
|
+
the click), then settles `unavailable`. A 503 that says it is a passing fault is not remembered, so a later check
|
|
150
|
+
asks again.
|
|
151
|
+
- **Web push refuses an `openUrl` on another origin** with `failed` and one console warning, before the prompt. The
|
|
152
|
+
service worker opens only its own origin, so such a tap never opened.
|
|
153
|
+
|
|
13
154
|
## [0.18.3] - 2026-11-11
|
|
14
155
|
|
|
15
156
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
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 { ReactNode } from 'react';
|
|
3
|
-
import { a as EverfurChatProps } from './
|
|
3
|
+
import { a as EverfurChatProps } from './useUnread.d-BsZKbLp9.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Entitlement-gated, four-state chat surface. Entitlement-OFF renders the CapabilityGate OffState;
|
|
@@ -1,6 +1,6 @@
|
|
|
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 { ReactNode } from 'react';
|
|
3
|
-
import { a as EverfurChatProps } from './
|
|
3
|
+
import { a as EverfurChatProps } from './useUnread.d-CfF2Cx-q.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Entitlement-gated, four-state chat surface. Entitlement-OFF renders the CapabilityGate OffState;
|
|
@@ -1,6 +1,6 @@
|
|
|
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 { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { c as RecordsScreenBaseProps } from './screenProps.d-
|
|
3
|
+
import { c as RecordsScreenBaseProps } from './screenProps.d-B_arD3Lh.js';
|
|
4
4
|
|
|
5
5
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
6
6
|
readonly style?: CSSProperties;
|
|
@@ -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 { ReactNode } from 'react';
|
|
3
3
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
-
import { c as RecordsScreenBaseProps } from './screenProps.d-
|
|
4
|
+
import { c as RecordsScreenBaseProps } from './screenProps.d-BgxlmfG5.cjs';
|
|
5
5
|
|
|
6
6
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
7
7
|
readonly style?: StyleProp<ViewStyle>;
|
|
@@ -1,6 +1,6 @@
|
|
|
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 { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { c as RecordsScreenBaseProps } from './screenProps.d-
|
|
3
|
+
import { c as RecordsScreenBaseProps } from './screenProps.d-BgxlmfG5.cjs';
|
|
4
4
|
|
|
5
5
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
6
6
|
readonly style?: CSSProperties;
|
|
@@ -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 { ReactNode } from 'react';
|
|
3
3
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
-
import { c as RecordsScreenBaseProps } from './screenProps.d-
|
|
4
|
+
import { c as RecordsScreenBaseProps } from './screenProps.d-B_arD3Lh.js';
|
|
5
5
|
|
|
6
6
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
7
7
|
readonly style?: StyleProp<ViewStyle>;
|
|
@@ -1,16 +1,22 @@
|
|
|
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 { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { R as RecordsClinicController, C as CaptureRecordsSignature } from './clinicRequestProps.d-
|
|
4
|
-
import { R as RecordsController } from './useRecords.d-
|
|
5
|
-
import { c as RecordForwardItem } from './models.d-
|
|
6
|
-
import { c as RecordsScreenBaseProps } from './screenProps.d-
|
|
7
|
-
import { E as EverfurRecordsSheet } from './sheetSeam.d-
|
|
3
|
+
import { R as RecordsClinicController, C as CaptureRecordsSignature } from './clinicRequestProps.d-DjzUdDFx.cjs';
|
|
4
|
+
import { R as RecordsController } from './useRecords.d-BMSW4aRD.cjs';
|
|
5
|
+
import { c as RecordsConsentScope, d as RecordForwardItem } from './models.d-BN53M9sU.cjs';
|
|
6
|
+
import { c as RecordsScreenBaseProps } from './screenProps.d-BgxlmfG5.cjs';
|
|
7
|
+
import { E as EverfurRecordsSheet } from './sheetSeam.d-B9iQqG_I.cjs';
|
|
8
8
|
|
|
9
9
|
interface EverfurRecordsPageProps extends RecordsScreenBaseProps {
|
|
10
10
|
readonly controller?: RecordsController;
|
|
11
11
|
/** Host/test seam over the clinic controller the `Request records` sheet uses. */
|
|
12
12
|
readonly clinicController?: RecordsClinicController;
|
|
13
13
|
readonly consentVersion?: string;
|
|
14
|
+
/**
|
|
15
|
+
* What `Allow` covers. `'pet'` (the default) asks for this pet only, one consent per pet; `'all_pets'` is one
|
|
16
|
+
* consent for every pet the member has now. Opt in only with `consentText`, and a new
|
|
17
|
+
* `consentVersion`, that say so.
|
|
18
|
+
*/
|
|
19
|
+
readonly consentScope?: RecordsConsentScope;
|
|
14
20
|
/** Your consent text, shown above `Allow` on the consent gate; pass it with its `consentVersion`. */
|
|
15
21
|
readonly consentText?: string;
|
|
16
22
|
/** The owner's name the clinic authorization is signed with (the owner can correct it before signing). */
|
|
@@ -1,16 +1,22 @@
|
|
|
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 { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { R as RecordsClinicController, C as CaptureRecordsSignature } from './clinicRequestProps.d-
|
|
4
|
-
import { R as RecordsController } from './useRecords.d-
|
|
5
|
-
import { c as RecordForwardItem } from './models.d-
|
|
6
|
-
import { c as RecordsScreenBaseProps } from './screenProps.d-
|
|
7
|
-
import { E as EverfurRecordsSheet } from './sheetSeam.d-
|
|
3
|
+
import { R as RecordsClinicController, C as CaptureRecordsSignature } from './clinicRequestProps.d-BuMuGoVZ.js';
|
|
4
|
+
import { R as RecordsController } from './useRecords.d-Cv1nhZrv.js';
|
|
5
|
+
import { c as RecordsConsentScope, d as RecordForwardItem } from './models.d-Bhq9p6Wa.js';
|
|
6
|
+
import { c as RecordsScreenBaseProps } from './screenProps.d-B_arD3Lh.js';
|
|
7
|
+
import { E as EverfurRecordsSheet } from './sheetSeam.d-CtuKILqp.js';
|
|
8
8
|
|
|
9
9
|
interface EverfurRecordsPageProps extends RecordsScreenBaseProps {
|
|
10
10
|
readonly controller?: RecordsController;
|
|
11
11
|
/** Host/test seam over the clinic controller the `Request records` sheet uses. */
|
|
12
12
|
readonly clinicController?: RecordsClinicController;
|
|
13
13
|
readonly consentVersion?: string;
|
|
14
|
+
/**
|
|
15
|
+
* What `Allow` covers. `'pet'` (the default) asks for this pet only, one consent per pet; `'all_pets'` is one
|
|
16
|
+
* consent for every pet the member has now. Opt in only with `consentText`, and a new
|
|
17
|
+
* `consentVersion`, that say so.
|
|
18
|
+
*/
|
|
19
|
+
readonly consentScope?: RecordsConsentScope;
|
|
14
20
|
/** Your consent text, shown above `Allow` on the consent gate; pass it with its `consentVersion`. */
|
|
15
21
|
readonly consentText?: string;
|
|
16
22
|
/** The owner's name the clinic authorization is signed with (the owner can correct it before signing). */
|
|
@@ -1,99 +1,6 @@
|
|
|
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
|
"use strict";var react=require("react"),reactNative=require("react-native"),jsxRuntime=require("react/jsx-runtime"),zod=require("zod");var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=react.createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return react.useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return react.createElement(reactNative.Text,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}react.forwardRef(function(props,ref){return react.createElement(reactNative.TextInput,{...props,...ref===null?{}:{ref:ref}})});function assertNever(x){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(x)}`)}function errorFrame(fields){/* @__PURE__ */
|
|
3
|
-
return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:null})}var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}var HostRenderBoundary=class extends react.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state){return Object.is(props.resetKey,state.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return react.createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:react.createElement(RenderHost,{render:render})})}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
|
|
4
|
-
/* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
5
|
-
/* @__PURE__ */Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),
|
|
6
|
-
/* @__PURE__ */Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),
|
|
7
|
-
/* @__PURE__ */Object.freeze({wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true}),
|
|
8
|
-
/* @__PURE__ */Object.freeze({wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
9
|
-
/* @__PURE__ */Object.freeze({wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true}),
|
|
10
|
-
/* @__PURE__ */Object.freeze({wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
11
|
-
/* @__PURE__ */Object.freeze({wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
12
|
-
/* @__PURE__ */Object.freeze({wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true}),
|
|
13
|
-
/* @__PURE__ */Object.freeze({wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false}),
|
|
14
|
-
/* @__PURE__ */Object.freeze({wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false}),
|
|
15
|
-
/* @__PURE__ */Object.freeze({wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false}),
|
|
16
|
-
/* @__PURE__ */Object.freeze({wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false}),
|
|
17
|
-
/* @__PURE__ */Object.freeze({wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true}),
|
|
18
|
-
/* @__PURE__ */Object.freeze({wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false}),
|
|
19
|
-
/* @__PURE__ */Object.freeze({wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true}),
|
|
20
|
-
/* @__PURE__ */Object.freeze({wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
21
|
-
/* @__PURE__ */Object.freeze({wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
22
|
-
/* @__PURE__ */Object.freeze({wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false}),
|
|
23
|
-
/* @__PURE__ */Object.freeze({wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
24
|
-
/* @__PURE__ */Object.freeze({wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true}),
|
|
25
|
-
/* @__PURE__ */Object.freeze({wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false}),
|
|
26
|
-
/* @__PURE__ */Object.freeze({wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
27
|
-
/* @__PURE__ */Object.freeze({wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
28
|
-
/* @__PURE__ */Object.freeze({wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
29
|
-
/* @__PURE__ */Object.freeze({wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
30
|
-
/* @__PURE__ */Object.freeze({wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
31
|
-
/* @__PURE__ */Object.freeze({wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),
|
|
32
|
-
/* @__PURE__ */Object.freeze({wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
33
|
-
/* @__PURE__ */Object.freeze({wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
34
|
-
/* @__PURE__ */Object.freeze({wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
35
|
-
/* @__PURE__ */Object.freeze({wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
36
|
-
/* @__PURE__ */Object.freeze({wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
37
|
-
/* @__PURE__ */Object.freeze({wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
38
|
-
/* @__PURE__ */Object.freeze({wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
39
|
-
/* @__PURE__ */Object.freeze({wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
40
|
-
/* @__PURE__ */Object.freeze({wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
41
|
-
/* @__PURE__ */Object.freeze({wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
42
|
-
/* @__PURE__ */Object.freeze({wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
43
|
-
/* @__PURE__ */Object.freeze({wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false}),
|
|
44
|
-
/* @__PURE__ */Object.freeze({wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
45
|
-
/* @__PURE__ */Object.freeze({wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false}),
|
|
46
|
-
/* @__PURE__ */Object.freeze({wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false}),
|
|
47
|
-
/* @__PURE__ */Object.freeze({wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false}),
|
|
48
|
-
/* @__PURE__ */Object.freeze({wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false}),
|
|
49
|
-
/* @__PURE__ */Object.freeze({wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false}),
|
|
50
|
-
/* @__PURE__ */Object.freeze({wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false}),
|
|
51
|
-
/* @__PURE__ */Object.freeze({wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false}),
|
|
52
|
-
/* @__PURE__ */Object.freeze({wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
53
|
-
/* @__PURE__ */Object.freeze({wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),
|
|
54
|
-
/* @__PURE__ */Object.freeze({wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
55
|
-
/* @__PURE__ */Object.freeze({wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false}),
|
|
56
|
-
/* @__PURE__ */Object.freeze({wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),
|
|
57
|
-
/* @__PURE__ */Object.freeze({wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false}),
|
|
58
|
-
/* @__PURE__ */Object.freeze({wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
59
|
-
/* @__PURE__ */Object.freeze({wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
60
|
-
/* @__PURE__ */Object.freeze({wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
61
|
-
/* @__PURE__ */Object.freeze({wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false}),
|
|
62
|
-
/* @__PURE__ */Object.freeze({wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
63
|
-
/* @__PURE__ */Object.freeze({wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
64
|
-
/* @__PURE__ */Object.freeze({wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
65
|
-
/* @__PURE__ */Object.freeze({wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false}),
|
|
66
|
-
/* @__PURE__ */Object.freeze({wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
67
|
-
/* @__PURE__ */Object.freeze({wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true}),
|
|
68
|
-
/* @__PURE__ */Object.freeze({wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
69
|
-
/* @__PURE__ */Object.freeze({wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),
|
|
70
|
-
/* @__PURE__ */Object.freeze({wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
71
|
-
/* @__PURE__ */Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
72
|
-
/* @__PURE__ */Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
73
|
-
/* @__PURE__ */Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
74
|
-
/* @__PURE__ */Object.freeze({wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false}),
|
|
75
|
-
/* @__PURE__ */Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),
|
|
76
|
-
/* @__PURE__ */Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),
|
|
77
|
-
/* @__PURE__ */Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
78
|
-
/* @__PURE__ */Object.freeze({wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
79
|
-
/* @__PURE__ */Object.freeze({wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
80
|
-
/* @__PURE__ */Object.freeze({wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),
|
|
81
|
-
/* @__PURE__ */Object.freeze({wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
82
|
-
/* @__PURE__ */Object.freeze({wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true}),
|
|
83
|
-
/* @__PURE__ */Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
84
|
-
/* @__PURE__ */Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),
|
|
85
|
-
/* @__PURE__ */Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),
|
|
86
|
-
/* @__PURE__ */Object.freeze({wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
87
|
-
/* @__PURE__ */Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),
|
|
88
|
-
/* @__PURE__ */Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),
|
|
89
|
-
/* @__PURE__ */Object.freeze({wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
90
|
-
/* @__PURE__ */Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),
|
|
91
|
-
/* @__PURE__ */Object.freeze({wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
92
|
-
/* @__PURE__ */Object.freeze({wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),
|
|
93
|
-
/* @__PURE__ */Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
94
|
-
/* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
95
|
-
/* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
96
|
-
/* @__PURE__ */Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row=>row.wireCode));var NORMALIZED_FOLD=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row=BY_KEY.get(candidate+key);if(row)return row}}var CATEGORY_OF=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."}),SESSION_REVOKED_COPY="This session has ended. Please sign in again.",LINKED_ACCOUNT_READ_ONLY="linked_account_read_only";function displayFor(code,wireCode,reasonCode){return code==="conflict"&&reasonCode===LINKED_ACCOUNT_READ_ONLY?ACCESS_DENIED_COPY:(code==="authRejected"||code==="authExpired")&&typeof wireCode=="string"&&wireCode.trim().toLowerCase()==="session_revoked"?SESSION_REVOKED_COPY:userFacingError(code)}function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),linkedReadOnly=code==="conflict"&&opts?.reasonCode===LINKED_ACCOUNT_READ_ONLY,error={code:code,category:categoryFor(code),retryable:opts?.retryable??(linkedReadOnly?false:isRetryableCode(code)),displayMessage:displayFor(code,opts?.wireCode,linkedReadOnly?LINKED_ACCOUNT_READ_ONLY:null)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}var REQUIRES=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
|
|
3
|
+
return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:null})}var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}var HostRenderBoundary=class extends react.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state){return Object.is(props.resetKey,state.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return react.createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:react.createElement(RenderHost,{render:render})})}var RETRYABILITY_ROWS=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze(RETRYABILITY_ROWS.map(row=>/* @__PURE__ */Object.freeze(row)));/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row=>row.wireCode));var NORMALIZED_FOLD=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row=BY_KEY.get(candidate+key);if(row)return row}}var CATEGORY_OF=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."}),SESSION_REVOKED_COPY="This session has ended. Please sign in again.",LINKED_ACCOUNT_READ_ONLY="linked_account_read_only";function displayFor(code,wireCode,reasonCode){return code==="conflict"&&reasonCode===LINKED_ACCOUNT_READ_ONLY?ACCESS_DENIED_COPY:(code==="authRejected"||code==="authExpired")&&typeof wireCode=="string"&&wireCode.trim().toLowerCase()==="session_revoked"?SESSION_REVOKED_COPY:userFacingError(code)}function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),linkedReadOnly=code==="conflict"&&opts?.reasonCode===LINKED_ACCOUNT_READ_ONLY,error={code:code,category:categoryFor(code),retryable:opts?.retryable??(linkedReadOnly?false:isRetryableCode(code)),displayMessage:displayFor(code,opts?.wireCode,linkedReadOnly?LINKED_ACCOUNT_READ_ONLY:null)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}var REQUIRES=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
|
|
97
4
|
return Object.freeze({reason:explicit.reason,level:explicit.level,recoverable:explicit.recoverable})}/* @__PURE__ */
|
|
98
5
|
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function freezeDecision(d){let base={name:d.name,enabled:d.enabled,isPending:d.isPending,limits:/* @__PURE__ */Object.freeze({...d.limits})};return d.disabled!==void 0&&(base.disabled=d.disabled),/* @__PURE__ */Object.freeze(base)}function ok(value,warning){/* @__PURE__ */
|
|
99
6
|
return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
4
|
import { E as EverfurResult } from '../EverfurResult.d-BFH-3s6E.cjs';
|
|
5
|
-
import { A as AuthContext } from '../identity.d-
|
|
6
|
-
export { I as IdentityProvider, n as newSessionId } from '../identity.d-
|
|
5
|
+
import { A as AuthContext } from '../identity.d-CooKscNj.cjs';
|
|
6
|
+
export { I as IdentityProvider, n as newSessionId } from '../identity.d-CooKscNj.cjs';
|
|
7
7
|
import { P as PetRef } from '../ids.d-B2GAAifq.cjs';
|
|
8
8
|
export { B as Brand, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.cjs';
|
|
9
9
|
import { z } from 'zod';
|
|
@@ -14,7 +14,7 @@ import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.cjs';
|
|
|
14
14
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.cjs';
|
|
15
15
|
import { D as DisabledLevel, a as CapabilityDecision } from '../resolve.d-BTC3b6FW.cjs';
|
|
16
16
|
export { b as CapabilityDisabled, C as CapabilityName } from '../resolve.d-BTC3b6FW.cjs';
|
|
17
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-
|
|
17
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-DoC-XaJ0.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* The full /state payload. `degraded` + `cache_epoch` + `cache_key` are additive fields an older backend
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
4
4
|
import { E as EverfurResult } from '../EverfurResult.d-D_-254ZY.js';
|
|
5
|
-
import { A as AuthContext } from '../identity.d-
|
|
6
|
-
export { I as IdentityProvider, n as newSessionId } from '../identity.d-
|
|
5
|
+
import { A as AuthContext } from '../identity.d-BWZiaByn.js';
|
|
6
|
+
export { I as IdentityProvider, n as newSessionId } from '../identity.d-BWZiaByn.js';
|
|
7
7
|
import { P as PetRef } from '../ids.d-B2GAAifq.js';
|
|
8
8
|
export { B as Brand, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.js';
|
|
9
9
|
import { z } from 'zod';
|
|
@@ -14,7 +14,7 @@ import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.js';
|
|
|
14
14
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.js';
|
|
15
15
|
import { D as DisabledLevel, a as CapabilityDecision } from '../resolve.d-BTC3b6FW.js';
|
|
16
16
|
export { b as CapabilityDisabled, C as CapabilityName } from '../resolve.d-BTC3b6FW.js';
|
|
17
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-
|
|
17
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-BnZkxI5a.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* The full /state payload. `degraded` + `cache_epoch` + `cache_key` are additive fields an older backend
|