@everfur/sdk 0.13.0 → 0.15.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 (206) hide show
  1. package/CHANGELOG.md +206 -0
  2. package/README.md +11 -10
  3. package/dist/{Chat.d-Dts8u_1a.d.cts → Chat.d-CtfANk3A.d.cts} +12 -4
  4. package/dist/{Chat.d-DUNTfzqC.d.ts → Chat.d-a7Ksz7NZ.d.ts} +12 -4
  5. package/dist/{DepthViews.d-CubkMPbU.d.ts → DepthViews.d-BqMnWSMu.d.cts} +1 -1
  6. package/dist/{DepthViews.d-BMU2jFPw.d.cts → DepthViews.d-CuBElgEc.d.ts} +1 -1
  7. package/dist/{DepthViews.d-Ce2Zhnrb.d.ts → DepthViews.d-DbJejGm3.d.ts} +1 -1
  8. package/dist/{DepthViews.d-BIp599lz.d.cts → DepthViews.d-dXWL6ToG.d.cts} +1 -1
  9. package/dist/RecordsPage.d-DKrZ9rHX.d.ts +93 -0
  10. package/dist/RecordsPage.d-DRPdUAo4.d.cts +93 -0
  11. package/dist/animations/index.cjs +1 -1
  12. package/dist/animations/index.d.cts +7 -5
  13. package/dist/animations/index.d.ts +7 -5
  14. package/dist/animations/index.js +1 -1
  15. package/dist/{attachments.d-Djy9z_0Z.d.ts → attachments.d-BGn2_knv.d.ts} +6 -24
  16. package/dist/{attachments.d-D1yhJjcZ.d.ts → attachments.d-CoQhXrP9.d.ts} +2 -2
  17. package/dist/{attachments.d-Bp2qbHxn.d.cts → attachments.d-CpaOfi2g.d.cts} +6 -24
  18. package/dist/{attachments.d-DisnvB9R.d.cts → attachments.d-CqHMGoER.d.cts} +2 -2
  19. package/dist/{bookingCopy.d-BlBmhAJc.d.cts → bookingCopy.d-Bnq2zk0F.d.cts} +2 -2
  20. package/dist/{bookingCopy.d-BJF6gd1A.d.ts → bookingCopy.d-BwCOCZUj.d.ts} +2 -2
  21. package/dist/{branding.d-DI8S400y.d.cts → branding.d-Bbc6p1XY.d.cts} +2 -2
  22. package/dist/{branding.d-OIGLbQeM.d.ts → branding.d-y6c0UwhE.d.ts} +2 -2
  23. package/dist/{casesRepository.d-CT2LTicS.d.cts → casesRepository.d-CsUJ2Oyb.d.cts} +1 -1
  24. package/dist/{casesRepository.d-UsWOz9bv.d.ts → casesRepository.d-DG83Ggbq.d.ts} +1 -1
  25. package/dist/chat/index.cjs +45 -43
  26. package/dist/chat/index.d.cts +26 -13
  27. package/dist/chat/index.d.ts +26 -13
  28. package/dist/chat/index.js +45 -43
  29. package/dist/client/index.cjs +3 -3
  30. package/dist/client/index.d.cts +12 -12
  31. package/dist/client/index.d.ts +12 -12
  32. package/dist/client/index.js +3 -3
  33. package/dist/clinicBatch.d-BLpbpS51.d.cts +71 -0
  34. package/dist/clinicBatch.d-Byjx4y_W.d.ts +71 -0
  35. package/dist/clinicModels.d-BXgKZqDb.d.cts +68 -0
  36. package/dist/clinicModels.d-CaS64-P-.d.ts +68 -0
  37. package/dist/clinicRequestProps.d-1dCtouGA.d.cts +65 -0
  38. package/dist/clinicRequestProps.d-CjsMg_OD.d.ts +65 -0
  39. package/dist/{config.d-BR3DT9ho.d.cts → config.d-C0WgjutL.d.cts} +1 -1
  40. package/dist/{config.d-Dy6igYlH.d.ts → config.d-zd2eTb2L.d.ts} +1 -1
  41. package/dist/consent/index.d.cts +5 -5
  42. package/dist/consent/index.d.ts +5 -5
  43. package/dist/{context.d-QcCgguzA.d.ts → context.d-BBjmV0rz.d.ts} +8 -8
  44. package/dist/{context.d-Cwks0p3C.d.cts → context.d-Du_UPxa1.d.cts} +8 -8
  45. package/dist/{copy.d-CiMn2IIt.d.ts → copy.d-D_VVj01o.d.ts} +2 -2
  46. package/dist/{copy.d-DLJTyRfT.d.cts → copy.d-Da_PP2K3.d.cts} +2 -2
  47. package/dist/core/index.cjs +3 -3
  48. package/dist/core/index.d.cts +21 -19
  49. package/dist/core/index.d.ts +21 -19
  50. package/dist/core/index.js +3 -3
  51. package/dist/{depth.d-OSALbYM7.d.ts → depth.d-BEedifOR.d.ts} +6 -133
  52. package/dist/{depth.d-CjPGVPDL.d.cts → depth.d-RTV61QNf.d.cts} +6 -133
  53. package/dist/{entitlementRepository.d-Cf3LbTwD.d.ts → entitlementRepository.d-BwThmh3V.d.ts} +4 -4
  54. package/dist/{entitlementRepository.d-CVQa1DA1.d.cts → entitlementRepository.d-C-stdRyA.d.cts} +4 -4
  55. package/dist/{features.d-fNsGcg0R.d.ts → features.d-DrQxTw3-.d.cts} +1 -1
  56. package/dist/{features.d-fNsGcg0R.d.cts → features.d-DrQxTw3-.d.ts} +1 -1
  57. package/dist/{focus.d-DMg2ngHI.d.ts → focus.d-CtotIyEt.d.ts} +127 -350
  58. package/dist/{focus.d-az9cqUz3.d.cts → focus.d-Dsm39DjO.d.cts} +127 -350
  59. package/dist/health-plan/index.cjs +182 -163
  60. package/dist/health-plan/index.d.cts +53 -11
  61. package/dist/health-plan/index.d.ts +53 -11
  62. package/dist/health-plan/index.js +185 -166
  63. package/dist/{idempotency.d-WpXx9zQo.d.ts → idempotency.d-Bfm7oIxS.d.cts} +158 -6
  64. package/dist/{idempotency.d-D461_DPD.d.cts → idempotency.d-Cv-B7SfC.d.ts} +158 -6
  65. package/dist/{identity.d-DzTijonw.d.ts → identity.d-BksOEa6m.d.ts} +1 -1
  66. package/dist/{identity.d-60LeJt_s.d.cts → identity.d-CioQhZrq.d.cts} +1 -1
  67. package/dist/index.cjs +48 -46
  68. package/dist/index.d.cts +20 -19
  69. package/dist/index.d.ts +20 -19
  70. package/dist/index.js +48 -46
  71. package/dist/introEvents.d-dS3fJCH1.d.cts +5 -0
  72. package/dist/introEvents.d-dS3fJCH1.d.ts +5 -0
  73. package/dist/introEvents.d-fAZitxMA.d.cts +175 -0
  74. package/dist/introEvents.d-tOi4o3F4.d.ts +175 -0
  75. package/dist/{models.d-BnLm3VAA.d.cts → models.d-BSqvbTE1.d.cts} +8 -1
  76. package/dist/{models.d-BagXhafD.d.ts → models.d-DOwnr8fi.d.ts} +8 -1
  77. package/dist/notifications/index.d.cts +4 -4
  78. package/dist/notifications/index.d.ts +4 -4
  79. package/dist/{optInView.d-acKpV8V2.d.ts → optInView.d-B8zTORO2.d.ts} +119 -3
  80. package/dist/{optInView.d-CEyHR6PK.d.cts → optInView.d-BkNSv4Gk.d.cts} +119 -3
  81. package/dist/{parse.d-C8CXyS58.d.ts → parse.d-B5JHS6Pr.d.ts} +1 -1
  82. package/dist/{parse.d-tEzufgJX.d.cts → parse.d-BgjO82mY.d.cts} +1 -1
  83. package/dist/{pets.d-NbJvP_kh.d.cts → pets.d-B_LoizOv.d.cts} +1 -1
  84. package/dist/{pets.d-C_53_fzo.d.ts → pets.d-OWxskXCP.d.ts} +1 -1
  85. package/dist/{petsRepository.d-lp1BHRqM.d.cts → petsRepository.d-B5DWzU7C.d.cts} +1 -1
  86. package/dist/{petsRepository.d-BuGHymNx.d.ts → petsRepository.d-Ba3xhJcj.d.ts} +1 -1
  87. package/dist/planSignals.d-Cl6n5QpS.d.cts +126 -0
  88. package/dist/planSignals.d-DtxZoWGM.d.ts +126 -0
  89. package/dist/{ports.d-COIyN624.d.ts → ports.d-BDtwHxmW.d.ts} +4 -4
  90. package/dist/{ports.d-CEROoqnA.d.cts → ports.d-gZNTn8Qf.d.cts} +4 -4
  91. package/dist/{presentation.d-DMbdad7G.d.cts → presentation.d-vy8kTGfR.d.cts} +6 -0
  92. package/dist/{presentation.d-DMbdad7G.d.ts → presentation.d-vy8kTGfR.d.ts} +6 -0
  93. package/dist/quickPrompts.d-NM_81Jc1.d.cts +19 -0
  94. package/dist/quickPrompts.d-NM_81Jc1.d.ts +19 -0
  95. package/dist/records/depth/index.d.cts +13 -9
  96. package/dist/records/depth/index.d.ts +13 -9
  97. package/dist/records/index.cjs +264 -140
  98. package/dist/records/index.d.cts +95 -24
  99. package/dist/records/index.d.ts +95 -24
  100. package/dist/records/index.js +265 -141
  101. package/dist/{requestFunnel.d-DWQQpjFR.d.cts → requestFunnel.d-CR4akGCY.d.cts} +2 -2
  102. package/dist/{requestFunnel.d-CXUMPw1K.d.ts → requestFunnel.d-DFf9C__p.d.ts} +2 -2
  103. package/dist/{resolve.d-jI8FmBj3.d.cts → resolve.d-CoQWUy1Y.d.cts} +1 -1
  104. package/dist/{resolve.d-jI8FmBj3.d.ts → resolve.d-CoQWUy1Y.d.ts} +1 -1
  105. package/dist/{runtimeTypes.d-4yFNNuYR.d.ts → runtimeTypes.d-BqBOrZxa.d.ts} +6 -6
  106. package/dist/{runtimeTypes.d-D6N_fhxx.d.cts → runtimeTypes.d-CHdH-y2c.d.cts} +6 -6
  107. package/dist/{useRecordsDepth.d-sAq2Qkhr.d.cts → screenProps.d-B1dIANI0.d.cts} +5 -91
  108. package/dist/{useRecordsDepth.d-DFcCfiXm.d.ts → screenProps.d-CVqFJw-J.d.ts} +5 -91
  109. package/dist/server/events/index.cjs +1 -1
  110. package/dist/server/events/index.d.cts +2 -2
  111. package/dist/server/events/index.d.ts +2 -2
  112. package/dist/server/events/index.js +1 -1
  113. package/dist/server/index.cjs +1 -1
  114. package/dist/server/index.d.cts +3 -3
  115. package/dist/server/index.d.ts +3 -3
  116. package/dist/server/index.js +1 -1
  117. package/dist/{sheetSeam.d-Cviqk89n.d.ts → sheetSeam.d-B09jf4YC.d.ts} +8 -4
  118. package/dist/{sheetSeam.d-DCS3LW8g.d.cts → sheetSeam.d-BBuEIVsa.d.cts} +8 -4
  119. package/dist/shop/index.cjs +227 -60
  120. package/dist/shop/index.d.cts +35 -5
  121. package/dist/shop/index.d.ts +35 -5
  122. package/dist/shop/index.js +228 -61
  123. package/dist/tabs/index.cjs +195 -0
  124. package/dist/tabs/index.d.cts +175 -0
  125. package/dist/tabs/index.d.ts +175 -0
  126. package/dist/tabs/index.js +195 -0
  127. package/dist/tabsModel.d-BfIQg6yS.d.cts +31 -0
  128. package/dist/tabsModel.d-BfIQg6yS.d.ts +31 -0
  129. package/dist/televet/booking/index.d.cts +6 -6
  130. package/dist/televet/booking/index.d.ts +6 -6
  131. package/dist/testing/index.cjs +1 -1
  132. package/dist/testing/index.d.cts +1 -1
  133. package/dist/testing/index.d.ts +1 -1
  134. package/dist/testing/index.js +1 -1
  135. package/dist/testing/rn/index.cjs +1 -1
  136. package/dist/testing/rn/index.d.cts +12 -12
  137. package/dist/testing/rn/index.d.ts +12 -12
  138. package/dist/testing/rn/index.js +1 -1
  139. package/dist/testing/web/index.d.cts +13 -13
  140. package/dist/testing/web/index.d.ts +13 -13
  141. package/dist/texting/index.cjs +40 -5
  142. package/dist/texting/index.d.cts +40 -7
  143. package/dist/texting/index.d.ts +40 -7
  144. package/dist/texting/index.js +40 -5
  145. package/dist/threadOptions.d-CnSfFVMr.d.cts +458 -0
  146. package/dist/threadOptions.d-DZ0AoQGk.d.ts +458 -0
  147. package/dist/{timelineRows.d-BNxgzYRW.d.cts → timelineRows.d-CF1KvLcQ.d.cts} +1 -1
  148. package/dist/{timelineRows.d-CU5GvvLk.d.ts → timelineRows.d-CtL0y7y1.d.ts} +1 -1
  149. package/dist/{tokens.d-DarDaV39.d.cts → tokens.d-BUVqme2D.d.cts} +1 -1
  150. package/dist/{tokens.d-DarDaV39.d.ts → tokens.d-BUVqme2D.d.ts} +1 -1
  151. package/dist/{typeStyle.d-C1HBRAI3.d.ts → typeStyle.d-B3Kdtjie.d.ts} +2 -2
  152. package/dist/{typeStyle.d-Bl8pzbBy.d.cts → typeStyle.d-DmlwyJq-.d.cts} +2 -2
  153. package/dist/useIntroSeen.d-CTWFUthO.d.cts +35 -0
  154. package/dist/useIntroSeen.d-CTWFUthO.d.ts +35 -0
  155. package/dist/usePresentation.d-BsR08Wxt.d.ts +285 -0
  156. package/dist/usePresentation.d-CZS0qlLI.d.cts +285 -0
  157. package/dist/{useRecords.d-Cb-36SF5.d.cts → useRecords.d-BYNX01El.d.cts} +2 -2
  158. package/dist/{useRecords.d-aQTzQZoV.d.ts → useRecords.d-DWk61a4c.d.ts} +2 -2
  159. package/dist/useRecordsDepth.d-DTAxFf5s.d.ts +32 -0
  160. package/dist/useRecordsDepth.d-k-zYIHTe.d.cts +32 -0
  161. package/dist/{view.d-C-SNpDJX.d.ts → view.d-BE7VOlsB.d.ts} +6 -4
  162. package/dist/{view.d-Dps5C8-s.d.cts → view.d-CAWQjcY_.d.cts} +6 -4
  163. package/dist/web/consent/index.d.cts +5 -5
  164. package/dist/web/consent/index.d.ts +5 -5
  165. package/dist/web/health-plan/index.cjs +65 -53
  166. package/dist/web/health-plan/index.d.cts +46 -192
  167. package/dist/web/health-plan/index.d.ts +46 -192
  168. package/dist/web/health-plan/index.js +79 -67
  169. package/dist/web/index.cjs +62 -46
  170. package/dist/web/index.d.cts +168 -27
  171. package/dist/web/index.d.ts +168 -27
  172. package/dist/web/index.js +63 -47
  173. package/dist/web/intro/index.cjs +167 -0
  174. package/dist/web/intro/index.d.cts +79 -0
  175. package/dist/web/intro/index.d.ts +79 -0
  176. package/dist/web/intro/index.js +167 -0
  177. package/dist/web/notifications/index.d.cts +3 -3
  178. package/dist/web/notifications/index.d.ts +3 -3
  179. package/dist/web/records/depth/index.d.cts +13 -9
  180. package/dist/web/records/depth/index.d.ts +13 -9
  181. package/dist/web/records/index.cjs +7 -7
  182. package/dist/web/records/index.d.cts +21 -82
  183. package/dist/web/records/index.d.ts +21 -82
  184. package/dist/web/records/index.js +7 -7
  185. package/dist/web/records-sheet/index.cjs +207 -128
  186. package/dist/web/records-sheet/index.d.cts +25 -16
  187. package/dist/web/records-sheet/index.d.ts +25 -16
  188. package/dist/web/records-sheet/index.js +207 -128
  189. package/dist/web/shop/index.cjs +194 -78
  190. package/dist/web/shop/index.d.cts +21 -4
  191. package/dist/web/shop/index.d.ts +21 -4
  192. package/dist/web/shop/index.js +194 -78
  193. package/dist/web/televet/booking/index.d.cts +7 -7
  194. package/dist/web/televet/booking/index.d.ts +7 -7
  195. package/dist/web/texting/index.cjs +36 -5
  196. package/dist/web/texting/index.d.cts +40 -7
  197. package/dist/web/texting/index.d.ts +40 -7
  198. package/dist/web/texting/index.js +36 -5
  199. package/package.json +36 -4
  200. package/tabs/package.json +8 -0
  201. package/web/intro/native-blocked.cjs +12 -0
  202. package/web/intro/package.json +8 -0
  203. package/dist/threadOptions.d-B1pTMmDF.d.cts +0 -260
  204. package/dist/threadOptions.d-B1pTMmDF.d.ts +0 -260
  205. package/dist/usePresentation.d-D6qsFzBz.d.cts +0 -9
  206. package/dist/usePresentation.d-DuGQe_Do.d.ts +0 -9
