@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
@@ -1,8 +1,8 @@
1
1
  import { b as EverfurErrorCode } from './EverfurError.d-8NHtlgzA.cjs';
2
2
  import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
3
3
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
4
- import { d as EverfurRequest, F as Frame } from './config.d-BR3DT9ho.cjs';
5
- import { A as AuthContext } from './identity.d-60LeJt_s.cjs';
4
+ import { d as EverfurRequest, F as Frame } from './config.d-C0WgjutL.cjs';
5
+ import { A as AuthContext } from './identity.d-CioQhZrq.cjs';
6
6
 
7
7
  /** Why the funnel stopped, or kept going. Every settle and every retry names one. */
8
8
  type FunnelRetryReason = 'ok' | 'aborted' | 'terminal-code' | 'attempts-exhausted' | 'daily-quota-exhausted' | 'burst-throttle' | 'retryable-code' | 'server-reset-beyond-budget';
@@ -1,8 +1,8 @@
1
1
  import { b as EverfurErrorCode } from './EverfurError.d-8NHtlgzA.js';
2
2
  import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
3
3
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
4
- import { d as EverfurRequest, F as Frame } from './config.d-Dy6igYlH.js';
5
- import { A as AuthContext } from './identity.d-DzTijonw.js';
4
+ import { d as EverfurRequest, F as Frame } from './config.d-zd2eTb2L.js';
5
+ import { A as AuthContext } from './identity.d-BksOEa6m.js';
6
6
 
7
7
  /** Why the funnel stopped, or kept going. Every settle and every retry names one. */
8
8
  type FunnelRetryReason = 'ok' | 'aborted' | 'terminal-code' | 'attempts-exhausted' | 'daily-quota-exhausted' | 'burst-throttle' | 'retryable-code' | 'server-reset-beyond-budget';
