@everfur/sdk 0.13.0 → 0.14.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 (202) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +11 -10
  3. package/dist/{Chat.d-Dts8u_1a.d.cts → Chat.d-aycmX1CA.d.cts} +12 -4
  4. package/dist/{Chat.d-DUNTfzqC.d.ts → Chat.d-puminpyi.d.ts} +12 -4
  5. package/dist/{DepthViews.d-CubkMPbU.d.ts → DepthViews.d-BdvFZgPs.d.cts} +1 -1
  6. package/dist/{DepthViews.d-Ce2Zhnrb.d.ts → DepthViews.d-DIvxzLDf.d.ts} +1 -1
  7. package/dist/{DepthViews.d-BMU2jFPw.d.cts → DepthViews.d-Dy0Zl-s-.d.ts} +1 -1
  8. package/dist/{DepthViews.d-BIp599lz.d.cts → DepthViews.d-wLNkzk9f.d.cts} +1 -1
  9. package/dist/RecordsPage.d-9Ank15PT.d.ts +93 -0
  10. package/dist/RecordsPage.d-DMKU0IKc.d.cts +93 -0
  11. package/dist/animations/index.d.cts +5 -5
  12. package/dist/animations/index.d.ts +5 -5
  13. package/dist/{attachments.d-D1yhJjcZ.d.ts → attachments.d--sIsfk6e.d.ts} +2 -2
  14. package/dist/{attachments.d-Bp2qbHxn.d.cts → attachments.d-DNUCiyy5.d.cts} +6 -24
  15. package/dist/{attachments.d-DisnvB9R.d.cts → attachments.d-ZEpTUeWN.d.cts} +2 -2
  16. package/dist/{attachments.d-Djy9z_0Z.d.ts → attachments.d-rp3xs-Q3.d.ts} +6 -24
  17. package/dist/{bookingCopy.d-BJF6gd1A.d.ts → bookingCopy.d-D0uIIFAJ.d.ts} +2 -2
  18. package/dist/{bookingCopy.d-BlBmhAJc.d.cts → bookingCopy.d-DUrmVcLs.d.cts} +2 -2
  19. package/dist/{branding.d-DI8S400y.d.cts → branding.d-CTXTUg_8.d.cts} +1 -1
  20. package/dist/{branding.d-OIGLbQeM.d.ts → branding.d-DxJSoFce.d.ts} +1 -1
  21. package/dist/{casesRepository.d-CT2LTicS.d.cts → casesRepository.d-DCnix2pT.d.cts} +1 -1
  22. package/dist/{casesRepository.d-UsWOz9bv.d.ts → casesRepository.d-DbirgbyH.d.ts} +1 -1
  23. package/dist/chat/index.cjs +43 -41
  24. package/dist/chat/index.d.cts +26 -13
  25. package/dist/chat/index.d.ts +26 -13
  26. package/dist/chat/index.js +43 -41
  27. package/dist/client/index.cjs +2 -2
  28. package/dist/client/index.d.cts +10 -10
  29. package/dist/client/index.d.ts +10 -10
  30. package/dist/client/index.js +2 -2
  31. package/dist/clinicBatch.d-Ccmrngcu.d.cts +71 -0
  32. package/dist/clinicBatch.d-D9Ci7IpP.d.ts +71 -0
  33. package/dist/clinicModels.d-BXgKZqDb.d.cts +68 -0
  34. package/dist/clinicModels.d-CaS64-P-.d.ts +68 -0
  35. package/dist/clinicRequestProps.d-1dCtouGA.d.cts +65 -0
  36. package/dist/clinicRequestProps.d-CjsMg_OD.d.ts +65 -0
  37. package/dist/{config.d-BR3DT9ho.d.cts → config.d-DJ4mvf_w.d.cts} +1 -1
  38. package/dist/{config.d-Dy6igYlH.d.ts → config.d-MX7IKP2f.d.ts} +1 -1
  39. package/dist/consent/index.d.cts +5 -5
  40. package/dist/consent/index.d.ts +5 -5
  41. package/dist/{context.d-QcCgguzA.d.ts → context.d-BdnBe8Oe.d.ts} +7 -7
  42. package/dist/{context.d-Cwks0p3C.d.cts → context.d-C6MJsMpN.d.cts} +7 -7
  43. package/dist/{copy.d-CiMn2IIt.d.ts → copy.d-BIfQOoDB.d.ts} +2 -2
  44. package/dist/{copy.d-DLJTyRfT.d.cts → copy.d-C_u7shha.d.cts} +2 -2
  45. package/dist/core/index.cjs +3 -3
  46. package/dist/core/index.d.cts +20 -18
  47. package/dist/core/index.d.ts +20 -18
  48. package/dist/core/index.js +3 -3
  49. package/dist/{depth.d-OSALbYM7.d.ts → depth.d-COFxYWLU.d.ts} +6 -133
  50. package/dist/{depth.d-CjPGVPDL.d.cts → depth.d-D2e5WZuE.d.cts} +6 -133
  51. package/dist/{entitlementRepository.d-CVQa1DA1.d.cts → entitlementRepository.d-BP15dFbe.d.cts} +4 -4
  52. package/dist/{entitlementRepository.d-Cf3LbTwD.d.ts → entitlementRepository.d-DLuxnGi5.d.ts} +4 -4
  53. package/dist/{features.d-fNsGcg0R.d.ts → features.d-DrQxTw3-.d.cts} +1 -1
  54. package/dist/{features.d-fNsGcg0R.d.cts → features.d-DrQxTw3-.d.ts} +1 -1
  55. package/dist/{focus.d-DMg2ngHI.d.ts → focus.d-C0Tr0oVJ.d.ts} +109 -348
  56. package/dist/{focus.d-az9cqUz3.d.cts → focus.d-jQWp0hdK.d.cts} +109 -348
  57. package/dist/health-plan/index.cjs +165 -151
  58. package/dist/health-plan/index.d.cts +53 -11
  59. package/dist/health-plan/index.d.ts +53 -11
  60. package/dist/health-plan/index.js +169 -155
  61. package/dist/{idempotency.d-D461_DPD.d.cts → idempotency.d-DXb1BN2A.d.ts} +151 -6
  62. package/dist/{idempotency.d-WpXx9zQo.d.ts → idempotency.d-HF6fyRt2.d.cts} +151 -6
  63. package/dist/{identity.d-DzTijonw.d.ts → identity.d-BePPZ7Uv.d.ts} +1 -1
  64. package/dist/{identity.d-60LeJt_s.d.cts → identity.d-CJfnWOdH.d.cts} +1 -1
  65. package/dist/index.cjs +46 -44
  66. package/dist/index.d.cts +19 -18
  67. package/dist/index.d.ts +19 -18
  68. package/dist/index.js +46 -44
  69. package/dist/introEvents.d-BkGDT_kG.d.cts +175 -0
  70. package/dist/introEvents.d-DHlMvmC7.d.ts +175 -0
  71. package/dist/introEvents.d-dS3fJCH1.d.cts +5 -0
  72. package/dist/introEvents.d-dS3fJCH1.d.ts +5 -0
  73. package/dist/{models.d-BnLm3VAA.d.cts → models.d-BSqvbTE1.d.cts} +8 -1
  74. package/dist/{models.d-BagXhafD.d.ts → models.d-DOwnr8fi.d.ts} +8 -1
  75. package/dist/notifications/index.d.cts +4 -4
  76. package/dist/notifications/index.d.ts +4 -4
  77. package/dist/{optInView.d-CEyHR6PK.d.cts → optInView.d-0iI5JoAf.d.cts} +119 -3
  78. package/dist/{optInView.d-acKpV8V2.d.ts → optInView.d-s-w4aGN3.d.ts} +119 -3
  79. package/dist/{parse.d-C8CXyS58.d.ts → parse.d-COt1qVA6.d.ts} +1 -1
  80. package/dist/{parse.d-tEzufgJX.d.cts → parse.d-EmsgOUMQ.d.cts} +1 -1
  81. package/dist/{pets.d-C_53_fzo.d.ts → pets.d-BFT_b53y.d.ts} +1 -1
  82. package/dist/{pets.d-NbJvP_kh.d.cts → pets.d-nNAVnw7f.d.cts} +1 -1
  83. package/dist/{petsRepository.d-lp1BHRqM.d.cts → petsRepository.d-B2TpRE7r.d.cts} +1 -1
  84. package/dist/{petsRepository.d-BuGHymNx.d.ts → petsRepository.d-RGwSZcYl.d.ts} +1 -1
  85. package/dist/planSignals.d-BDbp2e-k.d.cts +126 -0
  86. package/dist/planSignals.d-DSnxKoWe.d.ts +126 -0
  87. package/dist/{ports.d-COIyN624.d.ts → ports.d-D2n4HRUy.d.ts} +4 -4
  88. package/dist/{ports.d-CEROoqnA.d.cts → ports.d-DBA_gsq5.d.cts} +4 -4
  89. package/dist/{presentation.d-DMbdad7G.d.cts → presentation.d-vy8kTGfR.d.cts} +6 -0
  90. package/dist/{presentation.d-DMbdad7G.d.ts → presentation.d-vy8kTGfR.d.ts} +6 -0
  91. package/dist/quickPrompts.d-NM_81Jc1.d.cts +19 -0
  92. package/dist/quickPrompts.d-NM_81Jc1.d.ts +19 -0
  93. package/dist/records/depth/index.d.cts +13 -9
  94. package/dist/records/depth/index.d.ts +13 -9
  95. package/dist/records/index.cjs +252 -138
  96. package/dist/records/index.d.cts +88 -23
  97. package/dist/records/index.d.ts +88 -23
  98. package/dist/records/index.js +253 -139
  99. package/dist/{requestFunnel.d-CXUMPw1K.d.ts → requestFunnel.d-D9edIEjZ.d.ts} +2 -2
  100. package/dist/{requestFunnel.d-DWQQpjFR.d.cts → requestFunnel.d-RZex94XX.d.cts} +2 -2
  101. package/dist/{resolve.d-jI8FmBj3.d.cts → resolve.d-CoQWUy1Y.d.cts} +1 -1
  102. package/dist/{resolve.d-jI8FmBj3.d.ts → resolve.d-CoQWUy1Y.d.ts} +1 -1
  103. package/dist/{runtimeTypes.d-4yFNNuYR.d.ts → runtimeTypes.d-BYq38b17.d.ts} +6 -6
  104. package/dist/{runtimeTypes.d-D6N_fhxx.d.cts → runtimeTypes.d-LkwZaF7z.d.cts} +6 -6
  105. package/dist/{useRecordsDepth.d-DFcCfiXm.d.ts → screenProps.d-BVzRzowC.d.ts} +5 -91
  106. package/dist/{useRecordsDepth.d-sAq2Qkhr.d.cts → screenProps.d-CQ0qZJkr.d.cts} +5 -91
  107. package/dist/server/events/index.cjs +1 -1
  108. package/dist/server/events/index.d.cts +2 -2
  109. package/dist/server/events/index.d.ts +2 -2
  110. package/dist/server/events/index.js +1 -1
  111. package/dist/server/index.cjs +1 -1
  112. package/dist/server/index.d.cts +3 -3
  113. package/dist/server/index.d.ts +3 -3
  114. package/dist/server/index.js +1 -1
  115. package/dist/{sheetSeam.d-Cviqk89n.d.ts → sheetSeam.d-B09jf4YC.d.ts} +8 -4
  116. package/dist/{sheetSeam.d-DCS3LW8g.d.cts → sheetSeam.d-BBuEIVsa.d.cts} +8 -4
  117. package/dist/shop/index.cjs +224 -58
  118. package/dist/shop/index.d.cts +23 -5
  119. package/dist/shop/index.d.ts +23 -5
  120. package/dist/shop/index.js +225 -59
  121. package/dist/tabs/index.cjs +195 -0
  122. package/dist/tabs/index.d.cts +174 -0
  123. package/dist/tabs/index.d.ts +174 -0
  124. package/dist/tabs/index.js +195 -0
  125. package/dist/tabsModel.d-BfIQg6yS.d.cts +31 -0
  126. package/dist/tabsModel.d-BfIQg6yS.d.ts +31 -0
  127. package/dist/televet/booking/index.d.cts +6 -6
  128. package/dist/televet/booking/index.d.ts +6 -6
  129. package/dist/testing/index.cjs +1 -1
  130. package/dist/testing/index.d.cts +1 -1
  131. package/dist/testing/index.d.ts +1 -1
  132. package/dist/testing/index.js +1 -1
  133. package/dist/testing/rn/index.cjs +1 -1
  134. package/dist/testing/rn/index.d.cts +11 -11
  135. package/dist/testing/rn/index.d.ts +11 -11
  136. package/dist/testing/rn/index.js +1 -1
  137. package/dist/testing/web/index.d.cts +12 -12
  138. package/dist/testing/web/index.d.ts +12 -12
  139. package/dist/texting/index.cjs +40 -5
  140. package/dist/texting/index.d.cts +40 -7
  141. package/dist/texting/index.d.ts +40 -7
  142. package/dist/texting/index.js +40 -5
  143. package/dist/threadOptions.d-9r4Csa7k.d.cts +458 -0
  144. package/dist/threadOptions.d-B6GA09aM.d.ts +458 -0
  145. package/dist/{timelineRows.d-CU5GvvLk.d.ts → timelineRows.d-Bes8ip2v.d.ts} +1 -1
  146. package/dist/{timelineRows.d-BNxgzYRW.d.cts → timelineRows.d-BvM2A7_G.d.cts} +1 -1
  147. package/dist/{typeStyle.d-C1HBRAI3.d.ts → typeStyle.d-Co5KF0up.d.ts} +1 -1
  148. package/dist/{typeStyle.d-Bl8pzbBy.d.cts → typeStyle.d-xIZj02Ru.d.cts} +1 -1
  149. package/dist/useIntroSeen.d-CTWFUthO.d.cts +35 -0
  150. package/dist/useIntroSeen.d-CTWFUthO.d.ts +35 -0
  151. package/dist/usePresentation.d-BGz32Vlm.d.ts +285 -0
  152. package/dist/usePresentation.d-DYTF_ZGf.d.cts +285 -0
  153. package/dist/{useRecords.d-Cb-36SF5.d.cts → useRecords.d-BYNX01El.d.cts} +2 -2
  154. package/dist/{useRecords.d-aQTzQZoV.d.ts → useRecords.d-DWk61a4c.d.ts} +2 -2
  155. package/dist/useRecordsDepth.d--LLA_4ga.d.cts +32 -0
  156. package/dist/useRecordsDepth.d-BQRL0Hez.d.ts +32 -0
  157. package/dist/{view.d-Dps5C8-s.d.cts → view.d-0yBjLTV3.d.cts} +6 -4
  158. package/dist/{view.d-C-SNpDJX.d.ts → view.d-DqbCADFa.d.ts} +6 -4
  159. package/dist/web/consent/index.d.cts +5 -5
  160. package/dist/web/consent/index.d.ts +5 -5
  161. package/dist/web/health-plan/index.cjs +50 -43
  162. package/dist/web/health-plan/index.d.cts +46 -192
  163. package/dist/web/health-plan/index.d.ts +46 -192
  164. package/dist/web/health-plan/index.js +65 -58
  165. package/dist/web/index.cjs +61 -45
  166. package/dist/web/index.d.cts +165 -25
  167. package/dist/web/index.d.ts +165 -25
  168. package/dist/web/index.js +62 -46
  169. package/dist/web/intro/index.cjs +167 -0
  170. package/dist/web/intro/index.d.cts +79 -0
  171. package/dist/web/intro/index.d.ts +79 -0
  172. package/dist/web/intro/index.js +167 -0
  173. package/dist/web/notifications/index.d.cts +3 -3
  174. package/dist/web/notifications/index.d.ts +3 -3
  175. package/dist/web/records/depth/index.d.cts +13 -9
  176. package/dist/web/records/depth/index.d.ts +13 -9
  177. package/dist/web/records/index.cjs +7 -7
  178. package/dist/web/records/index.d.cts +21 -82
  179. package/dist/web/records/index.d.ts +21 -82
  180. package/dist/web/records/index.js +7 -7
  181. package/dist/web/records-sheet/index.cjs +181 -127
  182. package/dist/web/records-sheet/index.d.cts +18 -16
  183. package/dist/web/records-sheet/index.d.ts +18 -16
  184. package/dist/web/records-sheet/index.js +181 -127
  185. package/dist/web/shop/index.cjs +191 -76
  186. package/dist/web/shop/index.d.cts +21 -4
  187. package/dist/web/shop/index.d.ts +21 -4
  188. package/dist/web/shop/index.js +191 -76
  189. package/dist/web/televet/booking/index.d.cts +6 -6
  190. package/dist/web/televet/booking/index.d.ts +6 -6
  191. package/dist/web/texting/index.cjs +36 -5
  192. package/dist/web/texting/index.d.cts +40 -7
  193. package/dist/web/texting/index.d.ts +40 -7
  194. package/dist/web/texting/index.js +36 -5
  195. package/package.json +35 -4
  196. package/tabs/package.json +8 -0
  197. package/web/intro/native-blocked.cjs +12 -0
  198. package/web/intro/package.json +8 -0
  199. package/dist/threadOptions.d-B1pTMmDF.d.cts +0 -260
  200. package/dist/threadOptions.d-B1pTMmDF.d.ts +0 -260
  201. package/dist/usePresentation.d-D6qsFzBz.d.cts +0 -9
  202. package/dist/usePresentation.d-DuGQe_Do.d.ts +0 -9