@@ -0,0 +1,285 @@
1
+ import { ReactNode } from 'react';
2
+ import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
3
+ import { P as PetRef } from './ids.d-B2GAAifq.js';
4
+ import { f as HealthPlanItem, m as HealthPlan, n as HealthPlanRepository, o as HealthPlanReasonKind } from './focus.d-CtotIyEt.js';
5
+ import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
6
+ import { d as RecordsRequestView, f as RecordsView } from './models.d-DOwnr8fi.js';
7
+ import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-vy8kTGfR.js';
8
+
9
+ type EverfurHealthPlanStatus = 'signedOut' | 'noPet' | 'loading' | 'failed' | 'empty' | 'ready';
10
+ /** The member's cart: the items in the plan, and their total when one can honestly be given. */
11
+ interface HealthPlanCart {
12
+ readonly items: readonly HealthPlanItem[];
13
+ readonly count: number;
14
+ /**
15
+ * The sum of the priced items, or null when any item has no price or the items do not share one currency
16
+ * (a total across currencies is a number nobody can pay).
17
+ */
18
+ readonly subtotal: number | null;
19
+ /** The shared currency of `subtotal`, or null. */
20
+ readonly currency: string | null;
21
+ }
22
+ interface EverfurHealthPlanOptions {
23
+ /** The pet whose plan to show. Omit it and the provider's active pet is used. */
24
+ readonly petRef?: PetRef | null;
25
+ /**
26
+ * The host's lifecycle signals: coming back to the foreground re-reads a plan shown for more than a minute, quietly
27
+ * (the plan stays on screen). Absent, only `refreshKey` and `refresh()` re-read.
28
+ */
29
+ readonly lifecycle?: LifecyclePort | null;
30
+ /** Change it to re-read the plan now, quietly (for example after your checkout completed). */
31
+ readonly refreshKey?: string | number;
32
+ }
33
+ interface EverfurHealthPlanState {
34
+ readonly status: EverfurHealthPlanStatus;
35
+ readonly petRef: PetRef | null;
36
+ readonly plan: HealthPlan | null;
37
+ readonly cart: HealthPlanCart;
38
+ /** Product ids whose add or remove is in flight. */
39
+ readonly pending: readonly string[];
40
+ /** The last refused write per product id. */
41
+ readonly itemErrors: Readonly<Record<string, EverfurError>>;
42
+ /** The refused read, or null. */
43
+ readonly error: EverfurError | null;
44
+ /** Put an item in the plan (`true`) or take it out (`false`). Optimistic; rolls back on a refusal. */
45
+ setInPlan(productId: string, inPlan: boolean): Promise<boolean>;
46
+ refresh(): Promise<void>;
47
+ }
48
+ /** The cart a plan makes. Pure, so a partner's own cart UI reads the same totals. */
49
+ declare function healthPlanCart(plan: HealthPlan | null): HealthPlanCart;
50
+ /**
51
+ * A price as the member reads it: the platform's own currency format (`$19.99`), or `USD 19.99` where the runtime
52
+ * has no formatter for that currency. Null for an item with no price; the surface shows none rather than `$0`.
53
+ * `locale` picks the number format (omit it for the platform default). With `format.dropZeroCents` a whole amount
54
+ * reads without minor units (`$39`); a non-whole one keeps them (`$29.99`).
55
+ */
56
+ declare function formatHealthPlanPrice(amount: number | null, currency: string | null, locale?: string, format?: Pick<HealthPlanPriceFormat, 'dropZeroCents'>): string | null;
57
+ /** `formatHealthPlanPrice` with a page's `priceFormat` option. */
58
+ declare function formatHealthPlanPriceWith(amount: number | null, currency: string | null, format?: HealthPlanPriceFormat): string | null;
59
+ /** The Health Plan repository bound to the runtime under your provider, for a partner's own UI. */
60
+ declare function useEverfurHealthPlanRepository(): HealthPlanRepository;
61
+ /** One pet's Health Plan and the member's cart. `EverfurHealthPlan` renders it on either host. */
62
+ declare function useEverfurHealthPlan(options?: EverfurHealthPlanOptions): EverfurHealthPlanState;
63
+
64
+ /** Where a product's picture sits on its card. */
65
+ type HealthPlanImageVariant = 'wide' | 'thumbnail';
66
+ /** How a product's reasons are drawn. */
67
+ type HealthPlanReasonVariant = 'pills' | 'rows';
68
+ /** When the page draws the cart bar. */
69
+ type HealthPlanCartBarVisibility = 'whenItems' | 'always';
70
+ /** Where the cart bar lives: stuck to the foot of the page, or nowhere on the page (the host docks its own). */
71
+ type HealthPlanCartBarPlacement = 'sticky' | 'none';
72
+ /** The size of a product card's add control: a named size, or the pill's height in px. */
73
+ type HealthPlanAddButtonSize = 'full' | 'compact' | number;
74
+ /** How a product in the cart shows: "Added" with a Remove link, or the add pill held pressed. */
75
+ type HealthPlanAddedVariant = 'link' | 'pressed';
76
+ /** How a product's category reads: body text, or the reason-row label face (mono, uppercase). */
77
+ type HealthPlanCategoryVariant = 'text' | 'label';
78
+ /** A shadow of the partner's own, painted the same way on both hosts. Lengths are px. */
79
+ interface HealthPlanShadow {
80
+ /** Any colour the theme parser reads (`#RRGGBB`, `rgba(...)`). */
81
+ readonly color: string;
82
+ readonly offsetX?: number;
83
+ readonly offsetY: number;
84
+ readonly blur: number;
85
+ /** 0..1, multiplied into the colour's own alpha. Default 1. */
86
+ readonly opacity?: number;
87
+ }
88
+ /** A card shadow: `true` for the SDK's soft one, a CSS shadow string, or a `HealthPlanShadow`. */
89
+ type HealthPlanCardShadow = boolean | string | HealthPlanShadow;
90
+ /** A font weight a card text accepts. */
91
+ type HealthPlanFontWeight = 400 | 500 | 600 | 700 | 800 | 900;
92
+ /** How a price reads. Prices always go through `Intl.NumberFormat` with the item's own currency. */
93
+ interface HealthPlanPriceFormat {
94
+ /** A BCP 47 locale for the number format. Omit it and the platform's default locale is used. */
95
+ readonly locale?: string;
96
+ /** True to drop zero minor units on a whole amount (`$39` instead of `$39.00`). A non-whole amount keeps them. */
97
+ readonly dropZeroCents?: boolean;
98
+ }
99
+ declare const HEALTH_PLAN_LAYOUT_DEFAULTS: Readonly<{
100
+ imageVariant: HealthPlanImageVariant;
101
+ reasonVariant: HealthPlanReasonVariant;
102
+ cartBarVisibility: HealthPlanCartBarVisibility;
103
+ cartBarPlacement: HealthPlanCartBarPlacement;
104
+ addButtonSize: HealthPlanAddButtonSize;
105
+ addedVariant: HealthPlanAddedVariant;
106
+ categoryVariant: HealthPlanCategoryVariant;
107
+ showCategory: false;
108
+ cardShadow: false;
109
+ cardBorder: true;
110
+ }>;
111
+ /** True when the page should draw the cart bar for a cart of `count` items. */
112
+ declare function showHealthPlanCartBar(visibility: HealthPlanCartBarVisibility | undefined, count: number): boolean;
113
+ /**
114
+ * What a partner's header and footer nodes are handed: the pet, its plan and the member's cart, as the page draws
115
+ * them. `cart.items` are the products in the plan, `cart.count` how many, `cart.subtotal` their sum (null when the
116
+ * currencies differ or a price is missing).
117
+ */
118
+ interface HealthPlanHeaderContext {
119
+ readonly petRef: PetRef | null;
120
+ readonly plan: HealthPlan | null;
121
+ readonly cart: HealthPlanCart;
122
+ /**
123
+ * Put a product in the plan (`true`) or take it out (`false`), through the same optimistic write the cards use:
124
+ * the card flips at once and a refusal puts it back. Resolves true when the server accepted it.
125
+ */
126
+ readonly setInPlan: (productId: string, inPlan: boolean) => Promise<boolean>;
127
+ /** Put every product not yet in the plan into it. Resolves true when every write was accepted. */
128
+ readonly addAll: () => Promise<boolean>;
129
+ }
130
+ /** The same context, named for the page footer. */
131
+ type HealthPlanPageContext = HealthPlanHeaderContext;
132
+ /** The card options `HealthPlanItemCard` takes, on both hosts. */
133
+ interface HealthPlanCardOptions {
134
+ /** True to draw the product's category above its name. Default false. */
135
+ readonly showCategory?: boolean;
136
+ /**
137
+ * A shadow under the card: `true` for the SDK's soft one (the theme's shadow colour at 8%), a CSS shadow string
138
+ * (`0 1px 3px rgba(38,37,35,.06)`; React Native reads the first shadow's offset, blur and colour), or a
139
+ * `HealthPlanShadow`. Default none.
140
+ */
141
+ readonly cardShadow?: HealthPlanCardShadow;
142
+ /** False to drop the card's hairline edge. Default true. */
143
+ readonly cardBorder?: boolean;
144
+ /** `'full'` (default, 44 high), `'compact'` (32 high), or the pill's height in px. The tap area stays 44. */
145
+ readonly addButtonSize?: HealthPlanAddButtonSize;
146
+ /** The add control's font size in px. Default: body for a pill 40 or taller, else caption. */
147
+ readonly addButtonFontSize?: number;
148
+ /** `'link'` (default): "Added" and a Remove link. `'pressed'`: the pill stays, pressed; a tap removes it. */
149
+ readonly addedVariant?: HealthPlanAddedVariant;
150
+ /** `'text'` (default) or `'label'` (the reason-row label face). Only read with `showCategory`. */
151
+ readonly categoryVariant?: HealthPlanCategoryVariant;
152
+ /** The card's inner padding in px. Default the theme's `space.lg`. */
153
+ readonly cardPadding?: number;
154
+ /** The product name's size (px) and weight. Default body size, bold. */
155
+ readonly itemTitleSize?: number;
156
+ readonly itemTitleWeight?: HealthPlanFontWeight;
157
+ /** The price's size (px) and weight. Default body size, bold. */
158
+ readonly priceSize?: number;
159
+ readonly priceWeight?: HealthPlanFontWeight;
160
+ /** The reason text's size (px). Default caption size. */
161
+ readonly reasonTextSize?: number;
162
+ /** The label column of `'rows'` reasons in px. Default sized to the longest label (web) or 72 (React Native). */
163
+ readonly reasonLabelWidth?: number;
164
+ /** The space between a reason row's label and its text in px. Default the theme's `space.lg`. */
165
+ readonly reasonGap?: number;
166
+ }
167
+ /** The layout props `EverfurHealthPlan` takes on both hosts. Paint stays the theme's. */
168
+ interface HealthPlanLayoutProps extends HealthPlanCardOptions {
169
+ /** Where each product's picture sits. Default `'wide'`. */
170
+ readonly imageVariant?: HealthPlanImageVariant;
171
+ /** How each product's reasons are drawn. Default `'pills'`. */
172
+ readonly reasonVariant?: HealthPlanReasonVariant;
173
+ /** When the cart bar is drawn. Default `'whenItems'`. */
174
+ readonly cartBarVisibility?: HealthPlanCartBarVisibility;
175
+ /** How prices and the subtotal read. */
176
+ readonly priceFormat?: HealthPlanPriceFormat;
177
+ /**
178
+ * Your own node between the plan title and the products (a summary or risk card of yours). Drawn on the plan and
179
+ * on the empty plan. A throw while rendering it draws nothing in its place.
180
+ */
181
+ readonly renderHeader?: (context: HealthPlanHeaderContext) => ReactNode;
182
+ /** Your own node at the foot of each product card, above its control. A throw draws nothing in its place. */
183
+ readonly renderItemFooter?: (item: HealthPlanItem) => ReactNode;
184
+ /**
185
+ * Your own node after the products, before the cart bar (totals, an upsell row, fine print). Drawn on the plan only.
186
+ * A throw draws nothing in its place.
187
+ */
188
+ readonly renderFooter?: (context: HealthPlanPageContext) => ReactNode;
189
+ /** The plan title's font size in px. Default the theme's heading size. */
190
+ readonly titleSize?: number;
191
+ /** The space under the plan title in px. Default the section gap. */
192
+ readonly titleGap?: number;
193
+ /** The space between the page's blocks in px. Default the theme's `space.lg`. */
194
+ readonly sectionGap?: number;
195
+ /** Where the cart bar lives. Default `'sticky'`. With `'none'`, wrap the page and your bar in `HealthPlanCartScope`. */
196
+ readonly cartBarPlacement?: HealthPlanCartBarPlacement;
197
+ /** The plan title's line height as a ratio of its size (1.15 reads tight). Default the theme's snug ratio. */
198
+ readonly titleLineHeight?: number;
199
+ /**
200
+ * Your own node between two products (a group label such as a list heading), drawn before the product at `index`
201
+ * (1 and up; never before the first). Return null for no node. A throw draws nothing in its place.
202
+ */
203
+ readonly renderBetweenItems?: (index: number, item: HealthPlanItem) => ReactNode;
204
+ }
205
+ /**
206
+ * True for a refusal because the session is not a SIGNED member session: the plan routes answer a publishable-key or
207
+ * unsigned caller 403 `session_required` (EFBackend partner_shop_widget_router.py). A retry cannot help, so the
208
+ * surface shows the sign-in line and no retry.
209
+ */
210
+ declare function isHealthPlanSessionRequired(error: EverfurError | null): boolean;
211
+
212
+ /** Where her clinic request stands, for the three blanks. */
213
+ type HealthPlanBlanksPhase = 'wait' | 'filled';
214
+ interface HealthPlanBlanksFacts {
215
+ readonly phase: HealthPlanBlanksPhase;
216
+ /** The request's id: the plan flashes the filled blanks once per request. */
217
+ readonly requestId: string;
218
+ /** The clinic the request went to, as the member chose it; null when the request does not name one. */
219
+ readonly clinicName: string | null;
220
+ /** Her latest weight in her vet records, in kilograms; null when they hold none (or before they land). */
221
+ readonly weightKg: number | null;
222
+ /** When her next vaccine is due (ms, a UTC day), the earliest one due from today on; null when none is. */
223
+ readonly nextShotsAt: number | null;
224
+ }
225
+ /**
226
+ * Her latest weight from her vet records: the record's weight series and weight facts, newest first. A reading the
227
+ * owner typed (`owner_reported`) is not her vet records' and is skipped.
228
+ */
229
+ declare function healthPlanRecordsWeightKg(record: RecordsView | null): number | null;
230
+ /** The earliest vaccine her record says is due from `today` (ms, the start of a UTC day) on. */
231
+ declare function healthPlanNextShotsAt(record: RecordsView | null, today: number): number | null;
232
+ /**
233
+ * The three blanks from her records read: the latest clinic request and the record. `now` is a clock reading (ms).
234
+ * Null when there is no card to draw.
235
+ */
236
+ declare function healthPlanBlanksFacts(input: {
237
+ readonly requests: readonly RecordsRequestView[];
238
+ readonly record: RecordsView | null;
239
+ }, now: number): HealthPlanBlanksFacts | null;
240
+
241
+ declare const HEALTH_PLAN_COPY: Readonly<{
242
+ loading: "Loading";
243
+ retry: "Try again";
244
+ signedOut: "Sign in required";
245
+ addToCart: "Add to cart";
246
+ added: "Added";
247
+ remove: "Remove";
248
+ checkout: "Checkout";
249
+ subtotal: "Subtotal";
250
+ sample: "Sample";
251
+ cartEmpty: "Your cart is empty.";
252
+ choosePet: "Choose a pet";
253
+ emptyTitle: "";
254
+ emptyBody: "";
255
+ emptyAsk: "";
256
+ }>;
257
+ /** The Health Plan's empty state words (Q1). Each is '' by default: an empty title and body draw nothing. */
258
+ interface HealthPlanEmptyCopy {
259
+ readonly emptyTitle: string;
260
+ readonly emptyBody: string;
261
+ /** The empty state's Ask button. */
262
+ readonly emptyAsk: string;
263
+ }
264
+ /**
265
+ * The reason labels, one per kind. An empty label is not drawn (the reason's text still is). `profile` (a pet profile
266
+ * fact) has no source yet; `dna` names one partner's product, so the SDK leaves it to that partner (Q3).
267
+ */
268
+ declare const HEALTH_PLAN_REASON_LABELS: Readonly<Record<HealthPlanReasonKind, string>>;
269
+ /** ADAPTED from Raph. Listed for approval. */
270
+ declare const HEALTH_PLAN_TEMPLATES: Readonly<{
271
+ /** Raph: "Georgia's care plan". Used only when the plan carries no `headline` of the tenant's own. */
272
+ planTitle: (petName: string) => string;
273
+ /** Raph: "<brand> cart" (his demo named the partner). */
274
+ cartLabel: (brand: string) => string;
275
+ }>;
276
+ /** Every key still waiting on Raph's words (empty, so not drawn), so the list a reviewer approves cannot drift from the file. */
277
+ declare const HEALTH_PLAN_COPY_PLACEHOLDERS: readonly string[];
278
+
279
+ /**
280
+ * The tenant's presentation settings resolved against `client` (the explicit props; leave a field undefined to
281
+ * take the console value). Total: always every field.
282
+ */
283
+ declare function useEverfurPresentation(client?: EverfurPresentationInput | null): EverfurPresentation;
284
+
285
+ export { formatHealthPlanPriceWith as A, healthPlanBlanksFacts as B, healthPlanCart as C, healthPlanNextShotsAt as D, type EverfurHealthPlanOptions as E, healthPlanRecordsWeightKg as F, isHealthPlanSessionRequired as G, type HealthPlanBlanksFacts as H, showHealthPlanCartBar as I, useEverfurHealthPlan as J, useEverfurHealthPlanRepository as K, useEverfurPresentation as L, type HealthPlanPriceFormat as a, type HealthPlanLayoutProps as b, type HealthPlanEmptyCopy as c, type HealthPlanCart as d, type HealthPlanCardOptions as e, type HealthPlanImageVariant as f, type HealthPlanReasonVariant as g, type EverfurHealthPlanState as h, type EverfurHealthPlanStatus as i, HEALTH_PLAN_COPY as j, HEALTH_PLAN_COPY_PLACEHOLDERS as k, HEALTH_PLAN_LAYOUT_DEFAULTS as l, HEALTH_PLAN_REASON_LABELS as m, HEALTH_PLAN_TEMPLATES as n, type HealthPlanAddButtonSize as o, type HealthPlanAddedVariant as p, type HealthPlanBlanksPhase as q, type HealthPlanCardShadow as r, type HealthPlanCartBarPlacement as s, type HealthPlanCartBarVisibility as t, type HealthPlanCategoryVariant as u, type HealthPlanFontWeight as v, type HealthPlanHeaderContext as w, type HealthPlanPageContext as x, type HealthPlanShadow as y, formatHealthPlanPrice as z };
@@ -0,0 +1,285 @@
1
+ import { ReactNode } from 'react';
2
+ import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
3
+ import { P as PetRef } from './ids.d-B2GAAifq.cjs';
4
+ import { f as HealthPlanItem, m as HealthPlan, n as HealthPlanRepository, o as HealthPlanReasonKind } from './focus.d-Dsm39DjO.cjs';
5
+ import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
6
+ import { d as RecordsRequestView, f as RecordsView } from './models.d-BSqvbTE1.cjs';
7
+ import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-vy8kTGfR.cjs';
8
+
9
+ type EverfurHealthPlanStatus = 'signedOut' | 'noPet' | 'loading' | 'failed' | 'empty' | 'ready';
10
+ /** The member's cart: the items in the plan, and their total when one can honestly be given. */
11
+ interface HealthPlanCart {
12
+ readonly items: readonly HealthPlanItem[];
13
+ readonly count: number;
14
+ /**
15
+ * The sum of the priced items, or null when any item has no price or the items do not share one currency
16
+ * (a total across currencies is a number nobody can pay).
17
+ */
18
+ readonly subtotal: number | null;
19
+ /** The shared currency of `subtotal`, or null. */
20
+ readonly currency: string | null;
21
+ }
22
+ interface EverfurHealthPlanOptions {
23
+ /** The pet whose plan to show. Omit it and the provider's active pet is used. */
24
+ readonly petRef?: PetRef | null;
25
+ /**
26
+ * The host's lifecycle signals: coming back to the foreground re-reads a plan shown for more than a minute, quietly
27
+ * (the plan stays on screen). Absent, only `refreshKey` and `refresh()` re-read.
28
+ */
29
+ readonly lifecycle?: LifecyclePort | null;
30
+ /** Change it to re-read the plan now, quietly (for example after your checkout completed). */
31
+ readonly refreshKey?: string | number;
32
+ }
33
+ interface EverfurHealthPlanState {
34
+ readonly status: EverfurHealthPlanStatus;
35
+ readonly petRef: PetRef | null;
36
+ readonly plan: HealthPlan | null;
37
+ readonly cart: HealthPlanCart;
38
+ /** Product ids whose add or remove is in flight. */
39
+ readonly pending: readonly string[];
40
+ /** The last refused write per product id. */
41
+ readonly itemErrors: Readonly<Record<string, EverfurError>>;
42
+ /** The refused read, or null. */
43
+ readonly error: EverfurError | null;
44
+ /** Put an item in the plan (`true`) or take it out (`false`). Optimistic; rolls back on a refusal. */
45
+ setInPlan(productId: string, inPlan: boolean): Promise<boolean>;
46
+ refresh(): Promise<void>;
47
+ }
48
+ /** The cart a plan makes. Pure, so a partner's own cart UI reads the same totals. */
49
+ declare function healthPlanCart(plan: HealthPlan | null): HealthPlanCart;
50
+ /**
51
+ * A price as the member reads it: the platform's own currency format (`$19.99`), or `USD 19.99` where the runtime
52
+ * has no formatter for that currency. Null for an item with no price; the surface shows none rather than `$0`.
53
+ * `locale` picks the number format (omit it for the platform default). With `format.dropZeroCents` a whole amount
54
+ * reads without minor units (`$39`); a non-whole one keeps them (`$29.99`).
55
+ */
56
+ declare function formatHealthPlanPrice(amount: number | null, currency: string | null, locale?: string, format?: Pick<HealthPlanPriceFormat, 'dropZeroCents'>): string | null;
57
+ /** `formatHealthPlanPrice` with a page's `priceFormat` option. */
58
+ declare function formatHealthPlanPriceWith(amount: number | null, currency: string | null, format?: HealthPlanPriceFormat): string | null;
59
+ /** The Health Plan repository bound to the runtime under your provider, for a partner's own UI. */
60
+ declare function useEverfurHealthPlanRepository(): HealthPlanRepository;
61
+ /** One pet's Health Plan and the member's cart. `EverfurHealthPlan` renders it on either host. */
62
+ declare function useEverfurHealthPlan(options?: EverfurHealthPlanOptions): EverfurHealthPlanState;
63
+
64
+ /** Where a product's picture sits on its card. */
65
+ type HealthPlanImageVariant = 'wide' | 'thumbnail';
66
+ /** How a product's reasons are drawn. */
67
+ type HealthPlanReasonVariant = 'pills' | 'rows';
68
+ /** When the page draws the cart bar. */
69
+ type HealthPlanCartBarVisibility = 'whenItems' | 'always';
70
+ /** Where the cart bar lives: stuck to the foot of the page, or nowhere on the page (the host docks its own). */
71
+ type HealthPlanCartBarPlacement = 'sticky' | 'none';
72
+ /** The size of a product card's add control: a named size, or the pill's height in px. */
73
+ type HealthPlanAddButtonSize = 'full' | 'compact' | number;
74
+ /** How a product in the cart shows: "Added" with a Remove link, or the add pill held pressed. */
75
+ type HealthPlanAddedVariant = 'link' | 'pressed';
76
+ /** How a product's category reads: body text, or the reason-row label face (mono, uppercase). */
77
+ type HealthPlanCategoryVariant = 'text' | 'label';
78
+ /** A shadow of the partner's own, painted the same way on both hosts. Lengths are px. */
79
+ interface HealthPlanShadow {
80
+ /** Any colour the theme parser reads (`#RRGGBB`, `rgba(...)`). */
81
+ readonly color: string;
82
+ readonly offsetX?: number;
83
+ readonly offsetY: number;
84
+ readonly blur: number;
85
+ /** 0..1, multiplied into the colour's own alpha. Default 1. */
86
+ readonly opacity?: number;
87
+ }
88
+ /** A card shadow: `true` for the SDK's soft one, a CSS shadow string, or a `HealthPlanShadow`. */
89
+ type HealthPlanCardShadow = boolean | string | HealthPlanShadow;
90
+ /** A font weight a card text accepts. */
91
+ type HealthPlanFontWeight = 400 | 500 | 600 | 700 | 800 | 900;
92
+ /** How a price reads. Prices always go through `Intl.NumberFormat` with the item's own currency. */
93
+ interface HealthPlanPriceFormat {
94
+ /** A BCP 47 locale for the number format. Omit it and the platform's default locale is used. */
95
+ readonly locale?: string;
96
+ /** True to drop zero minor units on a whole amount (`$39` instead of `$39.00`). A non-whole amount keeps them. */
97
+ readonly dropZeroCents?: boolean;
98
+ }
99
+ declare const HEALTH_PLAN_LAYOUT_DEFAULTS: Readonly<{
100
+ imageVariant: HealthPlanImageVariant;
101
+ reasonVariant: HealthPlanReasonVariant;
102
+ cartBarVisibility: HealthPlanCartBarVisibility;
103
+ cartBarPlacement: HealthPlanCartBarPlacement;
104
+ addButtonSize: HealthPlanAddButtonSize;
105
+ addedVariant: HealthPlanAddedVariant;
106
+ categoryVariant: HealthPlanCategoryVariant;
107
+ showCategory: false;
108
+ cardShadow: false;
109
+ cardBorder: true;
110
+ }>;
111
+ /** True when the page should draw the cart bar for a cart of `count` items. */
112
+ declare function showHealthPlanCartBar(visibility: HealthPlanCartBarVisibility | undefined, count: number): boolean;
113
+ /**
114
+ * What a partner's header and footer nodes are handed: the pet, its plan and the member's cart, as the page draws
115
+ * them. `cart.items` are the products in the plan, `cart.count` how many, `cart.subtotal` their sum (null when the
116
+ * currencies differ or a price is missing).
117
+ */
118
+ interface HealthPlanHeaderContext {
119
+ readonly petRef: PetRef | null;
120
+ readonly plan: HealthPlan | null;
121
+ readonly cart: HealthPlanCart;
122
+ /**
123
+ * Put a product in the plan (`true`) or take it out (`false`), through the same optimistic write the cards use:
124
+ * the card flips at once and a refusal puts it back. Resolves true when the server accepted it.
125
+ */
126
+ readonly setInPlan: (productId: string, inPlan: boolean) => Promise<boolean>;
127
+ /** Put every product not yet in the plan into it. Resolves true when every write was accepted. */
128
+ readonly addAll: () => Promise<boolean>;
129
+ }
130
+ /** The same context, named for the page footer. */
131
+ type HealthPlanPageContext = HealthPlanHeaderContext;
132
+ /** The card options `HealthPlanItemCard` takes, on both hosts. */
133
+ interface HealthPlanCardOptions {
134
+ /** True to draw the product's category above its name. Default false. */
135
+ readonly showCategory?: boolean;
136
+ /**
137
+ * A shadow under the card: `true` for the SDK's soft one (the theme's shadow colour at 8%), a CSS shadow string
138
+ * (`0 1px 3px rgba(38,37,35,.06)`; React Native reads the first shadow's offset, blur and colour), or a
139
+ * `HealthPlanShadow`. Default none.
140
+ */
141
+ readonly cardShadow?: HealthPlanCardShadow;
142
+ /** False to drop the card's hairline edge. Default true. */
143
+ readonly cardBorder?: boolean;
144
+ /** `'full'` (default, 44 high), `'compact'` (32 high), or the pill's height in px. The tap area stays 44. */
145
+ readonly addButtonSize?: HealthPlanAddButtonSize;
146
+ /** The add control's font size in px. Default: body for a pill 40 or taller, else caption. */
147
+ readonly addButtonFontSize?: number;
148
+ /** `'link'` (default): "Added" and a Remove link. `'pressed'`: the pill stays, pressed; a tap removes it. */
149
+ readonly addedVariant?: HealthPlanAddedVariant;
150
+ /** `'text'` (default) or `'label'` (the reason-row label face). Only read with `showCategory`. */
151
+ readonly categoryVariant?: HealthPlanCategoryVariant;
152
+ /** The card's inner padding in px. Default the theme's `space.lg`. */
153
+ readonly cardPadding?: number;
154
+ /** The product name's size (px) and weight. Default body size, bold. */
155
+ readonly itemTitleSize?: number;
156
+ readonly itemTitleWeight?: HealthPlanFontWeight;
157
+ /** The price's size (px) and weight. Default body size, bold. */
158
+ readonly priceSize?: number;
159
+ readonly priceWeight?: HealthPlanFontWeight;
160
+ /** The reason text's size (px). Default caption size. */
161
+ readonly reasonTextSize?: number;
162
+ /** The label column of `'rows'` reasons in px. Default sized to the longest label (web) or 72 (React Native). */
163
+ readonly reasonLabelWidth?: number;
164
+ /** The space between a reason row's label and its text in px. Default the theme's `space.lg`. */
165
+ readonly reasonGap?: number;
166
+ }
167
+ /** The layout props `EverfurHealthPlan` takes on both hosts. Paint stays the theme's. */
168
+ interface HealthPlanLayoutProps extends HealthPlanCardOptions {
169
+ /** Where each product's picture sits. Default `'wide'`. */
170
+ readonly imageVariant?: HealthPlanImageVariant;
171
+ /** How each product's reasons are drawn. Default `'pills'`. */
172
+ readonly reasonVariant?: HealthPlanReasonVariant;
173
+ /** When the cart bar is drawn. Default `'whenItems'`. */
174
+ readonly cartBarVisibility?: HealthPlanCartBarVisibility;
175
+ /** How prices and the subtotal read. */
176
+ readonly priceFormat?: HealthPlanPriceFormat;
177
+ /**
178
+ * Your own node between the plan title and the products (a summary or risk card of yours). Drawn on the plan and
179
+ * on the empty plan. A throw while rendering it draws nothing in its place.
180
+ */
181
+ readonly renderHeader?: (context: HealthPlanHeaderContext) => ReactNode;
182
+ /** Your own node at the foot of each product card, above its control. A throw draws nothing in its place. */
183
+ readonly renderItemFooter?: (item: HealthPlanItem) => ReactNode;
184
+ /**
185
+ * Your own node after the products, before the cart bar (totals, an upsell row, fine print). Drawn on the plan only.
186
+ * A throw draws nothing in its place.
187
+ */
188
+ readonly renderFooter?: (context: HealthPlanPageContext) => ReactNode;
189
+ /** The plan title's font size in px. Default the theme's heading size. */
190
+ readonly titleSize?: number;
191
+ /** The space under the plan title in px. Default the section gap. */
192
+ readonly titleGap?: number;
193
+ /** The space between the page's blocks in px. Default the theme's `space.lg`. */
194
+ readonly sectionGap?: number;
195
+ /** Where the cart bar lives. Default `'sticky'`. With `'none'`, wrap the page and your bar in `HealthPlanCartScope`. */
196
+ readonly cartBarPlacement?: HealthPlanCartBarPlacement;
197
+ /** The plan title's line height as a ratio of its size (1.15 reads tight). Default the theme's snug ratio. */
198
+ readonly titleLineHeight?: number;
199
+ /**
200
+ * Your own node between two products (a group label such as a list heading), drawn before the product at `index`
201
+ * (1 and up; never before the first). Return null for no node. A throw draws nothing in its place.
202
+ */
203
+ readonly renderBetweenItems?: (index: number, item: HealthPlanItem) => ReactNode;
204
+ }
205
+ /**
206
+ * True for a refusal because the session is not a SIGNED member session: the plan routes answer a publishable-key or
207
+ * unsigned caller 403 `session_required` (EFBackend partner_shop_widget_router.py). A retry cannot help, so the
208
+ * surface shows the sign-in line and no retry.
209
+ */
210
+ declare function isHealthPlanSessionRequired(error: EverfurError | null): boolean;
211
+
212
+ /** Where her clinic request stands, for the three blanks. */
213
+ type HealthPlanBlanksPhase = 'wait' | 'filled';
214
+ interface HealthPlanBlanksFacts {
215
+ readonly phase: HealthPlanBlanksPhase;
216
+ /** The request's id: the plan flashes the filled blanks once per request. */
217
+ readonly requestId: string;
218
+ /** The clinic the request went to, as the member chose it; null when the request does not name one. */
219
+ readonly clinicName: string | null;
220
+ /** Her latest weight in her vet records, in kilograms; null when they hold none (or before they land). */
221
+ readonly weightKg: number | null;
222
+ /** When her next vaccine is due (ms, a UTC day), the earliest one due from today on; null when none is. */
223
+ readonly nextShotsAt: number | null;
224
+ }
225
+ /**
226
+ * Her latest weight from her vet records: the record's weight series and weight facts, newest first. A reading the
227
+ * owner typed (`owner_reported`) is not her vet records' and is skipped.
228
+ */
229
+ declare function healthPlanRecordsWeightKg(record: RecordsView | null): number | null;
230
+ /** The earliest vaccine her record says is due from `today` (ms, the start of a UTC day) on. */
231
+ declare function healthPlanNextShotsAt(record: RecordsView | null, today: number): number | null;
232
+ /**
233
+ * The three blanks from her records read: the latest clinic request and the record. `now` is a clock reading (ms).
234
+ * Null when there is no card to draw.
235
+ */
236
+ declare function healthPlanBlanksFacts(input: {
237
+ readonly requests: readonly RecordsRequestView[];
238
+ readonly record: RecordsView | null;
239
+ }, now: number): HealthPlanBlanksFacts | null;
240
+
241
+ declare const HEALTH_PLAN_COPY: Readonly<{
242
+ loading: "Loading";
243
+ retry: "Try again";
244
+ signedOut: "Sign in required";
245
+ addToCart: "Add to cart";
246
+ added: "Added";
247
+ remove: "Remove";
248
+ checkout: "Checkout";
249
+ subtotal: "Subtotal";
250
+ sample: "Sample";
251
+ cartEmpty: "Your cart is empty.";
252
+ choosePet: "Choose a pet";
253
+ emptyTitle: "";
254
+ emptyBody: "";
255
+ emptyAsk: "";
256
+ }>;
257
+ /** The Health Plan's empty state words (Q1). Each is '' by default: an empty title and body draw nothing. */
258
+ interface HealthPlanEmptyCopy {
259
+ readonly emptyTitle: string;
260
+ readonly emptyBody: string;
261
+ /** The empty state's Ask button. */
262
+ readonly emptyAsk: string;
263
+ }
264
+ /**
265
+ * The reason labels, one per kind. An empty label is not drawn (the reason's text still is). `profile` (a pet profile
266
+ * fact) has no source yet; `dna` names one partner's product, so the SDK leaves it to that partner (Q3).
267
+ */
268
+ declare const HEALTH_PLAN_REASON_LABELS: Readonly<Record<HealthPlanReasonKind, string>>;
269
+ /** ADAPTED from Raph. Listed for approval. */
270
+ declare const HEALTH_PLAN_TEMPLATES: Readonly<{
271
+ /** Raph: "Georgia's care plan". Used only when the plan carries no `headline` of the tenant's own. */
272
+ planTitle: (petName: string) => string;
273
+ /** Raph: "<brand> cart" (his demo named the partner). */
274
+ cartLabel: (brand: string) => string;
275
+ }>;
276
+ /** Every key still waiting on Raph's words (empty, so not drawn), so the list a reviewer approves cannot drift from the file. */
277
+ declare const HEALTH_PLAN_COPY_PLACEHOLDERS: readonly string[];
278
+
279
+ /**
280
+ * The tenant's presentation settings resolved against `client` (the explicit props; leave a field undefined to
281
+ * take the console value). Total: always every field.
282
+ */
283
+ declare function useEverfurPresentation(client?: EverfurPresentationInput | null): EverfurPresentation;
284
+
285
+ export { formatHealthPlanPriceWith as A, healthPlanBlanksFacts as B, healthPlanCart as C, healthPlanNextShotsAt as D, type EverfurHealthPlanOptions as E, healthPlanRecordsWeightKg as F, isHealthPlanSessionRequired as G, type HealthPlanBlanksFacts as H, showHealthPlanCartBar as I, useEverfurHealthPlan as J, useEverfurHealthPlanRepository as K, useEverfurPresentation as L, type HealthPlanPriceFormat as a, type HealthPlanLayoutProps as b, type HealthPlanEmptyCopy as c, type HealthPlanCart as d, type HealthPlanCardOptions as e, type HealthPlanImageVariant as f, type HealthPlanReasonVariant as g, type EverfurHealthPlanState as h, type EverfurHealthPlanStatus as i, HEALTH_PLAN_COPY as j, HEALTH_PLAN_COPY_PLACEHOLDERS as k, HEALTH_PLAN_LAYOUT_DEFAULTS as l, HEALTH_PLAN_REASON_LABELS as m, HEALTH_PLAN_TEMPLATES as n, type HealthPlanAddButtonSize as o, type HealthPlanAddedVariant as p, type HealthPlanBlanksPhase as q, type HealthPlanCardShadow as r, type HealthPlanCartBarPlacement as s, type HealthPlanCartBarVisibility as t, type HealthPlanCategoryVariant as u, type HealthPlanFontWeight as v, type HealthPlanHeaderContext as w, type HealthPlanPageContext as x, type HealthPlanShadow as y, formatHealthPlanPrice as z };
@@ -2,8 +2,8 @@ import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
2
2
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
3
3
  import { R as RecordsRequestId, P as PetRef } from './ids.d-B2GAAifq.cjs';