@@ -89,4 +89,4 @@ interface DecideOptions {
89
89
  */
90
90
  declare function decideCapability(name: CapabilityName, decisions: readonly EntitlementDecision[], opts?: DecideOptions): CapabilityDecision;
91
91
 
92
- export { type CapabilityDecision as C, type DisabledLevel as D, type EntitlementDecision as E, type LevelGrant as L, type ResolvedEntitlements as R, type CapabilityName as a, type CapabilityDisabled as b, type DecideOptions as c, decideCapability as d, deniedDecisionsFor as e, resolveEntitlements as f, requires as r };
92
+ export { type CapabilityName as C, type DisabledLevel as D, type EntitlementDecision as E, type LevelGrant as L, type ResolvedEntitlements as R, type CapabilityDecision as a, type CapabilityDisabled as b, type DecideOptions as c, decideCapability as d, deniedDecisionsFor as e, resolveEntitlements as f, requires as r };
@@ -89,4 +89,4 @@ interface DecideOptions {
89
89
  */
90
90
  declare function decideCapability(name: CapabilityName, decisions: readonly EntitlementDecision[], opts?: DecideOptions): CapabilityDecision;
91
91
 
92
- export { type CapabilityDecision as C, type DisabledLevel as D, type EntitlementDecision as E, type LevelGrant as L, type ResolvedEntitlements as R, type CapabilityName as a, type CapabilityDisabled as b, type DecideOptions as c, decideCapability as d, deniedDecisionsFor as e, resolveEntitlements as f, requires as r };
92
+ export { type CapabilityName as C, type DisabledLevel as D, type EntitlementDecision as E, type LevelGrant as L, type ResolvedEntitlements as R, type CapabilityDecision as a, type CapabilityDisabled as b, type DecideOptions as c, decideCapability as d, deniedDecisionsFor as e, resolveEntitlements as f, requires as r };
@@ -1,13 +1,13 @@
1
- import { E as EntitlementDecision, a as CapabilityName } from './resolve.d-jI8FmBj3.js';
2
- import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-BuGHymNx.js';
1
+ import { E as EntitlementDecision, C as CapabilityName } from './resolve.d-CoQWUy1Y.js';
2
+ import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-Ba3xhJcj.js';
3
3
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
4
- import { E as EverfurThemeInput, C as ClientBranding } from './branding.d-OIGLbQeM.js';
5
- import { A as AuthContext, T as TokenProvider } from './identity.d-DzTijonw.js';
4
+ import { E as EverfurThemeInput, C as ClientBranding } from './branding.d-y6c0UwhE.js';
5
+ import { A as AuthContext, T as TokenProvider } from './identity.d-BksOEa6m.js';
6
6
  import { U as UserRef, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.js';
7
- import { T as TransportPort } from './config.d-Dy6igYlH.js';
7
+ import { T as TransportPort } from './config.d-zd2eTb2L.js';
8
8
  import { I as ImageCachePort, K as KvPort } from './cacheEpoch.d-DknKn3S0.js';
9
9
  import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
10
- import { U as UploadPort, n as ChatController } from './ports.d-COIyN624.js';
10
+ import { U as UploadPort, n as ChatController } from './ports.d-BDtwHxmW.js';
11
11
  import { C as CameraPort } from './CameraPort.d-Cv31Pz7g.js';
12
12
  import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.js';
13
13
  import { U as UploadTransport } from './ports.d-BX4f4UsB.js';
@@ -1,13 +1,13 @@
1
- import { E as EntitlementDecision, a as CapabilityName } from './resolve.d-jI8FmBj3.cjs';
2
- import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-lp1BHRqM.cjs';
1
+ import { E as EntitlementDecision, C as CapabilityName } from './resolve.d-CoQWUy1Y.cjs';
2
+ import { P as PetProfileInput, R as RegisteredPet, a as PetProfilePatch } from './petsRepository.d-B5DWzU7C.cjs';
3
3
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
4
- import { E as EverfurThemeInput, C as ClientBranding } from './branding.d-DI8S400y.cjs';
5
- import { A as AuthContext, T as TokenProvider } from './identity.d-60LeJt_s.cjs';
4
+ import { E as EverfurThemeInput, C as ClientBranding } from './branding.d-Bbc6p1XY.cjs';
5
+ import { A as AuthContext, T as TokenProvider } from './identity.d-CioQhZrq.cjs';
6
6
  import { U as UserRef, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.cjs';
7
- import { T as TransportPort } from './config.d-BR3DT9ho.cjs';
7
+ import { T as TransportPort } from './config.d-C0WgjutL.cjs';
8
8
  import { I as ImageCachePort, K as KvPort } from './cacheEpoch.d-DknKn3S0.cjs';
9
9
  import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
10
- import { U as UploadPort, n as ChatController } from './ports.d-CEROoqnA.cjs';
10
+ import { U as UploadPort, n as ChatController } from './ports.d-gZNTn8Qf.cjs';
11
11
  import { C as CameraPort } from './CameraPort.d-Cv31Pz7g.cjs';
12
12
  import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.cjs';
13
13
  import { U as UploadTransport } from './ports.d-BX4f4UsB.cjs';
@@ -1,68 +1,8 @@
1
- import { R as RecordsRequestId, P as PetRef } from './ids.d-B2GAAifq.cjs';
2
- import { $ as RecordsClinicSearchInput, a0 as RecordsClinicSearchPage, a1 as RecordsRecentClinicsInput, a2 as RecordsAuthorizationCopy, a3 as CreateClinicRequestInput, a4 as RecordsSignatureUploadPolicy, l as RecordsClinic, M as RecordsClinicBatch, N as RecordsClinicBatchClient, m as RecordsDepthClient } from './depth.d-CjPGVPDL.cjs';
3
- import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
4
- import { j as RecordsRequestGroupView, d as RecordsRequestView } from './models.d-BnLm3VAA.cjs';
1
+ import { P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.cjs';
2
+ import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-BLpbpS51.cjs';
3
+ import { C as CaptureRecordsSignature, R as RecordsClinicController } from './clinicRequestProps.d-1dCtouGA.cjs';
4
+ import { R as RecordsClinic, c as RecordsClinicSearchInput } from './clinicModels.d-BXgKZqDb.cjs';
5
5
  import { a as RecordsAskHandler } from './recordsAsk.d-C5CGSi3j.cjs';
6
- import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
7
-
8
- interface RecordsClinicController {
9
- searchClinics(input?: RecordsClinicSearchInput): Promise<EverfurResult<RecordsClinicSearchPage>>;
10
- /** The clinics this member requested from before, most recent first: the picker's "recent" section. */
11
- recentClinics(input?: RecordsRecentClinicsInput): Promise<EverfurResult<RecordsClinicSearchPage>>;
12
- /** A multi-clinic batch's rollup and members. Not found until Everfur switches the multi-clinic flag on. */
13
- getRequestGroup(requestGroupId: string): Promise<EverfurResult<RecordsRequestGroupView>>;
14
- getAuthorizationCopy(): Promise<EverfurResult<RecordsAuthorizationCopy>>;
15
- createClinicRequest(input: CreateClinicRequestInput): Promise<EverfurResult<RecordsRequestView>>;
16
- retryRequest(id: RecordsRequestId): Promise<EverfurResult<RecordsRequestView>>;
17
- revokeRequest(id: RecordsRequestId): Promise<EverfurResult<RecordsRequestView>>;
18
- updateClinicEmail(id: RecordsRequestId, clinicEmail: string): Promise<EverfurResult<RecordsRequestView>>;
19
- convertToUpload(id: RecordsRequestId): Promise<EverfurResult<RecordsRequestView>>;
20
- /** Bytes are uploaded by the host directly to the returned multipart policy; never through the API. */
21
- initiateSignatureUpload(fileSize: number): Promise<EverfurResult<RecordsSignatureUploadPolicy>>;
22
- completeSignatureUpload(uploadId: string): Promise<EverfurResult<string>>;
23
- }
24
-
25
- /** The exact owner-visible scope at the moment the owner chooses to sign. */
26
- interface RecordsSignatureContext {
27
- readonly petRef: PetRef;
28
- readonly petName: string;
29
- readonly ownerName: string;
30
- readonly clinicName: string;
31
- readonly authorizationVersion: string;
32
- readonly scopeText: string;
33
- /** Cancel native capture/upload when the signed-in user or active pet changes. */
34
- readonly signal: AbortSignal;
35
- }
36
- /**
37
- * A captured signature: a registered signature id (the PNG uploaded through the initiate/complete APIs, the
38
- * consumer's own path, which keeps the bytes off the JSON body), or an inline PNG: the built-in React Native
39
- * pad's one-bit image (a few hundred bytes), or any built-in pad's PNG when the direct S3 POST was refused
40
- * (`signatureUploadFallback.ts`). The widget create path accepts it inline up to 2 MiB of base64.
41
- */
42
- type CapturedRecordsSignature = {
43
- readonly signatureId: string;
44
- readonly signaturePngBase64?: never;
45
- } | {
46
- readonly signatureId?: never;
47
- readonly signaturePngBase64: string;
48
- };
49
- /**
50
- * Capture explicitly at the moment the owner presses Send, after seeing the scope, and return the signature.
51
- * null means the owner cancelled. Prefer the registered id for anything but a tiny PNG.
52
- */
53
- type CaptureRecordsSignature = (context: RecordsSignatureContext) => Promise<CapturedRecordsSignature | null>;
54
- interface ClinicRequestBaseProps {
55
- readonly petRef: PetRef;
56
- /** Display name for this exact registered petRef; the server owns the final PDF identity. */
57
- readonly petName: string;
58
- /** Initial value only; the owner can visibly confirm or correct it before signing. */
59
- readonly ownerName: string;
60
- readonly onCaptureSignature?: CaptureRecordsSignature;
61
- readonly onCreated?: (request: RecordsRequestView) => void;
62
- readonly onClose?: () => void;
63
- /** Host/test seam over the same signed-user controller contract. */
64
- readonly controller?: RecordsClinicController;
65
- }
66
6
 
67
7
  /** One composed clinic of the batch (the consumer `ClinicRequestDraft`). */
68
8
  interface ClinicDraft {
@@ -216,30 +156,4 @@ interface RecordsScreenBaseProps extends RecordsHostSeams {
216
156
  readonly onBack?: () => void;
217
157
  }
218
158
 
219
- type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
220
- /** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */
221
- interface UseRecordsDepthState<T> {
222
- readonly status: RecordsDepthStatus;
223
- readonly value: T | null;
224
- readonly error: EverfurError | null;
225
- /**
226
- * False once a read got the router's dark 404, which is how a tenant without `partner.records_full_depth_enabled`
227
- * answers EVERY depth route. The state is then `empty` with no error, so the surface draws its own nothing
228
- * instead of the generic failure leaf and its unusable `Try again`. True otherwise, including for a failure
229
- * that never reached the server, which proves nothing about the tenant.
230
- */
231
- readonly available: boolean;
232
- readonly refresh: () => void;
233
- }
234
- /** The signed member's depth client over the provider's auth; a surface with no user settles to accessDenied. */
235
- declare function useEverfurRecordsDepthClient(): RecordsDepthClient;
236
- /**
237
- * Run one depth read for the scoped pet on mount, and again on `refresh`. `isEmpty` decides between `empty`
238
- * and `populated`; a withheld answer is `populated` with `withheld:true`, which every depth surface renders as
239
- * nothing (never a partial record).
240
- */
241
- declare function useRecordsDepthRead<T extends {
242
- readonly withheld: boolean;
243
- }>(petRef: PetRef, read: (client: RecordsDepthClient, petRef: PetRef) => Promise<EverfurResult<T>>, isEmpty: (value: T) => boolean, extraKey?: string): UseRecordsDepthState<T>;
244
-
245
- export { type ClinicDraft as C, type RecordsDepthStatus as R, type UseRecordsDepthState as U, type ClinicLocation as a, type RecordsHostSeams as b, type RecordsScreen as c, type RecordsScreenBaseProps as d, type RecordsUrlKind as e, useRecordsDepthRead as f, type RecordsClinicController as g, type CaptureRecordsSignature as h, type ClinicRequestBaseProps as i, type ClinicBatchBaseProps as j, type CapturedRecordsSignature as k, type RecordsNavAction as l, type RecordsNavState as m, type RecordsSignatureContext as n, type RegisterSignaturePng as o, currentRecordsScreen as p, initialRecordsNav as q, popRecordsNav as r, pushRecordsNav as s, recordsNavReducer as t, useEverfurRecordsDepthClient as u, replaceRecordsNav as v, resetRecordsNav as w, transitionRecordsNav as x };
159
+ export { type ClinicDraft as C, type RecordsHostSeams as R, type ClinicLocation as a, type RecordsScreen as b, type RecordsScreenBaseProps as c, type RecordsUrlKind as d, type ClinicBatchBaseProps as e, type RecordsNavAction as f, type RecordsNavState as g, type RegisterSignaturePng as h, currentRecordsScreen as i, initialRecordsNav as j, pushRecordsNav as k, replaceRecordsNav as l, resetRecordsNav as m, popRecordsNav as p, recordsNavReducer as r, transitionRecordsNav as t };
@@ -1,68 +1,8 @@
1
- import { R as RecordsRequestId, P as PetRef } from './ids.d-B2GAAifq.js';
2
- import { $ as RecordsClinicSearchInput, a0 as RecordsClinicSearchPage, a1 as RecordsRecentClinicsInput, a2 as RecordsAuthorizationCopy, a3 as CreateClinicRequestInput, a4 as RecordsSignatureUploadPolicy, l as RecordsClinic, M as RecordsClinicBatch, N as RecordsClinicBatchClient, m as RecordsDepthClient } from './depth.d-OSALbYM7.js';
3
- import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
4
- import { j as RecordsRequestGroupView, d as RecordsRequestView } from './models.d-BagXhafD.js';
1
+ import { P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.js';
2
+ import { R as RecordsClinicBatch, a as RecordsClinicBatchClient } from './clinicBatch.d-Byjx4y_W.js';
3
+ import { C as CaptureRecordsSignature, R as RecordsClinicController } from './clinicRequestProps.d-CjsMg_OD.js';
4
+ import { R as RecordsClinic, c as RecordsClinicSearchInput } from './clinicModels.d-CaS64-P-.js';
5
5
  import { a as RecordsAskHandler } from './recordsAsk.d-C5CGSi3j.js';
6
- import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
7
-
8
- interface RecordsClinicController {
9
- searchClinics(input?: RecordsClinicSearchInput): Promise<EverfurResult<RecordsClinicSearchPage>>;
10
- /** The clinics this member requested from before, most recent first: the picker's "recent" section. */
11
- recentClinics(input?: RecordsRecentClinicsInput): Promise<EverfurResult<RecordsClinicSearchPage>>;
12
- /** A multi-clinic batch's rollup and members. Not found until Everfur switches the multi-clinic flag on. */
13
- getRequestGroup(requestGroupId: string): Promise<EverfurResult<RecordsRequestGroupView>>;
14
- getAuthorizationCopy(): Promise<EverfurResult<RecordsAuthorizationCopy>>;
15
- createClinicRequest(input: CreateClinicRequestInput): Promise<EverfurResult<RecordsRequestView>>;
16
- retryRequest(id: RecordsRequestId): Promise<EverfurResult<RecordsRequestView>>;
17
- revokeRequest(id: RecordsRequestId): Promise<EverfurResult<RecordsRequestView>>;
18
- updateClinicEmail(id: RecordsRequestId, clinicEmail: string): Promise<EverfurResult<RecordsRequestView>>;
19
- convertToUpload(id: RecordsRequestId): Promise<EverfurResult<RecordsRequestView>>;
20
- /** Bytes are uploaded by the host directly to the returned multipart policy; never through the API. */
21
- initiateSignatureUpload(fileSize: number): Promise<EverfurResult<RecordsSignatureUploadPolicy>>;
22
- completeSignatureUpload(uploadId: string): Promise<EverfurResult<string>>;
23
- }
24
-
25
- /** The exact owner-visible scope at the moment the owner chooses to sign. */
26
- interface RecordsSignatureContext {
27
- readonly petRef: PetRef;
28
- readonly petName: string;
29
- readonly ownerName: string;
30
- readonly clinicName: string;
31
- readonly authorizationVersion: string;
32
- readonly scopeText: string;
33
- /** Cancel native capture/upload when the signed-in user or active pet changes. */
34
- readonly signal: AbortSignal;
35
- }
36
- /**
37
- * A captured signature: a registered signature id (the PNG uploaded through the initiate/complete APIs, the
38
- * consumer's own path, which keeps the bytes off the JSON body), or an inline PNG: the built-in React Native
39
- * pad's one-bit image (a few hundred bytes), or any built-in pad's PNG when the direct S3 POST was refused
40
- * (`signatureUploadFallback.ts`). The widget create path accepts it inline up to 2 MiB of base64.
41
- */
42
- type CapturedRecordsSignature = {
43
- readonly signatureId: string;
44
- readonly signaturePngBase64?: never;
45
- } | {
46
- readonly signatureId?: never;
47
- readonly signaturePngBase64: string;
48
- };
49
- /**
50
- * Capture explicitly at the moment the owner presses Send, after seeing the scope, and return the signature.
51
- * null means the owner cancelled. Prefer the registered id for anything but a tiny PNG.
52
- */
53
- type CaptureRecordsSignature = (context: RecordsSignatureContext) => Promise<CapturedRecordsSignature | null>;
54
- interface ClinicRequestBaseProps {
55
- readonly petRef: PetRef;
56
- /** Display name for this exact registered petRef; the server owns the final PDF identity. */
57
- readonly petName: string;
58
- /** Initial value only; the owner can visibly confirm or correct it before signing. */
59
- readonly ownerName: string;
60
- readonly onCaptureSignature?: CaptureRecordsSignature;
61
- readonly onCreated?: (request: RecordsRequestView) => void;
62
- readonly onClose?: () => void;
63
- /** Host/test seam over the same signed-user controller contract. */
64
- readonly controller?: RecordsClinicController;
65
- }
66
6
 
67
7
  /** One composed clinic of the batch (the consumer `ClinicRequestDraft`). */
68
8
  interface ClinicDraft {
@@ -216,30 +156,4 @@ interface RecordsScreenBaseProps extends RecordsHostSeams {
216
156
  readonly onBack?: () => void;
217
157
  }
218
158
 
219
- type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
220
- /** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */
221
- interface UseRecordsDepthState<T> {
222
- readonly status: RecordsDepthStatus;
223
- readonly value: T | null;
224
- readonly error: EverfurError | null;
225
- /**
226
- * False once a read got the router's dark 404, which is how a tenant without `partner.records_full_depth_enabled`
227
- * answers EVERY depth route. The state is then `empty` with no error, so the surface draws its own nothing
228
- * instead of the generic failure leaf and its unusable `Try again`. True otherwise, including for a failure
229
- * that never reached the server, which proves nothing about the tenant.
230
- */
231
- readonly available: boolean;
232
- readonly refresh: () => void;
233
- }
234
- /** The signed member's depth client over the provider's auth; a surface with no user settles to accessDenied. */
235
- declare function useEverfurRecordsDepthClient(): RecordsDepthClient;
236
- /**
237
- * Run one depth read for the scoped pet on mount, and again on `refresh`. `isEmpty` decides between `empty`
238
- * and `populated`; a withheld answer is `populated` with `withheld:true`, which every depth surface renders as
239
- * nothing (never a partial record).
240
- */
241
- declare function useRecordsDepthRead<T extends {
242
- readonly withheld: boolean;
243
- }>(petRef: PetRef, read: (client: RecordsDepthClient, petRef: PetRef) => Promise<EverfurResult<T>>, isEmpty: (value: T) => boolean, extraKey?: string): UseRecordsDepthState<T>;
244
-
245
- export { type ClinicDraft as C, type RecordsDepthStatus as R, type UseRecordsDepthState as U, type ClinicLocation as a, type RecordsHostSeams as b, type RecordsScreen as c, type RecordsScreenBaseProps as d, type RecordsUrlKind as e, useRecordsDepthRead as f, type RecordsClinicController as g, type CaptureRecordsSignature as h, type ClinicRequestBaseProps as i, type ClinicBatchBaseProps as j, type CapturedRecordsSignature as k, type RecordsNavAction as l, type RecordsNavState as m, type RecordsSignatureContext as n, type RegisterSignaturePng as o, currentRecordsScreen as p, initialRecordsNav as q, popRecordsNav as r, pushRecordsNav as s, recordsNavReducer as t, useEverfurRecordsDepthClient as u, replaceRecordsNav as v, resetRecordsNav as w, transitionRecordsNav as x };
159
+ export { type ClinicDraft as C, type RecordsHostSeams as R, type ClinicLocation as a, type RecordsScreen as b, type RecordsScreenBaseProps as c, type RecordsUrlKind as d, type ClinicBatchBaseProps as e, type RecordsNavAction as f, type RecordsNavState as g, type RegisterSignaturePng as h, currentRecordsScreen as i, initialRecordsNav as j, pushRecordsNav as k, replaceRecordsNav as l, resetRecordsNav as m, popRecordsNav as p, recordsNavReducer as r, transitionRecordsNav as t };
@@ -1,6 +1,6 @@
1
1
  "use strict";var crypto=require("crypto");function ok(value,warning){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_SIGNATURE_HEADER="Everfur-Signature",DEFAULT_WEBHOOK_TOLERANCE_SECONDS=300,SIGNATURE_SCHEME="v1",MAX_HEADER_LENGTH=4096,HEX_SHA256_LENGTH=64,DIGITS=/^[0-9]+$/,EverfurWebhookVerificationError=class _EverfurWebhookVerificationError extends Error{constructor(code){super(`Everfur webhook verification failed: ${code}`),this.name="EverfurWebhookVerificationError",this.code=code,Object.setPrototypeOf(this,_EverfurWebhookVerificationError.prototype)}};function constructEvent(payload,signatureHeader,secrets,options={}){let body=rawBodyBytes(payload),keys=requireSecrets(secrets),tolerance=options.toleranceSeconds??DEFAULT_WEBHOOK_TOLERANCE_SECONDS;if(!Number.isInteger(tolerance)||tolerance<0)throw new EverfurConfigError("invalid-argument","toleranceSeconds must be a non-negative integer");let parsed=parseSignatureHeader(signatureHeader),now=options.nowSeconds??Math.floor(Date.now()/1e3);if(Math.abs(now-parsed.timestamp)>tolerance)throw new EverfurWebhookVerificationError("timestamp_outside_tolerance");let matched=false;for(let key of keys){let expected=Buffer.from(computeSignature(key,parsed.timestamp,body),"ascii");for(let candidate of parsed.signatures){if(candidate.length!==HEX_SHA256_LENGTH)continue;let actual=Buffer.from(candidate,"utf8");actual.length===expected.length&&crypto.timingSafeEqual(expected,actual)&&(matched=true)}}if(!matched)throw new EverfurWebhookVerificationError("no_matching_signature");return parseEnvelope(body)}function generateTestSignatureHeader(params){let body=rawBodyBytes(params.payload),keys=requireSecrets(params.secrets),timestamp=params.timestamp??Math.floor(Date.now()/1e3);if(!Number.isSafeInteger(timestamp)||timestamp<0)throw new EverfurConfigError("invalid-argument","timestamp must be a non-negative integer (unix seconds)");return[`t=${timestamp}`,...keys.map(key=>`${SIGNATURE_SCHEME}=${computeSignature(key,timestamp,body)}`)].join(",")}function computeSignature(secret,timestamp,body){return crypto.createHmac("sha256",Buffer.from(secret,"utf8")).update(`${timestamp}.`,"ascii").update(body).digest("hex")}function rawBodyBytes(payload){if(typeof payload=="string")return Buffer.from(payload,"utf8");if(payload instanceof Uint8Array)return payload;throw new EverfurConfigError("invalid-argument","constructEvent needs the raw request body (a string or a Buffer), not parsed JSON: re-serialised JSON does not reproduce the signed bytes.")}function requireSecrets(secrets){let list=typeof secrets=="string"?[secrets]:Array.isArray(secrets)?secrets:[];if(list.length===0||list.some(s=>typeof s!="string"||s.length===0))throw new EverfurConfigError("invalid-argument","at least one non-empty webhook signing secret is required");return list}function parseSignatureHeader(header){if(typeof header!="string"||header.length===0||header.length>MAX_HEADER_LENGTH)throw new EverfurWebhookVerificationError("malformed_header");let timestamp=null,signatures=[];for(let item of header.split(",")){let trimmed=item.trim(),at=trimmed.indexOf("=");if(at<0)throw new EverfurWebhookVerificationError("malformed_header");let key=trimmed.slice(0,at),value=trimmed.slice(at+1);if(key==="t"){if(timestamp!==null||!DIGITS.test(value))throw new EverfurWebhookVerificationError("malformed_header");let parsed=Number(value);if(!Number.isSafeInteger(parsed))throw new EverfurWebhookVerificationError("malformed_header");timestamp=parsed}else key===SIGNATURE_SCHEME&&signatures.push(value)}if(timestamp===null||signatures.length===0)throw new EverfurWebhookVerificationError("malformed_header");return{timestamp:timestamp,signatures:signatures}}function parseEnvelope(body){let json;try{json=JSON.parse(Buffer.from(body.buffer,body.byteOffset,body.byteLength).toString("utf8"))}catch{throw new EverfurWebhookVerificationError("malformed_payload")}if(!isRecord(json))throw new EverfurWebhookVerificationError("malformed_payload");let{id:id,object:object,type:type,api_version:apiVersion,created:created,livemode:livemode,data:data}=json;if(typeof id!="string"||id.length===0||object!=="event"||typeof type!="string"||type.length===0||typeof apiVersion!="string"||typeof created!="number"||typeof livemode!="boolean"||!isRecord(data)||!isRecord(data.object))throw new EverfurWebhookVerificationError("malformed_payload");return json}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}var SDK_VERSION="0.13.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_SIGNATURE_HEADER="Everfur-Signature",DEFAULT_WEBHOOK_TOLERANCE_SECONDS=300,SIGNATURE_SCHEME="v1",MAX_HEADER_LENGTH=4096,HEX_SHA256_LENGTH=64,DIGITS=/^[0-9]+$/,EverfurWebhookVerificationError=class _EverfurWebhookVerificationError extends Error{constructor(code){super(`Everfur webhook verification failed: ${code}`),this.name="EverfurWebhookVerificationError",this.code=code,Object.setPrototypeOf(this,_EverfurWebhookVerificationError.prototype)}};function constructEvent(payload,signatureHeader,secrets,options={}){let body=rawBodyBytes(payload),keys=requireSecrets(secrets),tolerance=options.toleranceSeconds??DEFAULT_WEBHOOK_TOLERANCE_SECONDS;if(!Number.isInteger(tolerance)||tolerance<0)throw new EverfurConfigError("invalid-argument","toleranceSeconds must be a non-negative integer");let parsed=parseSignatureHeader(signatureHeader),now=options.nowSeconds??Math.floor(Date.now()/1e3);if(Math.abs(now-parsed.timestamp)>tolerance)throw new EverfurWebhookVerificationError("timestamp_outside_tolerance");let matched=false;for(let key of keys){let expected=Buffer.from(computeSignature(key,parsed.timestamp,body),"ascii");for(let candidate of parsed.signatures){if(candidate.length!==HEX_SHA256_LENGTH)continue;let actual=Buffer.from(candidate,"utf8");actual.length===expected.length&&crypto.timingSafeEqual(expected,actual)&&(matched=true)}}if(!matched)throw new EverfurWebhookVerificationError("no_matching_signature");return parseEnvelope(body)}function generateTestSignatureHeader(params){let body=rawBodyBytes(params.payload),keys=requireSecrets(params.secrets),timestamp=params.timestamp??Math.floor(Date.now()/1e3);if(!Number.isSafeInteger(timestamp)||timestamp<0)throw new EverfurConfigError("invalid-argument","timestamp must be a non-negative integer (unix seconds)");return[`t=${timestamp}`,...keys.map(key=>`${SIGNATURE_SCHEME}=${computeSignature(key,timestamp,body)}`)].join(",")}function computeSignature(secret,timestamp,body){return crypto.createHmac("sha256",Buffer.from(secret,"utf8")).update(`${timestamp}.`,"ascii").update(body).digest("hex")}function rawBodyBytes(payload){if(typeof payload=="string")return Buffer.from(payload,"utf8");if(payload instanceof Uint8Array)return payload;throw new EverfurConfigError("invalid-argument","constructEvent needs the raw request body (a string or a Buffer), not parsed JSON: re-serialised JSON does not reproduce the signed bytes.")}function requireSecrets(secrets){let list=typeof secrets=="string"?[secrets]:Array.isArray(secrets)?secrets:[];if(list.length===0||list.some(s=>typeof s!="string"||s.length===0))throw new EverfurConfigError("invalid-argument","at least one non-empty webhook signing secret is required");return list}function parseSignatureHeader(header){if(typeof header!="string"||header.length===0||header.length>MAX_HEADER_LENGTH)throw new EverfurWebhookVerificationError("malformed_header");let timestamp=null,signatures=[];for(let item of header.split(",")){let trimmed=item.trim(),at=trimmed.indexOf("=");if(at<0)throw new EverfurWebhookVerificationError("malformed_header");let key=trimmed.slice(0,at),value=trimmed.slice(at+1);if(key==="t"){if(timestamp!==null||!DIGITS.test(value))throw new EverfurWebhookVerificationError("malformed_header");let parsed=Number(value);if(!Number.isSafeInteger(parsed))throw new EverfurWebhookVerificationError("malformed_header");timestamp=parsed}else key===SIGNATURE_SCHEME&&signatures.push(value)}if(timestamp===null||signatures.length===0)throw new EverfurWebhookVerificationError("malformed_header");return{timestamp:timestamp,signatures:signatures}}function parseEnvelope(body){let json;try{json=JSON.parse(Buffer.from(body.buffer,body.byteOffset,body.byteLength).toString("utf8"))}catch{throw new EverfurWebhookVerificationError("malformed_payload")}if(!isRecord(json))throw new EverfurWebhookVerificationError("malformed_payload");let{id:id,object:object,type:type,api_version:apiVersion,created:created,livemode:livemode,data:data}=json;if(typeof id!="string"||id.length===0||object!=="event"||typeof type!="string"||type.length===0||typeof apiVersion!="string"||typeof created!="number"||typeof livemode!="boolean"||!isRecord(data)||!isRecord(data.object))throw new EverfurWebhookVerificationError("malformed_payload");return json}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}var SDK_VERSION="0.15.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
5
5
  return Object.freeze({ok:true,value:value})}function isLoopbackHost(hostname){let host=hostname.toLowerCase();return host==="localhost"||host==="127.0.0.1"||host==="[::1]"||host==="::1"}function readEnv(name){let value=globalThis.process?.env?.[name];return typeof value=="string"&&value.trim().length>0?value.trim():void 0}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
6
6
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
@@ -1,6 +1,6 @@
1
- import { P as PartnerPetProfile } from '../../pets.d-NbJvP_kh.cjs';
1
+ import { P as PartnerPetProfile } from '../../pets.d-B_LoizOv.cjs';
2
2
  import { E as EverfurResult } from '../../EverfurResult.d-BFH-3s6E.cjs';
3
- import { j as FetchLike } from '../../config.d-BR3DT9ho.cjs';
3
+ import { j as FetchLike } from '../../config.d-C0WgjutL.cjs';
4
4
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../../profile.d-CSs1wlXT.cjs';
5
5
  import '../../EverfurError.d-8NHtlgzA.cjs';
6
6
 
@@ -1,6 +1,6 @@
1
- import { P as PartnerPetProfile } from '../../pets.d-C_53_fzo.js';
1
+ import { P as PartnerPetProfile } from '../../pets.d-OWxskXCP.js';
2
2
  import { E as EverfurResult } from '../../EverfurResult.d-D_-254ZY.js';
3
- import { j as FetchLike } from '../../config.d-Dy6igYlH.js';
3
+ import { j as FetchLike } from '../../config.d-zd2eTb2L.js';
4
4
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../../profile.d-CSs1wlXT.js';
5
5
  import '../../EverfurError.d-8NHtlgzA.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import{timingSafeEqual,createHmac,randomUUID}from"crypto";function ok(value,warning){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_SIGNATURE_HEADER="Everfur-Signature",DEFAULT_WEBHOOK_TOLERANCE_SECONDS=300,SIGNATURE_SCHEME="v1",MAX_HEADER_LENGTH=4096,HEX_SHA256_LENGTH=64,DIGITS=/^[0-9]+$/,EverfurWebhookVerificationError=class _EverfurWebhookVerificationError extends Error{constructor(code){super(`Everfur webhook verification failed: ${code}`),this.name="EverfurWebhookVerificationError",this.code=code,Object.setPrototypeOf(this,_EverfurWebhookVerificationError.prototype)}};function constructEvent(payload,signatureHeader,secrets,options={}){let body=rawBodyBytes(payload),keys=requireSecrets(secrets),tolerance=options.toleranceSeconds??DEFAULT_WEBHOOK_TOLERANCE_SECONDS;if(!Number.isInteger(tolerance)||tolerance<0)throw new EverfurConfigError("invalid-argument","toleranceSeconds must be a non-negative integer");let parsed=parseSignatureHeader(signatureHeader),now=options.nowSeconds??Math.floor(Date.now()/1e3);if(Math.abs(now-parsed.timestamp)>tolerance)throw new EverfurWebhookVerificationError("timestamp_outside_tolerance");let matched=false;for(let key of keys){let expected=Buffer.from(computeSignature(key,parsed.timestamp,body),"ascii");for(let candidate of parsed.signatures){if(candidate.length!==HEX_SHA256_LENGTH)continue;let actual=Buffer.from(candidate,"utf8");actual.length===expected.length&&timingSafeEqual(expected,actual)&&(matched=true)}}if(!matched)throw new EverfurWebhookVerificationError("no_matching_signature");return parseEnvelope(body)}function generateTestSignatureHeader(params){let body=rawBodyBytes(params.payload),keys=requireSecrets(params.secrets),timestamp=params.timestamp??Math.floor(Date.now()/1e3);if(!Number.isSafeInteger(timestamp)||timestamp<0)throw new EverfurConfigError("invalid-argument","timestamp must be a non-negative integer (unix seconds)");return[`t=${timestamp}`,...keys.map(key=>`${SIGNATURE_SCHEME}=${computeSignature(key,timestamp,body)}`)].join(",")}function computeSignature(secret,timestamp,body){return createHmac("sha256",Buffer.from(secret,"utf8")).update(`${timestamp}.`,"ascii").update(body).digest("hex")}function rawBodyBytes(payload){if(typeof payload=="string")return Buffer.from(payload,"utf8");if(payload instanceof Uint8Array)return payload;throw new EverfurConfigError("invalid-argument","constructEvent needs the raw request body (a string or a Buffer), not parsed JSON: re-serialised JSON does not reproduce the signed bytes.")}function requireSecrets(secrets){let list=typeof secrets=="string"?[secrets]:Array.isArray(secrets)?secrets:[];if(list.length===0||list.some(s=>typeof s!="string"||s.length===0))throw new EverfurConfigError("invalid-argument","at least one non-empty webhook signing secret is required");return list}function parseSignatureHeader(header){if(typeof header!="string"||header.length===0||header.length>MAX_HEADER_LENGTH)throw new EverfurWebhookVerificationError("malformed_header");let timestamp=null,signatures=[];for(let item of header.split(",")){let trimmed=item.trim(),at=trimmed.indexOf("=");if(at<0)throw new EverfurWebhookVerificationError("malformed_header");let key=trimmed.slice(0,at),value=trimmed.slice(at+1);if(key==="t"){if(timestamp!==null||!DIGITS.test(value))throw new EverfurWebhookVerificationError("malformed_header");let parsed=Number(value);if(!Number.isSafeInteger(parsed))throw new EverfurWebhookVerificationError("malformed_header");timestamp=parsed}else key===SIGNATURE_SCHEME&&signatures.push(value)}if(timestamp===null||signatures.length===0)throw new EverfurWebhookVerificationError("malformed_header");return{timestamp:timestamp,signatures:signatures}}function parseEnvelope(body){let json;try{json=JSON.parse(Buffer.from(body.buffer,body.byteOffset,body.byteLength).toString("utf8"))}catch{throw new EverfurWebhookVerificationError("malformed_payload")}if(!isRecord(json))throw new EverfurWebhookVerificationError("malformed_payload");let{id:id,object:object,type:type,api_version:apiVersion,created:created,livemode:livemode,data:data}=json;if(typeof id!="string"||id.length===0||object!=="event"||typeof type!="string"||type.length===0||typeof apiVersion!="string"||typeof created!="number"||typeof livemode!="boolean"||!isRecord(data)||!isRecord(data.object))throw new EverfurWebhookVerificationError("malformed_payload");return json}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}var SDK_VERSION="0.13.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_SIGNATURE_HEADER="Everfur-Signature",DEFAULT_WEBHOOK_TOLERANCE_SECONDS=300,SIGNATURE_SCHEME="v1",MAX_HEADER_LENGTH=4096,HEX_SHA256_LENGTH=64,DIGITS=/^[0-9]+$/,EverfurWebhookVerificationError=class _EverfurWebhookVerificationError extends Error{constructor(code){super(`Everfur webhook verification failed: ${code}`),this.name="EverfurWebhookVerificationError",this.code=code,Object.setPrototypeOf(this,_EverfurWebhookVerificationError.prototype)}};function constructEvent(payload,signatureHeader,secrets,options={}){let body=rawBodyBytes(payload),keys=requireSecrets(secrets),tolerance=options.toleranceSeconds??DEFAULT_WEBHOOK_TOLERANCE_SECONDS;if(!Number.isInteger(tolerance)||tolerance<0)throw new EverfurConfigError("invalid-argument","toleranceSeconds must be a non-negative integer");let parsed=parseSignatureHeader(signatureHeader),now=options.nowSeconds??Math.floor(Date.now()/1e3);if(Math.abs(now-parsed.timestamp)>tolerance)throw new EverfurWebhookVerificationError("timestamp_outside_tolerance");let matched=false;for(let key of keys){let expected=Buffer.from(computeSignature(key,parsed.timestamp,body),"ascii");for(let candidate of parsed.signatures){if(candidate.length!==HEX_SHA256_LENGTH)continue;let actual=Buffer.from(candidate,"utf8");actual.length===expected.length&&timingSafeEqual(expected,actual)&&(matched=true)}}if(!matched)throw new EverfurWebhookVerificationError("no_matching_signature");return parseEnvelope(body)}function generateTestSignatureHeader(params){let body=rawBodyBytes(params.payload),keys=requireSecrets(params.secrets),timestamp=params.timestamp??Math.floor(Date.now()/1e3);if(!Number.isSafeInteger(timestamp)||timestamp<0)throw new EverfurConfigError("invalid-argument","timestamp must be a non-negative integer (unix seconds)");return[`t=${timestamp}`,...keys.map(key=>`${SIGNATURE_SCHEME}=${computeSignature(key,timestamp,body)}`)].join(",")}function computeSignature(secret,timestamp,body){return createHmac("sha256",Buffer.from(secret,"utf8")).update(`${timestamp}.`,"ascii").update(body).digest("hex")}function rawBodyBytes(payload){if(typeof payload=="string")return Buffer.from(payload,"utf8");if(payload instanceof Uint8Array)return payload;throw new EverfurConfigError("invalid-argument","constructEvent needs the raw request body (a string or a Buffer), not parsed JSON: re-serialised JSON does not reproduce the signed bytes.")}function requireSecrets(secrets){let list=typeof secrets=="string"?[secrets]:Array.isArray(secrets)?secrets:[];if(list.length===0||list.some(s=>typeof s!="string"||s.length===0))throw new EverfurConfigError("invalid-argument","at least one non-empty webhook signing secret is required");return list}function parseSignatureHeader(header){if(typeof header!="string"||header.length===0||header.length>MAX_HEADER_LENGTH)throw new EverfurWebhookVerificationError("malformed_header");let timestamp=null,signatures=[];for(let item of header.split(",")){let trimmed=item.trim(),at=trimmed.indexOf("=");if(at<0)throw new EverfurWebhookVerificationError("malformed_header");let key=trimmed.slice(0,at),value=trimmed.slice(at+1);if(key==="t"){if(timestamp!==null||!DIGITS.test(value))throw new EverfurWebhookVerificationError("malformed_header");let parsed=Number(value);if(!Number.isSafeInteger(parsed))throw new EverfurWebhookVerificationError("malformed_header");timestamp=parsed}else key===SIGNATURE_SCHEME&&signatures.push(value)}if(timestamp===null||signatures.length===0)throw new EverfurWebhookVerificationError("malformed_header");return{timestamp:timestamp,signatures:signatures}}function parseEnvelope(body){let json;try{json=JSON.parse(Buffer.from(body.buffer,body.byteOffset,body.byteLength).toString("utf8"))}catch{throw new EverfurWebhookVerificationError("malformed_payload")}if(!isRecord(json))throw new EverfurWebhookVerificationError("malformed_payload");let{id:id,object:object,type:type,api_version:apiVersion,created:created,livemode:livemode,data:data}=json;if(typeof id!="string"||id.length===0||object!=="event"||typeof type!="string"||type.length===0||typeof apiVersion!="string"||typeof created!="number"||typeof livemode!="boolean"||!isRecord(data)||!isRecord(data.object))throw new EverfurWebhookVerificationError("malformed_payload");return json}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}var SDK_VERSION="0.15.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
5
5
  return Object.freeze({ok:true,value:value})}function isLoopbackHost(hostname){let host=hostname.toLowerCase();return host==="localhost"||host==="127.0.0.1"||host==="[::1]"||host==="::1"}function readEnv(name){let value=globalThis.process?.env?.[name];return typeof value=="string"&&value.trim().length>0?value.trim():void 0}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
6
6
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
@@ -1,6 +1,6 @@
1
1
  "use strict";function ok(value,warning){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.13.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.15.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
5
5
  return Object.freeze({ok:true,value:value})}function isLoopbackHost(hostname){let host=hostname.toLowerCase();return host==="localhost"||host==="127.0.0.1"||host==="[::1]"||host==="::1"}function readEnv(name){let value=globalThis.process?.env?.[name];return typeof value=="string"&&value.trim().length>0?value.trim():void 0}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
6
6
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurResult } from '../EverfurResult.d-BFH-3s6E.cjs';
2
- import { j as FetchLike } from '../config.d-BR3DT9ho.cjs';
3
- import { a as PartnerServerClient } from '../pets.d-NbJvP_kh.cjs';
4
- export { b as PartnerPet, P as PartnerPetProfile, c as PartnerPetTarget, d as PartnerPetWithProfile, e as deletePartnerPet, g as getPartnerPet, u as updatePartnerPet, f as upsertPartnerPet } from '../pets.d-NbJvP_kh.cjs';
2
+ import { j as FetchLike } from '../config.d-C0WgjutL.cjs';
3
+ import { a as PartnerServerClient } from '../pets.d-B_LoizOv.cjs';
4
+ export { b as PartnerPet, P as PartnerPetProfile, c as PartnerPetTarget, d as PartnerPetWithProfile, e as deletePartnerPet, g as getPartnerPet, u as updatePartnerPet, f as upsertPartnerPet } from '../pets.d-B_LoizOv.cjs';
5
5
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../profile.d-CSs1wlXT.cjs';
6
6
  export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from '../species.d-BXAIMh7I.cjs';
7
7
  import '../EverfurError.d-8NHtlgzA.cjs';
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurResult } from '../EverfurResult.d-D_-254ZY.js';
2
- import { j as FetchLike } from '../config.d-Dy6igYlH.js';
3
- import { a as PartnerServerClient } from '../pets.d-C_53_fzo.js';
4
- export { b as PartnerPet, P as PartnerPetProfile, c as PartnerPetTarget, d as PartnerPetWithProfile, e as deletePartnerPet, g as getPartnerPet, u as updatePartnerPet, f as upsertPartnerPet } from '../pets.d-C_53_fzo.js';
2
+ import { j as FetchLike } from '../config.d-zd2eTb2L.js';
3
+ import { a as PartnerServerClient } from '../pets.d-OWxskXCP.js';
4
+ export { b as PartnerPet, P as PartnerPetProfile, c as PartnerPetTarget, d as PartnerPetWithProfile, e as deletePartnerPet, g as getPartnerPet, u as updatePartnerPet, f as upsertPartnerPet } from '../pets.d-OWxskXCP.js';
5
5
  export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from '../profile.d-CSs1wlXT.js';
6
6
  export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from '../species.d-BXAIMh7I.js';
7
7
  import '../EverfurError.d-8NHtlgzA.js';
@@ -1,6 +1,6 @@
1
1
  function ok(value,warning){/* @__PURE__ */
2
2
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
3
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.13.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
3
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.15.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
4
4
  return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
5
5
  return Object.freeze({ok:true,value:value})}function isLoopbackHost(hostname){let host=hostname.toLowerCase();return host==="localhost"||host==="127.0.0.1"||host==="[::1]"||host==="::1"}function readEnv(name){let value=globalThis.process?.env?.[name];return typeof value=="string"&&value.trim().length>0?value.trim():void 0}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
6
6
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
- import { P as PetRef } from './ids.d-B2GAAifq.js';
3
- import { c as RecordForwardItem } from './models.d-BagXhafD.js';
2
+ import { P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.js';
3
+ import { c as RecordForwardItem } from './models.d-DOwnr8fi.js';
4
4
  import { a as RecordsAskHandler } from './recordsAsk.d-C5CGSi3j.js';
5
- import { U as UseEverfurRecordsState } from './useRecords.d-aQTzQZoV.js';
5
+ import { U as UseEverfurRecordsState } from './useRecords.d-DWk61a4c.js';
6
6
 
7
7
  /** What the page hands the sheet: its records state and the page's own flows behind every button. */
8
8
  interface EverfurRecordsSheetRenderArgs {
@@ -23,6 +23,10 @@ interface EverfurRecordsSheetRenderArgs {
23
23
  readonly weightUnit?: 'lb' | 'kg' | undefined;
24
24
  /** The page's `onOpenPlan`: the top risk line's button. A sheet built with its own `onOpenPlan` keeps that. */
25
25
  readonly onOpenPlan?: (() => void) | undefined;
26
+ /** The page's `noVet`: the member said the pet has no vet yet, so the no-records title says to start there then. */
27
+ readonly noVet?: boolean | undefined;
28
+ /** Opens one request's tracker: the button under each line about a request or an upload still in flight. */
29
+ readonly onOpenRequest?: ((requestId: RecordsRequestId) => void) | undefined;
26
30
  }
27
31
  /** What the page hands the lab screen when a result opens in place. */
28
32
  interface EverfurRecordsSheetLabRenderArgs {
@@ -32,7 +36,7 @@ interface EverfurRecordsSheetLabRenderArgs {
32
36
  readonly onAsk?: RecordsAskHandler | undefined;
33
37
  }
34
38
  /**
35
- * Raph's v3 records sheet, built by `recordsSheet()` from `@everfur/sdk/web/records-sheet`. Pass it as
39
+ * The records sheet (our web app's health tab), built by `recordsSheet()` from `@everfur/sdk/web/records-sheet`. Pass it as
36
40
  * `EverfurRecordsPage`'s `sheet`. Build it once (module scope or `useMemo`), not on every render.
37
41
  */
38
42
  interface EverfurRecordsSheet {
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
- import { P as PetRef } from './ids.d-B2GAAifq.cjs';
3
- import { c as RecordForwardItem } from './models.d-BnLm3VAA.cjs';
2
+ import { P as PetRef, R as RecordsRequestId } from './ids.d-B2GAAifq.cjs';
3
+ import { c as RecordForwardItem } from './models.d-BSqvbTE1.cjs';
4
4
  import { a as RecordsAskHandler } from './recordsAsk.d-C5CGSi3j.cjs';
5
- import { U as UseEverfurRecordsState } from './useRecords.d-Cb-36SF5.cjs';
5
+ import { U as UseEverfurRecordsState } from './useRecords.d-BYNX01El.cjs';
6
6
 
7
7
  /** What the page hands the sheet: its records state and the page's own flows behind every button. */
8
8
  interface EverfurRecordsSheetRenderArgs {
@@ -23,6 +23,10 @@ interface EverfurRecordsSheetRenderArgs {
23
23
  readonly weightUnit?: 'lb' | 'kg' | undefined;
24
24
  /** The page's `onOpenPlan`: the top risk line's button. A sheet built with its own `onOpenPlan` keeps that. */
25
25
  readonly onOpenPlan?: (() => void) | undefined;
26
+ /** The page's `noVet`: the member said the pet has no vet yet, so the no-records title says to start there then. */
27
+ readonly noVet?: boolean | undefined;
28
+ /** Opens one request's tracker: the button under each line about a request or an upload still in flight. */
29
+ readonly onOpenRequest?: ((requestId: RecordsRequestId) => void) | undefined;
26
30
  }
27
31
  /** What the page hands the lab screen when a result opens in place. */
28
32
  interface EverfurRecordsSheetLabRenderArgs {
@@ -32,7 +36,7 @@ interface EverfurRecordsSheetLabRenderArgs {
32
36
  readonly onAsk?: RecordsAskHandler | undefined;
33
37
  }
34
38
  /**
35
- * Raph's v3 records sheet, built by `recordsSheet()` from `@everfur/sdk/web/records-sheet`. Pass it as
39
+ * The records sheet (our web app's health tab), built by `recordsSheet()` from `@everfur/sdk/web/records-sheet`. Pass it as
36
40
  * `EverfurRecordsPage`'s `sheet`. Build it once (module scope or `useMemo`), not on every render.
37
41
  */
38
42
  interface EverfurRecordsSheet {