@@ -0,0 +1,458 @@
1
+ import { ReactNode, CSSProperties } from 'react';
2
+ import { a as CapabilityDecision } from './resolve.d-CoQWUy1Y.cjs';
3
+ import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
4
+ import { P as PetRef } from './ids.d-B2GAAifq.cjs';
5
+ import { b as HealthPlanFocusDesign, c as HealthPlanFocusCopy, d as HealthPlanFocusClassNames, e as HealthPlanFocusIcon, f as HealthPlanItem, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-jQWp0hdK.cjs';
6
+ import { H as HealthPlanBlanksFacts, a as HealthPlanPriceFormat, b as HealthPlanLayoutProps, c as HealthPlanEmptyCopy } from './usePresentation.d-DYTF_ZGf.cjs';
7
+ import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
8
+ import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
9
+ import { i as EverfurPresentationInput } from './presentation.d-vy8kTGfR.cjs';
10
+
11
+ /** Which overlay the focus layout has open, for a host that dims its own chrome under it. */
12
+ type HealthPlanFocusOverlay = 'checkout' | 'manage' | 'started' | 'cart' | 'cartCheckout' | 'placed' | 'orders' | 'order' | 'weight' | null;
13
+ /** Which layer `overlayContainer` is asked for: the checkout and manage sheets, the started screen, the toast. */
14
+ type HealthPlanFocusLayer = 'sheet' | 'started' | 'toast';
15
+ /** Handed to `onOverlayChange`, so a host's own back control can close what is open. */
16
+ interface HealthPlanFocusOverlayControls {
17
+ /** Closes everything the layout has open. */
18
+ readonly close: () => void;
19
+ /** Closes the top screen or sheet only (a header's back). Absent before the shop: `close`. */
20
+ readonly back?: () => void;
21
+ /** The title for the host's header over a pushed screen ("Cart", "Order placed"); absent over a sheet. */
22
+ readonly title?: string;
23
+ /** True for a full screen (no bottom tabs under it): the cart, the order placed, the started screen. */
24
+ readonly full?: boolean;
25
+ }
26
+ /** The focus layout's options. Passing them to `EverfurHealthPlan` (`focus={...}`) opts the page in. */
27
+ interface HealthPlanFocusOptions {
28
+ /**
29
+ * Your content for the layout. Omit it and `EverfurHealthPlan` reads the pet's plan page from Everfur (built from
30
+ * vet-approved templates and the pet's own facts) and draws that, with the page's checkout setting.
31
+ */
32
+ readonly design?: HealthPlanFocusDesign;
33
+ /** Your words over the SDK's buying words, on top of `design.copy`. Works with the backend page too. */
34
+ readonly copy?: Partial<HealthPlanFocusCopy>;
35
+ readonly classNames?: HealthPlanFocusClassNames;
36
+ /** Draw an icon your way (an `<svg><use href="#i-check"/></svg>` from your sprite). */
37
+ readonly renderIcon?: (icon: HealthPlanFocusIcon, className?: string) => ReactNode;
38
+ /** False never reads the subscription quote: the buy button is the one-time handoff only. Default true. */
39
+ readonly subscriptions?: boolean;
40
+ /**
41
+ * Where the checkout sheet, the started screen and the toast mount, asked per layer (a sheet over your whole
42
+ * frame, the started screen under your own header). Null or absent: `document.body`.
43
+ */
44
+ readonly overlayContainer?: (layer: HealthPlanFocusLayer) => HTMLElement | null;
45
+ /** A one-time buy handed to your checkout (no quote, or no one-box offer). Omit it and `onCheckout([item])` is called instead. */
46
+ readonly onBuy?: (item: HealthPlanItem) => void;
47
+ /** The "Why this product?" link. Omit it and the link is not drawn. */
48
+ readonly onMore?: (item: HealthPlanItem) => void;
49
+ /** One of `design.extras` was added (or taken back). Local state; the host runs its own cart. Omit it and the extras are not drawn. */
50
+ readonly onExtra?: (key: string, added: boolean) => void;
51
+ /** The checkup questions were added to (or taken off) the next visit. Local state; the host persists it. */
52
+ readonly onAddToVisit?: (added: boolean, questions: readonly string[]) => void;
53
+ readonly onOverlayChange?: (overlay: HealthPlanFocusOverlay, controls: HealthPlanFocusOverlayControls) => void;
54
+ /** A subscription changed (started, skipped, interval, cancelled), with the server's new state. */
55
+ readonly onSubscriptionChange?: (subscription: HealthPlanSubscription) => void;
56
+ /** A one-box order was recorded, with the server's order. */
57
+ readonly onOneBoxOrder?: (order: HealthPlanOneBoxOrder) => void;
58
+ /** Number and date locale. Defaults to the platform's. */
59
+ readonly locale?: string;
60
+ /** A repository of your own (a stub backend, tests). */
61
+ readonly subscriptionRepository?: HealthPlanSubscriptionRepository;
62
+ /**
63
+ * How the member leaves for Everfur's Stripe Checkout (`checkout: everfur_stripe` only). Defaults to
64
+ * `window.location.assign(url)`; a page inside a frame passes its own (the top window's).
65
+ */
66
+ readonly navigate?: (url: string) => void;
67
+ /** The plan page and checkout repository of your own (a stub backend, tests). */
68
+ readonly pageRepository?: HealthPlanPageRepository;
69
+ /**
70
+ * True turns Buy into Add to cart and draws the cart, its checkout, the orders and an order. Default: on when the
71
+ * checkout is Everfur's (`everfur_stripe`), off for a partner's own checkout. `shop: false` turns it off with
72
+ * Everfur's checkout too: Buy and Subscribe then go straight to Stripe Checkout.
73
+ */
74
+ readonly shop?: boolean;
75
+ /**
76
+ * True when Everfur texts the member the tracking number once it ships: the "tracking comes by text" lines are drawn.
77
+ * `EverfurHealthPlan` sets it from the plan page (`tracking_texts_enabled`). Default false: never promised.
78
+ */
79
+ readonly trackingTexts?: boolean;
80
+ /**
81
+ * The pet's sex, for "her" / "his" in the buying words; absent or null uses the pet's name ("Georgia's"), else
82
+ * "your pet". `EverfurHealthPlan` sets it from the plan page; a host design passes its own.
83
+ */
84
+ readonly petSex?: 'female' | 'male' | null;
85
+ /** The unit the weight sheet takes: `lb` (the default) or `kg`. */
86
+ readonly weightUnit?: 'lb' | 'kg';
87
+ /** The partner's own orders for this pet (its kits, its tests), listed after Everfur's. The partner's data, drawn as given. */
88
+ readonly shopOrders?: readonly HealthPlanShopOrder[];
89
+ /** "Get help with this order". Omit it and the link is not drawn. */
90
+ readonly onOrderHelp?: (orderKey: string) => void;
91
+ /**
92
+ * False: the pet's weight is unknown, so the dose is replaced by a row that asks for it. `EverfurHealthPlan` sets it
93
+ * from the plan page; a host design passes its own. Absent: the dose is drawn.
94
+ */
95
+ readonly weightKnown?: boolean;
96
+ /** Save the weight your way (a demo pet). Omit it and the pet's profile is updated (`updatePet`, `weightKg`). */
97
+ readonly onSaveWeight?: (weightKg: number, pounds: number) => Promise<EverfurResult<unknown>>;
98
+ /** The weight was saved; `EverfurHealthPlan` re-reads the plan page with it. */
99
+ readonly onWeightSaved?: (weightKg: number) => void;
100
+ /**
101
+ * True with `onConnectRecords`: the row that asks for the pet's vet records is drawn under the checkup.
102
+ * `EverfurHealthPlan` derives it from the pet's records read when you pass `onConnectRecords` and leave this out.
103
+ */
104
+ readonly recordsMissing?: boolean;
105
+ readonly onConnectRecords?: () => void;
106
+ /**
107
+ * Her three blanks: where her clinic request stands and what her records hold (`healthPlanBlanksFacts`). Null: no
108
+ * card. `EverfurHealthPlan` reads it from the pet's records when you pass `onConnectRecords` and leave this out.
109
+ */
110
+ readonly recordsBlanks?: HealthPlanBlanksFacts | null;
111
+ /**
112
+ * True when the member has no vet for this pet yet (the intro's "doesn't have a vet yet"). Absent: what
113
+ * `setHealthPlanNoVet` last said for this pet on this page, else false.
114
+ */
115
+ readonly noVet?: boolean;
116
+ /** The waiting card's button (`design.wait.action`). */
117
+ readonly onWaitAction?: () => void;
118
+ }
119
+ interface HealthPlanFocusProps extends Omit<HealthPlanFocusOptions, 'design'> {
120
+ readonly design: HealthPlanFocusDesign;
121
+ /** Whose checkout Buy and Subscribe run. `partner` (the default) is the handoff; `everfur_stripe` redirects to Stripe. */
122
+ readonly checkout?: HealthPlanCheckoutProvider;
123
+ readonly item: HealthPlanItem;
124
+ /** The pet's other plan items, drawn under the pick in plan order, each with its own buy. `EverfurHealthPlan` passes the plan's items minus the pick. */
125
+ readonly others?: readonly HealthPlanItem[];
126
+ /** True to draw each other item's category (the backend `category`) above its name, as `showCategory` does on the list cards. Default false. */
127
+ readonly showCategory?: boolean;
128
+ /**
129
+ * The plan's re-read signals, so the subscription state (the subscribed line, Manage, Subscribe) is read again with
130
+ * it: a foreground past the stale window, quietly. `EverfurHealthPlan` passes its own. Absent, the quote is read
131
+ * once.
132
+ */
133
+ readonly lifecycle?: LifecyclePort | null;
134
+ /** Change it to re-read the subscription state now, quietly. `EverfurHealthPlan` passes its `refreshKey`. */
135
+ readonly refreshKey?: string | number;
136
+ readonly petRef: PetRef;
137
+ readonly petName: string | null;
138
+ readonly onCheckout?: (items: readonly HealthPlanItem[]) => void;
139
+ readonly priceFormat?: HealthPlanPriceFormat;
140
+ readonly style?: CSSProperties;
141
+ readonly className?: string;
142
+ }
143
+ /** The focus layout over one plan item. `EverfurHealthPlan` mounts it; a partner can mount it over the hook too. */
144
+ declare function HealthPlanFocus(props: HealthPlanFocusProps): ReactNode;
145
+
146
+ interface EverfurHealthPlanProps extends HealthPlanLayoutProps {
147
+ /** The pet whose plan to show. Omit it and the provider's active pet is used. */
148
+ readonly petRef?: PetRef | null;
149
+ /** Called with the cart's items when the member presses checkout. Omit it and no checkout control is drawn. */
150
+ readonly onCheckout?: (items: readonly HealthPlanItem[]) => void;
151
+ /** Your own wording for a refused read. The retry control stays the SDK's. */
152
+ readonly renderNotice?: (error: EverfurError) => ReactNode;
153
+ /** What to show when the `healthPlan` capability is off. Defaults to the gate's own off state. */
154
+ readonly renderDisabled?: (decision: CapabilityDecision) => ReactNode;
155
+ readonly style?: CSSProperties;
156
+ readonly className?: string;
157
+ /**
158
+ * The focus layout's content: one issue, the free tips first, one product sized for the pet (subscribe or one
159
+ * box), the pet's other plan items after it (each with its own one-box buy), the signs to watch with the checkup
160
+ * questions, and your other offers. The words come from `focus.design`.
161
+ * It is drawn while the layout setting `healthPlanLayout` resolves to `focus_plan` (your `presentation` prop, else
162
+ * your console's render_hints.branding.presentation `health_plan_layout`), with or without these options (none:
163
+ * Everfur's plan page with the SDK's defaults); otherwise the page keeps the product grid. Signed out, loading,
164
+ * refused and empty states draw exactly as without it.
165
+ *
166
+ * Without `focus.design` the content is Everfur's plan page for the pet (`GET .../plan/page`), read again on a pet
167
+ * change: loading while it reads, the empty state when the page is null, the retry notice when it is refused. The
168
+ * page also says whose checkout runs Buy and Subscribe (`everfur_stripe` redirects to Stripe Checkout; `partner`
169
+ * keeps the `onBuy` / `onCheckout` handoff).
170
+ */
171
+ readonly focus?: HealthPlanFocusOptions;
172
+ /**
173
+ * The layout setting, `healthPlanLayout` (`standard` or `focus_plan`). Your value wins over the console's unless the
174
+ * console locks it. Absent everywhere, `standard`.
175
+ */
176
+ readonly presentation?: Pick<EverfurPresentationInput, 'healthPlanLayout'>;
177
+ /**
178
+ * When the plan is read again on its own: coming back to the page after more than a minute re-reads it quietly
179
+ * (the plan stays on screen), so a change made in another tab shows: the plan, the page and, in the focus layout,
180
+ * the subscription state (a subscription started elsewhere). Absent, Everfur uses the browser's own
181
+ * signal (the page becoming visible again; see `createBrowserLifecycle`). Pass your own port, or `null` to turn
182
+ * the re-read off.
183
+ */
184
+ readonly lifecycle?: LifecyclePort | null;
185
+ /** Change it to re-read the plan (and, in the focus layout, the subscription state) now, quietly (for example after your checkout completed). */
186
+ readonly refreshKey?: string | number;
187
+ /**
188
+ * Whether this pet has a plan to show: true once the plan (or its page) draws, false when the pet has none and the
189
+ * empty state has no words to draw (Q1: the page then draws nothing; hide your Health Plan tab for that pet).
190
+ * Not called while loading or after a refused read.
191
+ */
192
+ readonly onAvailability?: (available: boolean, petRef: PetRef | null) => void;
193
+ /** The empty state's Ask button (drawn only when `emptyAsk` has words). */
194
+ readonly onAsk?: () => void;
195
+ /** Your words for the empty state, over the SDK's (empty until Raph writes them: then nothing is drawn). */
196
+ readonly emptyCopy?: Partial<HealthPlanEmptyCopy>;
197
+ }
198
+ /** One pet's Health Plan on a web page. Mount it under the `EverfurProvider` from "@everfur/sdk/web". */
199
+ declare function EverfurHealthPlan(props: EverfurHealthPlanProps): ReactNode;
200
+
201
+ /** What `renderEmptyHeader` receives: ask a question in this thread, with no screen in between. */
202
+ interface EverfurChatEmptyHeaderContext {
203
+ /** Send `prompt` as the member's next message in the open thread (the same path as a starter chip). */
204
+ ask(prompt: string): void;
205
+ }
206
+ /**
207
+ * The history bar: a "Chats" control with the member's thread count that opens the history drawer, and a "New
208
+ * chat" control. For a surface that passes `header={false}` and still wants the member's past chats.
209
+ */
210
+ interface EverfurChatHistoryBar {
211
+ /** The history control's words ("Chats"). */
212
+ readonly chats: string;
213
+ /** The new-chat control's words ("New chat"). */
214
+ readonly newChat: string;
215
+ /** Classes per element; a class drops that element's inline default. */
216
+ readonly classNames?: {
217
+ readonly bar?: string;
218
+ readonly chats?: string;
219
+ readonly count?: string;
220
+ readonly newChat?: string;
221
+ /** The dot on "Chats" while some thread carries an unread reply. */
222
+ readonly unreadDot?: string;
223
+ };
224
+ /** Draw the two icons your way. */
225
+ readonly renderIcon?: (icon: 'history' | 'edit') => ReactNode;
226
+ /** Your own control after "Chats" (a pill that reopens a card you closed). Absent, nothing is drawn. */
227
+ readonly extra?: ReactNode;
228
+ }
229
+ /**
230
+ * The empty thread's own title and layout, for a host that draws it its way. The words are yours; a class drops
231
+ * that element's inline layout default (a starter chip keeps its tint). Absent, the empty state is Everfur's own.
232
+ */
233
+ interface EverfurChatEmptyState {
234
+ /** The title over the starter chips, in place of "What can we help {pet} with today?". */
235
+ readonly title?: string;
236
+ readonly classNames?: {
237
+ /** The block that holds the title and the chips (under `renderEmptyHeader`'s card). */
238
+ readonly start?: string;
239
+ readonly title?: string;
240
+ readonly list?: string;
241
+ readonly chip?: string;
242
+ };
243
+ /**
244
+ * Fills for the chips that bring none of their own (Everfur's built-in chips, the backend's suggestions, a starter
245
+ * prompt without a `tint`), taken in turn: the first chip the first fill, and round again. Each is a fill (any CSS
246
+ * colour) and its ink. Absent or empty, those chips keep the theme's paint.
247
+ */
248
+ readonly chipTints?: readonly {
249
+ readonly tint: string;
250
+ readonly ink?: string;
251
+ }[];
252
+ }
253
+ /**
254
+ * The card a thread opened from a notification starts with, in place of the member's first bubble: drawn while
255
+ * the first message of the open thread is the surface's `initialAsk`.
256
+ */
257
+ interface EverfurChatOpeningCard {
258
+ /** The line over the title ("Notification · 9:41 AM"). */
259
+ readonly kicker: string;
260
+ readonly title: string;
261
+ readonly body?: string;
262
+ /** The brand mark in the card's corner. */
263
+ readonly icon?: ReactNode;
264
+ /** Classes per element; a class drops that element's inline default. */
265
+ readonly classNames?: {
266
+ readonly card?: string;
267
+ readonly icon?: string;
268
+ readonly body?: string;
269
+ };
270
+ }
271
+ /**
272
+ * One card under an answer in the cards answer style (presentation `chat_answer_style: "cards"`): a record (a tile, the
273
+ * title, a meta line, a status pill and a chevron), a stat (the title, a meta line and a value), or a link to one of your
274
+ * screens. The words and the data are yours; Everfur holds none of them.
275
+ */
276
+ interface EverfurChatAnswerCard {
277
+ /** Stable key within the answer. */
278
+ readonly key: string;
279
+ readonly title: string;
280
+ /** The small line under the title. */
281
+ readonly meta?: string;
282
+ /** A status pill; `tone` picks `classNames.pillTone[tone]`. */
283
+ readonly pill?: {
284
+ readonly label: string;
285
+ readonly tone?: string;
286
+ };
287
+ /** A stat card's value (`14` with the unit `lb`): drawn in place of the pill and the chevron. */
288
+ readonly value?: {
289
+ readonly amount: string;
290
+ readonly unit?: string;
291
+ };
292
+ /** The tile at the start: an icon of yours, or an image (https, or a path on your own origin); `tone` picks `classNames.tileTone[tone]`. */
293
+ readonly tile?: {
294
+ readonly icon?: ReactNode;
295
+ readonly imageUrl?: string;
296
+ readonly tone?: string;
297
+ };
298
+ /** Picks `classNames.cardVariant[variant]` (for example a highlighted plan card). */
299
+ readonly variant?: string;
300
+ /** Given, the card is a button that calls this. Absent, a static card. */
301
+ readonly onPress?: () => void;
302
+ /**
303
+ * A card of your own (the host card slot): given, Everfur draws this node in the card's place, inside the card's
304
+ * class (`classNames.card` plus `cardVariant[variant]`), and ignores the tile, the pill, the value and `onPress`.
305
+ * Use it for a card Everfur's shapes do not cover (for example a breed-mix chart). If it throws, the slot draws
306
+ * nothing and the answer still draws. `title` stays its accessible name.
307
+ */
308
+ readonly render?: () => ReactNode;
309
+ }
310
+ /** What `answerCards.cards` receives: the settled answer's text and the question it answered. */
311
+ interface EverfurChatAnswerContext {
312
+ readonly answer: string;
313
+ readonly question: string | null;
314
+ /** The answer's message id, stable for the life of the thread. */
315
+ readonly messageId: string;
316
+ }
317
+ /**
318
+ * The cards answer style's content and classes (used while presentation `chat_answer_style` is `cards`). Every part is
319
+ * optional; absent, the answer is drawn open (no bubble) with Everfur's own sources and footer. The words are yours.
320
+ */
321
+ interface EverfurChatAnswerCards {
322
+ /** The line over each answer (an icon and your words, "Read her test results"). Absent, the assistant's name line. */
323
+ readonly byline?: {
324
+ readonly label: string;
325
+ readonly icon?: ReactNode;
326
+ };
327
+ /** Your cards under a settled answer (records, stats, a link to your plan). A throw draws none. */
328
+ readonly cards?: (context: EverfurChatAnswerContext) => readonly EverfurChatAnswerCard[];
329
+ /**
330
+ * Two feedback chips in place of the footer's thumbs, mapped to thumbs up and thumbs down; the footer's Copy control
331
+ * stays beside them (`classNames.copy`). Absent, Everfur's own footer.
332
+ */
333
+ readonly feedback?: {
334
+ readonly helpful: string;
335
+ readonly notHelpful: string;
336
+ };
337
+ /** Your own rows at the top of the follow-ups ("See her Health Plan"), for the answer it receives. */
338
+ readonly followUpActions?: (context: EverfurChatAnswerContext) => readonly EverfurChatFollowUpAction[];
339
+ /** Draw the chevron your way. Absent, Everfur's glyph. */
340
+ readonly renderIcon?: (icon: 'chevron') => ReactNode;
341
+ /** Classes per element; a class drops that element's inline default. */
342
+ readonly classNames?: {
343
+ /** The answer row (the by-line, the body, the cards, the feedback). */
344
+ readonly answer?: string;
345
+ readonly byline?: string;
346
+ readonly body?: string;
347
+ /** The owner's question bubble. */
348
+ readonly question?: string;
349
+ readonly cards?: string;
350
+ readonly card?: string;
351
+ readonly cardStat?: string;
352
+ readonly cardVariant?: Readonly<Record<string, string>>;
353
+ readonly tile?: string;
354
+ readonly tileTone?: Readonly<Record<string, string>>;
355
+ readonly title?: string;
356
+ readonly meta?: string;
357
+ readonly pill?: string;
358
+ readonly pillTone?: Readonly<Record<string, string>>;
359
+ readonly value?: string;
360
+ readonly feedback?: string;
361
+ /** The Copy control beside the feedback chips. */
362
+ readonly copy?: string;
363
+ /** The block of follow-ups under the answer, its label and each row. */
364
+ readonly followUps?: string;
365
+ readonly followUpsLabel?: string;
366
+ readonly followUp?: string;
367
+ readonly followUpAction?: string;
368
+ /** The safety disclaimer when presentation `safety_disclaimer_placement` is `answer_footer`. */
369
+ readonly disclaimer?: string;
370
+ };
371
+ }
372
+ /** A row of yours at the top of the follow-ups under an answer. */
373
+ interface EverfurChatFollowUpAction {
374
+ readonly key: string;
375
+ readonly label: string;
376
+ readonly icon?: ReactNode;
377
+ readonly onPress: () => void;
378
+ }
379
+ /**
380
+ * The card at the top of the empty thread (presentation `chat_top_card: "focus"`): one finding, in your words, with
381
+ * an action of yours and a question it can ask in the thread. A close control folds it into a pill beside "Chats" in
382
+ * the history bar, which opens it again.
383
+ */
384
+ interface EverfurChatTopCard {
385
+ /** The small heading ("Her focus"). */
386
+ readonly kicker: string;
387
+ /** A source badge ("<your brand> results"). */
388
+ readonly badge?: string;
389
+ readonly title: string;
390
+ /** The finding: a bold lead and the rest of the sentence. */
391
+ readonly lead?: string;
392
+ readonly body?: string;
393
+ /** Your action ("See her Health Plan"). */
394
+ readonly action?: {
395
+ readonly label: string;
396
+ readonly onPress: () => void;
397
+ };
398
+ /** A question the card asks in this thread ("What does it mean?" sends `prompt`). */
399
+ readonly ask?: {
400
+ readonly label: string;
401
+ readonly prompt: string;
402
+ };
403
+ /** The close control's accessible name; given, the card can close to the pill. */
404
+ readonly closeLabel?: string;
405
+ /** The pill's words while the card is closed (defaults to `kicker`). */
406
+ readonly pill?: string;
407
+ /** Draw the close glyph your way. */
408
+ readonly renderIcon?: (icon: 'close') => ReactNode;
409
+ /** Classes per element; a class drops that element's inline default. */
410
+ readonly classNames?: {
411
+ readonly wrap?: string;
412
+ readonly card?: string;
413
+ readonly kicker?: string;
414
+ readonly badges?: string;
415
+ readonly badge?: string;
416
+ readonly close?: string;
417
+ readonly title?: string;
418
+ readonly content?: string;
419
+ readonly finding?: string;
420
+ readonly dot?: string;
421
+ readonly actions?: string;
422
+ readonly action?: string;
423
+ readonly ask?: string;
424
+ readonly pill?: string;
425
+ };
426
+ }
427
+ /**
428
+ * The history bottom sheet (presentation `chat_history_style: "sheet"`): the member's chats by day, each with its
429
+ * preview, and a new chat button. Its words and classes; absent, Everfur's own words and inline look.
430
+ */
431
+ interface EverfurChatHistorySheet {
432
+ /** The sheet's small title ("Chats with Ask <your brand>"). Absent, Everfur's history heading. */
433
+ readonly title?: string;
434
+ /** Where the sheet and its scrim mount (your app frame), so the scrim covers it. Absent, inside the chat. */
435
+ readonly container?: () => HTMLElement | null;
436
+ /** Draw the icons your way. */
437
+ readonly renderIcon?: (icon: 'close' | 'chat' | 'edit') => ReactNode;
438
+ readonly classNames?: {
439
+ readonly scrim?: string;
440
+ readonly sheet?: string;
441
+ /** Added to the scrim and the sheet while open (for a stylesheet that animates them in). */
442
+ readonly open?: string;
443
+ readonly grab?: string;
444
+ readonly top?: string;
445
+ readonly title?: string;
446
+ readonly close?: string;
447
+ readonly day?: string;
448
+ readonly row?: string;
449
+ readonly icon?: string;
450
+ readonly time?: string;
451
+ /** A row's time while it carries an unread reply (with `time`), and the dot under it. */
452
+ readonly timeUnread?: string;
453
+ readonly unreadDot?: string;
454
+ readonly newChat?: string;
455
+ };
456
+ }
457
+
458
+ export { type EverfurChatTopCard as E, HealthPlanFocus as H, EverfurHealthPlan as a, type EverfurHealthPlanProps as b, type HealthPlanFocusLayer as c, type HealthPlanFocusOptions as d, type HealthPlanFocusOverlay as e, type HealthPlanFocusOverlayControls as f, type HealthPlanFocusProps as g, type EverfurChatEmptyHeaderContext as h, type EverfurChatEmptyState as i, type EverfurChatHistoryBar as j, type EverfurChatOpeningCard as k, type EverfurChatAnswerCards as l, type EverfurChatHistorySheet as m, type EverfurChatAnswerCard as n, type EverfurChatAnswerContext as o, type EverfurChatFollowUpAction as p };