@everfur/sdk 0.12.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +292 -0
- package/README.md +12 -10
- package/dist/{Chat-CgYQdfqi.d.ts → Chat.d-aycmX1CA.d.cts} +178 -8
- package/dist/{Chat-CbyZ1vAX.d.cts → Chat.d-puminpyi.d.ts} +178 -8
- package/dist/{DepthViews-CCz4ig0u.d.ts → DepthViews.d-BdvFZgPs.d.cts} +1 -1
- package/dist/{DepthViews-CaQUyCHK.d.ts → DepthViews.d-DIvxzLDf.d.ts} +1 -1
- package/dist/{DepthViews-iGZi4_WK.d.cts → DepthViews.d-Dy0Zl-s-.d.ts} +1 -1
- package/dist/{DepthViews-D3OiIK_x.d.cts → DepthViews.d-wLNkzk9f.d.cts} +1 -1
- package/dist/{ErrorPolicyPort-10s3HJCt.d.cts → ErrorPolicyPort.d-68yrE3BE.d.ts} +1 -1
- package/dist/{ErrorPolicyPort-C3nNSS_j.d.ts → ErrorPolicyPort.d-DirW9hgO.d.cts} +1 -1
- package/dist/{EverfurError-DeBqRpQV.d.cts → EverfurError.d-8NHtlgzA.d.cts} +11 -1
- package/dist/{EverfurError-DeBqRpQV.d.ts → EverfurError.d-8NHtlgzA.d.ts} +11 -1
- package/dist/{EverfurResult-ClPTS0P2.d.ts → EverfurResult.d-BFH-3s6E.d.cts} +1 -1
- package/dist/{EverfurResult-COlXj1wq.d.cts → EverfurResult.d-D_-254ZY.d.ts} +1 -1
- package/dist/{IntakeMedia-BH0fYDT2.d.cts → IntakeMedia.d-4a89XrP7.d.ts} +1 -1
- package/dist/{IntakeMedia-B-_vA9ZB.d.cts → IntakeMedia.d-DGxrhgIW.d.ts} +1 -1
- package/dist/{IntakeMedia-CIoTXAWs.d.ts → IntakeMedia.d-DUPR4lVM.d.cts} +1 -1
- package/dist/{IntakeMedia-Bavl7E4Z.d.ts → IntakeMedia.d-JJCUvQu7.d.cts} +1 -1
- package/dist/LifecyclePort.d-Cr1p33a7.d.cts +23 -0
- package/dist/LifecyclePort.d-Cr1p33a7.d.ts +23 -0
- package/dist/{PhotoController-vzY5bfY_.d.ts → PhotoController.d-BzCJOE7e.d.cts} +2 -2
- package/dist/{PhotoController-3l7MT9jA.d.cts → PhotoController.d-D0XiUUOl.d.ts} +2 -2
- package/dist/RecordsPage.d-9Ank15PT.d.ts +93 -0
- package/dist/RecordsPage.d-DMKU0IKc.d.cts +93 -0
- package/dist/animations/index.cjs +4 -1
- package/dist/animations/index.d.cts +24 -24
- package/dist/animations/index.d.ts +24 -24
- package/dist/animations/index.js +4 -1
- package/dist/{attachments-CTJK0jQ4.d.ts → attachments.d--sIsfk6e.d.ts} +4 -4
- package/dist/{attachments-DkMrKCIU.d.ts → attachments.d-DNUCiyy5.d.cts} +10 -32
- package/dist/{attachments-DXBETOrV.d.cts → attachments.d-ZEpTUeWN.d.cts} +4 -4
- package/dist/{attachments-BOk3hEAM.d.cts → attachments.d-rp3xs-Q3.d.ts} +10 -32
- package/dist/{bookingCopy-C_a45T4-.d.ts → bookingCopy.d-D0uIIFAJ.d.ts} +24 -9
- package/dist/{bookingCopy-CHYGYHe0.d.cts → bookingCopy.d-DUrmVcLs.d.cts} +24 -9
- package/dist/{branding-DJf4h12Q.d.ts → branding.d-CTXTUg_8.d.cts} +9 -2
- package/dist/{branding-BCfwLj0h.d.cts → branding.d-DxJSoFce.d.ts} +9 -2
- package/dist/{callRoom-BhIdadyV.d.cts → callRoom.d-B1DoYdJe.d.cts} +1 -1
- package/dist/{callRoom-B92eH_ij.d.ts → callRoom.d-Dqm1rUqT.d.ts} +1 -1
- package/dist/{casesRepository-C8KJmlxE.d.cts → casesRepository.d-DCnix2pT.d.cts} +3 -3
- package/dist/{casesRepository-iAi5qWnx.d.ts → casesRepository.d-DbirgbyH.d.ts} +3 -3
- package/dist/chat/index.cjs +139 -63
- package/dist/chat/index.d.cts +34 -19
- package/dist/chat/index.d.ts +34 -19
- package/dist/chat/index.js +139 -63
- package/dist/client/index.cjs +14 -10
- package/dist/client/index.d.cts +19 -18
- package/dist/client/index.d.ts +19 -18
- package/dist/client/index.js +14 -10
- package/dist/clinicBatch.d-Ccmrngcu.d.cts +71 -0
- package/dist/clinicBatch.d-D9Ci7IpP.d.ts +71 -0
- package/dist/clinicModels.d-BXgKZqDb.d.cts +68 -0
- package/dist/clinicModels.d-CaS64-P-.d.ts +68 -0
- package/dist/clinicRequestProps.d-1dCtouGA.d.cts +65 -0
- package/dist/clinicRequestProps.d-CjsMg_OD.d.ts +65 -0
- package/dist/{config-C9zhanL-.d.cts → config.d-DJ4mvf_w.d.cts} +3 -3
- package/dist/{config-C5iPNKDj.d.ts → config.d-MX7IKP2f.d.ts} +3 -3
- package/dist/consent/index.cjs +4 -1
- package/dist/consent/index.d.cts +10 -10
- package/dist/consent/index.d.ts +10 -10
- package/dist/consent/index.js +4 -1
- package/dist/{context-D_bcpHDA.d.cts → context.d-BdnBe8Oe.d.ts} +15 -15
- package/dist/{context-BUIrC20Z.d.ts → context.d-C6MJsMpN.d.cts} +15 -15
- package/dist/{copy-KbCU9fen.d.ts → copy.d-BIfQOoDB.d.ts} +6 -6
- package/dist/{copy-BE31T2jR.d.cts → copy.d-C_u7shha.d.cts} +6 -6
- package/dist/core/index.cjs +16 -13
- package/dist/core/index.d.cts +35 -29
- package/dist/core/index.d.ts +35 -29
- package/dist/core/index.js +16 -13
- package/dist/{depth-DDKGfFaB.d.ts → depth.d-COFxYWLU.d.ts} +9 -242
- package/dist/{depth-DNxDieoO.d.cts → depth.d-D2e5WZuE.d.cts} +9 -242
- package/dist/{entitlementRepository-C1_wXIE3.d.cts → entitlementRepository.d-BP15dFbe.d.cts} +10 -5
- package/dist/{entitlementRepository-CYtdIGfH.d.ts → entitlementRepository.d-DLuxnGi5.d.ts} +10 -5
- package/dist/features.d-DrQxTw3-.d.cts +108 -0
- package/dist/features.d-DrQxTw3-.d.ts +108 -0
- package/dist/focus.d-C0Tr0oVJ.d.ts +939 -0
- package/dist/focus.d-jQWp0hdK.d.cts +939 -0
- package/dist/health-plan/index.cjs +384 -0
- package/dist/health-plan/index.d.cts +293 -0
- package/dist/health-plan/index.d.ts +293 -0
- package/dist/health-plan/index.js +384 -0
- package/dist/idempotency.d-DXb1BN2A.d.ts +1055 -0
- package/dist/idempotency.d-HF6fyRt2.d.cts +1055 -0
- package/dist/{identity-gjurBi7m.d.cts → identity.d-BePPZ7Uv.d.ts} +3 -3
- package/dist/{identity-BqeaN8An.d.ts → identity.d-CJfnWOdH.d.cts} +3 -3
- package/dist/index.cjs +148 -72
- package/dist/index.d.cts +32 -29
- package/dist/index.d.ts +32 -29
- package/dist/index.js +148 -72
- package/dist/introEvents.d-BkGDT_kG.d.cts +175 -0
- package/dist/introEvents.d-DHlMvmC7.d.ts +175 -0
- package/dist/introEvents.d-dS3fJCH1.d.cts +5 -0
- package/dist/introEvents.d-dS3fJCH1.d.ts +5 -0
- package/dist/{models-CnXY5LuO.d.ts → models.d-BSqvbTE1.d.cts} +15 -3
- package/dist/{models-A4A5S7AG.d.cts → models.d-DOwnr8fi.d.ts} +15 -3
- package/dist/notifications/index.cjs +4 -1
- package/dist/notifications/index.d.cts +9 -9
- package/dist/notifications/index.d.ts +9 -9
- package/dist/notifications/index.js +4 -1
- package/dist/optInView.d-0iI5JoAf.d.cts +441 -0
- package/dist/optInView.d-s-w4aGN3.d.ts +441 -0
- package/dist/parse.d-COt1qVA6.d.ts +210 -0
- package/dist/parse.d-EmsgOUMQ.d.cts +210 -0
- package/dist/{pets-CfutxNs9.d.cts → pets.d-BFT_b53y.d.ts} +3 -3
- package/dist/{pets-LIGadUtr.d.ts → pets.d-nNAVnw7f.d.cts} +3 -3
- package/dist/{petsRepository-CoRa3C_U.d.ts → petsRepository.d-B2TpRE7r.d.cts} +4 -4
- package/dist/{petsRepository-Cqpd3hLU.d.cts → petsRepository.d-RGwSZcYl.d.ts} +4 -4
- package/dist/photo/index.cjs +5 -2
- package/dist/photo/index.d.cts +9 -9
- package/dist/photo/index.d.ts +9 -9
- package/dist/photo/index.js +5 -2
- package/dist/planSignals.d-BDbp2e-k.d.cts +126 -0
- package/dist/planSignals.d-DSnxKoWe.d.ts +126 -0
- package/dist/{ports-BN6RHF9W.d.cts → ports.d-BX4f4UsB.d.cts} +14 -1
- package/dist/{ports-BN6RHF9W.d.ts → ports.d-BX4f4UsB.d.ts} +14 -1
- package/dist/{ports-CVi3n0re.d.ts → ports.d-D2n4HRUy.d.ts} +16 -10
- package/dist/{ports-gJ3faaWz.d.cts → ports.d-DBA_gsq5.d.cts} +16 -10
- package/dist/presentation.d-vy8kTGfR.d.cts +96 -0
- package/dist/presentation.d-vy8kTGfR.d.ts +96 -0
- package/dist/quickPrompts.d-NM_81Jc1.d.cts +19 -0
- package/dist/quickPrompts.d-NM_81Jc1.d.ts +19 -0
- package/dist/records/depth/index.cjs +10 -7
- package/dist/records/depth/index.d.cts +18 -12
- package/dist/records/depth/index.d.ts +18 -12
- package/dist/records/depth/index.js +10 -7
- package/dist/records/index.cjs +350 -74
- package/dist/records/index.d.cts +225 -21
- package/dist/records/index.d.ts +225 -21
- package/dist/records/index.js +351 -75
- package/dist/recordsAsk.d-C5CGSi3j.d.cts +14 -0
- package/dist/recordsAsk.d-C5CGSi3j.d.ts +14 -0
- package/dist/{requestFunnel-BYzlyaC0.d.ts → requestFunnel.d-D9edIEjZ.d.ts} +5 -5
- package/dist/{requestFunnel-DLZpiFD3.d.cts → requestFunnel.d-RZex94XX.d.cts} +5 -5
- package/dist/{resolve-D4Ywz5OS.d.ts → resolve.d-CoQWUy1Y.d.cts} +2 -2
- package/dist/{resolve-D4Ywz5OS.d.cts → resolve.d-CoQWUy1Y.d.ts} +2 -2
- package/dist/{runtimeTypes-BxxCKMn8.d.cts → runtimeTypes.d-BYq38b17.d.ts} +20 -13
- package/dist/{runtimeTypes-Doa_xxSa.d.ts → runtimeTypes.d-LkwZaF7z.d.cts} +20 -13
- package/dist/screenProps.d-BVzRzowC.d.ts +159 -0
- package/dist/screenProps.d-CQ0qZJkr.d.cts +159 -0
- package/dist/server/events/index.cjs +6 -3
- package/dist/server/events/index.d.cts +51 -9
- package/dist/server/events/index.d.ts +51 -9
- package/dist/server/events/index.js +6 -3
- package/dist/server/index.cjs +11 -6
- package/dist/server/index.d.cts +152 -8
- package/dist/server/index.d.ts +152 -8
- package/dist/server/index.js +11 -6
- package/dist/sheetCopy.d-CAhLOxjc.d.cts +4 -0
- package/dist/sheetCopy.d-CAhLOxjc.d.ts +4 -0
- package/dist/sheetSeam.d-B09jf4YC.d.ts +49 -0
- package/dist/sheetSeam.d-BBuEIVsa.d.cts +49 -0
- package/dist/shop/index.cjs +428 -0
- package/dist/shop/index.d.cts +211 -0
- package/dist/shop/index.d.ts +211 -0
- package/dist/shop/index.js +428 -0
- package/dist/tabs/index.cjs +195 -0
- package/dist/tabs/index.d.cts +174 -0
- package/dist/tabs/index.d.ts +174 -0
- package/dist/tabs/index.js +195 -0
- package/dist/tabsModel.d-BfIQg6yS.d.cts +31 -0
- package/dist/tabsModel.d-BfIQg6yS.d.ts +31 -0
- package/dist/televet/booking/index.cjs +15 -12
- package/dist/televet/booking/index.d.cts +36 -22
- package/dist/televet/booking/index.d.ts +36 -22
- package/dist/televet/booking/index.js +15 -12
- package/dist/televet/call/index.d.cts +5 -5
- package/dist/televet/call/index.d.ts +5 -5
- package/dist/televet/index.cjs +6 -3
- package/dist/televet/index.d.cts +12 -12
- package/dist/televet/index.d.ts +12 -12
- package/dist/televet/index.js +6 -3
- package/dist/{televetGlobal-C5dTUACe.d.cts → televetGlobal.d-CC-DrqkQ.d.ts} +7 -2
- package/dist/{televetGlobal-CnjrfhT4.d.ts → televetGlobal.d-CKwDCbmN.d.cts} +7 -2
- package/dist/testing/index.cjs +6 -3
- package/dist/testing/index.d.cts +3 -3
- package/dist/testing/index.d.ts +3 -3
- package/dist/testing/index.js +6 -3
- package/dist/testing/rn/index.cjs +5 -2
- package/dist/testing/rn/index.d.cts +23 -22
- package/dist/testing/rn/index.d.ts +23 -22
- package/dist/testing/rn/index.js +5 -2
- package/dist/testing/web/index.cjs +4 -1
- package/dist/testing/web/index.d.cts +23 -22
- package/dist/testing/web/index.d.ts +23 -22
- package/dist/testing/web/index.js +4 -1
- package/dist/texting/index.cjs +193 -0
- package/dist/texting/index.d.cts +69 -0
- package/dist/texting/index.d.ts +69 -0
- package/dist/texting/index.js +193 -0
- package/dist/threadOptions.d-9r4Csa7k.d.cts +458 -0
- package/dist/threadOptions.d-B6GA09aM.d.ts +458 -0
- package/dist/{timelineRows-Beun96e2.d.cts → timelineRows.d-Bes8ip2v.d.ts} +1 -1
- package/dist/{timelineRows-CGOlC_Q9.d.ts → timelineRows.d-BvM2A7_G.d.cts} +1 -1
- package/dist/{tokens-DLj8OnLH.d.cts → tokens.d-DarDaV39.d.cts} +10 -2
- package/dist/{tokens-DLj8OnLH.d.ts → tokens.d-DarDaV39.d.ts} +10 -2
- package/dist/{typeStyle-DJedEu14.d.cts → typeStyle.d-Co5KF0up.d.ts} +2 -2
- package/dist/{typeStyle-BxVyF71R.d.ts → typeStyle.d-xIZj02Ru.d.cts} +2 -2
- package/dist/{uploadTransport-C6kGP1Kd.d.ts → uploadTransport.d-CWL7CdWP.d.cts} +1 -1
- package/dist/{uploadTransport-BM_pnEWj.d.cts → uploadTransport.d-EGoUl7gX.d.ts} +1 -1
- package/dist/useIntroSeen.d-CTWFUthO.d.cts +35 -0
- package/dist/useIntroSeen.d-CTWFUthO.d.ts +35 -0
- package/dist/usePresentation.d-BGz32Vlm.d.ts +285 -0
- package/dist/usePresentation.d-DYTF_ZGf.d.cts +285 -0
- package/dist/useRecords.d-BYNX01El.d.cts +121 -0
- package/dist/useRecords.d-DWk61a4c.d.ts +121 -0
- package/dist/useRecordsDepth.d--LLA_4ga.d.cts +32 -0
- package/dist/useRecordsDepth.d-BQRL0Hez.d.ts +32 -0
- package/dist/{useVetVisit-DmWa7lt1.d.ts → useVetVisit.d-BtdwhmgD.d.cts} +15 -4
- package/dist/{useVetVisit-PtBjNwZr.d.cts → useVetVisit.d-DoYQimyt.d.ts} +15 -4
- package/dist/video/index.cjs +5 -2
- package/dist/video/index.d.cts +7 -7
- package/dist/video/index.d.ts +7 -7
- package/dist/video/index.js +5 -2
- package/dist/{view-VvLEdXP4.d.cts → view.d-0yBjLTV3.d.cts} +12 -122
- package/dist/{view-C_B5U04g.d.ts → view.d-DqbCADFa.d.ts} +12 -122
- package/dist/web/consent/index.cjs +4 -1
- package/dist/web/consent/index.d.cts +10 -10
- package/dist/web/consent/index.d.ts +10 -10
- package/dist/web/consent/index.js +4 -1
- package/dist/web/health-plan/index.cjs +421 -0
- package/dist/web/health-plan/index.d.cts +189 -0
- package/dist/web/health-plan/index.d.ts +189 -0
- package/dist/web/health-plan/index.js +421 -0
- package/dist/web/index.cjs +170 -87
- package/dist/web/index.d.cts +292 -38
- package/dist/web/index.d.ts +292 -38
- package/dist/web/index.js +170 -87
- package/dist/web/intro/index.cjs +167 -0
- package/dist/web/intro/index.d.cts +79 -0
- package/dist/web/intro/index.d.ts +79 -0
- package/dist/web/intro/index.js +167 -0
- package/dist/web/notifications/index.cjs +15 -3
- package/dist/web/notifications/index.d.cts +39 -209
- package/dist/web/notifications/index.d.ts +39 -209
- package/dist/web/notifications/index.js +15 -3
- package/dist/web/records/depth/index.cjs +10 -7
- package/dist/web/records/depth/index.d.cts +18 -12
- package/dist/web/records/depth/index.d.ts +18 -12
- package/dist/web/records/depth/index.js +10 -7
- package/dist/web/records/index.cjs +94 -68
- package/dist/web/records/index.d.cts +39 -55
- package/dist/web/records/index.d.ts +39 -55
- package/dist/web/records/index.js +94 -68
- package/dist/web/records/upload/index.d.cts +2 -2
- package/dist/web/records/upload/index.d.ts +2 -2
- package/dist/web/records-sheet/index.cjs +332 -0
- package/dist/web/records-sheet/index.d.cts +104 -0
- package/dist/web/records-sheet/index.d.ts +104 -0
- package/dist/web/records-sheet/index.js +332 -0
- package/dist/web/shop/index.cjs +416 -0
- package/dist/web/shop/index.d.cts +59 -0
- package/dist/web/shop/index.d.ts +59 -0
- package/dist/web/shop/index.js +416 -0
- package/dist/web/televet/booking/index.cjs +15 -12
- package/dist/web/televet/booking/index.d.cts +37 -23
- package/dist/web/televet/booking/index.d.ts +37 -23
- package/dist/web/televet/booking/index.js +15 -12
- package/dist/web/televet/call/index.d.cts +4 -4
- package/dist/web/televet/call/index.d.ts +4 -4
- package/dist/web/televet/index.cjs +6 -3
- package/dist/web/televet/index.d.cts +12 -12
- package/dist/web/televet/index.d.ts +12 -12
- package/dist/web/televet/index.js +6 -3
- package/dist/web/texting/index.cjs +188 -0
- package/dist/web/texting/index.d.cts +69 -0
- package/dist/web/texting/index.d.ts +69 -0
- package/dist/web/texting/index.js +188 -0
- package/health-plan/package.json +8 -0
- package/package.json +138 -5
- package/shop/package.json +8 -0
- package/tabs/package.json +8 -0
- package/texting/package.json +8 -0
- package/web/health-plan/native-blocked.cjs +12 -0
- package/web/health-plan/package.json +8 -0
- package/web/intro/native-blocked.cjs +12 -0
- package/web/intro/package.json +8 -0
- package/web/records-sheet/native-blocked.cjs +12 -0
- package/web/records-sheet/package.json +8 -0
- package/web/shop/native-blocked.cjs +12 -0
- package/web/shop/package.json +8 -0
- package/web/texting/native-blocked.cjs +12 -0
- package/web/texting/package.json +8 -0
- package/dist/useRecordsDepth-DRrJntjt.d.cts +0 -257
- package/dist/useRecordsDepth-hR94debv.d.ts +0 -257
- /package/dist/{CameraPort-Cv31Pz7g.d.cts → CameraPort.d-Cv31Pz7g.d.cts} +0 -0
- /package/dist/{CameraPort-Cv31Pz7g.d.ts → CameraPort.d-Cv31Pz7g.d.ts} +0 -0
- /package/dist/{TelemetryPort-BDNr00hu.d.cts → TelemetryPort.d-BDNr00hu.d.cts} +0 -0
- /package/dist/{TelemetryPort-BDNr00hu.d.ts → TelemetryPort.d-BDNr00hu.d.ts} +0 -0
- /package/dist/{cacheEpoch-DknKn3S0.d.cts → cacheEpoch.d-DknKn3S0.d.cts} +0 -0
- /package/dist/{cacheEpoch-DknKn3S0.d.ts → cacheEpoch.d-DknKn3S0.d.ts} +0 -0
- /package/dist/{callCopy-Bw6oZT54.d.cts → callCopy.d-Bw6oZT54.d.cts} +0 -0
- /package/dist/{callCopy-Bw6oZT54.d.ts → callCopy.d-Bw6oZT54.d.ts} +0 -0
- /package/dist/{ids-B2GAAifq.d.cts → ids.d-B2GAAifq.d.cts} +0 -0
- /package/dist/{ids-B2GAAifq.d.ts → ids.d-B2GAAifq.d.ts} +0 -0
- /package/dist/{optionalModule-DbJmsq5f.d.cts → optionalModule.d-DbJmsq5f.d.cts} +0 -0
- /package/dist/{optionalModule-DbJmsq5f.d.ts → optionalModule.d-DbJmsq5f.d.ts} +0 -0
- /package/dist/{profile-CSs1wlXT.d.cts → profile.d-CSs1wlXT.d.cts} +0 -0
- /package/dist/{profile-CSs1wlXT.d.ts → profile.d-CSs1wlXT.d.ts} +0 -0
- /package/dist/{projection-CeIUsbSk.d.cts → projection.d-CeIUsbSk.d.cts} +0 -0
- /package/dist/{projection-CeIUsbSk.d.ts → projection.d-CeIUsbSk.d.ts} +0 -0
- /package/dist/{species-BXAIMh7I.d.cts → species.d-BXAIMh7I.d.cts} +0 -0
- /package/dist/{species-BXAIMh7I.d.ts → species.d-BXAIMh7I.d.ts} +0 -0
- /package/dist/{visitIntent-D7_yVp1I.d.cts → visitIntent.d-D7_yVp1I.d.cts} +0 -0
- /package/dist/{visitIntent-D7_yVp1I.d.ts → visitIntent.d-D7_yVp1I.d.ts} +0 -0
|
@@ -0,0 +1,939 @@
|
|
|
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, U as UserRef } from './ids.d-B2GAAifq.js';
|
|
4
|
+
import { R as RequestFunnel } from './requestFunnel.d-D9edIEjZ.js';
|
|
5
|
+
import { A as AuthContext } from './identity.d-BePPZ7Uv.js';
|
|
6
|
+
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
7
|
+
|
|
8
|
+
/** Where a reason comes from. An unknown kind reads as `profile` (a fact about the pet). */
|
|
9
|
+
declare const HEALTH_PLAN_REASON_KINDS: readonly ["dna", "records", "inside", "profile"];
|
|
10
|
+
type HealthPlanReasonKind = (typeof HEALTH_PLAN_REASON_KINDS)[number];
|
|
11
|
+
interface HealthPlanReason {
|
|
12
|
+
readonly kind: HealthPlanReasonKind;
|
|
13
|
+
/** The partner's catalog text or an Everfur fact, verbatim. */
|
|
14
|
+
readonly text: string;
|
|
15
|
+
}
|
|
16
|
+
/** One product in a pet's plan. */
|
|
17
|
+
interface HealthPlanItem {
|
|
18
|
+
readonly productId: string;
|
|
19
|
+
/** The partner's own SKU: what `onCheckout` hands back so the partner's cart can find it. */
|
|
20
|
+
readonly partnerSku: string | null;
|
|
21
|
+
readonly title: string;
|
|
22
|
+
readonly description: string | null;
|
|
23
|
+
/** The partner's catalog category (`Supplement`), up to 60 characters, or null. */
|
|
24
|
+
readonly category: string | null;
|
|
25
|
+
/** The price as a number in `currency` units, or null when the catalog carries none. */
|
|
26
|
+
readonly price: number | null;
|
|
27
|
+
/** ISO 4217 (`USD`), or null. */
|
|
28
|
+
readonly currency: string | null;
|
|
29
|
+
/** https only; anything else is dropped. */
|
|
30
|
+
readonly imageUrl: string | null;
|
|
31
|
+
/** The partner's product page, https only, or null. */
|
|
32
|
+
readonly url: string | null;
|
|
33
|
+
readonly reasons: readonly HealthPlanReason[];
|
|
34
|
+
/** Whether the member has this item in the plan. */
|
|
35
|
+
readonly inPlan: boolean;
|
|
36
|
+
/** A demo product, labelled as a sample wherever it is drawn. */
|
|
37
|
+
readonly sample: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface HealthPlan {
|
|
40
|
+
readonly petRef: PetRef;
|
|
41
|
+
/** The plan title the tenant's template rendered for this pet, or null. */
|
|
42
|
+
readonly headline: string | null;
|
|
43
|
+
readonly items: readonly HealthPlanItem[];
|
|
44
|
+
/** ISO 8601, or null. */
|
|
45
|
+
readonly updatedAt: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Wire `tracking_texts_enabled`: Everfur texts the owner when the partner sets tracking. Absent on the wire reads as
|
|
48
|
+
* false. Optional here so a host's own plan objects keep compiling.
|
|
49
|
+
*/
|
|
50
|
+
readonly trackingTextsEnabled?: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface HealthPlanRepository {
|
|
53
|
+
/** `GET /widget/v1/pets/{pet_ref}/plan`. Settles; never throws. */
|
|
54
|
+
read(petRef: PetRef, opts?: {
|
|
55
|
+
readonly signal?: AbortSignal;
|
|
56
|
+
}): Promise<EverfurResult<HealthPlan>>;
|
|
57
|
+
/** `PUT .../plan/items/{product_id}`. Settles the plan the server returned, or null for an empty answer. */
|
|
58
|
+
addItem(petRef: PetRef, productId: string): Promise<EverfurResult<HealthPlan | null>>;
|
|
59
|
+
/** `DELETE .../plan/items/{product_id}`. Settles the plan the server returned, or null for an empty answer. */
|
|
60
|
+
removeItem(petRef: PetRef, productId: string): Promise<EverfurResult<HealthPlan | null>>;
|
|
61
|
+
}
|
|
62
|
+
/** The part of the runtime this repository needs (`useEverfurContext().runtime` satisfies it). */
|
|
63
|
+
interface HealthPlanRuntime {
|
|
64
|
+
readonly isDisposed: boolean;
|
|
65
|
+
readonly registry: {
|
|
66
|
+
readonly services: {
|
|
67
|
+
authFor(userRef: UserRef | null): AuthContext;
|
|
68
|
+
readonly errorPolicy: ErrorPolicyPort | undefined;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
interface HealthPlanRepositoryDeps {
|
|
73
|
+
readonly auth: AuthContext;
|
|
74
|
+
readonly errorPolicy?: ErrorPolicyPort;
|
|
75
|
+
readonly funnel?: RequestFunnel;
|
|
76
|
+
}
|
|
77
|
+
/** The allowlist mapper for one plan body. `items` must be a list; a row that is not an item is dropped. */
|
|
78
|
+
declare function healthPlanFromWire(raw: unknown, petRef: PetRef): HealthPlan | null;
|
|
79
|
+
/** The repository over the runtime under your provider. Auth is read at CALL time; a disposed runtime sends nothing. */
|
|
80
|
+
declare function createHealthPlanRepository(runtime: HealthPlanRuntime): HealthPlanRepository;
|
|
81
|
+
/** The same repository over one auth context (or an injected funnel). Internal seam, for deterministic tests. */
|
|
82
|
+
declare function createHealthPlanRepositoryOver(deps: HealthPlanRepositoryDeps): HealthPlanRepository;
|
|
83
|
+
|
|
84
|
+
/** The icons the layout draws. `renderIcon` lets the host draw its own; the SDK has a plain default for each. */
|
|
85
|
+
type HealthPlanFocusIcon = 'shield' | 'arrow' | 'check' | 'star' | 'truck' | 'refresh' | 'card' | 'alert' | 'x' | 'chat' | 'repeat' | 'calendar' | 'flame' | 'box' | 'cart' | 'minus' | 'plus' | 'chev' | 'pulse' | 'file' | 'kit' | 'dna' | 'heart' | 'bottle' | 'harness' | 'ramp';
|
|
86
|
+
/** One free tip of the routine. Tips are numbered in order and never checked off. */
|
|
87
|
+
interface HealthPlanFocusStep {
|
|
88
|
+
readonly title: string;
|
|
89
|
+
readonly body?: string;
|
|
90
|
+
/** Where the tip comes from ("From her vet records"). */
|
|
91
|
+
readonly source?: string;
|
|
92
|
+
/** The card's tint, a `tip:<tone>` class for a host that styles parts (Raph v3 draws the tips as tinted cards). */
|
|
93
|
+
readonly tone?: 'y' | 'c' | 'g' | 'r';
|
|
94
|
+
/** The icon beside the tip's number. */
|
|
95
|
+
readonly icon?: HealthPlanFocusIcon;
|
|
96
|
+
/**
|
|
97
|
+
* The vet's own tip: its source line names the vet from the page's one vet setting (`byline.shortName`, "From
|
|
98
|
+
* {shortName}") in place of `source`, and is not drawn when the setting has no short name. A vet's name is never
|
|
99
|
+
* typed into a tip.
|
|
100
|
+
*/
|
|
101
|
+
readonly fromVet?: boolean;
|
|
102
|
+
}
|
|
103
|
+
/** One review of the product, word for word from the partner's store. */
|
|
104
|
+
interface HealthPlanFocusReview {
|
|
105
|
+
/** Whole stars, 1..5. */
|
|
106
|
+
readonly stars: number;
|
|
107
|
+
readonly text: string;
|
|
108
|
+
/** Who wrote it ("Robin"). */
|
|
109
|
+
readonly by: string;
|
|
110
|
+
}
|
|
111
|
+
/** Another offer of the partner's, after the plan ("Another dog at home?"). The words and prices are the host's. */
|
|
112
|
+
interface HealthPlanFocusExtra {
|
|
113
|
+
/** Your id for it, handed back to `onExtra`. */
|
|
114
|
+
readonly key: string;
|
|
115
|
+
readonly title: string;
|
|
116
|
+
readonly body?: string;
|
|
117
|
+
/** The price as you show it ("$75") and, struck, the usual price ("$139"). */
|
|
118
|
+
readonly price?: string;
|
|
119
|
+
readonly was?: string;
|
|
120
|
+
/** A small tag beside the price ("Illustrative"). */
|
|
121
|
+
readonly tag?: string;
|
|
122
|
+
/** https or a same-origin path; drawn in place of `icon`. */
|
|
123
|
+
readonly imageUrl?: string;
|
|
124
|
+
readonly icon?: HealthPlanFocusIcon;
|
|
125
|
+
/** A modifier kind for the row (`extra:<kind>`) and for its title (`extraTitle:<kind>`). */
|
|
126
|
+
readonly kind?: string;
|
|
127
|
+
/** The button's words before ("Add a kit") and after ("Added to cart") it is pressed. */
|
|
128
|
+
readonly action: string;
|
|
129
|
+
readonly added: string;
|
|
130
|
+
/**
|
|
131
|
+
* The Everfur product this offer is, when it is one of the pet's plan items. With the shop on (`shop: true`), its
|
|
132
|
+
* button puts that item in the cart (and reads "View cart" once it is in). Without one, the button is `onExtra`'s.
|
|
133
|
+
*/
|
|
134
|
+
readonly productId?: string;
|
|
135
|
+
/** True when the member already ordered it: an item she owns is not offered again (Raph round 5, step 3). */
|
|
136
|
+
readonly owned?: boolean;
|
|
137
|
+
}
|
|
138
|
+
/** One step of a tracker (an order's, a test kit's). The words and dates are the host's or the server's. */
|
|
139
|
+
interface HealthPlanTrackStep {
|
|
140
|
+
readonly title: string;
|
|
141
|
+
/** The line under it: a date, or "Expected Dec 8". */
|
|
142
|
+
readonly detail?: string;
|
|
143
|
+
/** `done` draws the check, `now` the current step; anything else is still ahead. */
|
|
144
|
+
readonly state?: 'done' | 'now' | 'next';
|
|
145
|
+
/** A tag after the line (a demo marks a made-up date "Illustrative"). */
|
|
146
|
+
readonly tag?: string;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* What the page says while the pet's plan cannot be made yet (the partner's test results are not back yet). With it, the page
|
|
150
|
+
* draws its title, this card and the partner's other offers only: no focus, routine, pick or signs. The words and the
|
|
151
|
+
* kit's tracker are the partner's (Everfur does not know where a kit is).
|
|
152
|
+
*/
|
|
153
|
+
interface HealthPlanFocusWait {
|
|
154
|
+
readonly kicker: string;
|
|
155
|
+
readonly title: string;
|
|
156
|
+
readonly icon?: HealthPlanFocusIcon;
|
|
157
|
+
readonly track?: readonly HealthPlanTrackStep[];
|
|
158
|
+
/** The heading over the rows ("What her plan will hold"). */
|
|
159
|
+
readonly heading?: string;
|
|
160
|
+
/**
|
|
161
|
+
* A row with `fromVet` names the vet from the page's one vet setting ("Free tips from {byline.name}, built around
|
|
162
|
+
* that risk") in place of `text`, and is not drawn without a byline.
|
|
163
|
+
*/
|
|
164
|
+
readonly rows?: readonly {
|
|
165
|
+
readonly icon: HealthPlanFocusIcon;
|
|
166
|
+
readonly label: string;
|
|
167
|
+
readonly text: string;
|
|
168
|
+
readonly fromVet?: boolean;
|
|
169
|
+
}[];
|
|
170
|
+
/** The line with the chat icon under the rows ("We'll text you when it's ready."). */
|
|
171
|
+
readonly note?: string;
|
|
172
|
+
/** The button under it; drawn only with `onWaitAction`. */
|
|
173
|
+
readonly action?: string;
|
|
174
|
+
}
|
|
175
|
+
interface HealthPlanFocusReasonRow {
|
|
176
|
+
/** The chip word ("Record", "Ask"). */
|
|
177
|
+
readonly chip: string;
|
|
178
|
+
/** A modifier kind for the chip class (`chip:<kind>`). */
|
|
179
|
+
readonly kind?: string;
|
|
180
|
+
readonly title: string;
|
|
181
|
+
readonly body?: string;
|
|
182
|
+
}
|
|
183
|
+
interface HealthPlanFocusSign {
|
|
184
|
+
readonly title: string;
|
|
185
|
+
readonly body: string;
|
|
186
|
+
/** An emergency sign: drawn with the alert icon and the `sign:urgent` modifier. */
|
|
187
|
+
readonly urgent?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* The sign that sends her to her vet ("Call her vet today"). Its title follows what the SDK knows of her vet: with
|
|
190
|
+
* her vet records, `title`; without them, `copy.callYourVet`; with no vet yet, `copy.callAVet` (Raph round 5).
|
|
191
|
+
*/
|
|
192
|
+
readonly callVet?: boolean;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Everything the focus layout says about the pet. Every string is the host's (or the backend page's), drawn verbatim.
|
|
196
|
+
* `focus`, `routine` and `signs` are optional: a section that is absent is not drawn.
|
|
197
|
+
*/
|
|
198
|
+
interface HealthPlanFocusDesign {
|
|
199
|
+
readonly eyebrow?: string;
|
|
200
|
+
readonly title: string;
|
|
201
|
+
readonly subtitle?: string;
|
|
202
|
+
/** https or a same-origin path; the pet's photo beside the title. */
|
|
203
|
+
readonly headImageUrl?: string;
|
|
204
|
+
/**
|
|
205
|
+
* THE VET, ONE SETTING (Raph round 5, `VET`). Every vet mention on the page reads it: the byline ("Built with
|
|
206
|
+
* {name}"), the vet's note (photo and short name), the vet's tips (`fromVet`, "From {shortName}") and the waiting
|
|
207
|
+
* card's tips row. Absent, every vet mention hides. On Everfur's plan page it is drawn only when the page is vet
|
|
208
|
+
* reviewed (Q2). `name` is the vet's own full name, as the vet is credited: the SDK says "Built with" itself. `role`
|
|
209
|
+
* is the line under it (credentials and title). `shortName` is the short form the vet goes by on the page; absent,
|
|
210
|
+
* the short-form mentions hide (the SDK never derives one from `name`).
|
|
211
|
+
*/
|
|
212
|
+
readonly byline?: {
|
|
213
|
+
readonly name: string;
|
|
214
|
+
readonly role?: string;
|
|
215
|
+
readonly imageUrl?: string;
|
|
216
|
+
readonly shortName?: string;
|
|
217
|
+
};
|
|
218
|
+
readonly focus?: {
|
|
219
|
+
readonly kicker: string;
|
|
220
|
+
readonly sources?: readonly {
|
|
221
|
+
readonly label: string;
|
|
222
|
+
readonly kind?: string;
|
|
223
|
+
}[];
|
|
224
|
+
readonly title: string;
|
|
225
|
+
/** The risk line: a bold lead and the rest of the sentence. `kind` picks the dot modifier. */
|
|
226
|
+
readonly risk?: {
|
|
227
|
+
readonly lead: string;
|
|
228
|
+
readonly body?: string;
|
|
229
|
+
readonly kind?: string;
|
|
230
|
+
};
|
|
231
|
+
readonly odds?: {
|
|
232
|
+
readonly label: string;
|
|
233
|
+
readonly tag?: string;
|
|
234
|
+
readonly from: string;
|
|
235
|
+
readonly to: string;
|
|
236
|
+
readonly toLabel?: string;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* The vet's note. Drawn only with a `byline` (the vet, one setting): the vet's photo and short name come from the
|
|
240
|
+
* byline, never from here. `kicker` and `imageUrl` are kept for older hosts and no longer drawn.
|
|
241
|
+
*/
|
|
242
|
+
readonly quote?: {
|
|
243
|
+
/** @deprecated Not drawn: the note names the vet from `byline.shortName`. */
|
|
244
|
+
readonly kicker?: string;
|
|
245
|
+
readonly tag?: string;
|
|
246
|
+
readonly text: string;
|
|
247
|
+
/** @deprecated Not drawn: the note's photo is `byline.imageUrl`. */
|
|
248
|
+
readonly imageUrl?: string;
|
|
249
|
+
};
|
|
250
|
+
/** The strip that jumps to the product. Its kicker is `copy.jumpKicker`. */
|
|
251
|
+
readonly jump?: {
|
|
252
|
+
readonly title: string;
|
|
253
|
+
readonly go: string;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
readonly routine?: {
|
|
257
|
+
readonly title: string;
|
|
258
|
+
/** The line beside the title ("5 free tips"). */
|
|
259
|
+
readonly label?: string;
|
|
260
|
+
readonly steps: readonly HealthPlanFocusStep[];
|
|
261
|
+
};
|
|
262
|
+
readonly pick: {
|
|
263
|
+
readonly title: string;
|
|
264
|
+
/**
|
|
265
|
+
* True when no product fits her risk (Raph round 5, step 2 "No"): part 2 and the jump strip are not drawn, and
|
|
266
|
+
* `copy.noPick` takes their place ("No supplement for this one. Her vet comes first."). The rest of `pick` is not
|
|
267
|
+
* read. The page's plan item, if any, is not offered.
|
|
268
|
+
*/
|
|
269
|
+
readonly none?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* The plan item to recommend: the item with this Everfur product id, else the item with `partnerSku` (your own
|
|
272
|
+
* catalog id, the same in every environment). Neither found or given: the plan's first item.
|
|
273
|
+
*/
|
|
274
|
+
readonly productId?: string;
|
|
275
|
+
readonly partnerSku?: string;
|
|
276
|
+
/** The rating as the partner shows it ("4.4") and its label ("· 92 reviews"). */
|
|
277
|
+
readonly rating?: {
|
|
278
|
+
readonly value: string;
|
|
279
|
+
readonly label?: string;
|
|
280
|
+
};
|
|
281
|
+
/** One line under the product name. Defaults to the catalog description. */
|
|
282
|
+
readonly line?: string;
|
|
283
|
+
/** Real reviews under the stars, word for word from your store. `label` names where they come from. */
|
|
284
|
+
readonly reviews?: {
|
|
285
|
+
readonly label: string;
|
|
286
|
+
readonly items: readonly HealthPlanFocusReview[];
|
|
287
|
+
};
|
|
288
|
+
/** The line under the product in the checkout and manage sheets ("For her back · 1 chew a day"). Defaults to `line`. */
|
|
289
|
+
readonly checkoutLine?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Why it fits, one row per real signal. With `score`, the count line under them is drawn, counted from the rows
|
|
292
|
+
* (`copy.signalsFit`, "2 of 2 signals fit Georgia", "2/2"), never from `score`'s own words, and hidden with fewer
|
|
293
|
+
* than two rows (Raph round 5, step 3).
|
|
294
|
+
*/
|
|
295
|
+
readonly why?: {
|
|
296
|
+
readonly title: string;
|
|
297
|
+
readonly rows: readonly HealthPlanFocusReasonRow[];
|
|
298
|
+
readonly score?: {
|
|
299
|
+
readonly text: string;
|
|
300
|
+
readonly value: string;
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Sized for her. A stat's `kind` names what it is; the daily dose (`dose`, "1" "chew a day") also fills the three
|
|
305
|
+
* blanks' dose row. With no stat marked `dose`, the first stat is the daily dose (Everfur's plan page sends the
|
|
306
|
+
* daily dose first, then the days a box).
|
|
307
|
+
*/
|
|
308
|
+
readonly dose?: {
|
|
309
|
+
readonly title: string;
|
|
310
|
+
readonly stats: readonly {
|
|
311
|
+
readonly value: string;
|
|
312
|
+
readonly label: string;
|
|
313
|
+
readonly kind?: 'weight' | 'dose' | 'days';
|
|
314
|
+
}[];
|
|
315
|
+
readonly note?: string;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* The daily dose's unit ("chew a day") when her weight is not known yet, so `dose` is not sized. The three blanks
|
|
319
|
+
* keep their dose row with this label and an empty blank until her records give a weight.
|
|
320
|
+
*/
|
|
321
|
+
readonly doseLabel?: string;
|
|
322
|
+
readonly ingredients?: {
|
|
323
|
+
readonly label?: string;
|
|
324
|
+
readonly items: readonly string[];
|
|
325
|
+
};
|
|
326
|
+
/** A line under the buy button with the flame icon, on a true number of the partner's ("Built on <a count your data backs>"). Hidden once subscribed. */
|
|
327
|
+
readonly proof?: string;
|
|
328
|
+
readonly trust?: readonly {
|
|
329
|
+
readonly icon: HealthPlanFocusIcon;
|
|
330
|
+
readonly label: string;
|
|
331
|
+
}[];
|
|
332
|
+
/** The "Why this product?" link. Drawn only with `onMore`. */
|
|
333
|
+
readonly more?: string;
|
|
334
|
+
readonly fine?: string;
|
|
335
|
+
/** The check-in question the started screen names ("how's she moving?"). */
|
|
336
|
+
readonly checkin?: string;
|
|
337
|
+
};
|
|
338
|
+
readonly signs?: {
|
|
339
|
+
readonly title: string;
|
|
340
|
+
readonly items: readonly HealthPlanFocusSign[];
|
|
341
|
+
};
|
|
342
|
+
/** What to ask at the checkup. With `signs` it sits in the signs section under its own kicker; alone, it is a section. */
|
|
343
|
+
readonly checkup?: {
|
|
344
|
+
readonly title: string;
|
|
345
|
+
readonly questions: readonly string[];
|
|
346
|
+
readonly add: string;
|
|
347
|
+
readonly added: string;
|
|
348
|
+
};
|
|
349
|
+
/** The partner's other offers, last ("More from <your brand>"). Drawn only with `onExtra`. */
|
|
350
|
+
readonly extras?: {
|
|
351
|
+
readonly title: string;
|
|
352
|
+
readonly items: readonly HealthPlanFocusExtra[];
|
|
353
|
+
};
|
|
354
|
+
readonly fine?: string;
|
|
355
|
+
/** Checkout rows ("Ships to" / "Home, on file with <your brand>"). The partner knows these; Everfur does not. */
|
|
356
|
+
readonly checkoutRows?: readonly {
|
|
357
|
+
readonly icon: HealthPlanFocusIcon;
|
|
358
|
+
readonly label: string;
|
|
359
|
+
readonly value: string;
|
|
360
|
+
}[];
|
|
361
|
+
/** The plan cannot be made yet: draw this card in place of the plan (see `HealthPlanFocusWait`). */
|
|
362
|
+
readonly wait?: HealthPlanFocusWait;
|
|
363
|
+
readonly copy?: Partial<HealthPlanFocusCopy>;
|
|
364
|
+
}
|
|
365
|
+
/** Facts the copy functions receive, all formatted from the server's answers. */
|
|
366
|
+
interface HealthPlanFocusPrices {
|
|
367
|
+
readonly petName: string | null;
|
|
368
|
+
readonly productName: string;
|
|
369
|
+
/** The first box as the member reads it (`$23.99`), or the box price when no offer applies. */
|
|
370
|
+
readonly first: string | null;
|
|
371
|
+
/** The regular box price (`$29.99`). */
|
|
372
|
+
readonly box: string | null;
|
|
373
|
+
/** One box, no renewal (`$28.49`), or the box price when there is no one-box discount. */
|
|
374
|
+
readonly once: string | null;
|
|
375
|
+
/** The one-box discount, 0 when none. */
|
|
376
|
+
readonly onceDiscountPercent: number;
|
|
377
|
+
readonly intervalDays: number;
|
|
378
|
+
readonly discountPercent: number;
|
|
379
|
+
readonly offer: boolean;
|
|
380
|
+
}
|
|
381
|
+
/** The words the SDK says about buying. Defaults: Raph's v3 design, 2026-10-16. */
|
|
382
|
+
interface HealthPlanFocusCopy {
|
|
383
|
+
readonly jumpKicker: (p: HealthPlanFocusPrices, subscribed: boolean) => string;
|
|
384
|
+
readonly optionsLabel: string;
|
|
385
|
+
readonly subscribe: string;
|
|
386
|
+
readonly bestValue: string;
|
|
387
|
+
readonly subscribeLine: (p: HealthPlanFocusPrices) => string;
|
|
388
|
+
readonly priceLine: (p: HealthPlanFocusPrices) => string;
|
|
389
|
+
readonly once: string;
|
|
390
|
+
readonly onceLine: (p: HealthPlanFocusPrices) => string;
|
|
391
|
+
readonly buyOnce: (p: HealthPlanFocusPrices) => string;
|
|
392
|
+
readonly subscribed: string;
|
|
393
|
+
readonly subscribedLine: (p: HealthPlanFocusPrices, nextBox: string | null) => string;
|
|
394
|
+
readonly manage: string;
|
|
395
|
+
readonly checkoutKicker: string;
|
|
396
|
+
readonly checkoutTitle: (p: HealthPlanFocusPrices) => string;
|
|
397
|
+
readonly checkoutOffer: (p: HealthPlanFocusPrices) => string;
|
|
398
|
+
readonly shipsEvery: string;
|
|
399
|
+
readonly days: (n: number) => string;
|
|
400
|
+
readonly buyOnceOption: string;
|
|
401
|
+
readonly checkoutGo: (p: HealthPlanFocusPrices, subscribe: boolean, today: string) => string;
|
|
402
|
+
readonly renews: (p: HealthPlanFocusPrices) => string;
|
|
403
|
+
readonly onceFine: string;
|
|
404
|
+
/** The checkout's Buy once line under its price. */
|
|
405
|
+
readonly onceOffer: (p: HealthPlanFocusPrices) => string;
|
|
406
|
+
/** Appended to the checkout's fine print (a sandbox says nothing is charged). Empty by default. */
|
|
407
|
+
readonly checkoutNote: string;
|
|
408
|
+
readonly close: string;
|
|
409
|
+
readonly startedTitle: (p: HealthPlanFocusPrices) => string;
|
|
410
|
+
/** The started screen's title after a one-box order. */
|
|
411
|
+
readonly orderedTitle: (p: HealthPlanFocusPrices) => string;
|
|
412
|
+
readonly startedWhat: (p: HealthPlanFocusPrices) => string;
|
|
413
|
+
/** A line under the started title (a sandbox says nothing was charged). Empty by default. */
|
|
414
|
+
readonly startedNote: string;
|
|
415
|
+
readonly startedSteps: string;
|
|
416
|
+
readonly tomorrow: string;
|
|
417
|
+
readonly firstBoxShips: string;
|
|
418
|
+
/**
|
|
419
|
+
* Added after `firstBoxShips` and `placedShips`, and the order screen's `trackingByText` is drawn, only when Everfur
|
|
420
|
+
* texts the tracking number for this partner (the plan page's `tracking_texts_enabled`, or `trackingTexts`).
|
|
421
|
+
*/
|
|
422
|
+
readonly trackingComesByText: string;
|
|
423
|
+
readonly checkin: (question: string | null) => string;
|
|
424
|
+
readonly refill: string;
|
|
425
|
+
readonly nextBoxShips: (p: HealthPlanFocusPrices) => string;
|
|
426
|
+
readonly startedDone: string;
|
|
427
|
+
readonly manageKicker: string;
|
|
428
|
+
readonly manageTitle: (p: HealthPlanFocusPrices) => string;
|
|
429
|
+
readonly skip: string;
|
|
430
|
+
readonly cancel: string;
|
|
431
|
+
readonly skipped: (p: HealthPlanFocusPrices, nextBox: string | null) => string;
|
|
432
|
+
readonly cancelled: (p: HealthPlanFocusPrices) => string;
|
|
433
|
+
readonly orders: string;
|
|
434
|
+
/** The host header's title over each pushed screen (`onOverlayChange` hands it over). */
|
|
435
|
+
readonly startedHeader: string;
|
|
436
|
+
readonly placedHeader: string;
|
|
437
|
+
readonly cartCheckoutTitle: string;
|
|
438
|
+
/** Appended to an Everfur order's fine print (a sandbox says nothing was charged). Empty by default. */
|
|
439
|
+
readonly orderNote: string;
|
|
440
|
+
/** The cart button's label: `count` items in it, 0 when empty. */
|
|
441
|
+
readonly cartLabel: (count: number) => string;
|
|
442
|
+
/** The pick's button with the shop on, at the price of the picked way to buy. */
|
|
443
|
+
readonly addToCart: (price: string) => string;
|
|
444
|
+
readonly viewCart: string;
|
|
445
|
+
/** The toast when the pick goes in the cart. */
|
|
446
|
+
readonly addedToCart: (p: HealthPlanFocusPrices, subscription: boolean) => string;
|
|
447
|
+
readonly removedFromCart: (productName: string) => string;
|
|
448
|
+
readonly cartTitle: string;
|
|
449
|
+
readonly cartEmptyTitle: string;
|
|
450
|
+
readonly cartEmptyBody: (p: HealthPlanFocusPrices) => string;
|
|
451
|
+
readonly seeOrders: string;
|
|
452
|
+
readonly quantityLabel: (productName: string) => string;
|
|
453
|
+
readonly fewer: string;
|
|
454
|
+
readonly more: string;
|
|
455
|
+
readonly remove: string;
|
|
456
|
+
/** Under a subscription line's price. */
|
|
457
|
+
readonly cartSubLine: (p: HealthPlanFocusPrices) => string;
|
|
458
|
+
/** Under a one-box line's price; `subscribed`: the pet's plan already ships this product. */
|
|
459
|
+
readonly cartOnceLine: (p: HealthPlanFocusPrices, subscribed: boolean) => string;
|
|
460
|
+
readonly cartModeLabel: (productName: string) => string;
|
|
461
|
+
readonly cartModeSubscribe: (p: HealthPlanFocusPrices) => string;
|
|
462
|
+
readonly cartModeOnce: (p: HealthPlanFocusPrices) => string;
|
|
463
|
+
readonly subtotal: string;
|
|
464
|
+
readonly shipping: string;
|
|
465
|
+
/** The shipping row's value; empty (the default) leaves the row out, as Everfur's checkout prices no shipping. */
|
|
466
|
+
readonly shippingValue: string;
|
|
467
|
+
/** A tag beside "Shipping" (a demo marks it "Illustrative"). Empty by default. */
|
|
468
|
+
readonly shippingTag: string;
|
|
469
|
+
readonly total: string;
|
|
470
|
+
readonly dueToday: string;
|
|
471
|
+
readonly thenRenews: (p: HealthPlanFocusPrices) => string;
|
|
472
|
+
readonly renewsEvery: (p: HealthPlanFocusPrices) => string;
|
|
473
|
+
readonly checkoutCart: (total: string) => string;
|
|
474
|
+
/**
|
|
475
|
+
* Under the cart's Checkout button when it cannot check out: the cart is off for this partner (the server answered
|
|
476
|
+
* `cart_disabled`), so Everfur's checkout takes one product, one box, per order. Also the toast when that answer
|
|
477
|
+
* comes. Empty by default (copy owed by design): the button is disabled either way, and the toast is the error's
|
|
478
|
+
* own line.
|
|
479
|
+
*/
|
|
480
|
+
readonly cartOneAtATime: string;
|
|
481
|
+
/**
|
|
482
|
+
* In the cart checkout's fine print when the cart holds a subscription and other items: a subscription checks out
|
|
483
|
+
* on its own, so this checkout takes the other items and the subscription stays in the cart. Empty by default (copy
|
|
484
|
+
* owed by design).
|
|
485
|
+
*/
|
|
486
|
+
readonly cartSubscriptionApart: string;
|
|
487
|
+
readonly cartItemSubscription: (p: HealthPlanFocusPrices) => string;
|
|
488
|
+
readonly cartItemQuantity: (quantity: number) => string;
|
|
489
|
+
readonly placeOrder: (total: string, subscribe: boolean) => string;
|
|
490
|
+
/** The cart checkout's fine print; `p` is the subscription line's, or null with none. */
|
|
491
|
+
readonly cartFine: (p: HealthPlanFocusPrices | null) => string;
|
|
492
|
+
readonly placedSteps: string;
|
|
493
|
+
readonly placedShips: string;
|
|
494
|
+
/** The order placed screen's last row, beside the expected delivery day (drawn only when the day is known). */
|
|
495
|
+
readonly placedArrives: string;
|
|
496
|
+
readonly viewOrder: string;
|
|
497
|
+
readonly herSubscription: string;
|
|
498
|
+
readonly nextBox: (day: string) => string;
|
|
499
|
+
readonly everyDays: (days: number) => string;
|
|
500
|
+
/** The orders list's heading, after the subscription card or alone. */
|
|
501
|
+
readonly ordersHeading: (afterSubscription: boolean) => string;
|
|
502
|
+
/** Under the orders list and an order (a demo says its dates are illustrative). Empty by default. */
|
|
503
|
+
readonly ordersFine: string;
|
|
504
|
+
readonly ordersEmptyTitle: string;
|
|
505
|
+
readonly ordersEmptyBody: (p: HealthPlanFocusPrices) => string;
|
|
506
|
+
/**
|
|
507
|
+
* The button under the orders list that reads the next page. Empty by default (copy owed by design): the next page
|
|
508
|
+
* then loads as the list's end scrolls into view, with no button.
|
|
509
|
+
*/
|
|
510
|
+
readonly moreOrders: string;
|
|
511
|
+
/** The order steps, in order: ordered, shipped, out for delivery, delivered. */
|
|
512
|
+
readonly orderSteps: readonly [string, string, string, string];
|
|
513
|
+
readonly subscriptionBox: string;
|
|
514
|
+
readonly orderTitle: (number: string | null) => string;
|
|
515
|
+
readonly arrivesBy: (day: string) => string;
|
|
516
|
+
readonly deliveredOn: (day: string) => string;
|
|
517
|
+
readonly expected: (day: string) => string;
|
|
518
|
+
readonly tracking: string;
|
|
519
|
+
readonly trackingByText: string;
|
|
520
|
+
readonly trackOn: (carrier: string) => string;
|
|
521
|
+
/**
|
|
522
|
+
* The tracking link's label when the order has a tracking link but no carrier name. Empty by default (copy owed by
|
|
523
|
+
* design): the link is then not drawn.
|
|
524
|
+
*/
|
|
525
|
+
readonly trackLink: string;
|
|
526
|
+
readonly inThisOrder: string;
|
|
527
|
+
readonly orderItemLine: (quantity: number, subscriptionBox: boolean) => string;
|
|
528
|
+
readonly paidWith: string;
|
|
529
|
+
readonly buyAgain: string;
|
|
530
|
+
readonly orderHelp: string;
|
|
531
|
+
readonly addWeightTitle: string;
|
|
532
|
+
readonly addWeightBody: string;
|
|
533
|
+
readonly connectRecordsTitle: string;
|
|
534
|
+
readonly connectRecordsBody: string;
|
|
535
|
+
readonly weightKicker: string;
|
|
536
|
+
readonly weightTitle: (p: HealthPlanFocusPrices) => string;
|
|
537
|
+
readonly weightBody: string;
|
|
538
|
+
readonly weightField: string;
|
|
539
|
+
readonly weightUnit: string;
|
|
540
|
+
/** The unit beside the field with `weightUnit: 'kg'`. */
|
|
541
|
+
readonly weightUnitKg: string;
|
|
542
|
+
readonly weightError: string;
|
|
543
|
+
/** The error for a weight in kilograms that does not read. */
|
|
544
|
+
readonly weightErrorKg: string;
|
|
545
|
+
readonly weightSave: string;
|
|
546
|
+
readonly weightSaved: (pounds: string) => string;
|
|
547
|
+
readonly weightSavedKg: (kilograms: string) => string;
|
|
548
|
+
/** A payment that failed or a checkout that expired: the cart opens again with its items and this line. */
|
|
549
|
+
readonly checkoutFailed: string;
|
|
550
|
+
/** The byline's title: "Built with {vet}". */
|
|
551
|
+
readonly builtWith: (vet: string) => string;
|
|
552
|
+
/** A vet's tip's source line (`fromVet`): "From {shortName}". */
|
|
553
|
+
readonly fromVet: (shortName: string) => string;
|
|
554
|
+
/** The waiting card's tips row (`fromVet`): "Free tips from {vet}, built around that risk". */
|
|
555
|
+
readonly waitVetTips: (vet: string) => string;
|
|
556
|
+
/** The score line under why it fits, counted from the rows: "2 of 2 signals fit Georgia". */
|
|
557
|
+
readonly signalsFit: (count: number) => string;
|
|
558
|
+
/** The score's short form beside it: "2/2". */
|
|
559
|
+
readonly signalsValue: (count: number) => string;
|
|
560
|
+
/** In place of part 2 and the jump strip when no product fits (`pick.none`). */
|
|
561
|
+
readonly noPick: string;
|
|
562
|
+
/** The vet sign's title (`HealthPlanFocusSign.callVet`) without her vet records: "Call your vet today". */
|
|
563
|
+
readonly callYourVet: string;
|
|
564
|
+
/** The vet sign's title when she has no vet yet: "Call a vet today". */
|
|
565
|
+
readonly callAVet: string;
|
|
566
|
+
/** The checkup button without her vet records or without a vet: "Save for her next checkup". */
|
|
567
|
+
readonly saveForCheckup: string;
|
|
568
|
+
/** The same button once pressed: "Saved for her next checkup". */
|
|
569
|
+
readonly savedForCheckup: string;
|
|
570
|
+
/** The card's accessible name ("Her three blanks"). */
|
|
571
|
+
readonly blanksLabel: string;
|
|
572
|
+
/** The waiting card's kicker: "Asked {clinic}". */
|
|
573
|
+
readonly blanksAsked: (clinic: string) => string;
|
|
574
|
+
/** The waiting card's kicker when the request names no clinic. Empty by default (copy owed by design): no kicker. */
|
|
575
|
+
readonly blanksAskedNoClinic: string;
|
|
576
|
+
/** The waiting card's pill: "2 to 5 days". */
|
|
577
|
+
readonly blanksWaitPill: string;
|
|
578
|
+
/** The filled card's kicker: "From her vet records". */
|
|
579
|
+
readonly blanksFilledKicker: string;
|
|
580
|
+
/** The filled card's pill, counted from the rows: "3 of 3 filled". */
|
|
581
|
+
readonly blanksFilled: (filled: number, total: number) => string;
|
|
582
|
+
/** Before her weight: "Keep her at " (then the weight, then `weightUnit` or `weightUnitKg`). */
|
|
583
|
+
readonly blanksWeight: string;
|
|
584
|
+
/** Her weight row's source line: "From her vet visits". */
|
|
585
|
+
readonly blanksWeightSource: string;
|
|
586
|
+
/** After her dose: "{chew a day} of {product}". Both are data (the dose's label and the product's name). */
|
|
587
|
+
readonly blanksDose: (dose: string, product: string) => string;
|
|
588
|
+
/** Her dose row's source line: "Sized to her weight". */
|
|
589
|
+
readonly blanksDoseSource: string;
|
|
590
|
+
/** Before her next shots' date: "Her next shots are due ". */
|
|
591
|
+
readonly blanksShots: string;
|
|
592
|
+
/** Her next shots row's source line: "From her clinic". */
|
|
593
|
+
readonly blanksShotsSource: string;
|
|
594
|
+
/** A blank's name for a screen reader. */
|
|
595
|
+
readonly blankEmpty: string;
|
|
596
|
+
/** The toast when her records land and the blanks fill. */
|
|
597
|
+
readonly recordsLanded: string;
|
|
598
|
+
}
|
|
599
|
+
/** The steps an order goes through, in order. */
|
|
600
|
+
type HealthPlanOrderStatus = 'ordered' | 'shipped' | 'out_for_delivery' | 'delivered';
|
|
601
|
+
/**
|
|
602
|
+
* An order from the partner's own shop (its kits, its tests), handed in by the host so the member's orders read as
|
|
603
|
+
* one list. Everything in it is the partner's: Everfur draws it and never changes it. Everfur's own orders (a box
|
|
604
|
+
* bought through its checkout) are read from Everfur and need nothing here.
|
|
605
|
+
*/
|
|
606
|
+
interface HealthPlanShopOrder {
|
|
607
|
+
/** Stable id; also the order number shown when `number` is absent and the host wants one. */
|
|
608
|
+
readonly key: string;
|
|
609
|
+
/** The partner's order number ("EMB-31907"). */
|
|
610
|
+
readonly number?: string;
|
|
611
|
+
readonly status: HealthPlanOrderStatus;
|
|
612
|
+
/** ISO dates per step, in `HealthPlanOrderStatus` order: a done step's date, or a later step's expected date. */
|
|
613
|
+
readonly dates?: readonly (string | null)[];
|
|
614
|
+
readonly items: readonly {
|
|
615
|
+
readonly title: string;
|
|
616
|
+
readonly quantity: number;
|
|
617
|
+
/** The line's total, in `currency`. */
|
|
618
|
+
readonly price: number;
|
|
619
|
+
readonly imageUrl?: string;
|
|
620
|
+
readonly icon?: HealthPlanFocusIcon;
|
|
621
|
+
}[];
|
|
622
|
+
readonly currency: string;
|
|
623
|
+
/** A subscription's box ("Subscription box" pill). */
|
|
624
|
+
readonly subscriptionBox?: boolean;
|
|
625
|
+
readonly carrier?: string;
|
|
626
|
+
readonly trackingNumber?: string;
|
|
627
|
+
/** A tag beside the tracking number (a demo marks it "Illustrative"). */
|
|
628
|
+
readonly trackingTag?: string;
|
|
629
|
+
/** Where "Track on {carrier}" goes; without it the button is not drawn. */
|
|
630
|
+
readonly trackingUrl?: string;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
type HealthPlanSubscriptionStatus = 'active' | 'cancelled';
|
|
634
|
+
/** One step still ahead on a subscription's schedule. The surface writes the words; these are the facts. */
|
|
635
|
+
interface HealthPlanSubscriptionStep {
|
|
636
|
+
readonly step: 'first_box_ships' | 'checkin' | 'refill_reminder' | 'next_box_ships';
|
|
637
|
+
/** ISO `YYYY-MM-DD`, a UTC calendar date. */
|
|
638
|
+
readonly on: string;
|
|
639
|
+
}
|
|
640
|
+
interface HealthPlanSubscriptionRenewal {
|
|
641
|
+
readonly amount: number;
|
|
642
|
+
readonly currency: string;
|
|
643
|
+
readonly intervalDays: number;
|
|
644
|
+
}
|
|
645
|
+
interface HealthPlanSubscription {
|
|
646
|
+
readonly subscriptionId: string;
|
|
647
|
+
readonly productId: string;
|
|
648
|
+
readonly title: string | null;
|
|
649
|
+
readonly status: HealthPlanSubscriptionStatus;
|
|
650
|
+
readonly intervalDays: number;
|
|
651
|
+
readonly intervalOptions: readonly number[];
|
|
652
|
+
readonly currency: string;
|
|
653
|
+
readonly boxPrice: number;
|
|
654
|
+
/** The CURRENT run's first box. */
|
|
655
|
+
readonly firstBoxPrice: number;
|
|
656
|
+
readonly offerApplied: boolean;
|
|
657
|
+
/** ISO `YYYY-MM-DD`, or null when cancelled. */
|
|
658
|
+
readonly nextBoxDate: string | null;
|
|
659
|
+
readonly renewal: HealthPlanSubscriptionRenewal | null;
|
|
660
|
+
readonly timeline: readonly HealthPlanSubscriptionStep[];
|
|
661
|
+
}
|
|
662
|
+
interface HealthPlanSubscriptionSupply {
|
|
663
|
+
readonly unitsPerBox: number;
|
|
664
|
+
readonly unitLabel: string | null;
|
|
665
|
+
readonly unitsPerDay: number;
|
|
666
|
+
readonly supplyDays: number;
|
|
667
|
+
readonly doseBasis: 'weight' | 'assumed';
|
|
668
|
+
}
|
|
669
|
+
/** Buy once: one box, no renewal. `price` is the box price less the one-box discount (the server's figure). */
|
|
670
|
+
interface HealthPlanOneBoxOffer {
|
|
671
|
+
readonly price: number;
|
|
672
|
+
readonly discountPercent: number;
|
|
673
|
+
}
|
|
674
|
+
/** Where a one-box order is on its way. Only the partner moves it; it may also move back to correct a mistake. */
|
|
675
|
+
type HealthPlanOrderTrackingStatus = 'ordered' | 'shipped' | 'delivered';
|
|
676
|
+
/**
|
|
677
|
+
* A one-box order's tracking, as the partner wrote it. Every field but `status` is null until the partner sends it,
|
|
678
|
+
* and a value that fails the server's own rules (control or bidi characters, a tracking url that is not plain https)
|
|
679
|
+
* reads as null here too.
|
|
680
|
+
*/
|
|
681
|
+
interface HealthPlanOrderTracking {
|
|
682
|
+
readonly status: HealthPlanOrderTrackingStatus;
|
|
683
|
+
readonly orderNumber: string | null;
|
|
684
|
+
readonly carrier: string | null;
|
|
685
|
+
readonly trackingNumber: string | null;
|
|
686
|
+
/** An `https://` url with no spaces and no `@`; open it in a new tab with `rel="noopener noreferrer"`. */
|
|
687
|
+
readonly trackingUrl: string | null;
|
|
688
|
+
/** ISO date-time. */
|
|
689
|
+
readonly shippedAt: string | null;
|
|
690
|
+
/** ISO `YYYY-MM-DD`, a calendar date. */
|
|
691
|
+
readonly estimatedDelivery: string | null;
|
|
692
|
+
/** The server time of the partner's last write (ISO date-time). */
|
|
693
|
+
readonly updatedAt: string | null;
|
|
694
|
+
}
|
|
695
|
+
/** One recorded one-box order. The partner charges and ships it; Everfur never charges. */
|
|
696
|
+
interface HealthPlanOneBoxOrder {
|
|
697
|
+
readonly orderId: string;
|
|
698
|
+
readonly productId: string;
|
|
699
|
+
readonly title: string | null;
|
|
700
|
+
readonly currency: string;
|
|
701
|
+
readonly boxPrice: number;
|
|
702
|
+
/** The price of ONE box. */
|
|
703
|
+
readonly price: number;
|
|
704
|
+
readonly discountPercent: number;
|
|
705
|
+
/** ISO `YYYY-MM-DD`. */
|
|
706
|
+
readonly shipsOn: string | null;
|
|
707
|
+
/** When it was recorded (ISO date-time), from the orders list; absent from an older server. */
|
|
708
|
+
readonly createdAt?: string | null;
|
|
709
|
+
/** How many boxes (1..10). Absent from an older server, which means one. */
|
|
710
|
+
readonly quantity?: number;
|
|
711
|
+
/** `price` x `quantity`, the server's figure. Absent from an older server, which means `price`. */
|
|
712
|
+
readonly total?: number;
|
|
713
|
+
/** Absent from an older server, which knows only that the order was recorded. */
|
|
714
|
+
readonly tracking?: HealthPlanOrderTracking;
|
|
715
|
+
}
|
|
716
|
+
/** One page of a pet's one-box orders, newest first. */
|
|
717
|
+
interface HealthPlanOneBoxOrderPage {
|
|
718
|
+
readonly orders: readonly HealthPlanOneBoxOrder[];
|
|
719
|
+
/** Pass it as `cursor` for the next page; null on the last page. */
|
|
720
|
+
readonly nextCursor: string | null;
|
|
721
|
+
}
|
|
722
|
+
interface HealthPlanOneBoxOrderPageOptions {
|
|
723
|
+
/** 1..50; default 50. */
|
|
724
|
+
readonly limit?: number;
|
|
725
|
+
/** The `nextCursor` of the previous page. */
|
|
726
|
+
readonly cursor?: string;
|
|
727
|
+
}
|
|
728
|
+
interface HealthPlanSubscriptionQuote {
|
|
729
|
+
readonly productId: string;
|
|
730
|
+
readonly currency: string;
|
|
731
|
+
readonly boxPrice: number;
|
|
732
|
+
readonly firstBoxPrice: number;
|
|
733
|
+
readonly firstBoxDiscountPercent: number;
|
|
734
|
+
readonly offerApplies: boolean;
|
|
735
|
+
/** Buy once. Null from a server older than contract v2: the surface then hands a one-time buy to the partner. */
|
|
736
|
+
readonly oneBox: HealthPlanOneBoxOffer | null;
|
|
737
|
+
readonly intervalOptions: readonly number[];
|
|
738
|
+
readonly defaultIntervalDays: number;
|
|
739
|
+
readonly supply: HealthPlanSubscriptionSupply | null;
|
|
740
|
+
readonly firstBoxShipsOn: string | null;
|
|
741
|
+
/** The member's existing active or cancelled row for this pet and product, or null. */
|
|
742
|
+
readonly subscription: HealthPlanSubscription | null;
|
|
743
|
+
}
|
|
744
|
+
interface HealthPlanSubscriptionRepository {
|
|
745
|
+
quote(petRef: PetRef, productId: string): Promise<EverfurResult<HealthPlanSubscriptionQuote>>;
|
|
746
|
+
list(petRef: PetRef): Promise<EverfurResult<readonly HealthPlanSubscription[]>>;
|
|
747
|
+
create(petRef: PetRef, productId: string, intervalDays?: number): Promise<EverfurResult<HealthPlanSubscription>>;
|
|
748
|
+
changeInterval(petRef: PetRef, subscriptionId: string, intervalDays: number): Promise<EverfurResult<HealthPlanSubscription>>;
|
|
749
|
+
skip(petRef: PetRef, subscriptionId: string): Promise<EverfurResult<HealthPlanSubscription>>;
|
|
750
|
+
cancel(petRef: PetRef, subscriptionId: string): Promise<EverfurResult<HealthPlanSubscription>>;
|
|
751
|
+
restart(petRef: PetRef, subscriptionId: string, intervalDays?: number): Promise<EverfurResult<HealthPlanSubscription>>;
|
|
752
|
+
/**
|
|
753
|
+
* Buy one box. `tapKey` names the member's one confirm tap: pass the same value on a retry of that tap and the
|
|
754
|
+
* server answers with the same order instead of recording a second one. Omitted, each call is a new order.
|
|
755
|
+
*/
|
|
756
|
+
buyOneBox(petRef: PetRef, productId: string, tapKey?: string): Promise<EverfurResult<HealthPlanOneBoxOrder>>;
|
|
757
|
+
/** The pet's one-box orders, newest first. Optional so a host's own repository keeps compiling; absent, no orders list. */
|
|
758
|
+
listOneBoxOrders?(petRef: PetRef): Promise<EverfurResult<readonly HealthPlanOneBoxOrder[]>>;
|
|
759
|
+
/**
|
|
760
|
+
* One page of the pet's one-box orders, newest first. Optional like `listOneBoxOrders`; absent, the surface reads
|
|
761
|
+
* that one list instead. A cursor that is no longer this pet's answers `reasonCode` `invalid_cursor` (422): start
|
|
762
|
+
* again without one.
|
|
763
|
+
*/
|
|
764
|
+
listOneBoxOrderPage?(petRef: PetRef, opts?: HealthPlanOneBoxOrderPageOptions): Promise<EverfurResult<HealthPlanOneBoxOrderPage>>;
|
|
765
|
+
}
|
|
766
|
+
/** A 404 on a subscription route: the switch is off, or the product is not subscribable. */
|
|
767
|
+
declare function isHealthPlanSubscriptionUnavailable(error: EverfurError | null | undefined): boolean;
|
|
768
|
+
/** The allowlist mapper for one Subscription body; null when a required fact is missing. */
|
|
769
|
+
declare function healthPlanSubscriptionFromWire(raw: unknown): HealthPlanSubscription | null;
|
|
770
|
+
/** The allowlist mapper for one OneBoxOrder body; null when a required fact is missing. */
|
|
771
|
+
declare function healthPlanOneBoxOrderFromWire(raw: unknown): HealthPlanOneBoxOrder | null;
|
|
772
|
+
/**
|
|
773
|
+
* The allowlist mapper for an order's `tracking` (always sent by a current server); null when absent or not an
|
|
774
|
+
* object (an older server). An unknown status reads as `ordered`, the one step every order has.
|
|
775
|
+
*/
|
|
776
|
+
declare function healthPlanOrderTrackingFromWire(raw: unknown): HealthPlanOrderTracking | null;
|
|
777
|
+
/** The allowlist mapper for one page of the orders list; null when `orders` is not a list. */
|
|
778
|
+
declare function healthPlanOneBoxOrderPageFromWire(raw: unknown): HealthPlanOneBoxOrderPage | null;
|
|
779
|
+
/** The allowlist mapper for one quote body; null when a required fact is missing. */
|
|
780
|
+
declare function healthPlanSubscriptionQuoteFromWire(raw: unknown): HealthPlanSubscriptionQuote | null;
|
|
781
|
+
/** The repository over one auth context (or an injected funnel). */
|
|
782
|
+
declare function createHealthPlanSubscriptionRepositoryOver(deps: HealthPlanRepositoryDeps): Required<HealthPlanSubscriptionRepository>;
|
|
783
|
+
/** The repository over the runtime under your provider. Auth is read at CALL time; a disposed runtime sends nothing. */
|
|
784
|
+
declare function createHealthPlanSubscriptionRepository(runtime: HealthPlanRuntime): Required<HealthPlanSubscriptionRepository>;
|
|
785
|
+
|
|
786
|
+
/** Whose checkout runs Buy and Subscribe: Everfur's Stripe Checkout, or the partner's own (today's handoff). */
|
|
787
|
+
type HealthPlanCheckoutProvider = 'everfur_stripe' | 'partner';
|
|
788
|
+
type HealthPlanPurchase = 'one_box' | 'subscription';
|
|
789
|
+
type HealthPlanCheckoutStatus = 'pending' | 'paid' | 'expired' | 'failed';
|
|
790
|
+
/** The pet facts the page was built from. */
|
|
791
|
+
interface HealthPlanPagePet {
|
|
792
|
+
readonly name: string | null;
|
|
793
|
+
readonly species: string | null;
|
|
794
|
+
readonly sex: 'female' | 'male' | null;
|
|
795
|
+
readonly breed: string | null;
|
|
796
|
+
readonly weightKg: number | null;
|
|
797
|
+
readonly weightLb: number | null;
|
|
798
|
+
}
|
|
799
|
+
interface HealthPlanPage {
|
|
800
|
+
readonly petRef: PetRef;
|
|
801
|
+
readonly pet: HealthPlanPagePet;
|
|
802
|
+
readonly checkout: HealthPlanCheckoutProvider;
|
|
803
|
+
/** The focus layout's content, or null when the plan has no items for this pet. */
|
|
804
|
+
readonly page: HealthPlanFocusDesign | null;
|
|
805
|
+
/**
|
|
806
|
+
* True only when the page draws a condition template the Medical Director reviewed (`vet_reviewed`). The focus
|
|
807
|
+
* layout draws the vet byline only then. Absent: false.
|
|
808
|
+
*/
|
|
809
|
+
readonly vetReviewed?: boolean;
|
|
810
|
+
/**
|
|
811
|
+
* True only when Everfur texts the member the tracking number once the partner sets it (`tracking_texts_enabled`).
|
|
812
|
+
* The "tracking comes by text" lines are drawn only then. Absent: false.
|
|
813
|
+
*/
|
|
814
|
+
readonly trackingTextsEnabled?: boolean;
|
|
815
|
+
}
|
|
816
|
+
interface HealthPlanCheckoutRequest {
|
|
817
|
+
readonly productId: string;
|
|
818
|
+
readonly purchase: HealthPlanPurchase;
|
|
819
|
+
/** Subscriptions only: one of the quote's interval options. */
|
|
820
|
+
readonly intervalDays?: number;
|
|
821
|
+
/** Where Stripe sends the member back after paying, and after backing out. Absolute http(s). */
|
|
822
|
+
readonly successUrl: string;
|
|
823
|
+
readonly cancelUrl: string;
|
|
824
|
+
}
|
|
825
|
+
/** One cart line for the cart checkout. Each product at most once; a subscription line is quantity 1 and alone. */
|
|
826
|
+
interface HealthPlanCheckoutItem {
|
|
827
|
+
readonly productId: string;
|
|
828
|
+
readonly purchase: HealthPlanPurchase;
|
|
829
|
+
/** Subscriptions only. */
|
|
830
|
+
readonly intervalDays?: number;
|
|
831
|
+
/** 1..10, default 1. */
|
|
832
|
+
readonly quantity?: number;
|
|
833
|
+
}
|
|
834
|
+
/** The cart checkout: 1..10 lines in one Stripe Checkout. */
|
|
835
|
+
interface HealthPlanCartCheckoutRequest {
|
|
836
|
+
readonly items: readonly HealthPlanCheckoutItem[];
|
|
837
|
+
readonly successUrl: string;
|
|
838
|
+
readonly cancelUrl: string;
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Why the server refused a checkout start, when it said so (a 409's `detail`): `cart_disabled` (the cart switch is
|
|
842
|
+
* off for this tenant: buy one product at a time), `cart_has_subscription` (check the subscription out on its own),
|
|
843
|
+
* or the older refusals.
|
|
844
|
+
*/
|
|
845
|
+
type HealthPlanCheckoutRefusal = 'cart_disabled' | 'cart_has_subscription' | 'cart_currency_mixed' | 'sample_product' | 'partner_endpoint_missing' | 'checkout_pending' | 'already_subscribed';
|
|
846
|
+
/**
|
|
847
|
+
* The refusal a checkout start's 409 named, or null. The route answers `{"detail": "<token>"}`, which reaches the SDK
|
|
848
|
+
* as the error's server message (or its `reasonCode`); only the tokens above are recognised, so free text never is.
|
|
849
|
+
*/
|
|
850
|
+
declare function healthPlanCheckoutRefusal(error: EverfurError | null | undefined): HealthPlanCheckoutRefusal | null;
|
|
851
|
+
interface HealthPlanCheckoutSession {
|
|
852
|
+
readonly checkoutId: string;
|
|
853
|
+
/** The Stripe Checkout page to send the member to (https). */
|
|
854
|
+
readonly url: string;
|
|
855
|
+
}
|
|
856
|
+
interface HealthPlanCheckoutState {
|
|
857
|
+
readonly status: HealthPlanCheckoutStatus;
|
|
858
|
+
readonly purchase: HealthPlanPurchase;
|
|
859
|
+
/** The first one-box order, once the server has one (`orders[0]`). */
|
|
860
|
+
readonly order: HealthPlanOneBoxOrder | null;
|
|
861
|
+
/** Every one-box order the checkout made, in cart line order; empty until paid (and from an older server). */
|
|
862
|
+
readonly orders: readonly HealthPlanOneBoxOrder[];
|
|
863
|
+
/** The subscription, once the server has one. */
|
|
864
|
+
readonly subscription: HealthPlanSubscription | null;
|
|
865
|
+
}
|
|
866
|
+
interface HealthPlanPageRepository {
|
|
867
|
+
/** `GET .../plan/page`. Settles; never throws. */
|
|
868
|
+
getPage(petRef: PetRef, opts?: {
|
|
869
|
+
readonly signal?: AbortSignal;
|
|
870
|
+
}): Promise<EverfurResult<HealthPlanPage>>;
|
|
871
|
+
/**
|
|
872
|
+
* `POST .../plan/checkout`. `idempotencyKey` names the member's one tap: the same value on a retry answers with the
|
|
873
|
+
* same session.
|
|
874
|
+
*/
|
|
875
|
+
startCheckout(petRef: PetRef, body: HealthPlanCheckoutRequest, idempotencyKey: string): Promise<EverfurResult<HealthPlanCheckoutSession>>;
|
|
876
|
+
/**
|
|
877
|
+
* `POST .../plan/checkout` in the cart form (`items`). Optional so a host's own repository keeps compiling; absent,
|
|
878
|
+
* the surface checks out one product at a time. A refusal names its reason through `healthPlanCheckoutRefusal`.
|
|
879
|
+
*/
|
|
880
|
+
startCartCheckout?(petRef: PetRef, body: HealthPlanCartCheckoutRequest, idempotencyKey: string): Promise<EverfurResult<HealthPlanCheckoutSession>>;
|
|
881
|
+
/** `GET .../plan/checkout/{checkout_id}`. */
|
|
882
|
+
getCheckout(petRef: PetRef, checkoutId: string): Promise<EverfurResult<HealthPlanCheckoutState>>;
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* The allowlist mapper for one plan page (`page` of the page route). Null when the page has no title or no pick:
|
|
886
|
+
* the layout cannot be drawn without them. The SDK's buying words (`copy`) are never read from the wire.
|
|
887
|
+
*/
|
|
888
|
+
declare function healthPlanFocusDesignFromWire(raw: unknown): HealthPlanFocusDesign | null;
|
|
889
|
+
/** The allowlist mapper for one page-route body. Null when it is not a page answer (no `page` key at all). */
|
|
890
|
+
declare function healthPlanPageFromWire(raw: unknown, petRef: PetRef): HealthPlanPage | null;
|
|
891
|
+
/** The allowlist mapper for one checkout-start body; null without an id or an https url. */
|
|
892
|
+
declare function healthPlanCheckoutSessionFromWire(raw: unknown): HealthPlanCheckoutSession | null;
|
|
893
|
+
/** The allowlist mapper for one checkout-status body; null without a known status and purchase. */
|
|
894
|
+
declare function healthPlanCheckoutStateFromWire(raw: unknown): HealthPlanCheckoutState | null;
|
|
895
|
+
/** The repository over one auth context (or an injected funnel). */
|
|
896
|
+
declare function createHealthPlanPageRepositoryOver(deps: HealthPlanRepositoryDeps): HealthPlanPageRepository;
|
|
897
|
+
/** The repository over the runtime under your provider. Auth is read at CALL time; a disposed runtime sends nothing. */
|
|
898
|
+
declare function createHealthPlanPageRepository(runtime: HealthPlanRuntime): HealthPlanPageRepository;
|
|
899
|
+
|
|
900
|
+
/** A named element of the focus layout. Pass a class for it in `classNames` and its inline default is dropped. */
|
|
901
|
+
type HealthPlanFocusPart = 'root' | 'head' | 'eyebrow' | 'serif' | 'headImage' | 'by' | 'byOk' | 'need' | 'needKicker' | 'sources' | 'source' | 'needRisk' | 'dot' | 'odds' | 'oddsKicker' | 'oddsNumbers' | 'tag' | 'says' | 'saysKicker' | 'jump' | 'jumpGo' | 'steps' | 'stepsHead' | 'n' | 'list' | 'tip' | 'tipN' | 'tipTop' | 'section' | 'sectionTitle' | 'pick' | 'others' | 'other' | 'otherCategory' | 'pickTop' | 'pickImage' | 'stars' | 'pickLine' | 'reviews' | 'review' | 'reviewStars' | 'score' | 'why' | 'mini' | 'chip' | 'dose' | 'ingredients' | 'opts' | 'opt' | 'optText' | 'optTag' | 'price' | 'optPrice' | 'buy' | 'button' | 'proof' | 'trust' | 'on' | 'onIcon' | 'more' | 'fine' | 'sign' | 'questionsKicker' | 'questions' | 'add' | 'extras' | 'extrasTitle' | 'extra' | 'extraIcon' | 'extraTitle' | 'extraPrice' | 'extraGo' | 'pageFine' | 'stateOn' | 'scrim' | 'sheet' | 'sheetGrab' | 'sheetTop' | 'sheetKicker' | 'sheetClose' | 'srOnly' | 'co' | 'coProd' | 'coProdImage' | 'coProdTitle' | 'coOpts' | 'coOpt' | 'coHit' | 'radio' | 'coPrice' | 'coWhen' | 'coKey' | 'coEvery' | 'coRows' | 'buttonLarge' | 'buttonGhost' | 'coFine' | 'mgCancel' | 'started' | 'startedScroll' | 'done' | 'doneCheck' | 'doneTitle' | 'doneWhen' | 'doneWho' | 'next' | 'nextIcon' | 'foot' | 'toast' | 'tools' | 'toolsEnd' | 'ordersButton' | 'cartButton' | 'cartCount' | 'askRow' | 'askRowIcon' | 'wait' | 'waitTop' | 'waitTile' | 'waitKey' | 'waitText' | 'track' | 'trackDot' | 'push' | 'shop' | 'shopTitle' | 'shopSub' | 'shopKey' | 'shopCard' | 'shopItems' | 'shopItem' | 'shopItemImage' | 'shopItemPrice' | 'shopItemActions' | 'stepper' | 'shopRemove' | 'shopMode' | 'summary' | 'shopFine' | 'shopEmpty' | 'shopTile' | 'shopLink' | 'shopActions' | 'subCard' | 'orderList' | 'order' | 'orderTop' | 'orderPill' | 'orderNo' | 'orderWhat' | 'orderMeta' | 'orderPics' | 'carrier' | 'carrierIcon' | 'carrierWait' | 'buttonSmall' | 'coItems' | 'weightField' | 'weightInput' | 'weightUnit' | 'weightError' | 'weightActions' | 'summaryRow' | 'trackStep' | 'shopTag' | 'sheetBody' | 'blanks' | 'blanksCard' | 'blanksHead' | 'blank' | 'noPick' | 'mgOrders';
|
|
902
|
+
/**
|
|
903
|
+
* Classes per part. A key `part:kind` adds a modifier class for one kind of a part (`sign:urgent`, `chip:rec`,
|
|
904
|
+
* `source:dna`, `dot:risk`, `opt:once`, `extra:kit`); the kinds come from the design rows.
|
|
905
|
+
*/
|
|
906
|
+
type HealthPlanFocusClassNames = Readonly<Partial<Record<HealthPlanFocusPart, string>>> & Readonly<Record<string, string | undefined>>;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* The words for the pet in the buying copy: "her" for a female, "his" for a male, else the pet's name ("Georgia's"),
|
|
910
|
+
* else "your pet" (the SDK's existing fallback, CHAT_COPY.emptyTitlePetFallback).
|
|
911
|
+
*/
|
|
912
|
+
interface HealthPlanPetWords {
|
|
913
|
+
/** The name mid-sentence: "Georgia", else "your pet". */
|
|
914
|
+
readonly name: string;
|
|
915
|
+
/** The name at a sentence's start: "Georgia", else "Your pet". */
|
|
916
|
+
readonly Name: string;
|
|
917
|
+
/** "her", "his", "Georgia's", "your pet's". */
|
|
918
|
+
readonly poss: string;
|
|
919
|
+
/** The same at a sentence's start. */
|
|
920
|
+
readonly Poss: string;
|
|
921
|
+
/** "her", "him", "Georgia", "your pet". */
|
|
922
|
+
readonly obj: string;
|
|
923
|
+
}
|
|
924
|
+
/** The pet's words from the plan page's `name` and `sex`. Pure. */
|
|
925
|
+
declare function healthPlanPetWords(name: string | null | undefined, sex: 'female' | 'male' | null | undefined): HealthPlanPetWords;
|
|
926
|
+
/**
|
|
927
|
+
* The buying words for one pet: Raph's (the v3 design of 2026-10-16 and round 5 of 2026-10-20) with "her" taken
|
|
928
|
+
* from the pet (`healthPlanPetWords`). The prices' `petName`, when set, names the pet in the lines that use its name.
|
|
929
|
+
*/
|
|
930
|
+
declare function healthPlanFocusCopyFor(pet: {
|
|
931
|
+
readonly name?: string | null;
|
|
932
|
+
readonly sex?: 'female' | 'male' | null;
|
|
933
|
+
}): HealthPlanFocusCopy;
|
|
934
|
+
/** The buying words for a female pet: Raph's own, word for word. `EverfurHealthPlan` builds them from the pet's sex. */
|
|
935
|
+
declare const HEALTH_PLAN_FOCUS_COPY: HealthPlanFocusCopy;
|
|
936
|
+
/** A UTC calendar date (`2026-10-30`) as a short day (`Oct 30`). */
|
|
937
|
+
declare function formatHealthPlanDay(iso: string | null, locale?: string): string | null;
|
|
938
|
+
|
|
939
|
+
export { createHealthPlanRepositoryOver as $, type HealthPlanCheckoutStatus as A, type HealthPlanFocusExtra as B, type HealthPlanFocusPrices as C, type HealthPlanFocusReasonRow as D, type HealthPlanFocusReview as E, type HealthPlanFocusSign as F, type HealthPlanFocusStep as G, type HealthPlanPage as H, type HealthPlanFocusWait as I, type HealthPlanOneBoxOffer as J, type HealthPlanOneBoxOrderPage as K, type HealthPlanOneBoxOrderPageOptions as L, type HealthPlanOrderStatus as M, type HealthPlanOrderTracking as N, type HealthPlanOrderTrackingStatus as O, type HealthPlanPurchase as P, type HealthPlanReason as Q, type HealthPlanRepositoryDeps as R, type HealthPlanRuntime as S, type HealthPlanSubscriptionRenewal as T, type HealthPlanSubscriptionStatus as U, type HealthPlanSubscriptionStep as V, type HealthPlanSubscriptionSupply as W, type HealthPlanTrackStep as X, createHealthPlanPageRepository as Y, createHealthPlanPageRepositoryOver as Z, createHealthPlanRepository as _, type HealthPlanPetWords as a, createHealthPlanSubscriptionRepository as a0, createHealthPlanSubscriptionRepositoryOver as a1, formatHealthPlanDay as a2, healthPlanCheckoutRefusal as a3, healthPlanCheckoutSessionFromWire as a4, healthPlanCheckoutStateFromWire as a5, healthPlanFocusCopyFor as a6, healthPlanFocusDesignFromWire as a7, healthPlanFromWire as a8, healthPlanOneBoxOrderFromWire as a9, healthPlanOneBoxOrderPageFromWire as aa, healthPlanOrderTrackingFromWire as ab, healthPlanPageFromWire as ac, healthPlanPetWords as ad, healthPlanSubscriptionFromWire as ae, healthPlanSubscriptionQuoteFromWire as af, isHealthPlanSubscriptionUnavailable as ag, type HealthPlanFocusDesign as b, type HealthPlanFocusCopy as c, type HealthPlanFocusClassNames as d, type HealthPlanFocusIcon as e, type HealthPlanItem as f, type HealthPlanSubscription as g, type HealthPlanOneBoxOrder as h, type HealthPlanSubscriptionRepository as i, type HealthPlanPageRepository as j, type HealthPlanShopOrder as k, type HealthPlanCheckoutProvider as l, type HealthPlan as m, type HealthPlanRepository as n, type HealthPlanReasonKind as o, type HealthPlanFocusPart as p, type HealthPlanSubscriptionQuote as q, type HealthPlanPagePet as r, HEALTH_PLAN_FOCUS_COPY as s, HEALTH_PLAN_REASON_KINDS as t, type HealthPlanCartCheckoutRequest as u, type HealthPlanCheckoutItem as v, type HealthPlanCheckoutRefusal as w, type HealthPlanCheckoutRequest as x, type HealthPlanCheckoutSession as y, type HealthPlanCheckoutState as z };
|