@everfur/sdk 0.18.2 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/README.md +6 -5
  3. package/dist/{Chat.d-BkLu9G00.d.ts → Chat.d-BHovj6Ku.d.ts} +1 -1
  4. package/dist/{Chat.d-B7iUVGmB.d.cts → Chat.d-BO-XtVYe.d.cts} +1 -1
  5. package/dist/{DepthViews.d-BiS-GTEf.d.cts → DepthViews.d-BwIkdmWZ.d.cts} +1 -1
  6. package/dist/{DepthViews.d-C-zs_BnZ.d.cts → DepthViews.d-Bx85LeiP.d.cts} +1 -1
  7. package/dist/{DepthViews.d-hXV6Ef0y.d.ts → DepthViews.d-CBUunxP1.d.ts} +1 -1
  8. package/dist/{DepthViews.d-C0DVqywN.d.ts → DepthViews.d-DKoZgF8l.d.ts} +1 -1
  9. package/dist/{IntakeMedia.d-4a89XrP7.d.ts → IntakeMedia.d-B_ZVDxh3.d.ts} +1 -1
  10. package/dist/{IntakeMedia.d-JJCUvQu7.d.cts → IntakeMedia.d-CnGzpllr.d.cts} +1 -1
  11. package/dist/{IntakeMedia.d-DGxrhgIW.d.ts → IntakeMedia.d-DNUAks9E.d.ts} +1 -1
  12. package/dist/{IntakeMedia.d-DUPR4lVM.d.cts → IntakeMedia.d-Dqc5V_YH.d.cts} +1 -1
  13. package/dist/{RecordsPage.d-BG_RDR1V.d.ts → RecordsPage.d-CsvBhU0f.d.ts} +1 -1
  14. package/dist/{RecordsPage.d-5rHMTDyY.d.cts → RecordsPage.d-DRFp2LXH.d.cts} +1 -1
  15. package/dist/animations/index.cjs +1 -94
  16. package/dist/animations/index.d.cts +3 -3
  17. package/dist/animations/index.d.ts +3 -3
  18. package/dist/animations/index.js +1 -94
  19. package/dist/{attachments.d-_mgNU-ur.d.ts → attachments.d-DOZjCdkb.d.ts} +2 -2
  20. package/dist/{attachments.d-DFbXLAYK.d.cts → attachments.d-DWUsHPf9.d.cts} +2 -2
  21. package/dist/{bookingCopy.d-RU8lNYJ4.d.ts → bookingCopy.d-BlMWlvgv.d.ts} +10 -3
  22. package/dist/{bookingCopy.d-0K1trjxx.d.cts → bookingCopy.d-tvO7y6MK.d.cts} +10 -3
  23. package/dist/{casesRepository.d-D2SQFL27.d.ts → casesRepository.d-C7qbrOL-.d.ts} +1 -1
  24. package/dist/{casesRepository.d-D7vIZ9oX.d.cts → casesRepository.d-sSo6oakf.d.cts} +1 -1
  25. package/dist/chat/index.cjs +29 -119
  26. package/dist/chat/index.d.cts +11 -10
  27. package/dist/chat/index.d.ts +11 -10
  28. package/dist/chat/index.js +30 -120
  29. package/dist/chat/lite/index.cjs +29 -119
  30. package/dist/chat/lite/index.d.cts +11 -10
  31. package/dist/chat/lite/index.d.ts +11 -10
  32. package/dist/chat/lite/index.js +30 -120
  33. package/dist/{attachments.d-D7f7OfPE.d.ts → chatHandoffToken.d-C4tEyuCT.d.ts} +33 -9
  34. package/dist/{attachments.d-HmRqizDG.d.cts → chatHandoffToken.d-D6GUoBvs.d.cts} +33 -9
  35. package/dist/{ports.d-RKc2C07X.d.ts → chatTypes.d-BI4vidgu.d.ts} +41 -52
  36. package/dist/{ports.d-CB9YZT2L.d.cts → chatTypes.d-CSyw9em_.d.cts} +41 -52
  37. package/dist/client/index.cjs +2 -95
  38. package/dist/client/index.d.cts +7 -7
  39. package/dist/client/index.d.ts +7 -7
  40. package/dist/client/index.js +2 -95
  41. package/dist/{clinicBatch.d-BN1jfVGo.d.cts → clinicBatch.d-BxA_uGBb.d.cts} +2 -2
  42. package/dist/{clinicBatch.d-BhaCdstU.d.ts → clinicBatch.d-T5oSAhY-.d.ts} +2 -2
  43. package/dist/{config.d-D_k_rNZZ.d.ts → config.d-N5Xzy53V.d.ts} +1 -1
  44. package/dist/{config.d-BFTqU7ft.d.cts → config.d-jCmrhM4a.d.cts} +1 -1
  45. package/dist/consent/index.cjs +1 -94
  46. package/dist/consent/index.d.cts +5 -5
  47. package/dist/consent/index.d.ts +5 -5
  48. package/dist/consent/index.js +1 -94
  49. package/dist/{context.d-B4LODPF1.d.ts → context.d-BJEpEERH.d.ts} +7 -6
  50. package/dist/{context.d-D2fhrjAM.d.cts → context.d-l4HkFJI8.d.cts} +7 -6
  51. package/dist/{copy.d-Bn9eIgkW.d.ts → copy.d-hFRaovog.d.ts} +2 -2
  52. package/dist/{copy.d-DjYhMxxS.d.cts → copy.d-hS49oJ4w.d.cts} +2 -2
  53. package/dist/core/index.cjs +6 -99
  54. package/dist/core/index.d.cts +14 -13
  55. package/dist/core/index.d.ts +14 -13
  56. package/dist/core/index.js +6 -99
  57. package/dist/{depth.d-CsKZkLNi.d.cts → depth.d-BYwddMNU.d.cts} +2 -2
  58. package/dist/{depth.d-DlaIV8TV.d.ts → depth.d-C99_xup2.d.ts} +2 -2
  59. package/dist/{entitlementRepository.d-CpIRpfzy.d.cts → entitlementRepository.d-CiU_QIPL.d.cts} +2 -2
  60. package/dist/{entitlementRepository.d-C5d_6QMi.d.ts → entitlementRepository.d-qZAlET7C.d.ts} +2 -2
  61. package/dist/{focus.d-DOlAaNIU.d.ts → focus.d-CG6KhDBK.d.ts} +2 -2
  62. package/dist/{focus.d-DdBbwzjP.d.cts → focus.d-RJMXplJc.d.cts} +2 -2
  63. package/dist/health-plan/index.cjs +1 -94
  64. package/dist/health-plan/index.d.cts +9 -9
  65. package/dist/health-plan/index.d.ts +9 -9
  66. package/dist/health-plan/index.js +1 -94
  67. package/dist/{idempotency.d-CmQc1OUv.d.ts → idempotency.d-D-ZWpO9p.d.ts} +1 -1
  68. package/dist/{idempotency.d-P4O5lNBq.d.cts → idempotency.d-DJyOZDPb.d.cts} +1 -1
  69. package/dist/{identity.d-BmbAwQYx.d.cts → identity.d-CA7mW59I.d.cts} +1 -1
  70. package/dist/{identity.d-BZXPu9Hi.d.ts → identity.d-DIOnFzXL.d.ts} +1 -1
  71. package/dist/index.cjs +30 -120
  72. package/dist/index.d.cts +14 -13
  73. package/dist/index.d.ts +14 -13
  74. package/dist/index.js +31 -121
  75. package/dist/{introEvents.d-Bqw2Hcpt.d.cts → introEvents.d-7wNDMhEF.d.cts} +1 -1
  76. package/dist/{introEvents.d-Cy8yxOoe.d.ts → introEvents.d-BjqfFgE1.d.ts} +1 -1
  77. package/dist/notifications/inbox/index.cjs +44 -0
  78. package/dist/notifications/inbox/index.d.cts +50 -0
  79. package/dist/notifications/inbox/index.d.ts +50 -0
  80. package/dist/notifications/inbox/index.js +44 -0
  81. package/dist/notifications/index.cjs +18 -98
  82. package/dist/notifications/index.d.cts +12 -6
  83. package/dist/notifications/index.d.ts +12 -6
  84. package/dist/notifications/index.js +18 -98
  85. package/dist/{optInView.d-wGSNOB86.d.ts → optInView.d-B5v4cDDW.d.ts} +2 -2
  86. package/dist/{optInView.d-DXj2w4KU.d.cts → optInView.d-BQhHPleh.d.cts} +2 -2
  87. package/dist/parse.d-DYsx1Q2V.d.cts +168 -0
  88. package/dist/parse.d-Do0sdAgm.d.ts +168 -0
  89. package/dist/{pets.d-CP13kAFa.d.cts → pets.d-DRqMaP8A.d.cts} +1 -1
  90. package/dist/{pets.d-tqGZP3Co.d.ts → pets.d-DVrOb-Bj.d.ts} +1 -1
  91. package/dist/{petsRepository.d-CLyzuoo4.d.ts → petsRepository.d-CpYWRWFq.d.ts} +1 -1
  92. package/dist/{petsRepository.d-CyerzD5G.d.cts → petsRepository.d-tZADfKA1.d.cts} +1 -1
  93. package/dist/photo/index.cjs +1 -94
  94. package/dist/photo/index.js +1 -94
  95. package/dist/records/depth/index.cjs +1 -94
  96. package/dist/records/depth/index.d.cts +9 -9
  97. package/dist/records/depth/index.d.ts +9 -9
  98. package/dist/records/depth/index.js +1 -94
  99. package/dist/records/index.cjs +2 -95
  100. package/dist/records/index.d.cts +10 -10
  101. package/dist/records/index.d.ts +10 -10
  102. package/dist/records/index.js +2 -95
  103. package/dist/{requestFunnel.d-BPWf5SQf.d.ts → requestFunnel.d-B8OVGh0p.d.ts} +2 -2
  104. package/dist/{requestFunnel.d-DocT7FXR.d.cts → requestFunnel.d-C4abgvt9.d.cts} +2 -2
  105. package/dist/{parse.d-MQST1RP3.d.ts → route.d-BAZqGLfl.d.ts} +90 -53
  106. package/dist/{parse.d-C9_UMXfA.d.cts → route.d-CTf8h9vS.d.cts} +90 -53
  107. package/dist/{runtimeTypes.d-CkwEMpy8.d.cts → runtimeTypes.d-DbaQKGLv.d.cts} +39 -5
  108. package/dist/{runtimeTypes.d-D4Cjjf_C.d.ts → runtimeTypes.d-DrIz5e6L.d.ts} +39 -5
  109. package/dist/{screenProps.d-DNTTp7hU.d.ts → screenProps.d-BP8LAZWn.d.ts} +1 -1
  110. package/dist/{screenProps.d-Byla6nJL.d.cts → screenProps.d-Di3wYGCn.d.cts} +1 -1
  111. package/dist/server/events/index.cjs +2 -95
  112. package/dist/server/events/index.d.cts +122 -4
  113. package/dist/server/events/index.d.ts +122 -4
  114. package/dist/server/events/index.js +2 -95
  115. package/dist/server/index.cjs +2 -95
  116. package/dist/server/index.d.cts +3 -3
  117. package/dist/server/index.d.ts +3 -3
  118. package/dist/server/index.js +2 -95
  119. package/dist/shop/index.d.cts +3 -3
  120. package/dist/shop/index.d.ts +3 -3
  121. package/dist/tabs/index.cjs +3 -96
  122. package/dist/tabs/index.d.cts +6 -6
  123. package/dist/tabs/index.d.ts +6 -6
  124. package/dist/tabs/index.js +3 -96
  125. package/dist/televet/booking/index.cjs +11 -103
  126. package/dist/televet/booking/index.d.cts +13 -11
  127. package/dist/televet/booking/index.d.ts +13 -11
  128. package/dist/televet/booking/index.js +11 -103
  129. package/dist/televet/index.cjs +1 -94
  130. package/dist/televet/index.d.cts +3 -3
  131. package/dist/televet/index.d.ts +3 -3
  132. package/dist/televet/index.js +1 -94
  133. package/dist/{televetGlobal.d-CC-DrqkQ.d.ts → televetGlobal.d-B0_jbCtC.d.ts} +7 -0
  134. package/dist/{televetGlobal.d-CKwDCbmN.d.cts → televetGlobal.d-BWYJR391.d.cts} +7 -0
  135. package/dist/testing/index.cjs +1 -94
  136. package/dist/testing/index.d.cts +1 -1
  137. package/dist/testing/index.d.ts +1 -1
  138. package/dist/testing/index.js +1 -94
  139. package/dist/testing/rn/index.cjs +1 -94
  140. package/dist/testing/rn/index.d.cts +8 -7
  141. package/dist/testing/rn/index.d.ts +8 -7
  142. package/dist/testing/rn/index.js +1 -94
  143. package/dist/testing/web/index.cjs +1 -94
  144. package/dist/testing/web/index.d.cts +8 -7
  145. package/dist/testing/web/index.d.ts +8 -7
  146. package/dist/testing/web/index.js +1 -94
  147. package/dist/texting/index.cjs +1 -94
  148. package/dist/texting/index.d.cts +5 -5
  149. package/dist/texting/index.d.ts +5 -5
  150. package/dist/texting/index.js +1 -94
  151. package/dist/{threadOptions.d-jgk_sHrj.d.ts → threadOptions.d-Cwmyu8pc.d.ts} +2 -2
  152. package/dist/{threadOptions.d-CIrevUL8.d.cts → threadOptions.d-REwBuXAY.d.cts} +2 -2
  153. package/dist/{timelineRows.d-BST14weg.d.ts → timelineRows.d-CTlGQTB0.d.ts} +1 -1
  154. package/dist/{timelineRows.d-BEjiHpkP.d.cts → timelineRows.d-CongJG58.d.cts} +1 -1
  155. package/dist/unreadStore.d-gCsleb6l.d.ts +74 -0
  156. package/dist/unreadStore.d-w5x6lEpR.d.cts +74 -0
  157. package/dist/{useHealthPlanSubscription.d-C9kh4mvk.d.ts → useHealthPlanSubscription.d-BSo5kFT9.d.ts} +2 -2
  158. package/dist/{useHealthPlanSubscription.d-CYJi9ZNE.d.cts → useHealthPlanSubscription.d-Br7GKHTt.d.cts} +2 -2
  159. package/dist/useInboxUnread.d-Blxu00eY.d.ts +206 -0
  160. package/dist/useInboxUnread.d-pi6FNnK-.d.cts +206 -0
  161. package/dist/{usePresentation.d-COEh8Xa1.d.cts → usePresentation.d-C6ci1s3j.d.cts} +1 -1
  162. package/dist/{usePresentation.d-WA3sfMpz.d.ts → usePresentation.d-yd9Gh4GB.d.ts} +1 -1
  163. package/dist/{useRecordsDepth.d-DZfdRdIU.d.cts → useRecordsDepth.d-BIDVPfx7.d.cts} +1 -1
  164. package/dist/{useRecordsDepth.d-CAYnVYl1.d.ts → useRecordsDepth.d-C5snbNxR.d.ts} +1 -1
  165. package/dist/{appStateLifecycle.d-_TM06yEk.d.cts → useUnread.d-CORommFJ.d.cts} +49 -14
  166. package/dist/{appStateLifecycle.d-7H_2a9it.d.ts → useUnread.d-w0dKMnx7.d.ts} +49 -14
  167. package/dist/video/index.cjs +1 -94
  168. package/dist/video/index.js +1 -94
  169. package/dist/{view.d-D8soknYh.d.ts → view.d-CK2UN4qn.d.ts} +3 -3
  170. package/dist/{view.d-eM315KIZ.d.cts → view.d-DUhKppyl.d.cts} +3 -3
  171. package/dist/web/consent/index.cjs +1 -94
  172. package/dist/web/consent/index.d.cts +5 -5
  173. package/dist/web/consent/index.d.ts +5 -5
  174. package/dist/web/consent/index.js +1 -94
  175. package/dist/web/health-plan/index.cjs +1 -94
  176. package/dist/web/health-plan/index.d.cts +11 -11
  177. package/dist/web/health-plan/index.d.ts +11 -11
  178. package/dist/web/health-plan/index.js +1 -94
  179. package/dist/web/inbox/index.cjs +49 -0
  180. package/dist/web/inbox/index.d.cts +191 -0
  181. package/dist/web/inbox/index.d.ts +191 -0
  182. package/dist/web/inbox/index.js +49 -0
  183. package/dist/web/index.cjs +28 -118
  184. package/dist/web/index.d.cts +76 -36
  185. package/dist/web/index.d.ts +76 -36
  186. package/dist/web/index.js +28 -118
  187. package/dist/web/intro/index.cjs +3 -96
  188. package/dist/web/intro/index.d.cts +6 -6
  189. package/dist/web/intro/index.d.ts +6 -6
  190. package/dist/web/intro/index.js +3 -96
  191. package/dist/web/notifications/index.cjs +16 -96
  192. package/dist/web/notifications/index.d.cts +8 -3
  193. package/dist/web/notifications/index.d.ts +8 -3
  194. package/dist/web/notifications/index.js +16 -96
  195. package/dist/web/records/depth/index.cjs +1 -94
  196. package/dist/web/records/depth/index.d.cts +9 -9
  197. package/dist/web/records/depth/index.d.ts +9 -9
  198. package/dist/web/records/depth/index.js +1 -94
  199. package/dist/web/records/index.cjs +1 -94
  200. package/dist/web/records/index.d.cts +11 -11
  201. package/dist/web/records/index.d.ts +11 -11
  202. package/dist/web/records/index.js +1 -94
  203. package/dist/web/records-sheet/index.cjs +2 -95
  204. package/dist/web/records-sheet/index.js +2 -95
  205. package/dist/web/shop/index.d.cts +3 -3
  206. package/dist/web/shop/index.d.ts +3 -3
  207. package/dist/web/televet/booking/index.cjs +9 -102
  208. package/dist/web/televet/booking/index.d.cts +18 -11
  209. package/dist/web/televet/booking/index.d.ts +18 -11
  210. package/dist/web/televet/booking/index.js +9 -102
  211. package/dist/web/televet/index.cjs +1 -94
  212. package/dist/web/televet/index.d.cts +3 -3
  213. package/dist/web/televet/index.d.ts +3 -3
  214. package/dist/web/televet/index.js +1 -94
  215. package/dist/web/texting/index.cjs +1 -94
  216. package/dist/web/texting/index.d.cts +5 -5
  217. package/dist/web/texting/index.d.ts +5 -5
  218. package/dist/web/texting/index.js +1 -94
  219. package/notifications/inbox/package.json +8 -0
  220. package/package.json +29 -1
  221. package/web/inbox/native-blocked.cjs +12 -0
  222. package/web/inbox/package.json +8 -0
