@everfur/sdk 0.5.1 → 0.5.3
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 +351 -0
- package/dist/BookedScreen-BJPbXLCG.d.ts +54 -0
- package/dist/BookedScreen-Cnld-jB_.d.cts +54 -0
- package/dist/{Chat-Rzplrf5M.d.ts → Chat-CNRZEu92.d.ts} +3 -3
- package/dist/{Chat-ypo6miKm.d.cts → Chat-a6If51cF.d.cts} +3 -3
- package/dist/{DepthViews-CeTfPUBX.d.ts → DepthViews-Bfv2DTUl.d.ts} +1 -1
- package/dist/{DepthViews-Cui3oonj.d.cts → DepthViews-Cl4AoL3X.d.cts} +1 -1
- package/dist/{DepthViews-ClykXOJj.d.cts → DepthViews-kURiusNd.d.cts} +1 -1
- package/dist/{DepthViews-baYLMNQ-.d.ts → DepthViews-zhn3Rk5Z.d.ts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments-D3HCBmOE.d.ts → attachments-5_p7kE38.d.ts} +2 -2
- package/dist/{attachments-CwsR-bPN.d.cts → attachments-CHgc11hT.d.cts} +5 -5
- package/dist/{attachments-CzZ7in24.d.ts → attachments-TXOhN36S.d.ts} +5 -5
- package/dist/{attachments-Nk73Lll8.d.cts → attachments-affGN_Uv.d.cts} +2 -2
- package/dist/{bookingCopy-SDkXaxDf.d.ts → bookingCopy-BQ7Pg7qg.d.ts} +38 -200
- package/dist/{bookingCopy-Dv8rKqyV.d.cts → bookingCopy-BpZvZO1S.d.cts} +38 -200
- package/dist/bookingTypes-DCs8mmBb.d.cts +188 -0
- package/dist/bookingTypes-DCs8mmBb.d.ts +188 -0
- package/dist/{callCopy-rDH9JTFo.d.cts → callCopy-CPe9mbwG.d.cts} +7 -2
- package/dist/{callCopy-rDH9JTFo.d.ts → callCopy-CPe9mbwG.d.ts} +7 -2
- package/dist/{casesRepository-BTAecTnF.d.ts → casesRepository-YCI0OVwl.d.ts} +1 -1
- package/dist/{casesRepository-aryld7fJ.d.cts → casesRepository-z2JAFlKA.d.cts} +1 -1
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/index.d.cts +14 -10
- package/dist/chat/index.d.ts +14 -10
- package/dist/chat/index.js +1 -1
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/{config-X6BtwDwQ.d.ts → config-BXVgTLCh.d.ts} +1 -1
- package/dist/{config-6qS7Sohy.d.cts → config-Bkbqkjb0.d.cts} +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context-7f3Nb_xE.d.ts → context-BVpOBDMe.d.ts} +5 -5
- package/dist/{context-CkqPM4Ml.d.cts → context-ChPrlKhy.d.cts} +5 -5
- package/dist/{copy-Bd__Pw5s.d.cts → copy-Be2H2i-D.d.cts} +2 -2
- package/dist/{copy-NgKgOOET.d.ts → copy-SxmZ-Eps.d.ts} +2 -2
- package/dist/core/index.cjs +5 -5
- package/dist/core/index.d.cts +12 -12
- package/dist/core/index.d.ts +12 -12
- package/dist/core/index.js +5 -5
- package/dist/{depth-CYPH92jE.d.ts → depth-By8dFpLA.d.ts} +2 -2
- package/dist/{depth-CyjaJJ6V.d.cts → depth-Dne8Qoss.d.cts} +2 -2
- package/dist/{entitlementRepository-DdeFuEKp.d.ts → entitlementRepository-Big-K_In.d.ts} +2 -2
- package/dist/{entitlementRepository-Dl1qRLcJ.d.cts → entitlementRepository-BmghvtGT.d.cts} +2 -2
- package/dist/{identity-Dy_L7Yq4.d.ts → identity-AuoeDRTh.d.ts} +1 -1
- package/dist/{identity-DjqhDm5Z.d.cts → identity-Z0yj-fC_.d.cts} +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +6 -6
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/{pets-BSG2qbr_.d.cts → pets-DfXGYmMk.d.cts} +1 -1
- package/dist/{pets-D7cZutrX.d.ts → pets-FD-5nMXr.d.ts} +1 -1
- package/dist/{petsRepository-DhsX3GLw.d.ts → petsRepository-BaTOwJ5L.d.ts} +1 -1
- package/dist/{petsRepository-D1bnxDZg.d.cts → petsRepository-CsvreWlY.d.cts} +1 -1
- package/dist/{ports-C0m1G1fS.d.ts → ports-DNIvfzBP.d.ts} +16 -5
- package/dist/{ports-DNXyyzZF.d.cts → ports-Dof7AQjk.d.cts} +16 -5
- package/dist/records/depth/index.d.cts +7 -7
- package/dist/records/depth/index.d.ts +7 -7
- package/dist/records/index.cjs +3 -3
- package/dist/records/index.d.cts +10 -10
- package/dist/records/index.d.ts +10 -10
- package/dist/records/index.js +3 -3
- package/dist/{requestFunnel-FvE5yLDD.d.ts → requestFunnel-CJC_q4BZ.d.ts} +2 -2
- package/dist/{requestFunnel-Bqc1inM9.d.cts → requestFunnel-DrigK6q_.d.cts} +2 -2
- package/dist/{runtimeTypes-C0yPBz89.d.ts → runtimeTypes-BiqMY6pC.d.ts} +4 -4
- package/dist/{runtimeTypes-RN-VXTFV.d.cts → runtimeTypes-Doj95Gll.d.cts} +4 -4
- 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 +2 -2
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +2 -2
- package/dist/televet/booking/index.cjs +1 -1
- package/dist/televet/booking/index.d.cts +17 -9
- package/dist/televet/booking/index.d.ts +17 -9
- package/dist/televet/booking/index.js +1 -1
- package/dist/televet/call/index.cjs +1 -1
- package/dist/televet/call/index.d.cts +13 -1
- package/dist/televet/call/index.d.ts +13 -1
- package/dist/televet/call/index.js +1 -1
- package/dist/televet/index.cjs +1 -1
- package/dist/televet/index.js +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/rn/index.d.cts +7 -7
- package/dist/testing/rn/index.d.ts +7 -7
- package/dist/testing/web/index.d.cts +7 -7
- package/dist/testing/web/index.d.ts +7 -7
- package/dist/{timelineRows-D4U6A8zE.d.ts → timelineRows-BHA0gIKH.d.ts} +1 -1
- package/dist/{timelineRows-DAB5dpjF.d.cts → timelineRows-CHeqZRpM.d.cts} +1 -1
- package/dist/{uploadTransport-DKJHs3Yj.d.cts → uploadTransport-C1p8FuG8.d.cts} +5 -1
- package/dist/{uploadTransport-D0M0T4hN.d.ts → uploadTransport-bZIKBTyK.d.ts} +5 -1
- package/dist/{useRecordsDepth--ObtMyjH.d.ts → useRecordsDepth-CG63cXFZ.d.ts} +1 -1
- package/dist/{useRecordsDepth-B35y8bV-.d.cts → useRecordsDepth-ChhS4c6r.d.cts} +1 -1
- package/dist/{view-B-Toym_j.d.cts → view-2pXv8ex7.d.cts} +7 -4
- package/dist/{view-D9JqNQai.d.ts → view-BKy44Q-3.d.ts} +7 -4
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/index.cjs +10 -10
- package/dist/web/index.d.cts +14 -14
- package/dist/web/index.d.ts +14 -14
- package/dist/web/index.js +10 -10
- 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 +7 -7
- package/dist/web/records/depth/index.d.ts +7 -7
- package/dist/web/records/index.cjs +3 -3
- package/dist/web/records/index.d.cts +9 -9
- package/dist/web/records/index.d.ts +9 -9
- package/dist/web/records/index.js +3 -3
- package/dist/web/televet/booking/index.cjs +2 -2
- package/dist/web/televet/booking/index.d.cts +35 -50
- package/dist/web/televet/booking/index.d.ts +35 -50
- package/dist/web/televet/booking/index.js +2 -2
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.d.cts +12 -5
- package/dist/web/televet/call/index.d.ts +12 -5
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/televet/index.cjs +4 -1
- package/dist/web/televet/index.d.cts +31 -2
- package/dist/web/televet/index.d.ts +31 -2
- package/dist/web/televet/index.js +4 -1
- package/package.json +4 -3
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/** The consult lifecycle, as the platform names it. `unknown` for a status this SDK build has not heard of. */
|
|
2
|
+
declare const CONSULT_STATUSES: readonly ["scheduled", "in_progress", "awaiting_summary", "completed", "cancelled_owner", "cancelled_ops", "no_show_owner", "no_show_vet"];
|
|
3
|
+
type ConsultStatus = (typeof CONSULT_STATUSES)[number] | 'unknown';
|
|
4
|
+
/**
|
|
5
|
+
* Statuses after which a consult can never change again.
|
|
6
|
+
*
|
|
7
|
+
* `awaiting_summary` is deliberately NOT terminal: the call is over but the write-up has not landed, and that
|
|
8
|
+
* is precisely the window a summary surface polls through.
|
|
9
|
+
*/
|
|
10
|
+
declare const TERMINAL_CONSULT_STATUSES: ReadonlySet<ConsultStatus>;
|
|
11
|
+
declare const CONSULT_KINDS: readonly ["wellness", "prescription"];
|
|
12
|
+
type ConsultKind = (typeof CONSULT_KINDS)[number] | 'unknown';
|
|
13
|
+
/**
|
|
14
|
+
* What a US state permits. TWO INDEPENDENT SERVER FACTS, not one.
|
|
15
|
+
*
|
|
16
|
+
* `wellnessAvailable` and `prescriptionsAvailable` are separate because "we cannot prescribe here but a
|
|
17
|
+
* wellness visit is available" is a real state the booking flow reads, not a copy decision.
|
|
18
|
+
*/
|
|
19
|
+
interface TelevetStatePolicy {
|
|
20
|
+
readonly state: string;
|
|
21
|
+
readonly wellnessAvailable: boolean;
|
|
22
|
+
readonly prescriptionsAvailable: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* ALWAYS NULL against a real server, and kept only so a host that reads it still compiles.
|
|
25
|
+
*
|
|
26
|
+
* `StateCapabilitiesResponse` has no `cancellation_policy_text` and never did: it is the jurisdiction
|
|
27
|
+
* matrix, and its own docstring refuses to carry a booking acknowledgement. The terms live on
|
|
28
|
+
* `GET /cancellation-policy` with the version token that makes them reportable, which is what
|
|
29
|
+
* `TelevetCancellationPolicy` and `TelevetBookingController.cancellationPolicy` read. Prefer that; this
|
|
30
|
+
* field is a wire that was never connected, left in place rather than removed because dropping a public
|
|
31
|
+
* field is a release decision, and documented rather than quietly parsed so the next surface does not
|
|
32
|
+
* build a tick on it.
|
|
33
|
+
*/
|
|
34
|
+
readonly cancellationPolicyText: string | null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A clinician card. BIOS ONLY AT LAUNCH, per the platform's own docstring: `photoRef` is an image REF and not a
|
|
38
|
+
* URL, so a surface that has no presign path renders initials rather than a broken image.
|
|
39
|
+
*/
|
|
40
|
+
interface TelevetClinician {
|
|
41
|
+
readonly clinicianId: string;
|
|
42
|
+
readonly displayName: string;
|
|
43
|
+
readonly credentials: string | null;
|
|
44
|
+
/** Null below the platform's publication threshold. NEVER coerce to 0: no stars is not zero stars. */
|
|
45
|
+
readonly rating: number | null;
|
|
46
|
+
readonly ratingCount: number | null;
|
|
47
|
+
/** The clinician's own words, or null until they write one. Rendered verbatim, never summarised. */
|
|
48
|
+
readonly bio: string | null;
|
|
49
|
+
/** An image ref, not a URL. Null for a clinician without a photo. */
|
|
50
|
+
readonly photoRef: string | null;
|
|
51
|
+
/** Where they may practise and what they may do there. Empty until served. */
|
|
52
|
+
readonly licensedStates: readonly {
|
|
53
|
+
readonly state: string;
|
|
54
|
+
readonly canPrescribe: boolean;
|
|
55
|
+
}[];
|
|
56
|
+
}
|
|
57
|
+
/** One bookable opening. */
|
|
58
|
+
interface TelevetSlot {
|
|
59
|
+
readonly slotId: string;
|
|
60
|
+
readonly startsAt: string;
|
|
61
|
+
readonly endsAt: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* An awarded hold. NO HOLD ID: the hold is identified by the slot it sits on plus an expiry. The booking's
|
|
65
|
+
* idempotency key is therefore minted by the client when a hold is awarded (`televetBookingKey`), one per
|
|
66
|
+
* hold, rather than read from a hold reference that does not exist.
|
|
67
|
+
*/
|
|
68
|
+
interface TelevetSlotHold {
|
|
69
|
+
readonly slotId: string;
|
|
70
|
+
readonly expiresAt: string;
|
|
71
|
+
}
|
|
72
|
+
/** A booked consult, as the server created it. What we asked for is the draft; this is what we got. */
|
|
73
|
+
interface TelevetConsult {
|
|
74
|
+
readonly consultId: string;
|
|
75
|
+
readonly petId: string;
|
|
76
|
+
readonly clinicianId: string;
|
|
77
|
+
/** The clinician's name, or null when the server has none. Never invented. */
|
|
78
|
+
readonly clinicianName: string | null;
|
|
79
|
+
/** What the owner wrote at booking, echoed back. */
|
|
80
|
+
readonly reasonText: string | null;
|
|
81
|
+
/** Attachment refs as stored against the consult. */
|
|
82
|
+
readonly mediaRefs: readonly string[];
|
|
83
|
+
readonly status: ConsultStatus;
|
|
84
|
+
readonly kind: ConsultKind;
|
|
85
|
+
readonly scheduledAt: string;
|
|
86
|
+
readonly emergencyFlagged: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Has the visit's video room been created? Read from the presence of `meeting_url`, which is the same
|
|
89
|
+
* signal the backend's `assert_joinable` checks; the URL itself is NOT kept, because the room credential
|
|
90
|
+
* is minted by the join and a list read is the last place to hold a link to a recorded clinical room.
|
|
91
|
+
* False moments after booking, while the provisioning outbox drains.
|
|
92
|
+
*/
|
|
93
|
+
readonly hasRoom: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** The televet entitlement verdict. True only for a live PAID subscription; promo and trial are not enough. */
|
|
96
|
+
interface TelevetBookingEntitlement {
|
|
97
|
+
readonly active: boolean;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The cancellation terms, and the token that says WHICH terms they are.
|
|
101
|
+
*
|
|
102
|
+
* WHY THIS IS ITS OWN READ. `TelevetStatePolicy.cancellationPolicyText` was parsed off the state-policy
|
|
103
|
+
* response, and no such field exists on it: `StateCapabilitiesResponse` carries the jurisdiction matrix and
|
|
104
|
+
* says so in its own docstring, and its `policy_version` is the state matrix's effective date, not the
|
|
105
|
+
* cancellation terms. So the terms tick could never render and there was no version to report, which is why
|
|
106
|
+
* the booking body omitted the attestation pair entirely. The server has always served this on its own route
|
|
107
|
+
* (`GET /cancellation-policy`, CancellationPolicyResponse), unfenced by entitlement precisely so someone
|
|
108
|
+
* deciding whether to book can read what cancelling costs.
|
|
109
|
+
*
|
|
110
|
+
* NEITHER FIELD IS EVER LOCAL. `summary` is the sentence the server derives from the numbers it enforces (the
|
|
111
|
+
* consumer app shipped a placeholder and a wrong hardcoded fee before this route existed), and `version` is
|
|
112
|
+
* evidence of what was on screen: a client-authored token would make the audit row a fiction, and a stale one
|
|
113
|
+
* is refused with a typed 409 rather than recorded as agreement to terms nobody saw.
|
|
114
|
+
*/
|
|
115
|
+
interface TelevetCancellationPolicy {
|
|
116
|
+
/** The served sentence, rendered verbatim. Never composed, templated or abbreviated by a client. */
|
|
117
|
+
readonly summary: string;
|
|
118
|
+
/** The server's own version token, reported back in `cancellation_policy_version`. */
|
|
119
|
+
readonly version: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The booking request body, in the platform's own field names. Built by `buildBookingBody`, never by hand.
|
|
123
|
+
*
|
|
124
|
+
* THE ATTESTATION PAIR IS BOUND, and the binding is the server's, not a house convention. `BookConsultRequest`
|
|
125
|
+
* declares `state_attested` and `cancellation_policy_version` individually optional and then refuses a request
|
|
126
|
+
* carrying exactly one (`_attestation_evidence_is_whole`, a 422). The compatibility case the pair is optional
|
|
127
|
+
* FOR is a client that predates the review screen and sends neither; a client that renders the tick and the
|
|
128
|
+
* terms and reports half of what the owner did writes an audit row nobody can read. So the SDK models both
|
|
129
|
+
* fields as jointly present or jointly absent and `validateBookingBody` refuses the half pair locally, before
|
|
130
|
+
* it can become a 422 the owner reads as "booking failed".
|
|
131
|
+
*/
|
|
132
|
+
interface TelevetBookingBody {
|
|
133
|
+
readonly pet_id: string;
|
|
134
|
+
readonly clinician_id: string;
|
|
135
|
+
readonly slot_id: string;
|
|
136
|
+
readonly state: string;
|
|
137
|
+
readonly reason_text: string;
|
|
138
|
+
readonly species: string | null;
|
|
139
|
+
readonly media_refs: readonly string[];
|
|
140
|
+
readonly emergency_acknowledged: boolean;
|
|
141
|
+
readonly share_health_records: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* The review screen's jurisdiction tick, as evidence.
|
|
144
|
+
*
|
|
145
|
+
* `true` ONLY, never `false`: the server's field is `Literal[True] | None` because persisting an explicit
|
|
146
|
+
* `false` is evidence of nothing and accepting it would let a client "attest false". An owner who has not
|
|
147
|
+
* ticked sends the pair absent, not a `false` half of it.
|
|
148
|
+
*/
|
|
149
|
+
readonly state_attested?: true;
|
|
150
|
+
/**
|
|
151
|
+
* Which cancellation terms the owner was SHOWN: the served version token, never a client-authored value.
|
|
152
|
+
*
|
|
153
|
+
* Paired with `state_attested` above. A stale token is refused with a typed 409 rather than recorded as if
|
|
154
|
+
* the owner had read the current terms, which is why it is the SERVER's token and why there is no local
|
|
155
|
+
* default: a build with no version to report sends the pair absent and the audit row says so honestly.
|
|
156
|
+
*/
|
|
157
|
+
readonly cancellation_policy_version?: string;
|
|
158
|
+
}
|
|
159
|
+
/** The server's own ceiling on `cancellation_policy_version` (`Field(max_length=64)`). */
|
|
160
|
+
declare const CANCELLATION_POLICY_VERSION_MAX = 64;
|
|
161
|
+
/** The server's own bound on `reason_text`. Enforced locally so an over-long description fails on the screen. */
|
|
162
|
+
declare const REASON_TEXT_MAX = 2000;
|
|
163
|
+
/** The server's own ceiling on `media_refs`. */
|
|
164
|
+
declare const MEDIA_REFS_MAX = 10;
|
|
165
|
+
/** A two-letter US state code, the only shape the booking wire accepts for `state`. */
|
|
166
|
+
declare function isWellFormedStateCode(state: string | null | undefined): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* What cancelling cost, as the server recorded it (`CancelConsultResponse`).
|
|
169
|
+
*
|
|
170
|
+
* `summary` IS THE SERVER'S SENTENCE, rendered verbatim: it is derived from the amount the cancel transaction
|
|
171
|
+
* itself computed, and the backend states the one rule it keeps (a recorded fee is worded as recorded and
|
|
172
|
+
* payable, never as "you will not be charged"). A client-side sentence built from `feeCents` would be a
|
|
173
|
+
* second author for a commercial statement.
|
|
174
|
+
*/
|
|
175
|
+
interface TelevetCancelReceipt {
|
|
176
|
+
/** What was recorded against this cancellation, in cents. Zero inside the free window. */
|
|
177
|
+
readonly feeCents: number;
|
|
178
|
+
/** ISO-4217, lowercase. */
|
|
179
|
+
readonly currency: string;
|
|
180
|
+
/** The flag to branch on, rather than comparing `feeCents` to zero or parsing `summary`. */
|
|
181
|
+
readonly feeRecorded: boolean;
|
|
182
|
+
/** The served sentence for the confirmation. Null when the server sent none; never composed here. */
|
|
183
|
+
readonly summary: string | null;
|
|
184
|
+
}
|
|
185
|
+
/** The server's own bound on a cancellation reason (`PartnerCancelRequest.reason`, 1..240). */
|
|
186
|
+
declare const CANCEL_REASON_MAX = 240;
|
|
187
|
+
|
|
188
|
+
export { type ConsultStatus as C, MEDIA_REFS_MAX as M, REASON_TEXT_MAX as R, type TelevetConsult as T, type TelevetStatePolicy as a, type TelevetBookingEntitlement as b, type TelevetCancellationPolicy as c, type TelevetClinician as d, type TelevetSlot as e, type TelevetSlotHold as f, type TelevetBookingBody as g, type TelevetCancelReceipt as h, CANCELLATION_POLICY_VERSION_MAX as i, CANCEL_REASON_MAX as j, CONSULT_KINDS as k, CONSULT_STATUSES as l, type ConsultKind as m, TERMINAL_CONSULT_STATUSES as n, isWellFormedStateCode as o };
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/** The consult lifecycle, as the platform names it. `unknown` for a status this SDK build has not heard of. */
|
|
2
|
+
declare const CONSULT_STATUSES: readonly ["scheduled", "in_progress", "awaiting_summary", "completed", "cancelled_owner", "cancelled_ops", "no_show_owner", "no_show_vet"];
|
|
3
|
+
type ConsultStatus = (typeof CONSULT_STATUSES)[number] | 'unknown';
|
|
4
|
+
/**
|
|
5
|
+
* Statuses after which a consult can never change again.
|
|
6
|
+
*
|
|
7
|
+
* `awaiting_summary` is deliberately NOT terminal: the call is over but the write-up has not landed, and that
|
|
8
|
+
* is precisely the window a summary surface polls through.
|
|
9
|
+
*/
|
|
10
|
+
declare const TERMINAL_CONSULT_STATUSES: ReadonlySet<ConsultStatus>;
|
|
11
|
+
declare const CONSULT_KINDS: readonly ["wellness", "prescription"];
|
|
12
|
+
type ConsultKind = (typeof CONSULT_KINDS)[number] | 'unknown';
|
|
13
|
+
/**
|
|
14
|
+
* What a US state permits. TWO INDEPENDENT SERVER FACTS, not one.
|
|
15
|
+
*
|
|
16
|
+
* `wellnessAvailable` and `prescriptionsAvailable` are separate because "we cannot prescribe here but a
|
|
17
|
+
* wellness visit is available" is a real state the booking flow reads, not a copy decision.
|
|
18
|
+
*/
|
|
19
|
+
interface TelevetStatePolicy {
|
|
20
|
+
readonly state: string;
|
|
21
|
+
readonly wellnessAvailable: boolean;
|
|
22
|
+
readonly prescriptionsAvailable: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* ALWAYS NULL against a real server, and kept only so a host that reads it still compiles.
|
|
25
|
+
*
|
|
26
|
+
* `StateCapabilitiesResponse` has no `cancellation_policy_text` and never did: it is the jurisdiction
|
|
27
|
+
* matrix, and its own docstring refuses to carry a booking acknowledgement. The terms live on
|
|
28
|
+
* `GET /cancellation-policy` with the version token that makes them reportable, which is what
|
|
29
|
+
* `TelevetCancellationPolicy` and `TelevetBookingController.cancellationPolicy` read. Prefer that; this
|
|
30
|
+
* field is a wire that was never connected, left in place rather than removed because dropping a public
|
|
31
|
+
* field is a release decision, and documented rather than quietly parsed so the next surface does not
|
|
32
|
+
* build a tick on it.
|
|
33
|
+
*/
|
|
34
|
+
readonly cancellationPolicyText: string | null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A clinician card. BIOS ONLY AT LAUNCH, per the platform's own docstring: `photoRef` is an image REF and not a
|
|
38
|
+
* URL, so a surface that has no presign path renders initials rather than a broken image.
|
|
39
|
+
*/
|
|
40
|
+
interface TelevetClinician {
|
|
41
|
+
readonly clinicianId: string;
|
|
42
|
+
readonly displayName: string;
|
|
43
|
+
readonly credentials: string | null;
|
|
44
|
+
/** Null below the platform's publication threshold. NEVER coerce to 0: no stars is not zero stars. */
|
|
45
|
+
readonly rating: number | null;
|
|
46
|
+
readonly ratingCount: number | null;
|
|
47
|
+
/** The clinician's own words, or null until they write one. Rendered verbatim, never summarised. */
|
|
48
|
+
readonly bio: string | null;
|
|
49
|
+
/** An image ref, not a URL. Null for a clinician without a photo. */
|
|
50
|
+
readonly photoRef: string | null;
|
|
51
|
+
/** Where they may practise and what they may do there. Empty until served. */
|
|
52
|
+
readonly licensedStates: readonly {
|
|
53
|
+
readonly state: string;
|
|
54
|
+
readonly canPrescribe: boolean;
|
|
55
|
+
}[];
|
|
56
|
+
}
|
|
57
|
+
/** One bookable opening. */
|
|
58
|
+
interface TelevetSlot {
|
|
59
|
+
readonly slotId: string;
|
|
60
|
+
readonly startsAt: string;
|
|
61
|
+
readonly endsAt: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* An awarded hold. NO HOLD ID: the hold is identified by the slot it sits on plus an expiry. The booking's
|
|
65
|
+
* idempotency key is therefore minted by the client when a hold is awarded (`televetBookingKey`), one per
|
|
66
|
+
* hold, rather than read from a hold reference that does not exist.
|
|
67
|
+
*/
|
|
68
|
+
interface TelevetSlotHold {
|
|
69
|
+
readonly slotId: string;
|
|
70
|
+
readonly expiresAt: string;
|
|
71
|
+
}
|
|
72
|
+
/** A booked consult, as the server created it. What we asked for is the draft; this is what we got. */
|
|
73
|
+
interface TelevetConsult {
|
|
74
|
+
readonly consultId: string;
|
|
75
|
+
readonly petId: string;
|
|
76
|
+
readonly clinicianId: string;
|
|
77
|
+
/** The clinician's name, or null when the server has none. Never invented. */
|
|
78
|
+
readonly clinicianName: string | null;
|
|
79
|
+
/** What the owner wrote at booking, echoed back. */
|
|
80
|
+
readonly reasonText: string | null;
|
|
81
|
+
/** Attachment refs as stored against the consult. */
|
|
82
|
+
readonly mediaRefs: readonly string[];
|
|
83
|
+
readonly status: ConsultStatus;
|
|
84
|
+
readonly kind: ConsultKind;
|
|
85
|
+
readonly scheduledAt: string;
|
|
86
|
+
readonly emergencyFlagged: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Has the visit's video room been created? Read from the presence of `meeting_url`, which is the same
|
|
89
|
+
* signal the backend's `assert_joinable` checks; the URL itself is NOT kept, because the room credential
|
|
90
|
+
* is minted by the join and a list read is the last place to hold a link to a recorded clinical room.
|
|
91
|
+
* False moments after booking, while the provisioning outbox drains.
|
|
92
|
+
*/
|
|
93
|
+
readonly hasRoom: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** The televet entitlement verdict. True only for a live PAID subscription; promo and trial are not enough. */
|
|
96
|
+
interface TelevetBookingEntitlement {
|
|
97
|
+
readonly active: boolean;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The cancellation terms, and the token that says WHICH terms they are.
|
|
101
|
+
*
|
|
102
|
+
* WHY THIS IS ITS OWN READ. `TelevetStatePolicy.cancellationPolicyText` was parsed off the state-policy
|
|
103
|
+
* response, and no such field exists on it: `StateCapabilitiesResponse` carries the jurisdiction matrix and
|
|
104
|
+
* says so in its own docstring, and its `policy_version` is the state matrix's effective date, not the
|
|
105
|
+
* cancellation terms. So the terms tick could never render and there was no version to report, which is why
|
|
106
|
+
* the booking body omitted the attestation pair entirely. The server has always served this on its own route
|
|
107
|
+
* (`GET /cancellation-policy`, CancellationPolicyResponse), unfenced by entitlement precisely so someone
|
|
108
|
+
* deciding whether to book can read what cancelling costs.
|
|
109
|
+
*
|
|
110
|
+
* NEITHER FIELD IS EVER LOCAL. `summary` is the sentence the server derives from the numbers it enforces (the
|
|
111
|
+
* consumer app shipped a placeholder and a wrong hardcoded fee before this route existed), and `version` is
|
|
112
|
+
* evidence of what was on screen: a client-authored token would make the audit row a fiction, and a stale one
|
|
113
|
+
* is refused with a typed 409 rather than recorded as agreement to terms nobody saw.
|
|
114
|
+
*/
|
|
115
|
+
interface TelevetCancellationPolicy {
|
|
116
|
+
/** The served sentence, rendered verbatim. Never composed, templated or abbreviated by a client. */
|
|
117
|
+
readonly summary: string;
|
|
118
|
+
/** The server's own version token, reported back in `cancellation_policy_version`. */
|
|
119
|
+
readonly version: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The booking request body, in the platform's own field names. Built by `buildBookingBody`, never by hand.
|
|
123
|
+
*
|
|
124
|
+
* THE ATTESTATION PAIR IS BOUND, and the binding is the server's, not a house convention. `BookConsultRequest`
|
|
125
|
+
* declares `state_attested` and `cancellation_policy_version` individually optional and then refuses a request
|
|
126
|
+
* carrying exactly one (`_attestation_evidence_is_whole`, a 422). The compatibility case the pair is optional
|
|
127
|
+
* FOR is a client that predates the review screen and sends neither; a client that renders the tick and the
|
|
128
|
+
* terms and reports half of what the owner did writes an audit row nobody can read. So the SDK models both
|
|
129
|
+
* fields as jointly present or jointly absent and `validateBookingBody` refuses the half pair locally, before
|
|
130
|
+
* it can become a 422 the owner reads as "booking failed".
|
|
131
|
+
*/
|
|
132
|
+
interface TelevetBookingBody {
|
|
133
|
+
readonly pet_id: string;
|
|
134
|
+
readonly clinician_id: string;
|
|
135
|
+
readonly slot_id: string;
|
|
136
|
+
readonly state: string;
|
|
137
|
+
readonly reason_text: string;
|
|
138
|
+
readonly species: string | null;
|
|
139
|
+
readonly media_refs: readonly string[];
|
|
140
|
+
readonly emergency_acknowledged: boolean;
|
|
141
|
+
readonly share_health_records: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* The review screen's jurisdiction tick, as evidence.
|
|
144
|
+
*
|
|
145
|
+
* `true` ONLY, never `false`: the server's field is `Literal[True] | None` because persisting an explicit
|
|
146
|
+
* `false` is evidence of nothing and accepting it would let a client "attest false". An owner who has not
|
|
147
|
+
* ticked sends the pair absent, not a `false` half of it.
|
|
148
|
+
*/
|
|
149
|
+
readonly state_attested?: true;
|
|
150
|
+
/**
|
|
151
|
+
* Which cancellation terms the owner was SHOWN: the served version token, never a client-authored value.
|
|
152
|
+
*
|
|
153
|
+
* Paired with `state_attested` above. A stale token is refused with a typed 409 rather than recorded as if
|
|
154
|
+
* the owner had read the current terms, which is why it is the SERVER's token and why there is no local
|
|
155
|
+
* default: a build with no version to report sends the pair absent and the audit row says so honestly.
|
|
156
|
+
*/
|
|
157
|
+
readonly cancellation_policy_version?: string;
|
|
158
|
+
}
|
|
159
|
+
/** The server's own ceiling on `cancellation_policy_version` (`Field(max_length=64)`). */
|
|
160
|
+
declare const CANCELLATION_POLICY_VERSION_MAX = 64;
|
|
161
|
+
/** The server's own bound on `reason_text`. Enforced locally so an over-long description fails on the screen. */
|
|
162
|
+
declare const REASON_TEXT_MAX = 2000;
|
|
163
|
+
/** The server's own ceiling on `media_refs`. */
|
|
164
|
+
declare const MEDIA_REFS_MAX = 10;
|
|
165
|
+
/** A two-letter US state code, the only shape the booking wire accepts for `state`. */
|
|
166
|
+
declare function isWellFormedStateCode(state: string | null | undefined): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* What cancelling cost, as the server recorded it (`CancelConsultResponse`).
|
|
169
|
+
*
|
|
170
|
+
* `summary` IS THE SERVER'S SENTENCE, rendered verbatim: it is derived from the amount the cancel transaction
|
|
171
|
+
* itself computed, and the backend states the one rule it keeps (a recorded fee is worded as recorded and
|
|
172
|
+
* payable, never as "you will not be charged"). A client-side sentence built from `feeCents` would be a
|
|
173
|
+
* second author for a commercial statement.
|
|
174
|
+
*/
|
|
175
|
+
interface TelevetCancelReceipt {
|
|
176
|
+
/** What was recorded against this cancellation, in cents. Zero inside the free window. */
|
|
177
|
+
readonly feeCents: number;
|
|
178
|
+
/** ISO-4217, lowercase. */
|
|
179
|
+
readonly currency: string;
|
|
180
|
+
/** The flag to branch on, rather than comparing `feeCents` to zero or parsing `summary`. */
|
|
181
|
+
readonly feeRecorded: boolean;
|
|
182
|
+
/** The served sentence for the confirmation. Null when the server sent none; never composed here. */
|
|
183
|
+
readonly summary: string | null;
|
|
184
|
+
}
|
|
185
|
+
/** The server's own bound on a cancellation reason (`PartnerCancelRequest.reason`, 1..240). */
|
|
186
|
+
declare const CANCEL_REASON_MAX = 240;
|
|
187
|
+
|
|
188
|
+
export { type ConsultStatus as C, MEDIA_REFS_MAX as M, REASON_TEXT_MAX as R, type TelevetConsult as T, type TelevetStatePolicy as a, type TelevetBookingEntitlement as b, type TelevetCancellationPolicy as c, type TelevetClinician as d, type TelevetSlot as e, type TelevetSlotHold as f, type TelevetBookingBody as g, type TelevetCancelReceipt as h, CANCELLATION_POLICY_VERSION_MAX as i, CANCEL_REASON_MAX as j, CONSULT_KINDS as k, CONSULT_STATUSES as l, type ConsultKind as m, TERMINAL_CONSULT_STATUSES as n, isWellFormedStateCode as o };
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The consumer mobile app's consult-length constant, in minutes (everfur-mobile-2026-7 televetTime.ts:85
|
|
3
|
+
* `CONSULT_MINUTES`). NOT the length of any particular visit: the join response serves that as
|
|
4
|
+
* `call_limits.consult_minutes` (`VetCallCredential.callLimits.consultMinutes`), and a surface that has it uses
|
|
5
|
+
* it. The web lobby no longer falls back to this number.
|
|
6
|
+
*/
|
|
2
7
|
declare const VET_CALL_CONSULT_MINUTES = 10;
|
|
3
8
|
declare const VET_CALL_COPY: Readonly<{
|
|
4
9
|
/** Controls, shared by the lobby and the live call. */
|
|
@@ -24,7 +29,7 @@ declare const VET_CALL_COPY: Readonly<{
|
|
|
24
29
|
lobbyTitle: (clinicianName: string | null | undefined) => string;
|
|
25
30
|
/** `{pet}` is DATA from the roster. Absent, the pet-free form is used instead. */
|
|
26
31
|
lobbyPrep: (petName: string | null | undefined) => string;
|
|
27
|
-
/** `{n}` is `
|
|
32
|
+
/** `{n}` is the visit length in minutes: the served `call_limits.consult_minutes` where the surface has it. */
|
|
28
33
|
lobbyDuration: (minutes: number) => string;
|
|
29
34
|
/** The consumer app's `visit.joinFailedReason` (:735), shown when the call object errors. */
|
|
30
35
|
joinFailedReason: "That did not open. Try again.";
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The consumer mobile app's consult-length constant, in minutes (everfur-mobile-2026-7 televetTime.ts:85
|
|
3
|
+
* `CONSULT_MINUTES`). NOT the length of any particular visit: the join response serves that as
|
|
4
|
+
* `call_limits.consult_minutes` (`VetCallCredential.callLimits.consultMinutes`), and a surface that has it uses
|
|
5
|
+
* it. The web lobby no longer falls back to this number.
|
|
6
|
+
*/
|
|
2
7
|
declare const VET_CALL_CONSULT_MINUTES = 10;
|
|
3
8
|
declare const VET_CALL_COPY: Readonly<{
|
|
4
9
|
/** Controls, shared by the lobby and the live call. */
|
|
@@ -24,7 +29,7 @@ declare const VET_CALL_COPY: Readonly<{
|
|
|
24
29
|
lobbyTitle: (clinicianName: string | null | undefined) => string;
|
|
25
30
|
/** `{pet}` is DATA from the roster. Absent, the pet-free form is used instead. */
|
|
26
31
|
lobbyPrep: (petName: string | null | undefined) => string;
|
|
27
|
-
/** `{n}` is `
|
|
32
|
+
/** `{n}` is the visit length in minutes: the served `call_limits.consult_minutes` where the surface has it. */
|
|
28
33
|
lobbyDuration: (minutes: number) => string;
|
|
29
34
|
/** The consumer app's `visit.joinFailedReason` (:735), shown when the call object errors. */
|
|
30
35
|
joinFailedReason: "That did not open. Try again.";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult-SGvHKsCB.js';
|
|
2
|
-
import { A as AuthContext } from './identity-
|
|
2
|
+
import { A as AuthContext } from './identity-AuoeDRTh.js';
|
|
3
3
|
import { P as PetRef } from './ids-B2GAAifq.js';
|
|
4
4
|
|
|
5
5
|
/** The owner's answer to a check-in, the wire values of the consumer `CheckinResponse` enum. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult-ZtH-YV1h.cjs';
|
|
2
|
-
import { A as AuthContext } from './identity-
|
|
2
|
+
import { A as AuthContext } from './identity-Z0yj-fC_.cjs';
|
|
3
3
|
import { P as PetRef } from './ids-B2GAAifq.cjs';
|
|
4
4
|
|
|
5
5
|
/** The owner's answer to a check-in, the wire values of the consumer `CheckinResponse` enum. */
|