@everfur/sdk 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +126 -0
- package/README.md +11 -10
- package/dist/{Chat.d-Dts8u_1a.d.cts → Chat.d-aycmX1CA.d.cts} +12 -4
- package/dist/{Chat.d-DUNTfzqC.d.ts → Chat.d-puminpyi.d.ts} +12 -4
- package/dist/{DepthViews.d-CubkMPbU.d.ts → DepthViews.d-BdvFZgPs.d.cts} +1 -1
- package/dist/{DepthViews.d-Ce2Zhnrb.d.ts → DepthViews.d-DIvxzLDf.d.ts} +1 -1
- package/dist/{DepthViews.d-BMU2jFPw.d.cts → DepthViews.d-Dy0Zl-s-.d.ts} +1 -1
- package/dist/{DepthViews.d-BIp599lz.d.cts → DepthViews.d-wLNkzk9f.d.cts} +1 -1
- package/dist/RecordsPage.d-9Ank15PT.d.ts +93 -0
- package/dist/RecordsPage.d-DMKU0IKc.d.cts +93 -0
- package/dist/animations/index.d.cts +5 -5
- package/dist/animations/index.d.ts +5 -5
- package/dist/{attachments.d-D1yhJjcZ.d.ts → attachments.d--sIsfk6e.d.ts} +2 -2
- package/dist/{attachments.d-Bp2qbHxn.d.cts → attachments.d-DNUCiyy5.d.cts} +6 -24
- package/dist/{attachments.d-DisnvB9R.d.cts → attachments.d-ZEpTUeWN.d.cts} +2 -2
- package/dist/{attachments.d-Djy9z_0Z.d.ts → attachments.d-rp3xs-Q3.d.ts} +6 -24
- package/dist/{bookingCopy.d-BJF6gd1A.d.ts → bookingCopy.d-D0uIIFAJ.d.ts} +2 -2
- package/dist/{bookingCopy.d-BlBmhAJc.d.cts → bookingCopy.d-DUrmVcLs.d.cts} +2 -2
- package/dist/{branding.d-DI8S400y.d.cts → branding.d-CTXTUg_8.d.cts} +1 -1
- package/dist/{branding.d-OIGLbQeM.d.ts → branding.d-DxJSoFce.d.ts} +1 -1
- package/dist/{casesRepository.d-CT2LTicS.d.cts → casesRepository.d-DCnix2pT.d.cts} +1 -1
- package/dist/{casesRepository.d-UsWOz9bv.d.ts → casesRepository.d-DbirgbyH.d.ts} +1 -1
- package/dist/chat/index.cjs +43 -41
- package/dist/chat/index.d.cts +26 -13
- package/dist/chat/index.d.ts +26 -13
- package/dist/chat/index.js +43 -41
- package/dist/client/index.cjs +2 -2
- package/dist/client/index.d.cts +10 -10
- package/dist/client/index.d.ts +10 -10
- package/dist/client/index.js +2 -2
- 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.d-BR3DT9ho.d.cts → config.d-DJ4mvf_w.d.cts} +1 -1
- package/dist/{config.d-Dy6igYlH.d.ts → config.d-MX7IKP2f.d.ts} +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context.d-QcCgguzA.d.ts → context.d-BdnBe8Oe.d.ts} +7 -7
- package/dist/{context.d-Cwks0p3C.d.cts → context.d-C6MJsMpN.d.cts} +7 -7
- package/dist/{copy.d-CiMn2IIt.d.ts → copy.d-BIfQOoDB.d.ts} +2 -2
- package/dist/{copy.d-DLJTyRfT.d.cts → copy.d-C_u7shha.d.cts} +2 -2
- package/dist/core/index.cjs +3 -3
- package/dist/core/index.d.cts +20 -18
- package/dist/core/index.d.ts +20 -18
- package/dist/core/index.js +3 -3
- package/dist/{depth.d-OSALbYM7.d.ts → depth.d-COFxYWLU.d.ts} +6 -133
- package/dist/{depth.d-CjPGVPDL.d.cts → depth.d-D2e5WZuE.d.cts} +6 -133
- package/dist/{entitlementRepository.d-CVQa1DA1.d.cts → entitlementRepository.d-BP15dFbe.d.cts} +4 -4
- package/dist/{entitlementRepository.d-Cf3LbTwD.d.ts → entitlementRepository.d-DLuxnGi5.d.ts} +4 -4
- package/dist/{features.d-fNsGcg0R.d.ts → features.d-DrQxTw3-.d.cts} +1 -1
- package/dist/{features.d-fNsGcg0R.d.cts → features.d-DrQxTw3-.d.ts} +1 -1
- package/dist/{focus.d-DMg2ngHI.d.ts → focus.d-C0Tr0oVJ.d.ts} +109 -348
- package/dist/{focus.d-az9cqUz3.d.cts → focus.d-jQWp0hdK.d.cts} +109 -348
- package/dist/health-plan/index.cjs +165 -151
- package/dist/health-plan/index.d.cts +53 -11
- package/dist/health-plan/index.d.ts +53 -11
- package/dist/health-plan/index.js +169 -155
- package/dist/{idempotency.d-D461_DPD.d.cts → idempotency.d-DXb1BN2A.d.ts} +151 -6
- package/dist/{idempotency.d-WpXx9zQo.d.ts → idempotency.d-HF6fyRt2.d.cts} +151 -6
- package/dist/{identity.d-DzTijonw.d.ts → identity.d-BePPZ7Uv.d.ts} +1 -1
- package/dist/{identity.d-60LeJt_s.d.cts → identity.d-CJfnWOdH.d.cts} +1 -1
- package/dist/index.cjs +46 -44
- package/dist/index.d.cts +19 -18
- package/dist/index.d.ts +19 -18
- package/dist/index.js +46 -44
- 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.d-BnLm3VAA.d.cts → models.d-BSqvbTE1.d.cts} +8 -1
- package/dist/{models.d-BagXhafD.d.ts → models.d-DOwnr8fi.d.ts} +8 -1
- package/dist/notifications/index.d.cts +4 -4
- package/dist/notifications/index.d.ts +4 -4
- package/dist/{optInView.d-CEyHR6PK.d.cts → optInView.d-0iI5JoAf.d.cts} +119 -3
- package/dist/{optInView.d-acKpV8V2.d.ts → optInView.d-s-w4aGN3.d.ts} +119 -3
- package/dist/{parse.d-C8CXyS58.d.ts → parse.d-COt1qVA6.d.ts} +1 -1
- package/dist/{parse.d-tEzufgJX.d.cts → parse.d-EmsgOUMQ.d.cts} +1 -1
- package/dist/{pets.d-C_53_fzo.d.ts → pets.d-BFT_b53y.d.ts} +1 -1
- package/dist/{pets.d-NbJvP_kh.d.cts → pets.d-nNAVnw7f.d.cts} +1 -1
- package/dist/{petsRepository.d-lp1BHRqM.d.cts → petsRepository.d-B2TpRE7r.d.cts} +1 -1
- package/dist/{petsRepository.d-BuGHymNx.d.ts → petsRepository.d-RGwSZcYl.d.ts} +1 -1
- package/dist/planSignals.d-BDbp2e-k.d.cts +126 -0
- package/dist/planSignals.d-DSnxKoWe.d.ts +126 -0
- package/dist/{ports.d-COIyN624.d.ts → ports.d-D2n4HRUy.d.ts} +4 -4
- package/dist/{ports.d-CEROoqnA.d.cts → ports.d-DBA_gsq5.d.cts} +4 -4
- package/dist/{presentation.d-DMbdad7G.d.cts → presentation.d-vy8kTGfR.d.cts} +6 -0
- package/dist/{presentation.d-DMbdad7G.d.ts → presentation.d-vy8kTGfR.d.ts} +6 -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.d.cts +13 -9
- package/dist/records/depth/index.d.ts +13 -9
- package/dist/records/index.cjs +252 -138
- package/dist/records/index.d.cts +88 -23
- package/dist/records/index.d.ts +88 -23
- package/dist/records/index.js +253 -139
- package/dist/{requestFunnel.d-CXUMPw1K.d.ts → requestFunnel.d-D9edIEjZ.d.ts} +2 -2
- package/dist/{requestFunnel.d-DWQQpjFR.d.cts → requestFunnel.d-RZex94XX.d.cts} +2 -2
- package/dist/{resolve.d-jI8FmBj3.d.cts → resolve.d-CoQWUy1Y.d.cts} +1 -1
- package/dist/{resolve.d-jI8FmBj3.d.ts → resolve.d-CoQWUy1Y.d.ts} +1 -1
- package/dist/{runtimeTypes.d-4yFNNuYR.d.ts → runtimeTypes.d-BYq38b17.d.ts} +6 -6
- package/dist/{runtimeTypes.d-D6N_fhxx.d.cts → runtimeTypes.d-LkwZaF7z.d.cts} +6 -6
- package/dist/{useRecordsDepth.d-DFcCfiXm.d.ts → screenProps.d-BVzRzowC.d.ts} +5 -91
- package/dist/{useRecordsDepth.d-sAq2Qkhr.d.cts → screenProps.d-CQ0qZJkr.d.cts} +5 -91
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/{sheetSeam.d-Cviqk89n.d.ts → sheetSeam.d-B09jf4YC.d.ts} +8 -4
- package/dist/{sheetSeam.d-DCS3LW8g.d.cts → sheetSeam.d-BBuEIVsa.d.cts} +8 -4
- package/dist/shop/index.cjs +224 -58
- package/dist/shop/index.d.cts +23 -5
- package/dist/shop/index.d.ts +23 -5
- package/dist/shop/index.js +225 -59
- 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.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/rn/index.cjs +1 -1
- package/dist/testing/rn/index.d.cts +11 -11
- package/dist/testing/rn/index.d.ts +11 -11
- package/dist/testing/rn/index.js +1 -1
- package/dist/testing/web/index.d.cts +12 -12
- package/dist/testing/web/index.d.ts +12 -12
- package/dist/texting/index.cjs +40 -5
- package/dist/texting/index.d.cts +40 -7
- package/dist/texting/index.d.ts +40 -7
- package/dist/texting/index.js +40 -5
- package/dist/threadOptions.d-9r4Csa7k.d.cts +458 -0
- package/dist/threadOptions.d-B6GA09aM.d.ts +458 -0
- package/dist/{timelineRows.d-CU5GvvLk.d.ts → timelineRows.d-Bes8ip2v.d.ts} +1 -1
- package/dist/{timelineRows.d-BNxgzYRW.d.cts → timelineRows.d-BvM2A7_G.d.cts} +1 -1
- package/dist/{typeStyle.d-C1HBRAI3.d.ts → typeStyle.d-Co5KF0up.d.ts} +1 -1
- package/dist/{typeStyle.d-Bl8pzbBy.d.cts → typeStyle.d-xIZj02Ru.d.cts} +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-Cb-36SF5.d.cts → useRecords.d-BYNX01El.d.cts} +2 -2
- package/dist/{useRecords.d-aQTzQZoV.d.ts → useRecords.d-DWk61a4c.d.ts} +2 -2
- package/dist/useRecordsDepth.d--LLA_4ga.d.cts +32 -0
- package/dist/useRecordsDepth.d-BQRL0Hez.d.ts +32 -0
- package/dist/{view.d-Dps5C8-s.d.cts → view.d-0yBjLTV3.d.cts} +6 -4
- package/dist/{view.d-C-SNpDJX.d.ts → view.d-DqbCADFa.d.ts} +6 -4
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/health-plan/index.cjs +50 -43
- package/dist/web/health-plan/index.d.cts +46 -192
- package/dist/web/health-plan/index.d.ts +46 -192
- package/dist/web/health-plan/index.js +65 -58
- package/dist/web/index.cjs +61 -45
- package/dist/web/index.d.cts +165 -25
- package/dist/web/index.d.ts +165 -25
- package/dist/web/index.js +62 -46
- 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.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/records/depth/index.d.cts +13 -9
- package/dist/web/records/depth/index.d.ts +13 -9
- package/dist/web/records/index.cjs +7 -7
- package/dist/web/records/index.d.cts +21 -82
- package/dist/web/records/index.d.ts +21 -82
- package/dist/web/records/index.js +7 -7
- package/dist/web/records-sheet/index.cjs +181 -127
- package/dist/web/records-sheet/index.d.cts +18 -16
- package/dist/web/records-sheet/index.d.ts +18 -16
- package/dist/web/records-sheet/index.js +181 -127
- package/dist/web/shop/index.cjs +191 -76
- package/dist/web/shop/index.d.cts +21 -4
- package/dist/web/shop/index.d.ts +21 -4
- package/dist/web/shop/index.js +191 -76
- package/dist/web/televet/booking/index.d.cts +6 -6
- package/dist/web/televet/booking/index.d.ts +6 -6
- package/dist/web/texting/index.cjs +36 -5
- package/dist/web/texting/index.d.cts +40 -7
- package/dist/web/texting/index.d.ts +40 -7
- package/dist/web/texting/index.js +36 -5
- package/package.json +35 -4
- package/tabs/package.json +8 -0
- package/web/intro/native-blocked.cjs +12 -0
- package/web/intro/package.json +8 -0
- package/dist/threadOptions.d-B1pTMmDF.d.cts +0 -260
- package/dist/threadOptions.d-B1pTMmDF.d.ts +0 -260
- package/dist/usePresentation.d-D6qsFzBz.d.cts +0 -9
- package/dist/usePresentation.d-DuGQe_Do.d.ts +0 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
3
|
-
import { R as RequestFunnel } from './requestFunnel.d-
|
|
4
|
-
import { A as AuthContext } from './identity.d-
|
|
3
|
+
import { R as RequestFunnel } from './requestFunnel.d-D9edIEjZ.js';
|
|
4
|
+
import { A as AuthContext } from './identity.d-BePPZ7Uv.js';
|
|
5
5
|
import { P as PetRef, U as UserRef } from './ids.d-B2GAAifq.js';
|
|
6
6
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
7
7
|
|
|
@@ -11,6 +11,7 @@ declare const TEXTING_COPY: Readonly<{
|
|
|
11
11
|
loading: "Loading";
|
|
12
12
|
retry: "Try again";
|
|
13
13
|
signedOut: "Sign in required";
|
|
14
|
+
close: "Close";
|
|
14
15
|
phoneLabel: "Mobile number";
|
|
15
16
|
phoneHint: "We'll text a 6-digit code to confirm it's you.";
|
|
16
17
|
phoneInvalid: "That doesn't look like a valid number. Check it and the country, then try again.";
|
|
@@ -52,6 +53,14 @@ declare const TEXTING_COPY: Readonly<{
|
|
|
52
53
|
genericFailure: "That didn't go through. Please try again.";
|
|
53
54
|
/** Followed by the request id, for a support conversation. */
|
|
54
55
|
supportReference: "Support reference:";
|
|
56
|
+
/**
|
|
57
|
+
* The ask (the in-chat line's two chips and the app-open pop-up, `EverfurTextingPrompt`): the consumer's invitation
|
|
58
|
+
* card (`promptBody` / `promptAccept` / `promptDismiss`, Aman 2026-09-15; everfur-mobile copy.ts:120-122). The
|
|
59
|
+
* in-chat line's chips are the same two words, as in both consumer apps.
|
|
60
|
+
*/
|
|
61
|
+
promptBody: "Ask questions about your pet by text message, anytime. No app needed.";
|
|
62
|
+
promptAccept: "Turn on SMS Chat";
|
|
63
|
+
promptDismiss: "Not now";
|
|
55
64
|
/**
|
|
56
65
|
* 403 `phone_country_not_allowed`, a valid number from a country the tenant does not text. The consumer screen
|
|
57
66
|
* refuses a valid number whose own country is outside its list (everfur-frontend app/product/sms-chat/phone.ts:36)
|
|
@@ -93,6 +102,15 @@ declare const TEXTING_BRAND_COPY: Readonly<{
|
|
|
93
102
|
statusActive: (brand: string) => string;
|
|
94
103
|
/** consumer `optedOutBody` */
|
|
95
104
|
optedOutBody: (brand: string) => string;
|
|
105
|
+
/** consumer `promptTitle`: 'Ask Everfur by text, for every pet' (the app-open pop-up's title). */
|
|
106
|
+
promptTitle: (brand: string) => string;
|
|
107
|
+
/**
|
|
108
|
+
* consumer `chatAskLine`: 'Want answers by text too? Add your mobile number and you can text Everfur about your pet
|
|
109
|
+
* anytime.' (owner approved 2026-09-30; everfur-mobile copy.ts:128). The in-chat ask's line.
|
|
110
|
+
*/
|
|
111
|
+
chatAskLine: (brand: string) => string;
|
|
112
|
+
/** consumer `statusUnrecorded`: "Verified. You're all set to text Everfur." The in-chat ask's closing line. */
|
|
113
|
+
chatAskVerified: (brand: string) => string;
|
|
96
114
|
}>;
|
|
97
115
|
/** Every placeholder key in `TEXTING_COPY`, so the list a reviewer approves cannot drift from the file. */
|
|
98
116
|
declare const TEXTING_COPY_PLACEHOLDERS: readonly (keyof typeof TEXTING_COPY)[];
|
|
@@ -302,6 +320,104 @@ declare function useEverfurTextingRepository(): TextingRepository;
|
|
|
302
320
|
/** The member's texting opt-in, step by step. `EverfurTextingOptIn` renders it on either host. */
|
|
303
321
|
declare function useEverfurTexting(): EverfurTextingState;
|
|
304
322
|
|
|
323
|
+
type TextingAskStage = 'hidden' | 'offered' | 'enrolling' | 'verified' | 'dismissed';
|
|
324
|
+
interface TextingAskOptions {
|
|
325
|
+
/** The surface wants the ask (the chat's `chatTextingAsk`). Default true. */
|
|
326
|
+
readonly enabled?: boolean;
|
|
327
|
+
/** The surface is ready for it (the chat: an answer on screen, nothing in flight). Default true. */
|
|
328
|
+
readonly ready?: boolean;
|
|
329
|
+
/** Which surface draws it. A showing belongs to the surface that offered it; the other draws nothing. Default `prompt`. */
|
|
330
|
+
readonly surface?: 'chat' | 'prompt';
|
|
331
|
+
}
|
|
332
|
+
/** The ask's state and its answers. Every function is safe to call in any stage (a call out of turn does nothing). */
|
|
333
|
+
interface TextingAsk {
|
|
334
|
+
readonly stage: TextingAskStage;
|
|
335
|
+
/** The tenant's brand name (its texting profile), for the brand-named lines. Empty while hidden. */
|
|
336
|
+
readonly brand: string;
|
|
337
|
+
/** Which ask this showing is (1, 2 or 3). */
|
|
338
|
+
readonly askNumber: 1 | 2 | 3;
|
|
339
|
+
/** The enrollment underneath (the opt-in's own state and steps). */
|
|
340
|
+
readonly texting: EverfurTextingState;
|
|
341
|
+
/** "Turn on SMS Chat": open the number entry. Answers nothing yet. */
|
|
342
|
+
accept(): void;
|
|
343
|
+
/** "Not now": one ask, unless this showing was already answered. The pop-up's close hands the ask to the chat. */
|
|
344
|
+
dismiss(): void;
|
|
345
|
+
/** The close control on the number entry: back to the two answers. Answers nothing. */
|
|
346
|
+
close(): void;
|
|
347
|
+
/** Text a code to what the member typed (a code request counts as accepting, once per showing). */
|
|
348
|
+
start(phone: string): Promise<boolean>;
|
|
349
|
+
}
|
|
350
|
+
/** The texting ask for the member under the provider. `EverfurChat` and `EverfurTextingPrompt` draw it. */
|
|
351
|
+
declare function useTextingAsk(options?: TextingAskOptions): TextingAsk;
|
|
352
|
+
|
|
353
|
+
/** What the member's identity read said: still unknown (loading, refused, not read), none yet, or one exists. */
|
|
354
|
+
type TextingAskIdentity = 'unknown' | 'none' | 'exists';
|
|
355
|
+
interface TextingAskDueInput {
|
|
356
|
+
/** The surface wants the ask: the chat's `chatTextingAsk`, true for the pop-up. */
|
|
357
|
+
readonly enabled: boolean;
|
|
358
|
+
readonly capabilityGranted: boolean;
|
|
359
|
+
readonly hasProfile: boolean;
|
|
360
|
+
readonly signedIn: boolean;
|
|
361
|
+
/** The schedule was readable and says this is an eligible ask. */
|
|
362
|
+
readonly scheduleEligible: boolean;
|
|
363
|
+
readonly offeredThisSession: boolean;
|
|
364
|
+
readonly identity: TextingAskIdentity;
|
|
365
|
+
/** The chat: a message on screen and nothing in flight. True for the pop-up. */
|
|
366
|
+
readonly surfaceReady: boolean;
|
|
367
|
+
}
|
|
368
|
+
interface TextingAskDue {
|
|
369
|
+
readonly readEnabled: boolean;
|
|
370
|
+
readonly due: boolean;
|
|
371
|
+
}
|
|
372
|
+
declare function resolveTextingAskDue(input: TextingAskDueInput): TextingAskDue;
|
|
373
|
+
/** The parts of a chat message the thread rule reads (a `ChatMessage` is one). */
|
|
374
|
+
interface TextingAskThreadMessage {
|
|
375
|
+
readonly role: string;
|
|
376
|
+
readonly text: string;
|
|
377
|
+
readonly pending?: boolean | undefined;
|
|
378
|
+
/** A platform check-in asks the member something; it is not an answer. */
|
|
379
|
+
readonly checkin?: unknown;
|
|
380
|
+
readonly urgencyLevel?: string | null | undefined;
|
|
381
|
+
}
|
|
382
|
+
/** The chat state the thread rule reads (`UseEverfurChatState` is one). */
|
|
383
|
+
interface TextingAskThreadState {
|
|
384
|
+
readonly messages: ReadonlyArray<TextingAskThreadMessage>;
|
|
385
|
+
readonly status?: string | undefined;
|
|
386
|
+
readonly stopped?: boolean | undefined;
|
|
387
|
+
readonly isBootstrapping?: boolean | undefined;
|
|
388
|
+
readonly isLoadingHistory?: boolean | undefined;
|
|
389
|
+
readonly isStreaming?: boolean | undefined;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* The chat's thread is ready for the ask: the line lands after an ANSWER (the consumer rule, everfur-mobile
|
|
393
|
+
* useSmsChatAsk.ts). Nothing is opening, loading or streaming, and the latest turn is a completed Everfur answer:
|
|
394
|
+
* the last row is the assistant's, settled and not empty, not a check-in, and not urgent (`URGENT_LEVELS`); the turn
|
|
395
|
+
* neither failed (the error card) nor was stopped. A vet's message is not Everfur's answer. This only gates the
|
|
396
|
+
* OFFER: a line already offered stays when a later turn fails (the ask's session entry holds it).
|
|
397
|
+
*/
|
|
398
|
+
declare function textingAskThreadReady(chat: TextingAskThreadState): boolean;
|
|
399
|
+
|
|
400
|
+
/** The KvPort key (the web port adds its own `everfur:` namespace). */
|
|
401
|
+
declare const TEXTING_ASK_SCHEDULE_KEY = "everfur.texting.askSchedule.v1";
|
|
402
|
+
/** Flat snooze after every ask. Not a backoff. */
|
|
403
|
+
declare const TEXTING_ASK_SNOOZE_MS: number;
|
|
404
|
+
/** Lifetime cap on asks. */
|
|
405
|
+
declare const TEXTING_ASK_MAX_ASKS = 3;
|
|
406
|
+
/** One member's record. */
|
|
407
|
+
interface TextingAskEntry {
|
|
408
|
+
readonly askCount: number;
|
|
409
|
+
/** Do not ask before this instant (epoch ms). Null when never asked. */
|
|
410
|
+
readonly nextAskAt: number | null;
|
|
411
|
+
readonly completed: boolean;
|
|
412
|
+
}
|
|
413
|
+
type TextingAskScheduleRead = {
|
|
414
|
+
readonly status: 'ok';
|
|
415
|
+
readonly entry: TextingAskEntry;
|
|
416
|
+
} | {
|
|
417
|
+
readonly status: 'unreadable';
|
|
418
|
+
};
|
|
419
|
+
declare function isTextingAskEligible(read: TextingAskScheduleRead, now: number): boolean;
|
|
420
|
+
|
|
305
421
|
/**
|
|
306
422
|
* The line for a refused step. The consumer deck's own words per refusal; never the raw server message. For a refused
|
|
307
423
|
* code, pass the snapshot's `codeRefusal` so a typo, an expired code and a used-up code read differently; without it
|
|
@@ -322,4 +438,4 @@ declare function textingOptedOutBody(identity: EverfurTextingIdentity | null, br
|
|
|
322
438
|
/** A +1 E.164 number as a member reads it: `+14155550134` becomes `(415) 555-0134`. Anything else is unchanged. */
|
|
323
439
|
declare function formatTextingPhone(e164: string | null): string;
|
|
324
440
|
|
|
325
|
-
export {
|
|
441
|
+
export { toTextingE164 as $, type TextingAskStage as A, type TextingAskThreadMessage as B, COPY_PLACEHOLDER_PREFIX as C, type TextingAskThreadState as D, type EverfurTextingViewStatus as E, type TextingCodeRefusal as F, TextingController as G, type TextingPhase as H, type TextingRepository as I, type TextingRepositoryDeps as J, type TextingRuntime as K, type TextingSnapshot as L, createTextingRepository as M, createTextingRepositoryOver as N, formatTextingPhone as O, isE164 as P, isTextingAskEligible as Q, parseTextingProfile as R, resolveTextingAskDue as S, type TextingCopy as T, textingAskThreadReady as U, textingErrorText as V, textingIdentityFromWire as W, textingInputProblemText as X, textingOptedOutBody as Y, textingReasonOf as Z, textingSupportText as _, type TextingBrandCopy as a, useEverfurTexting as a0, useEverfurTextingProfile as a1, useEverfurTextingRepository as a2, useTextingAsk as a3, validateTextingCode as a4, validateTextingEnroll as a5, type TextingAsk as b, EVERFUR_TEXTING_STATUSES as c, type EverfurTextingChallenge as d, type EverfurTextingIdentity as e, type EverfurTextingInputProblem as f, type EverfurTextingProfile as g, type EverfurTextingReason as h, type EverfurTextingState as i, type EverfurTextingStatus as j, type EverfurTextingVerificationInput as k, TEXTING_ASK_MAX_ASKS as l, TEXTING_ASK_SCHEDULE_KEY as m, TEXTING_ASK_SNOOZE_MS as n, TEXTING_BRAND_COPY as o, TEXTING_CODE_PATTERN as p, TEXTING_COPY as q, TEXTING_COPY_PLACEHOLDERS as r, TEXTING_UI_CODE_LENGTH as s, type TextingAction as t, type TextingAskDue as u, type TextingAskDueInput as v, type TextingAskEntry as w, type TextingAskIdentity as x, type TextingAskOptions as y, type TextingAskScheduleRead as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
3
3
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
4
|
-
import { A as AuthContext } from './identity.d-
|
|
4
|
+
import { A as AuthContext } from './identity.d-BePPZ7Uv.js';
|
|
5
5
|
import { U as UserRef, R as RecordsRequestId, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.js';
|
|
6
6
|
import { V as VetVisitIntent } from './visitIntent.d-D7_yVp1I.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
3
3
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
4
|
-
import { A as AuthContext } from './identity.d-
|
|
4
|
+
import { A as AuthContext } from './identity.d-CJfnWOdH.cjs';
|
|
5
5
|
import { U as UserRef, R as RecordsRequestId, P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.cjs';
|
|
6
6
|
import { V as VetVisitIntent } from './visitIntent.d-D7_yVp1I.cjs';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
2
|
-
import { j as FetchLike } from './config.d-
|
|
2
|
+
import { j as FetchLike } from './config.d-MX7IKP2f.js';
|
|
3
3
|
import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile.d-CSs1wlXT.js';
|
|
4
4
|
|
|
5
5
|
/** How your backend reaches Everfur for pet writes. Build it once and reuse it. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
2
|
-
import { j as FetchLike } from './config.d-
|
|
2
|
+
import { j as FetchLike } from './config.d-DJ4mvf_w.cjs';
|
|
3
3
|
import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile.d-CSs1wlXT.cjs';
|
|
4
4
|
|
|
5
5
|
/** How your backend reaches Everfur for pet writes. Build it once and reuse it. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
2
|
-
import { A as AuthContext } from './identity.d-
|
|
2
|
+
import { A as AuthContext } from './identity.d-CJfnWOdH.cjs';
|
|
3
3
|
import { P as PetRef } from './ids.d-B2GAAifq.cjs';
|
|
4
4
|
import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile.d-CSs1wlXT.cjs';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
2
|
-
import { A as AuthContext } from './identity.d-
|
|
2
|
+
import { A as AuthContext } from './identity.d-BePPZ7Uv.js';
|
|
3
3
|
import { P as PetRef } from './ids.d-B2GAAifq.js';
|
|
4
4
|
import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile.d-CSs1wlXT.js';
|
|
5
5
|
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { m as HealthPlan, j as HealthPlanPageRepository, H as HealthPlanPage, n as HealthPlanRepository } from './focus.d-jQWp0hdK.cjs';
|
|
3
|
+
import { P as PetRef } from './ids.d-B2GAAifq.cjs';
|
|
4
|
+
import { d as HealthPlanCart } from './usePresentation.d-DYTF_ZGf.cjs';
|
|
5
|
+
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
|
|
6
|
+
import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
|
|
7
|
+
|
|
8
|
+
/** What a docked bar needs, as the plan page last published it. */
|
|
9
|
+
interface HealthPlanCartDock {
|
|
10
|
+
/** The member's cart: the items in the plan, their count and subtotal. */
|
|
11
|
+
readonly cart: HealthPlanCart;
|
|
12
|
+
/** True while an add or remove is in flight (draw the checkout control disabled). */
|
|
13
|
+
readonly busy: boolean;
|
|
14
|
+
/** The pet whose plan the page shows, or null. */
|
|
15
|
+
readonly petRef: PetRef | null;
|
|
16
|
+
/** The plan the page shows, or null before it loads. */
|
|
17
|
+
readonly plan: HealthPlan | null;
|
|
18
|
+
/** Adds (`true`) or removes (`false`) one product, as the page's own control does. Resolves true when it took. */
|
|
19
|
+
readonly setInPlan: (productId: string, inPlan: boolean) => Promise<boolean>;
|
|
20
|
+
/** Adds every product not yet in the plan. Resolves true when every add took. */
|
|
21
|
+
readonly addAll: () => Promise<boolean>;
|
|
22
|
+
}
|
|
23
|
+
interface HealthPlanCartScopeProps {
|
|
24
|
+
readonly children?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/** The scope a plan page with `cartBarPlacement: 'none'` publishes its cart to. Wrap the page and your bar in it. */
|
|
27
|
+
declare function HealthPlanCartScope({ children }: HealthPlanCartScopeProps): ReactNode;
|
|
28
|
+
/** The cart the plan page in the nearest `HealthPlanCartScope` published, or null (no scope, or no page yet). */
|
|
29
|
+
declare function useHealthPlanCartDock(): HealthPlanCartDock | null;
|
|
30
|
+
|
|
31
|
+
type HealthPlanPagePhase = 'idle' | 'loading' | 'failed' | 'ready';
|
|
32
|
+
interface HealthPlanPageOptions {
|
|
33
|
+
readonly petRef: PetRef | null;
|
|
34
|
+
/** False skips the read. Defaults to true. */
|
|
35
|
+
readonly enabled?: boolean;
|
|
36
|
+
/** A repository of your own (tests, a stub backend). Defaults to the one over the provider's runtime. */
|
|
37
|
+
readonly repository?: HealthPlanPageRepository;
|
|
38
|
+
/** Coming back to the foreground re-reads a page shown for more than a minute, quietly. Absent, it does not. */
|
|
39
|
+
readonly lifecycle?: LifecyclePort | null;
|
|
40
|
+
/** Change it to re-read the page now, quietly. */
|
|
41
|
+
readonly refreshKey?: string | number;
|
|
42
|
+
}
|
|
43
|
+
interface HealthPlanPageState {
|
|
44
|
+
readonly phase: HealthPlanPagePhase;
|
|
45
|
+
/** The answer for `petRef`, or null until it lands. */
|
|
46
|
+
readonly page: HealthPlanPage | null;
|
|
47
|
+
readonly error: EverfurError | null;
|
|
48
|
+
/** True when the read answered not found: this pet has no plan page. `phase` is then `ready` and `page` null. */
|
|
49
|
+
readonly missing: boolean;
|
|
50
|
+
refresh(): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
/** The plan page repository bound to the runtime under your provider. */
|
|
53
|
+
declare function useHealthPlanPageRepository(): HealthPlanPageRepository;
|
|
54
|
+
/** One pet's Health Plan page. Re-read when the pet changes. */
|
|
55
|
+
declare function useHealthPlanPage(options: HealthPlanPageOptions): HealthPlanPageState;
|
|
56
|
+
|
|
57
|
+
type HealthPlanPhase = 'idle' | 'loading' | 'failed' | 'ready';
|
|
58
|
+
interface HealthPlanSnapshot {
|
|
59
|
+
readonly phase: HealthPlanPhase;
|
|
60
|
+
readonly petRef: PetRef | null;
|
|
61
|
+
readonly plan: HealthPlan | null;
|
|
62
|
+
/** Product ids whose add or remove is in flight. */
|
|
63
|
+
readonly pending: readonly string[];
|
|
64
|
+
/** The last refused write per product id. */
|
|
65
|
+
readonly itemErrors: Readonly<Record<string, EverfurError>>;
|
|
66
|
+
/** The refused read, or null. */
|
|
67
|
+
readonly error: EverfurError | null;
|
|
68
|
+
}
|
|
69
|
+
declare class HealthPlanController {
|
|
70
|
+
private readonly repository;
|
|
71
|
+
private snapshot;
|
|
72
|
+
private readonly listeners;
|
|
73
|
+
private generation;
|
|
74
|
+
/** Bumped by every add or remove, so a quiet re-read that started before one never overwrites it. */
|
|
75
|
+
private writes;
|
|
76
|
+
/** Bumped by every quiet re-read, so an older one that settles after a newer one never overwrites it. */
|
|
77
|
+
private revalidations;
|
|
78
|
+
/** A host refresh asked for while a write was in flight: the quiet re-read runs once the last write settles. */
|
|
79
|
+
private refreshAfterWrites;
|
|
80
|
+
private disposed;
|
|
81
|
+
constructor(repository: HealthPlanRepository);
|
|
82
|
+
readonly subscribe: (listener: () => void) => (() => void);
|
|
83
|
+
readonly getSnapshot: () => HealthPlanSnapshot;
|
|
84
|
+
private set;
|
|
85
|
+
/** Read the plan for `petRef` (null clears to `idle`). A different pet drops the old plan before the read lands. */
|
|
86
|
+
load(petRef: PetRef | null): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Re-read the shown plan WITHOUT a loading state (a member coming back to a page that sat open, a host's
|
|
89
|
+
* `refreshKey`). Only from `ready` with nothing in flight; the answer replaces the plan only while the same pet is
|
|
90
|
+
* shown and no add, remove or full read happened meanwhile. A refused re-read keeps the plan on screen.
|
|
91
|
+
*/
|
|
92
|
+
revalidate(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* The host says the plan changed (its `refreshKey`), so the request is never dropped: from `ready` a quiet
|
|
95
|
+
* re-read, held until the last add or remove in flight settles; from `failed` or `loading` a full read for the
|
|
96
|
+
* shown pet (there is no plan to keep on screen, and a read in flight may predate the change).
|
|
97
|
+
*/
|
|
98
|
+
refresh(): Promise<void>;
|
|
99
|
+
private settleWrite;
|
|
100
|
+
/** Put an item in the plan (`true`) or take it out (`false`). Settles true when the server accepted it. */
|
|
101
|
+
setInPlan(productId: string, inPlan: boolean): Promise<boolean>;
|
|
102
|
+
dispose(): void;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Who said her records landed: the plan's own records read, or the host (a notification, the intro). */
|
|
106
|
+
type HealthPlanRecordsLandedSource = 'plan' | 'host';
|
|
107
|
+
/** Hears `notifyHealthPlanRecordsLanded`: which pet, and who said it. */
|
|
108
|
+
type HealthPlanRecordsLandedListener = (petRef: PetRef, source: HealthPlanRecordsLandedSource) => void;
|
|
109
|
+
/** Hears `setHealthPlanNoVet`: which pet, and whether it now has no vet. */
|
|
110
|
+
type HealthPlanNoVetListener = (petRef: PetRef, noVet: boolean) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Says her records landed. The Health Plan reads her records again and, once they hold what her three blanks need,
|
|
113
|
+
* fills them with one yellow flash and the "Her records are in" toast. The plan calls it with `'plan'` when its own
|
|
114
|
+
* read sees them land; a host calls it (default `'host'`) from a notification or the intro.
|
|
115
|
+
*/
|
|
116
|
+
declare function notifyHealthPlanRecordsLanded(petRef: PetRef, source?: HealthPlanRecordsLandedSource): void;
|
|
117
|
+
/** Listens for `notifyHealthPlanRecordsLanded`. Returns the unsubscribe. */
|
|
118
|
+
declare function onHealthPlanRecordsLanded(listener: HealthPlanRecordsLandedListener): () => void;
|
|
119
|
+
/** Records that the member has no vet for this pet yet (true), or has one again (false). */
|
|
120
|
+
declare function setHealthPlanNoVet(petRef: PetRef, noVet: boolean): void;
|
|
121
|
+
/** True when `setHealthPlanNoVet(petRef, true)` was said for this pet on this page. */
|
|
122
|
+
declare function healthPlanNoVet(petRef: PetRef): boolean;
|
|
123
|
+
/** Listens for `setHealthPlanNoVet`. Returns the unsubscribe. */
|
|
124
|
+
declare function onHealthPlanNoVet(listener: HealthPlanNoVetListener): () => void;
|
|
125
|
+
|
|
126
|
+
export { type HealthPlanCartDock as H, HealthPlanCartScope as a, type HealthPlanCartScopeProps as b, HealthPlanController as c, type HealthPlanNoVetListener as d, type HealthPlanPageOptions as e, type HealthPlanPagePhase as f, type HealthPlanPageState as g, type HealthPlanPhase as h, type HealthPlanRecordsLandedListener as i, type HealthPlanRecordsLandedSource as j, type HealthPlanSnapshot as k, healthPlanNoVet as l, onHealthPlanRecordsLanded as m, notifyHealthPlanRecordsLanded as n, onHealthPlanNoVet as o, useHealthPlanPage as p, useHealthPlanPageRepository as q, setHealthPlanNoVet as s, useHealthPlanCartDock as u };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { m as HealthPlan, j as HealthPlanPageRepository, H as HealthPlanPage, n as HealthPlanRepository } from './focus.d-C0Tr0oVJ.js';
|
|
3
|
+
import { P as PetRef } from './ids.d-B2GAAifq.js';
|
|
4
|
+
import { d as HealthPlanCart } from './usePresentation.d-BGz32Vlm.js';
|
|
5
|
+
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
|
|
6
|
+
import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
|
|
7
|
+
|
|
8
|
+
/** What a docked bar needs, as the plan page last published it. */
|
|
9
|
+
interface HealthPlanCartDock {
|
|
10
|
+
/** The member's cart: the items in the plan, their count and subtotal. */
|
|
11
|
+
readonly cart: HealthPlanCart;
|
|
12
|
+
/** True while an add or remove is in flight (draw the checkout control disabled). */
|
|
13
|
+
readonly busy: boolean;
|
|
14
|
+
/** The pet whose plan the page shows, or null. */
|
|
15
|
+
readonly petRef: PetRef | null;
|
|
16
|
+
/** The plan the page shows, or null before it loads. */
|
|
17
|
+
readonly plan: HealthPlan | null;
|
|
18
|
+
/** Adds (`true`) or removes (`false`) one product, as the page's own control does. Resolves true when it took. */
|
|
19
|
+
readonly setInPlan: (productId: string, inPlan: boolean) => Promise<boolean>;
|
|
20
|
+
/** Adds every product not yet in the plan. Resolves true when every add took. */
|
|
21
|
+
readonly addAll: () => Promise<boolean>;
|
|
22
|
+
}
|
|
23
|
+
interface HealthPlanCartScopeProps {
|
|
24
|
+
readonly children?: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/** The scope a plan page with `cartBarPlacement: 'none'` publishes its cart to. Wrap the page and your bar in it. */
|
|
27
|
+
declare function HealthPlanCartScope({ children }: HealthPlanCartScopeProps): ReactNode;
|
|
28
|
+
/** The cart the plan page in the nearest `HealthPlanCartScope` published, or null (no scope, or no page yet). */
|
|
29
|
+
declare function useHealthPlanCartDock(): HealthPlanCartDock | null;
|
|
30
|
+
|
|
31
|
+
type HealthPlanPagePhase = 'idle' | 'loading' | 'failed' | 'ready';
|
|
32
|
+
interface HealthPlanPageOptions {
|
|
33
|
+
readonly petRef: PetRef | null;
|
|
34
|
+
/** False skips the read. Defaults to true. */
|
|
35
|
+
readonly enabled?: boolean;
|
|
36
|
+
/** A repository of your own (tests, a stub backend). Defaults to the one over the provider's runtime. */
|
|
37
|
+
readonly repository?: HealthPlanPageRepository;
|
|
38
|
+
/** Coming back to the foreground re-reads a page shown for more than a minute, quietly. Absent, it does not. */
|
|
39
|
+
readonly lifecycle?: LifecyclePort | null;
|
|
40
|
+
/** Change it to re-read the page now, quietly. */
|
|
41
|
+
readonly refreshKey?: string | number;
|
|
42
|
+
}
|
|
43
|
+
interface HealthPlanPageState {
|
|
44
|
+
readonly phase: HealthPlanPagePhase;
|
|
45
|
+
/** The answer for `petRef`, or null until it lands. */
|
|
46
|
+
readonly page: HealthPlanPage | null;
|
|
47
|
+
readonly error: EverfurError | null;
|
|
48
|
+
/** True when the read answered not found: this pet has no plan page. `phase` is then `ready` and `page` null. */
|
|
49
|
+
readonly missing: boolean;
|
|
50
|
+
refresh(): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
/** The plan page repository bound to the runtime under your provider. */
|
|
53
|
+
declare function useHealthPlanPageRepository(): HealthPlanPageRepository;
|
|
54
|
+
/** One pet's Health Plan page. Re-read when the pet changes. */
|
|
55
|
+
declare function useHealthPlanPage(options: HealthPlanPageOptions): HealthPlanPageState;
|
|
56
|
+
|
|
57
|
+
type HealthPlanPhase = 'idle' | 'loading' | 'failed' | 'ready';
|
|
58
|
+
interface HealthPlanSnapshot {
|
|
59
|
+
readonly phase: HealthPlanPhase;
|
|
60
|
+
readonly petRef: PetRef | null;
|
|
61
|
+
readonly plan: HealthPlan | null;
|
|
62
|
+
/** Product ids whose add or remove is in flight. */
|
|
63
|
+
readonly pending: readonly string[];
|
|
64
|
+
/** The last refused write per product id. */
|
|
65
|
+
readonly itemErrors: Readonly<Record<string, EverfurError>>;
|
|
66
|
+
/** The refused read, or null. */
|
|
67
|
+
readonly error: EverfurError | null;
|
|
68
|
+
}
|
|
69
|
+
declare class HealthPlanController {
|
|
70
|
+
private readonly repository;
|
|
71
|
+
private snapshot;
|
|
72
|
+
private readonly listeners;
|
|
73
|
+
private generation;
|
|
74
|
+
/** Bumped by every add or remove, so a quiet re-read that started before one never overwrites it. */
|
|
75
|
+
private writes;
|
|
76
|
+
/** Bumped by every quiet re-read, so an older one that settles after a newer one never overwrites it. */
|
|
77
|
+
private revalidations;
|
|
78
|
+
/** A host refresh asked for while a write was in flight: the quiet re-read runs once the last write settles. */
|
|
79
|
+
private refreshAfterWrites;
|
|
80
|
+
private disposed;
|
|
81
|
+
constructor(repository: HealthPlanRepository);
|
|
82
|
+
readonly subscribe: (listener: () => void) => (() => void);
|
|
83
|
+
readonly getSnapshot: () => HealthPlanSnapshot;
|
|
84
|
+
private set;
|
|
85
|
+
/** Read the plan for `petRef` (null clears to `idle`). A different pet drops the old plan before the read lands. */
|
|
86
|
+
load(petRef: PetRef | null): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Re-read the shown plan WITHOUT a loading state (a member coming back to a page that sat open, a host's
|
|
89
|
+
* `refreshKey`). Only from `ready` with nothing in flight; the answer replaces the plan only while the same pet is
|
|
90
|
+
* shown and no add, remove or full read happened meanwhile. A refused re-read keeps the plan on screen.
|
|
91
|
+
*/
|
|
92
|
+
revalidate(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* The host says the plan changed (its `refreshKey`), so the request is never dropped: from `ready` a quiet
|
|
95
|
+
* re-read, held until the last add or remove in flight settles; from `failed` or `loading` a full read for the
|
|
96
|
+
* shown pet (there is no plan to keep on screen, and a read in flight may predate the change).
|
|
97
|
+
*/
|
|
98
|
+
refresh(): Promise<void>;
|
|
99
|
+
private settleWrite;
|
|
100
|
+
/** Put an item in the plan (`true`) or take it out (`false`). Settles true when the server accepted it. */
|
|
101
|
+
setInPlan(productId: string, inPlan: boolean): Promise<boolean>;
|
|
102
|
+
dispose(): void;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Who said her records landed: the plan's own records read, or the host (a notification, the intro). */
|
|
106
|
+
type HealthPlanRecordsLandedSource = 'plan' | 'host';
|
|
107
|
+
/** Hears `notifyHealthPlanRecordsLanded`: which pet, and who said it. */
|
|
108
|
+
type HealthPlanRecordsLandedListener = (petRef: PetRef, source: HealthPlanRecordsLandedSource) => void;
|
|
109
|
+
/** Hears `setHealthPlanNoVet`: which pet, and whether it now has no vet. */
|
|
110
|
+
type HealthPlanNoVetListener = (petRef: PetRef, noVet: boolean) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Says her records landed. The Health Plan reads her records again and, once they hold what her three blanks need,
|
|
113
|
+
* fills them with one yellow flash and the "Her records are in" toast. The plan calls it with `'plan'` when its own
|
|
114
|
+
* read sees them land; a host calls it (default `'host'`) from a notification or the intro.
|
|
115
|
+
*/
|
|
116
|
+
declare function notifyHealthPlanRecordsLanded(petRef: PetRef, source?: HealthPlanRecordsLandedSource): void;
|
|
117
|
+
/** Listens for `notifyHealthPlanRecordsLanded`. Returns the unsubscribe. */
|
|
118
|
+
declare function onHealthPlanRecordsLanded(listener: HealthPlanRecordsLandedListener): () => void;
|
|
119
|
+
/** Records that the member has no vet for this pet yet (true), or has one again (false). */
|
|
120
|
+
declare function setHealthPlanNoVet(petRef: PetRef, noVet: boolean): void;
|
|
121
|
+
/** True when `setHealthPlanNoVet(petRef, true)` was said for this pet on this page. */
|
|
122
|
+
declare function healthPlanNoVet(petRef: PetRef): boolean;
|
|
123
|
+
/** Listens for `setHealthPlanNoVet`. Returns the unsubscribe. */
|
|
124
|
+
declare function onHealthPlanNoVet(listener: HealthPlanNoVetListener): () => void;
|
|
125
|
+
|
|
126
|
+
export { type HealthPlanCartDock as H, HealthPlanCartScope as a, type HealthPlanCartScopeProps as b, HealthPlanController as c, type HealthPlanNoVetListener as d, type HealthPlanPageOptions as e, type HealthPlanPagePhase as f, type HealthPlanPageState as g, type HealthPlanPhase as h, type HealthPlanRecordsLandedListener as i, type HealthPlanRecordsLandedSource as j, type HealthPlanSnapshot as k, healthPlanNoVet as l, onHealthPlanRecordsLanded as m, notifyHealthPlanRecordsLanded as n, onHealthPlanNoVet as o, useHealthPlanPage as p, useHealthPlanPageRepository as q, setHealthPlanNoVet as s, useHealthPlanCartDock as u };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository.d-
|
|
2
|
-
import { A as AuthContext } from './identity.d-
|
|
1
|
+
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository.d-DbirgbyH.js';
|
|
2
|
+
import { A as AuthContext } from './identity.d-BePPZ7Uv.js';
|
|
3
3
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
|
|
4
4
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
5
|
-
import { R as RequestFunnel } from './requestFunnel.d-
|
|
5
|
+
import { R as RequestFunnel } from './requestFunnel.d-D9edIEjZ.js';
|
|
6
6
|
import { P as PetRef, C as ConversationId, b as ResponseId } from './ids.d-B2GAAifq.js';
|
|
7
|
-
import { i as UrgencyLevel, F as Frame } from './config.d-
|
|
7
|
+
import { i as UrgencyLevel, F as Frame } from './config.d-MX7IKP2f.js';
|
|
8
8
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
9
9
|
import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.js';
|
|
10
10
|
import { F as FileHandle } from './ports.d-BX4f4UsB.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository.d-
|
|
2
|
-
import { A as AuthContext } from './identity.d-
|
|
1
|
+
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository.d-DCnix2pT.cjs';
|
|
2
|
+
import { A as AuthContext } from './identity.d-CJfnWOdH.cjs';
|
|
3
3
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
|
|
4
4
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
5
|
-
import { R as RequestFunnel } from './requestFunnel.d-
|
|
5
|
+
import { R as RequestFunnel } from './requestFunnel.d-RZex94XX.cjs';
|
|
6
6
|
import { P as PetRef, C as ConversationId, b as ResponseId } from './ids.d-B2GAAifq.cjs';
|
|
7
|
-
import { i as UrgencyLevel, F as Frame } from './config.d-
|
|
7
|
+
import { i as UrgencyLevel, F as Frame } from './config.d-DJ4mvf_w.cjs';
|
|
8
8
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
9
9
|
import { T as TelemetryPort } from './TelemetryPort.d-BDNr00hu.cjs';
|
|
10
10
|
import { F as FileHandle } from './ports.d-BX4f4UsB.cjs';
|
|
@@ -49,6 +49,12 @@ interface EverfurPresentation {
|
|
|
49
49
|
* at full strength; `dim_when_empty` dims it until there is text. Either way an empty box sends nothing.
|
|
50
50
|
*/
|
|
51
51
|
readonly chatSendButton: EverfurChatSendButtonSetting;
|
|
52
|
+
/**
|
|
53
|
+
* The in-chat texting ask: one Everfur line after an answer, offering to turn on texting, for a member with no
|
|
54
|
+
* texting identity when the tenant's `texting` capability is granted (default true). false hides only the chat's
|
|
55
|
+
* ask; the app-open pop-up (`EverfurTextingPrompt`) is the partner's own choice to mount.
|
|
56
|
+
*/
|
|
57
|
+
readonly chatTextingAsk: boolean;
|
|
52
58
|
}
|
|
53
59
|
/** A partial presentation: what the console sets, or what a partner passes as a prop. */
|
|
54
60
|
type EverfurPresentationInput = Partial<EverfurPresentation>;
|
|
@@ -49,6 +49,12 @@ interface EverfurPresentation {
|
|
|
49
49
|
* at full strength; `dim_when_empty` dims it until there is text. Either way an empty box sends nothing.
|
|
50
50
|
*/
|
|
51
51
|
readonly chatSendButton: EverfurChatSendButtonSetting;
|
|
52
|
+
/**
|
|
53
|
+
* The in-chat texting ask: one Everfur line after an answer, offering to turn on texting, for a member with no
|
|
54
|
+
* texting identity when the tenant's `texting` capability is granted (default true). false hides only the chat's
|
|
55
|
+
* ask; the app-open pop-up (`EverfurTextingPrompt`) is the partner's own choice to mount.
|
|
56
|
+
*/
|
|
57
|
+
readonly chatTextingAsk: boolean;
|
|
52
58
|
}
|
|
53
59
|
/** A partial presentation: what the console sets, or what a partner passes as a prop. */
|
|
54
60
|
type EverfurPresentationInput = Partial<EverfurPresentation>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One partner-supplied starter chip for the empty thread (`EverfurChat`'s `starterPrompts`). The words are the
|
|
3
|
+
* partner's own: Everfur shows `label` and sends `prompt` (the label when absent) as the member's next message.
|
|
4
|
+
*/
|
|
5
|
+
interface EverfurStarterPrompt {
|
|
6
|
+
/** What the chip reads. A blank label drops the chip. */
|
|
7
|
+
readonly label: string;
|
|
8
|
+
/** The text sent when the chip is tapped. Defaults to `label`. */
|
|
9
|
+
readonly prompt?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The chip's own fill, any CSS colour (for example `'#FFE7A1'`). Absent, the chip takes the theme's
|
|
12
|
+
* `highlight` under `onHighlight`, as the built-in chips do on a partner theme.
|
|
13
|
+
*/
|
|
14
|
+
readonly tint?: string;
|
|
15
|
+
/** The chip's text colour on its `tint`. Absent, the theme's primary text colour. Ignored without `tint`. */
|
|
16
|
+
readonly ink?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type { EverfurStarterPrompt as E };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One partner-supplied starter chip for the empty thread (`EverfurChat`'s `starterPrompts`). The words are the
|
|
3
|
+
* partner's own: Everfur shows `label` and sends `prompt` (the label when absent) as the member's next message.
|
|
4
|
+
*/
|
|
5
|
+
interface EverfurStarterPrompt {
|
|
6
|
+
/** What the chip reads. A blank label drops the chip. */
|
|
7
|
+
readonly label: string;
|
|
8
|
+
/** The text sent when the chip is tapped. Defaults to `label`. */
|
|
9
|
+
readonly prompt?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The chip's own fill, any CSS colour (for example `'#FFE7A1'`). Absent, the chip takes the theme's
|
|
12
|
+
* `highlight` under `onHighlight`, as the built-in chips do on a partner theme.
|
|
13
|
+
*/
|
|
14
|
+
readonly tint?: string;
|
|
15
|
+
/** The chip's text colour on its `tint`. Absent, the theme's primary text colour. Ignored without `tint`. */
|
|
16
|
+
readonly ink?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type { EverfurStarterPrompt as E };
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews.d-
|
|
2
|
-
export {
|
|
3
|
-
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows.d-
|
|
4
|
-
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as
|
|
1
|
+
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews.d-BdvFZgPs.cjs';
|
|
2
|
+
export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../useRecordsDepth.d--LLA_4ga.cjs';
|
|
3
|
+
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows.d-BvM2A7_G.cjs';
|
|
4
|
+
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../depth.d-D2e5WZuE.cjs';
|
|
5
|
+
export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../screenProps.d-CQ0qZJkr.cjs';
|
|
5
6
|
export { R as RecordsAskEntityRef, a as RecordsAskHandler } from '../../recordsAsk.d-C5CGSi3j.cjs';
|
|
7
|
+
export { R as RecordsClinic } from '../../clinicModels.d-BXgKZqDb.cjs';
|
|
6
8
|
export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids.d-B2GAAifq.cjs';
|
|
7
|
-
export { R as RecordShareAudience } from '../../features.d-
|
|
9
|
+
export { R as RecordShareAudience } from '../../features.d-DrQxTw3-.cjs';
|
|
8
10
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.cjs';
|
|
9
11
|
export { E as EverfurResult } from '../../EverfurResult.d-BFH-3s6E.cjs';
|
|
10
|
-
export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '../../models.d-
|
|
12
|
+
export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '../../models.d-BSqvbTE1.cjs';
|
|
11
13
|
import 'react';
|
|
12
14
|
import 'react-native';
|
|
13
|
-
import '../../requestFunnel.d-DWQQpjFR.cjs';
|
|
14
15
|
import '../../ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
15
|
-
import '../../
|
|
16
|
-
import '../../
|
|
16
|
+
import '../../requestFunnel.d-RZex94XX.cjs';
|
|
17
|
+
import '../../config.d-DJ4mvf_w.cjs';
|
|
18
|
+
import '../../identity.d-CJfnWOdH.cjs';
|
|
19
|
+
import '../../clinicBatch.d-Ccmrngcu.cjs';
|
|
20
|
+
import '../../clinicRequestProps.d-1dCtouGA.cjs';
|