4
4
  import { F as FileHandle, U as UploadTransport } from './ports.d-BX4f4UsB.cjs';
5
- import { a as RecordsFeatures, b as RecordsUploadContentType } from './features.d-fNsGcg0R.cjs';
6
- import { C as CreateUploadRequestInput, d as RecordsRequestView, U as UploadedDocument, e as RecordsView, f as ConsentState, G as GrantConsentInput, g as RecordsDenialReason } from './models.d-BnLm3VAA.cjs';
5
+ import { a as RecordsFeatures, b as RecordsUploadContentType } from './features.d-DrQxTw3-.cjs';
6
+ import { C as CreateUploadRequestInput, d as RecordsRequestView, U as UploadedDocument, f as RecordsView, g as ConsentState, G as GrantConsentInput, h as RecordsDenialReason } from './models.d-BSqvbTE1.cjs';
7
7
 
8
8
  interface UploadDocumentInput {
9
9
  readonly requestId: RecordsRequestId;
@@ -2,8 +2,8 @@ import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
2
2
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
3
3
  import { R as RecordsRequestId, P as PetRef } from './ids.d-B2GAAifq.js';
4
4
  import { F as FileHandle, U as UploadTransport } from './ports.d-BX4f4UsB.js';
5
- import { a as RecordsFeatures, b as RecordsUploadContentType } from './features.d-fNsGcg0R.js';
6
- import { C as CreateUploadRequestInput, d as RecordsRequestView, U as UploadedDocument, e as RecordsView, f as ConsentState, G as GrantConsentInput, g as RecordsDenialReason } from './models.d-BagXhafD.js';
5
+ import { a as RecordsFeatures, b as RecordsUploadContentType } from './features.d-DrQxTw3-.js';
6
+ import { C as CreateUploadRequestInput, d as RecordsRequestView, U as UploadedDocument, f as RecordsView, g as ConsentState, G as GrantConsentInput, h as RecordsDenialReason } from './models.d-DOwnr8fi.js';
7
7
 
8
8
  interface UploadDocumentInput {
9
9
  readonly requestId: RecordsRequestId;
@@ -0,0 +1,32 @@
1
+ import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
2
+ import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
3
+ import { P as PetRef } from './ids.d-B2GAAifq.js';
4
+ import { l as RecordsDepthClient } from './depth.d-BEedifOR.js';
5
+
6
+ type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
7
+ /** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */
8
+ interface UseRecordsDepthState<T> {
9
+ readonly status: RecordsDepthStatus;
10
+ readonly value: T | null;
11
+ readonly error: EverfurError | null;
12
+ /**
13
+ * False once a read got the router's dark 404, which is how a tenant without `partner.records_full_depth_enabled`
14
+ * answers EVERY depth route. The state is then `empty` with no error, so the surface draws its own nothing
15
+ * instead of the generic failure leaf and its unusable `Try again`. True otherwise, including for a failure
16
+ * that never reached the server, which proves nothing about the tenant.
17
+ */
18
+ readonly available: boolean;
19
+ readonly refresh: () => void;
20
+ }
21
+ /** The signed member's depth client over the provider's auth; a surface with no user settles to accessDenied. */
22
+ declare function useEverfurRecordsDepthClient(): RecordsDepthClient;
23
+ /**
24
+ * Run one depth read for the scoped pet on mount, and again on `refresh`. `isEmpty` decides between `empty`
25
+ * and `populated`; a withheld answer is `populated` with `withheld:true`, which every depth surface renders as
26
+ * nothing (never a partial record).
27
+ */
28
+ declare function useRecordsDepthRead<T extends {
29
+ readonly withheld: boolean;
30
+ }>(petRef: PetRef, read: (client: RecordsDepthClient, petRef: PetRef) => Promise<EverfurResult<T>>, isEmpty: (value: T) => boolean, extraKey?: string): UseRecordsDepthState<T>;
31
+
32
+ export { type RecordsDepthStatus as R, type UseRecordsDepthState as U, useRecordsDepthRead as a, useEverfurRecordsDepthClient as u };