@@ -2,9 +2,11 @@
2
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
3
3
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
4
4
  import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
5
- import { A as AuthContext } from './identity.d-BmbAwQYx.cjs';
6
- import { U as UserRef, R as RecordsRequestId, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.cjs';
5
+ import { A as AuthContext } from './identity.d-CA7mW59I.cjs';
6
+ import { U as UserRef, P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.cjs';
7
+ import { a as ChatCheckinTarget } from './chatTypes.d-CSyw9em_.cjs';
7
8
  import { V as VetVisitIntent } from './visitIntent.d-D7_yVp1I.cjs';
9
+ import { d as EverfurNotification, g as EverfurNotificationTarget } from './parse.d-DYsx1Q2V.cjs';
8
10
 
9
11
  /** The push providers the registration route accepts. `apns` is refused with `provider_unsupported` until APNs direct lands. */
10
12
  type PushProvider = 'expo' | 'fcm' | 'apns';
@@ -21,6 +23,18 @@ interface RegisterDeviceInput {
21
23
  readonly platform: DevicePlatform;
22
24
  /** Your own stable id for this install, if you keep one (1 to 128 characters). Echoed back, never interpreted. */
23
25
  readonly installationId?: string;
26
+ /**
27
+ * The device's IANA time zone (`America/Chicago`, at most 64 characters), so Everfur holds pushes to the member's
28
+ * own quiet hours. Absent, null, or not a zone name, nothing is sent and Everfur uses your tenant's time zone.
29
+ */
30
+ readonly timezone?: string | null;
31
+ /** The device's BCP 47 language tag (`en-US`, at most 35 characters). Absent, null, or malformed, nothing is sent. */
32
+ readonly locale?: string | null;
33
+ }
34
+ /** What `readDeviceLocale` read off the device: null for what it could not read. */
35
+ interface DeviceLocale {
36
+ readonly timezone: string | null;
37
+ readonly locale: string | null;
24
38
  }
25
39
  /** The device row as Everfur stored it. The token itself is never echoed. */
26
40
  interface RegisteredDevice {
@@ -94,6 +108,11 @@ type NotificationsReasonCode = 'provider_unsupported' | 'token_invalid' | 'devic
94
108
  declare const NOTIFICATIONS_REASON_MESSAGES: Readonly<Record<NotificationsReasonCode, string>>;
95
109
  /** The developer-facing sentence for an error's `reasonCode`, or null when it carries none this surface knows. */
96
110
  declare function explainNotificationsReason(error: EverfurError): string | null;
111
+ /**
112
+ * The device's time zone and language, read from `Intl` (the browser's, or Hermes' on React Native): null for either
113
+ * one it cannot read or that is not a well-formed name. Pass them to `registerDevice`; never throws.
114
+ */
115
+ declare function readDeviceLocale(): DeviceLocale;
97
116
  /**
98
117
  * The client over the runtime under your provider (`useEverfurContext().runtime`). Auth is read at call time, so the
99
118
  * client can be built once and reused across sign-ins; a disposed runtime settles every verb without a request.
@@ -113,6 +132,11 @@ interface EverfurNotificationsOptions {
113
132
  readonly platform: DevicePlatform;
114
133
  /** Your own stable id for this install, if you keep one. */
115
134
  readonly installationId?: string;
135
+ /**
136
+ * Send the device's time zone and language (`readDeviceLocale`) with each registration, so Everfur holds pushes to
137
+ * the member's own quiet hours. Default false: the registration carries the token, provider and platform only.
138
+ */
139
+ readonly sendDeviceLocale?: boolean;
116
140
  }
117
141
  /**
118
142
  * `signed_out`: no signed-in user on the provider (nothing to register). `no_token`: a user, no token yet.
@@ -145,67 +169,80 @@ declare function useEverfurNotificationsClient(): NotificationsClient;
145
169
  */
146
170
  declare function useEverfurNotifications(options: EverfurNotificationsOptions): EverfurNotificationsState;
147
171
 
148
- /** The version of the routing block this release reads. */
149
- declare const EVERFUR_NOTIFICATION_VERSION = 1;
150
- /** The closed target kinds, in the backend's order (`partner_target.py` TARGET_KINDS). */
151
- declare const EVERFUR_NOTIFICATION_TARGET_KINDS: readonly ["record_request", "pet", "visit", "case"];
152
- /** One target kind. */
153
- type EverfurNotificationTargetKind = (typeof EVERFUR_NOTIFICATION_TARGET_KINDS)[number];
154
- /**
155
- * The event types Everfur builds a push target for (`partner_target.py` TARGET_BUILDERS), in its order. The member
156
- * events, the urgency verdict and the endpoint test event reach the partner's webhook only and never a device, and
157
- * `visit.completed`, `visit.rescheduled` and `visit.ended` carry no consumer copy, so they are never pushed either;
158
- * they are listed because the platform builds their target.
159
- */
160
- declare const EVERFUR_NOTIFICATION_EVENT_TYPES: readonly ["record_request.updated", "record.ready", "pet.vaccination.due", "visit.booked", "visit.cancelled", "visit.completed", "visit.no_show", "visit.rescheduled", "visit.reminder", "visit.followup_sent", "visit.message_received", "visit.ended", "chat.follow_up_due", "chat.reminder_due", "record.activation"];
161
- /** One pushed event type. */
162
- type EverfurNotificationEventType = (typeof EVERFUR_NOTIFICATION_EVENT_TYPES)[number];
163
- /** What a tapped notification is about, keyed on `kind`. The optional references are null when the push carried none. */
164
- type EverfurNotificationTarget = {
165
- /**
166
- * A records request (`record_request.updated`, `record.ready`, and `record.activation`, which says what the
167
- * request's parse found): open that request.
168
- */
169
- readonly kind: 'record_request';
170
- readonly requestId: RecordsRequestId;
172
+ /** An SDK surface a tapped push opens, and what to hand it. Your navigation opens the screen that hosts it. */
173
+ type EverfurNotificationSurfaceRoute = {
174
+ /** `EverfurChat` on `petRef`, with `checkinTarget` (null: chat as it opens). */
175
+ readonly surface: 'chat';
171
176
  readonly petRef: PetRef | null;
177
+ readonly checkinTarget: ChatCheckinTarget | null;
172
178
  } | {
173
- /** A pet: `pet.vaccination.due` opens that pet's records, `chat.reminder_due` that pet's chat. */
174
- readonly kind: 'pet';
175
- readonly petRef: PetRef;
179
+ /** `EverfurRecords` on `petRef`, or `EverfurRecordsRequest` for `requestId` when the push named one. */
180
+ readonly surface: 'records';
181
+ readonly petRef: PetRef | null;
182
+ readonly requestId: RecordsRequestId | null;
176
183
  } | {
177
- /**
178
- * A vet visit (`visit.*`): open that visit. `visitRef` is the partner visit reference the visit events carry.
179
- * `intent` is what to open for it, derived from the event type with the consumer app's routing (the push
180
- * itself carries none): `visit` for a booking or a change to it, `join` for a reminder, `messages` for the
181
- * vet's reply or the follow-up, `summary` for a completed visit. Pass both to `useVetVisit().openVisit`.
182
- * `null` for a cancelled or missed visit: there is nothing left to open, so route to a new booking.
183
- */
184
- readonly kind: 'visit';
184
+ /** The visit: `useVetVisit().openVisit(visitRef, intent)`; `intent` null means book a new one. */
185
+ readonly surface: 'visit';
185
186
  readonly visitRef: string;
186
- readonly petRef: PetRef | null;
187
187
  readonly intent: VetVisitIntent | null;
188
+ readonly petRef: PetRef | null;
188
189
  } | {
189
- /** A follow-up case (`chat.follow_up_due`): open the conversation the check-in landed in. */
190
- readonly kind: 'case';
191
- readonly caseRef: string;
192
- readonly conversationId: ConversationId | null;
190
+ /** `EverfurHealthPlan`, on `petRef` when the push named one. */
191
+ readonly surface: 'health_plan';
193
192
  readonly petRef: PetRef | null;
194
193
  };
195
- /** A parsed push: the event it announces and the thing to open. Frozen. */
196
- interface EverfurNotification {
197
- /** `evt_` plus the public event id, the same id the webhook envelope for this event carries. */
194
+ /** What the inbox is asked to open: the item `itemId`, or the inbox itself when it is null. */
195
+ interface EverfurInboxRequest {
196
+ readonly itemId: string | null;
197
+ /** The push's event id, for an inbox that finds the item by its event when the push named none. */
198
198
  readonly eventId: string;
199
- readonly eventType: EverfurNotificationEventType;
200
- readonly target: EverfurNotificationTarget;
199
+ readonly notification: EverfurNotification;
200
+ }
201
+ /**
202
+ * The seam the member's inbox plugs into. `open` answers true when it took the tap (it may load the item after
203
+ * answering), false when it cannot open anything.
204
+ */
205
+ interface EverfurInboxRouter {
206
+ open(request: EverfurInboxRequest): boolean;
207
+ }
208
+ /** No inbox: opens nothing, so a tap no other step took is `unrouted`. The default. */
209
+ declare const NO_INBOX_ROUTER: EverfurInboxRouter;
210
+ /**
211
+ * The inbox router for an app that mounts `EverfurInbox`: `openInbox` moves your navigation to the screen that hosts
212
+ * it, passing `itemId` as its `initialItemId` and, when `itemId` is null, `request.eventId` as its `initialEventId`
213
+ * (a native push names no item; the inbox finds it by its event, else shows the list). It takes every tap it is asked
214
+ * about.
215
+ */
216
+ declare function createEverfurInboxRouter(openInbox: (itemId: string | null, request: EverfurInboxRequest) => void): EverfurInboxRouter;
217
+ interface EverfurNotificationRouterOptions {
218
+ /**
219
+ * Open one of the SDK's surfaces: move your navigation to the screen that hosts it, with what the route names.
220
+ * Absent, those targets go to `onTarget` like the rest.
221
+ */
222
+ readonly onSurface?: (route: EverfurNotificationSurfaceRoute, notification: EverfurNotification) => void;
223
+ /**
224
+ * Your handler for a target the SDK has no surface for (`medication` and the `care.*` pet reminders, `order`,
225
+ * `walk`, `weather`, `pack`, `mood`, `card`, `membership`, `support`, `offer`), a kind this release does not know
226
+ * (`unknown`), and every target when there is no `onSurface`. Return true when you opened something for it. Any
227
+ * other answer (false, or nothing at all) passes the tap on to the inbox, so a handler that only routes some kinds
228
+ * never swallows the rest.
229
+ */
230
+ readonly onTarget?: (target: EverfurNotificationTarget, notification: EverfurNotification) => boolean;
231
+ /** Where the member's inbox lives. Default `NO_INBOX_ROUTER`. */
232
+ readonly inbox?: EverfurInboxRouter;
201
233
  }
234
+ /** Where a tap went. `unrouted`: no step took it (no handler for it and no inbox). */
235
+ type EverfurNotificationRouteOutcome = 'surface' | 'partner' | 'inbox' | 'unrouted';
236
+ /**
237
+ * The SDK surface a push's target opens, or null when the SDK has none for it (the partner's handler or the inbox
238
+ * takes it). Pure.
239
+ */
240
+ declare function surfaceForNotification(notification: EverfurNotification): EverfurNotificationSurfaceRoute | null;
202
241
  /**
203
- * Read the Everfur routing block out of a received push, or null when there is none or it is not one Everfur would
204
- * send. Pure and total: it never throws, whatever it is handed.
205
- *
206
- * Pass the object your notification library gave you: an expo-notifications `Notification` or `NotificationResponse`,
207
- * an FCM `RemoteMessage`, or its `data` map. Route on `target.kind`; `eventType` says why the push was sent.
242
+ * Route a parsed push: the SDK's surface for its target (`onSurface`), else your handler (`onTarget`), else the inbox
243
+ * item the push names, or the inbox (`inbox`). An `inbox` target goes to the inbox first. Settles to where the tap
244
+ * went; never throws.
208
245
  */
209
- declare function parseEverfurNotification(payload: unknown): EverfurNotification | null;
246
+ declare function routeEverfurNotification(notification: EverfurNotification, options?: EverfurNotificationRouterOptions): EverfurNotificationRouteOutcome;
210
247
 
211
- export { type DevicePlatform as D, type EverfurNotificationsOptions as E, NOTIFICATIONS_REASON_MESSAGES as N, type PushProvider as P, type RegisterDeviceInput as R, type EverfurNotificationsState as a, EVERFUR_NOTIFICATION_EVENT_TYPES as b, EVERFUR_NOTIFICATION_TARGET_KINDS as c, EVERFUR_NOTIFICATION_VERSION as d, type EverfurNotification as e, type EverfurNotificationEventType as f, type EverfurNotificationTarget as g, type EverfurNotificationTargetKind as h, type EverfurNotificationsStatus as i, type NotificationPreferences as j, type NotificationPreferencesInput as k, type NotificationsClient as l, type NotificationsReasonCode as m, type NotificationsRuntime as n, type RegisteredDevice as o, createNotificationsClient as p, explainNotificationsReason as q, parseEverfurNotification as r, useEverfurNotifications as s, useEverfurNotificationsClient as u };
248
+ export { type DeviceLocale as D, type EverfurNotificationsOptions as E, NOTIFICATIONS_REASON_MESSAGES as N, type PushProvider as P, type RegisterDeviceInput as R, type EverfurNotificationsState as a, type DevicePlatform as b, type EverfurInboxRequest as c, type EverfurInboxRouter as d, type EverfurNotificationRouteOutcome as e, type EverfurNotificationRouterOptions as f, type EverfurNotificationSurfaceRoute as g, type EverfurNotificationsStatus as h, NO_INBOX_ROUTER as i, type NotificationPreferences as j, type NotificationPreferencesInput as k, type NotificationsClient as l, type NotificationsReasonCode as m, type NotificationsRuntime as n, type RegisteredDevice as o, createEverfurInboxRouter as p, createNotificationsClient as q, explainNotificationsReason as r, readDeviceLocale as s, routeEverfurNotification as t, surfaceForNotification as u, useEverfurNotificationsClient as v, useEverfurNotifications as w };
@@ -1,14 +1,15 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
2
  import { E as EntitlementDecision, C as CapabilityName } from './resolve.d-BTC3b6FW.cjs';
3
- import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-CyerzD5G.cjs';
3
+ import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-tZADfKA1.cjs';
4
4
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
5
5
  import { E as EverfurThemeInput, C as ClientBranding } from './branding.d-BFauULV6.cjs';
6
- import { A as AuthContext, T as TokenProvider } from './identity.d-BmbAwQYx.cjs';
6
+ import { A as AuthContext, T as TokenProvider } from './identity.d-CA7mW59I.cjs';
7
7
  import { U as UserRef, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.cjs';
8
- import { T as TransportPort } from './config.d-BFTqU7ft.cjs';
8
+ import { T as TransportPort } from './config.d-jCmrhM4a.cjs';
9
9
  import { I as ImageCachePort, K as KvPort } from './cacheEpoch.d-DknKn3S0.cjs';
10
10
  import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
11
- import { U as UploadPort, n as ChatController } from './ports.d-CB9YZT2L.cjs';
11
+ import { o as ChatController } from './chatTypes.d-CSyw9em_.cjs';
12
+ import { U as UploadPort, a as UnreadStore } from './unreadStore.d-w5x6lEpR.cjs';
12
13
  import { C as CameraPort } from './CameraPort.d-Cv31Pz7g.cjs';
13
14
  import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.cjs';
14
15
  import { U as UploadTransport } from './ports.d-BX4f4UsB.cjs';
@@ -66,6 +67,33 @@ type EverfurClientEvent = {
66
67
  } | {
67
68
  readonly type: 'conversation_started';
68
69
  readonly conversationId: string;
70
+ } | {
71
+ readonly type: 'unread_changed';
72
+ /** The pet whose chat list was read; null for the member's list across pets. */
73
+ readonly petRef: string | null;
74
+ /** The newest thread, the one the count is for; null when the member has none. */
75
+ readonly conversationId: string | null;
76
+ /** Unread messages in that thread, as the server counted them. */
77
+ readonly unreadCount: number;
78
+ readonly hasUnread: boolean;
79
+ } | {
80
+ readonly type: 'inbox_unread_changed';
81
+ /** Unread items in the member's inbox. */
82
+ readonly unreadCount: number;
83
+ } | {
84
+ readonly type: 'inbox_item_opened';
85
+ /** The inbox item (`inb_...`). */
86
+ readonly itemId: string;
87
+ /** The notification event it came from (`evt_...`), or null. */
88
+ readonly eventId: string | null;
89
+ /** The partner event type (`chat.vet_replied`), or null. */
90
+ readonly eventType: string | null;
91
+ readonly petRef: string | null;
92
+ /** Where it points: `kind` and its string fields, as the push envelope's `target` carries them; null for none. */
93
+ readonly target: {
94
+ readonly kind: string;
95
+ readonly [field: string]: string | null;
96
+ } | null;
69
97
  };
70
98
  /** The partner's handler. It may throw; the SDK reports and swallows it. */
71
99
  type EverfurEventHandler = (event: EverfurClientEvent) => void;
@@ -115,7 +143,8 @@ interface EverfurRuntimeConfig {
115
143
  /** Structured, redacted LogPort events when true. */
116
144
  readonly debug?: boolean;
117
145
  /**
118
- * Lifecycle events (`ready`, `error`, `session_expired`, `conversation_started`; see `EverfurClientEvent`).
146
+ * Lifecycle events (`ready`, `error`, `session_expired`, `conversation_started`, `unread_changed`; see `EverfurClientEvent`).
147
+ * `unread_changed` arrives only while `useEverfurUnread` is mounted.
119
148
  * Delivered asynchronously, never during a render; a throwing handler is reported and ignored. Best effort at
120
149
  * teardown: an event still queued when the runtime is disposed is dropped, and a refusal during `logout()` is
121
150
  * not reported.
@@ -303,6 +332,11 @@ interface EverfurRuntime {
303
332
  */
304
333
  readonly scopeEpoch: number;
305
334
  readonly entitlements: EntitlementStore;
335
+ /**
336
+ * Whether the member has unread Everfur chat, per pet, for your own badge (`useEverfurUnread` binds it). Fed
337
+ * by every read of a pet's chat list, the chat's own included; a re-scope forgets it.
338
+ */
339
+ readonly unread: UnreadStore;
306
340
  /** null => logout: drops the cached bearer and re-scopes every open capability. */
307
341
  setUser(user: RuntimeUser | null): void;
308
342
  /**
@@ -1,14 +1,15 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
2
  import { E as EntitlementDecision, C as CapabilityName } from './resolve.d-BTC3b6FW.js';
3
- import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-CLyzuoo4.js';
3
+ import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-CpYWRWFq.js';
4
4
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
5
5
  import { E as EverfurThemeInput, C as ClientBranding } from './branding.d-DpNGEdDL.js';
6
- import { A as AuthContext, T as TokenProvider } from './identity.d-BZXPu9Hi.js';
6
+ import { A as AuthContext, T as TokenProvider } from './identity.d-DIOnFzXL.js';
7
7
  import { U as UserRef, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.js';
8
- import { T as TransportPort } from './config.d-D_k_rNZZ.js';
8
+ import { T as TransportPort } from './config.d-N5Xzy53V.js';
9
9
  import { I as ImageCachePort, K as KvPort } from './cacheEpoch.d-DknKn3S0.js';
10
10
  import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
11
- import { U as UploadPort, n as ChatController } from './ports.d-RKc2C07X.js';
11
+ import { o as ChatController } from './chatTypes.d-BI4vidgu.js';
12
+ import { U as UploadPort, a as UnreadStore } from './unreadStore.d-gCsleb6l.js';
12
13
  import { C as CameraPort } from './CameraPort.d-Cv31Pz7g.js';
13
14
  import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.js';
14
15
  import { U as UploadTransport } from './ports.d-BX4f4UsB.js';
@@ -66,6 +67,33 @@ type EverfurClientEvent = {
66
67
  } | {
67
68
  readonly type: 'conversation_started';
68
69
  readonly conversationId: string;
70
+ } | {
71
+ readonly type: 'unread_changed';
72
+ /** The pet whose chat list was read; null for the member's list across pets. */
73
+ readonly petRef: string | null;
74
+ /** The newest thread, the one the count is for; null when the member has none. */
75
+ readonly conversationId: string | null;
76
+ /** Unread messages in that thread, as the server counted them. */
77
+ readonly unreadCount: number;
78
+ readonly hasUnread: boolean;
79
+ } | {
80
+ readonly type: 'inbox_unread_changed';
81
+ /** Unread items in the member's inbox. */
82
+ readonly unreadCount: number;
83
+ } | {
84
+ readonly type: 'inbox_item_opened';
85
+ /** The inbox item (`inb_...`). */
86
+ readonly itemId: string;
87
+ /** The notification event it came from (`evt_...`), or null. */
88
+ readonly eventId: string | null;
89
+ /** The partner event type (`chat.vet_replied`), or null. */
90
+ readonly eventType: string | null;
91
+ readonly petRef: string | null;
92
+ /** Where it points: `kind` and its string fields, as the push envelope's `target` carries them; null for none. */
93
+ readonly target: {
94
+ readonly kind: string;
95
+ readonly [field: string]: string | null;
96
+ } | null;
69
97
  };
70
98
  /** The partner's handler. It may throw; the SDK reports and swallows it. */
71
99
  type EverfurEventHandler = (event: EverfurClientEvent) => void;
@@ -115,7 +143,8 @@ interface EverfurRuntimeConfig {
115
143
  /** Structured, redacted LogPort events when true. */
116
144
  readonly debug?: boolean;
117
145
  /**
118
- * Lifecycle events (`ready`, `error`, `session_expired`, `conversation_started`; see `EverfurClientEvent`).
146
+ * Lifecycle events (`ready`, `error`, `session_expired`, `conversation_started`, `unread_changed`; see `EverfurClientEvent`).
147
+ * `unread_changed` arrives only while `useEverfurUnread` is mounted.
119
148
  * Delivered asynchronously, never during a render; a throwing handler is reported and ignored. Best effort at
120
149
  * teardown: an event still queued when the runtime is disposed is dropped, and a refusal during `logout()` is
121
150
  * not reported.
@@ -303,6 +332,11 @@ interface EverfurRuntime {
303
332
  */
304
333
  readonly scopeEpoch: number;
305
334
  readonly entitlements: EntitlementStore;
335
+ /**
336
+ * Whether the member has unread Everfur chat, per pet, for your own badge (`useEverfurUnread` binds it). Fed
337
+ * by every read of a pet's chat list, the chat's own included; a re-scope forgets it.
338
+ */
339
+ readonly unread: UnreadStore;
306
340
  /** null => logout: drops the cached bearer and re-scopes every open capability. */
307
341
  setUser(user: RuntimeUser | null): void;
308
342
  /**
@@ -1,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 { P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.js';
3
- import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-BhaCdstU.js';
3
+ import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-T5oSAhY-.js';
4
4
  import { C as CaptureRecordsSignature, R as RecordsClinicController } from './clinicRequestProps.d-CjsMg_OD.js';
5
5
  import { R as RecordsClinic, c as RecordsClinicSearchInput } from './clinicModels.d-CaS64-P-.js';
6
6
  import { a as RecordsAskHandler } from './recordsAsk.d-C5CGSi3j.js';
@@ -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 { P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.cjs';
3
- import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-BN1jfVGo.cjs';
3
+ import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-BxA_uGBb.cjs';
4
4
  import { C as CaptureRecordsSignature, R as RecordsClinicController } from './clinicRequestProps.d-1dCtouGA.cjs';
5
5
  import { R as RecordsClinic, c as RecordsClinicSearchInput } from './clinicModels.d-BXgKZqDb.cjs';
6
6
  import { a as RecordsAskHandler } from './recordsAsk.d-C5CGSi3j.cjs';