@everfur/sdk 0.1.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/CHANGELOG.md +703 -4
  2. package/README.md +63 -23
  3. package/consent/package.json +8 -0
  4. package/dist/Chat-BZZ-Py5l.d.ts +128 -0
  5. package/dist/Chat-Dq4fffIO.d.cts +128 -0
  6. package/dist/DepthViews-BG3E25MD.d.ts +16 -0
  7. package/dist/DepthViews-B_hIypI6.d.cts +19 -0
  8. package/dist/DepthViews-CL75jyRA.d.cts +16 -0
  9. package/dist/DepthViews-CkYri51q.d.ts +19 -0
  10. package/dist/ErrorPolicyPort-CNf4uQZP.d.cts +22 -0
  11. package/dist/ErrorPolicyPort-CwbfmxzJ.d.ts +22 -0
  12. package/dist/{EverfurResult-D92-uL82.d.cts → EverfurResult-DN9pL2Ab.d.cts} +11 -10
  13. package/dist/{EverfurResult-D92-uL82.d.ts → EverfurResult-DN9pL2Ab.d.ts} +11 -10
  14. package/dist/{PhotoController-BItt5M7u.d.cts → PhotoController-3l7MT9jA.d.cts} +1 -1
  15. package/dist/{PhotoController-D8zMTdcW.d.ts → PhotoController-vzY5bfY_.d.ts} +1 -1
  16. package/dist/animations/index.cjs +1 -1997
  17. package/dist/animations/index.d.cts +35 -35
  18. package/dist/animations/index.d.ts +35 -35
  19. package/dist/animations/index.js +1 -1972
  20. package/dist/attachments-BorG422I.d.cts +146 -0
  21. package/dist/attachments-BrUWQYNK.d.ts +257 -0
  22. package/dist/attachments-D_SECjr1.d.cts +257 -0
  23. package/dist/attachments-DpldrvIW.d.ts +146 -0
  24. package/dist/bookingCopy-CqtDYvCR.d.ts +732 -0
  25. package/dist/bookingCopy-SREvkG19.d.cts +732 -0
  26. package/dist/branding-CsRdeNwK.d.cts +566 -0
  27. package/dist/branding-CsRdeNwK.d.ts +566 -0
  28. package/dist/callCopy-DoQKG3-L.d.cts +40 -0
  29. package/dist/callCopy-DoQKG3-L.d.ts +40 -0
  30. package/dist/casesRepository-DwtZVsbj.d.cts +51 -0
  31. package/dist/casesRepository-v6QczS9N.d.ts +51 -0
  32. package/dist/chat/index.cjs +1 -1170
  33. package/dist/chat/index.d.cts +32 -53
  34. package/dist/chat/index.d.ts +32 -53
  35. package/dist/chat/index.js +1 -1167
  36. package/dist/client/index.cjs +9 -2315
  37. package/dist/client/index.d.cts +80 -16
  38. package/dist/client/index.d.ts +80 -16
  39. package/dist/client/index.js +9 -2215
  40. package/dist/{config-CiJ0PVBB.d.ts → config--Wu1Umhd.d.cts} +64 -26
  41. package/dist/{config-BSjBdxrZ.d.cts → config-C7eb_IMD.d.ts} +64 -26
  42. package/dist/consent/index.cjs +1 -0
  43. package/dist/consent/index.d.cts +33 -0
  44. package/dist/consent/index.d.ts +33 -0
  45. package/dist/consent/index.js +1 -0
  46. package/dist/context-CL3lyuy1.d.cts +159 -0
  47. package/dist/context-CahAEha8.d.ts +159 -0
  48. package/dist/copy-DdVFDL01.d.ts +198 -0
  49. package/dist/copy-UeUJVk8X.d.cts +198 -0
  50. package/dist/core/index.cjs +13 -3178
  51. package/dist/core/index.d.cts +164 -29
  52. package/dist/core/index.d.ts +164 -29
  53. package/dist/core/index.js +13 -3166
  54. package/dist/depth-D5HwcvKC.d.cts +533 -0
  55. package/dist/depth-DvPwPuT_.d.ts +533 -0
  56. package/dist/entitlementRepository-B7egEdW6.d.ts +43 -0
  57. package/dist/entitlementRepository-BpJ7tiwl.d.cts +43 -0
  58. package/dist/{identity-Brl-lDd6.d.cts → identity-C2-08BZW.d.cts} +20 -7
  59. package/dist/{identity-DK9zORrG.d.ts → identity-CEi9GRFZ.d.ts} +20 -7
  60. package/dist/{ids-CJ1S6adf.d.cts → ids-B2GAAifq.d.cts} +1 -1
  61. package/dist/{ids-CJ1S6adf.d.ts → ids-B2GAAifq.d.ts} +1 -1
  62. package/dist/index.cjs +12 -4494
  63. package/dist/index.d.cts +30 -121
  64. package/dist/index.d.ts +30 -121
  65. package/dist/index.js +12 -4470
  66. package/dist/models-B-Uh2LTf.d.ts +214 -0
  67. package/dist/models-D2EUxPZY.d.cts +214 -0
  68. package/dist/notifications/index.cjs +2 -0
  69. package/dist/notifications/index.d.cts +17 -0
  70. package/dist/notifications/index.d.ts +17 -0
  71. package/dist/notifications/index.js +2 -0
  72. package/dist/optionalModule-DbJmsq5f.d.cts +21 -0
  73. package/dist/optionalModule-DbJmsq5f.d.ts +21 -0
  74. package/dist/pets-DJv2sj2H.d.ts +92 -0
  75. package/dist/pets-JVCXgRgR.d.cts +92 -0
  76. package/dist/petsRepository-B_gKbAzJ.d.cts +142 -0
  77. package/dist/petsRepository-Bk6GDwLs.d.ts +142 -0
  78. package/dist/photo/index.cjs +1 -2189
  79. package/dist/photo/index.d.cts +6 -6
  80. package/dist/photo/index.d.ts +6 -6
  81. package/dist/photo/index.js +1 -2186
  82. package/dist/ports-BN6RHF9W.d.cts +48 -0
  83. package/dist/ports-BN6RHF9W.d.ts +48 -0
  84. package/dist/ports-BY2ph0_y.d.cts +376 -0
  85. package/dist/ports-D7YW8qz9.d.ts +376 -0
  86. package/dist/profile-CSs1wlXT.d.cts +93 -0
  87. package/dist/profile-CSs1wlXT.d.ts +93 -0
  88. package/dist/records/depth/index.cjs +2 -0
  89. package/dist/records/depth/index.d.cts +13 -0
  90. package/dist/records/depth/index.d.ts +13 -0
  91. package/dist/records/depth/index.js +2 -0
  92. package/dist/records/index.cjs +3 -2839
  93. package/dist/records/index.d.cts +137 -203
  94. package/dist/records/index.d.ts +137 -203
  95. package/dist/records/index.js +3 -2833
  96. package/dist/requestFunnel-BjDpqqvm.d.cts +110 -0
  97. package/dist/requestFunnel-DFMGcluw.d.ts +110 -0
  98. package/dist/{resolve-Dq_4_agU.d.ts → resolve-D4Ywz5OS.d.cts} +10 -4
  99. package/dist/{resolve-Dq_4_agU.d.cts → resolve-D4Ywz5OS.d.ts} +10 -4
  100. package/dist/{runtime-Bvr8yqXm.d.cts → runtimeTypes-gZEJu-da.d.cts} +104 -132
  101. package/dist/{runtime-BIYzf9cK.d.ts → runtimeTypes-w5KqBMcs.d.ts} +104 -132
  102. package/dist/server/events/index.cjs +2 -0
  103. package/dist/server/events/index.d.cts +550 -0
  104. package/dist/server/events/index.d.ts +550 -0
  105. package/dist/server/events/index.js +2 -0
  106. package/dist/server/index.cjs +2 -533
  107. package/dist/server/index.d.cts +73 -18
  108. package/dist/server/index.d.ts +73 -18
  109. package/dist/server/index.js +2 -530
  110. package/dist/species-BXAIMh7I.d.cts +9 -0
  111. package/dist/species-BXAIMh7I.d.ts +9 -0
  112. package/dist/televet/booking/index.cjs +1 -0
  113. package/dist/televet/booking/index.d.cts +294 -0
  114. package/dist/televet/booking/index.d.ts +294 -0
  115. package/dist/televet/booking/index.js +1 -0
  116. package/dist/televet/call/index.cjs +1 -0
  117. package/dist/televet/call/index.d.cts +141 -0
  118. package/dist/televet/call/index.d.ts +141 -0
  119. package/dist/televet/call/index.js +1 -0
  120. package/dist/televet/index.cjs +1 -0
  121. package/dist/televet/index.d.cts +142 -0
  122. package/dist/televet/index.d.ts +142 -0
  123. package/dist/televet/index.js +1 -0
  124. package/dist/testing/index.cjs +5 -823
  125. package/dist/testing/index.d.cts +18 -4
  126. package/dist/testing/index.d.ts +18 -4
  127. package/dist/testing/index.js +5 -820
  128. package/dist/testing/rn/index.cjs +1 -449
  129. package/dist/testing/rn/index.d.cts +18 -29
  130. package/dist/testing/rn/index.d.ts +18 -29
  131. package/dist/testing/rn/index.js +1 -444
  132. package/dist/testing/web/index.cjs +1 -0
  133. package/dist/testing/web/index.d.cts +132 -0
  134. package/dist/testing/web/index.d.ts +132 -0
  135. package/dist/testing/web/index.js +1 -0
  136. package/dist/timelineRows-C15jxFFH.d.ts +19 -0
  137. package/dist/timelineRows-odO8g9r2.d.cts +19 -0
  138. package/dist/typeStyle-CKqVYD6L.d.cts +111 -0
  139. package/dist/typeStyle-DmoyacDG.d.ts +111 -0
  140. package/dist/uploadTransport-D0M0T4hN.d.ts +38 -0
  141. package/dist/uploadTransport-DKJHs3Yj.d.cts +38 -0
  142. package/dist/useRecordsDepth-C6rjEaLn.d.cts +237 -0
  143. package/dist/useRecordsDepth-crhBllQK.d.ts +237 -0
  144. package/dist/useVetVisit-Bc84hWUU.d.cts +187 -0
  145. package/dist/useVetVisit-CjmMa896.d.ts +187 -0
  146. package/dist/video/index.cjs +1 -1941
  147. package/dist/video/index.d.cts +4 -4
  148. package/dist/video/index.d.ts +4 -4
  149. package/dist/video/index.js +1 -1938
  150. package/dist/view-Bxwxp4xD.d.ts +310 -0
  151. package/dist/view-DyitEO0m.d.cts +310 -0
  152. package/dist/visitIntent-D7_yVp1I.d.cts +8 -0
  153. package/dist/visitIntent-D7_yVp1I.d.ts +8 -0
  154. package/dist/web/consent/index.cjs +1 -0
  155. package/dist/web/consent/index.d.cts +34 -0
  156. package/dist/web/consent/index.d.ts +34 -0
  157. package/dist/web/consent/index.js +1 -0
  158. package/dist/web/index.cjs +14 -0
  159. package/dist/web/index.d.cts +218 -0
  160. package/dist/web/index.d.ts +218 -0
  161. package/dist/web/index.js +14 -0
  162. package/dist/web/notifications/index.cjs +2 -0
  163. package/dist/web/notifications/index.d.cts +213 -0
  164. package/dist/web/notifications/index.d.ts +213 -0
  165. package/dist/web/notifications/index.js +2 -0
  166. package/dist/web/records/depth/index.cjs +2 -0
  167. package/dist/web/records/depth/index.d.cts +12 -0
  168. package/dist/web/records/depth/index.d.ts +12 -0
  169. package/dist/web/records/depth/index.js +2 -0
  170. package/dist/web/records/index.cjs +4 -0
  171. package/dist/web/records/index.d.cts +285 -0
  172. package/dist/web/records/index.d.ts +285 -0
  173. package/dist/web/records/index.js +4 -0
  174. package/dist/web/televet/booking/index.cjs +1 -0
  175. package/dist/web/televet/booking/index.d.cts +349 -0
  176. package/dist/web/televet/booking/index.d.ts +349 -0
  177. package/dist/web/televet/booking/index.js +1 -0
  178. package/dist/web/televet/call/index.cjs +1 -0
  179. package/dist/web/televet/call/index.d.cts +142 -0
  180. package/dist/web/televet/call/index.d.ts +142 -0
  181. package/dist/web/televet/call/index.js +1 -0
  182. package/dist/web/televet/index.cjs +1 -0
  183. package/dist/web/televet/index.d.cts +136 -0
  184. package/dist/web/televet/index.d.ts +136 -0
  185. package/dist/web/televet/index.js +1 -0
  186. package/notifications/package.json +8 -0
  187. package/package.json +266 -10
  188. package/records/depth/package.json +8 -0
  189. package/server/events/device-blocked.cjs +15 -0
  190. package/server/events/package.json +9 -0
  191. package/televet/booking/package.json +8 -0
  192. package/televet/call/package.json +8 -0
  193. package/televet/package.json +8 -0
  194. package/testing/web/native-blocked.cjs +12 -0
  195. package/testing/web/package.json +8 -0
  196. package/web/consent/native-blocked.cjs +12 -0
  197. package/web/consent/package.json +8 -0
  198. package/web/native-blocked.cjs +12 -0
  199. package/web/notifications/native-blocked.cjs +12 -0
  200. package/web/notifications/package.json +8 -0
  201. package/web/package.json +8 -0
  202. package/web/records/depth/native-blocked.cjs +12 -0
  203. package/web/records/depth/package.json +8 -0
  204. package/web/records/native-blocked.cjs +12 -0
  205. package/web/records/package.json +8 -0
  206. package/web/televet/booking/native-blocked.cjs +12 -0
  207. package/web/televet/booking/package.json +8 -0
  208. package/web/televet/call/native-blocked.cjs +12 -0
  209. package/web/televet/call/package.json +8 -0
  210. package/web/televet/native-blocked.cjs +12 -0
  211. package/web/televet/package.json +8 -0
  212. package/dist/ChatController-CKdBvPj2.d.ts +0 -146
  213. package/dist/ChatController-CpUMvvZf.d.cts +0 -146
  214. package/dist/FilePort-BabWrv7I.d.cts +0 -22
  215. package/dist/FilePort-BabWrv7I.d.ts +0 -22
  216. package/dist/petsRepository-BEGb97M9.d.cts +0 -326
  217. package/dist/petsRepository-Bu18r2kK.d.ts +0 -326
  218. package/dist/requestFunnel-DuUH-kAe.d.cts +0 -28
  219. package/dist/requestFunnel-dio5OmR9.d.ts +0 -28
@@ -1,224 +1,158 @@
1
- import { f as EverfurError, E as EverfurResult } from '../EverfurResult-D92-uL82.js';
2
- export { g as EverfurErrorCategory, a as EverfurErrorCode } from '../EverfurResult-D92-uL82.js';
3
- import { P as PetRef, R as RecordsRequestId, D as DocumentId } from '../ids-CJ1S6adf.js';
4
- export { B as Brand, _ as __brand } from '../ids-CJ1S6adf.js';
5
- import { F as FileHandle } from '../FilePort-BabWrv7I.js';
1
+ import { R as RecordsController } from '../view-Bxwxp4xD.js';
2
+ export { C as ClinicCall, F as FactOverlay, a as REQUEST_TIMELINE_TITLES, b as RecordSharesStatus, c as RecordsDashboardState, d as RecordsDashboardView, e as RecordsEmptyVariant, f as RecordsStatus, g as RequestTimelineEvent, h as RequestTimelineEventKey, i as RequestTimelineEventState, S as ShareRowView, U as UploadDocumentInput, j as UploadQueueItem, k as UploadSkipReason, l as UseEverfurRecordsState, m as UseRecordFactEditState, n as UseRecordPdfLinkState, o as UseRecordSharesState, p as UseRecordsMarkersState, q as applyFactOverlay, r as buildRequestTimeline, s as deriveRecordsDashboardState, t as isFactEditable, u as pickPetRecordsRequest, v as selectClinicCall, w as selectDashboardView, x as selectPrimaryLabel, y as selectRequestList, z as selectRequestTitle, A as useEverfurRecords, B as useEverfurRecordsClinic, D as useEverfurRecordsClinicBatch, E as useRecordFactEdit, G as useRecordPdfLink, H as useRecordShares, I as useRecordsMarkers } from '../view-Bxwxp4xD.js';
6
3
  import { ReactNode } from 'react';
7
4
  import { StyleProp, ViewStyle } from 'react-native';
5
+ import { P as PetRef, R as RecordsRequestId } from '../ids-B2GAAifq.js';
6
+ export { B as Brand, D as DocumentId, _ as __brand } from '../ids-B2GAAifq.js';
7
+ import { d as RecordsHostSeams, i as RecordsClinicController, j as CaptureRecordsSignature, e as RecordsScreen, f as RecordsScreenBaseProps, C as ClinicDraft, k as ClinicRequestBaseProps, l as ClinicBatchBaseProps } from '../useRecordsDepth-crhBllQK.js';
8
+ export { m as CapturedRecordsSignature, a as ClinicLocation, n as RecordsAsk, R as RecordsAskEntityRef, b as RecordsAskHandler, c as RecordsDepthStatus, o as RecordsNavAction, p as RecordsNavState, q as RecordsSignatureContext, g as RecordsUrlKind, r as RegisterSignaturePng, s as currentRecordsScreen, t as initialRecordsNav, v as popRecordsNav, w as pushRecordsNav, x as recordsNavReducer, y as replaceRecordsNav, z as resetRecordsNav, A as transitionRecordsNav } from '../useRecordsDepth-crhBllQK.js';
9
+ import { U as UploadTransport } from '../ports-BN6RHF9W.js';
10
+ export { F as FileHandle, a as UploadPolicyWire } from '../ports-BN6RHF9W.js';
11
+ import { R as RecordsDocumentPicker } from '../uploadTransport-D0M0T4hN.js';
12
+ import { d as RecordsRequestView } from '../models-B-Uh2LTf.js';
13
+ export { h as ConsentState, C as CreateUploadRequestInput, G as GrantConsentInput, j as RECORDS_TERMINAL, R as RecordDocumentMeta, a as RecordEntity, k as RecordForwardItem, l as RecordIdentityField, b as RecordOrigin, m as RecordSeries, n as RecordSeriesPoint, i as RecordsDenialReason, f as RecordsRequestGroupView, c as RecordsRequestStatus, e as RecordsSimpleStatus, g as RecordsView, U as UploadedDocument, o as isTerminalStatus, r as recordsDenialReasonOf } from '../models-B-Uh2LTf.js';
14
+ export { C as CreateClinicRequestBatchInput, aa as CreateClinicRequestInput, x as FactFieldValue, A as RECORDS_CLINIC_BATCH_MAX, 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, B as RecordFactEditInput, D as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, E as RecordMarker, G as RecordMarkerLatest, I as RecordMarkerPoint, J as RecordMarkerSummary, K as RecordMarkersView, L as RecordPdfLink, k as RecordPhysicalExam, M as RecordShare, N as RecordShareLink, a9 as RecordsAuthorizationCopy, O as RecordsAuthorizationSignature, l as RecordsClinic, P as RecordsClinicBatch, Q as RecordsClinicBatchClient, S as RecordsClinicBatchItem, T as RecordsClinicBatchResult, a6 as RecordsClinicSearchInput, a7 as RecordsClinicSearchPage, U as RecordsClinicTarget, m as RecordsDepthClient, a8 as RecordsRecentClinicsInput, n as RecordsRequestDocument, V as RecordsSignatureSuggestion, ab as RecordsSignatureUploadPolicy, o as RecordsTimelineMedication, p as RecordsTimelineVaccine, q as RecordsTimelineView, r as RecordsTimelineVisit, s as RecordsTimelineWeight } from '../depth-DvPwPuT_.js';
15
+ export { a as EverfurDocumentContributionsProps, c as EverfurRecordsDepthProps } from '../DepthViews-CkYri51q.js';
16
+ export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as EverfurResult } from '../EverfurResult-DN9pL2Ab.js';
17
+ import '../requestFunnel-DFMGcluw.js';
18
+ import '../ErrorPolicyPort-CwbfmxzJ.js';
19
+ import '../config-C7eb_IMD.js';
20
+ import '../identity-CEi9GRFZ.js';
8
21
 
9
- /**
10
- * The partner-scoped projection of the backend records-request status (records_schemas.py). The internal
11
- * `dispatching` / `parsing_failed` / `review_email_failed` values are already collapsed by the backend
12
- * `from_db_status`; the clinic-dispatch statuses are out of partner scope (§0) and never appear here.
13
- */
14
- type RecordsRequestStatus = 'awaiting_upload' | 'received' | 'parsing' | 'in_review' | 'published' | 'failed' | 'revoked';
15
- /** Terminal statuses: polling stops here. */
16
- declare const RECORDS_TERMINAL: readonly RecordsRequestStatus[];
17
- declare function isTerminalStatus(status: RecordsRequestStatus): boolean;
18
- interface RecordsRequestView {
19
- readonly id: RecordsRequestId;
22
+ interface EverfurRecordsProps extends RecordsHostSeams {
20
23
  readonly petRef: PetRef;
21
- readonly status: RecordsRequestStatus;
22
- /** BE-authored copy, rendered verbatim (dumb-renderer rule). */
23
- readonly statusLabel: string;
24
- /**
25
- * DEAD, measured 2026-08-22: no plane sends it and nothing in this SDK reads it. The widget
26
- * `RecordsRequestResponse` omits it, the consumer `RecordsRequestSummary` has no such field either, and a
27
- * grep of `src/` finds zero render consumers - so it is always the mapper's `0` default.
28
- *
29
- * Deliberately NOT deleted here: removing a non-optional public field is a breaking change that needs a
30
- * major bump, which is a release decision. Documented so nobody reads a count off it.
31
- */
32
- readonly documentCount: number;
33
- /** facts extracted but awaiting review (badge "N being reviewed"). */
34
- readonly heldItemCount: number;
35
- /** ISO; null before first upload. */
36
- readonly receivedAt: string | null;
37
- /** drives the timeline "reading your records" step. */
38
- readonly parsingStartedAt: string | null;
39
- /** non-null == a parse gap occurred (§5, honest, not silent). */
40
- readonly reviewStartedAt: string | null;
41
- readonly createdAt: string;
42
- readonly updatedAt: string;
43
- }
44
- interface UploadedDocument {
45
- readonly documentId: DocumentId;
46
- readonly requestId: RecordsRequestId;
47
- /** uploads NEVER auto-bind / auto-publish. */
48
- readonly status: 'received';
49
- }
50
- /** One redacted identity row (name / species / breed / owner-safe field). Provenance absent. */
51
- interface RecordIdentityField {
52
- readonly label: string;
53
- readonly value: string;
54
- }
55
- /**
56
- * Who produced a reading. `owner_reported` is owner-entered (a home scale, typed into the pet profile);
57
- * `clinic_document` is extracted from a vet document. The two now share one series, so a clinician reading a
58
- * weight can tell them apart before dosing from it.
59
- *
60
- * A value this build does not know folds to `null` (unlabelled), never to a guess - see `normalizeOrigin`.
61
- * `null` therefore means "the backend did not say", NOT "clinic".
62
- */
63
- type RecordOrigin = 'owner_reported' | 'clinic_document';
64
- /**
65
- * One extracted clinical fact. No `raw_value` / `source_span` / `source_bbox` / `source_page` /
66
- * `source_doc_id` / `value_source` / `extraction_method` / `source_precedence` members - `origin` is the only
67
- * provenance-adjacent field, and it is a display label (see `RecordOrigin`).
68
- */
69
- interface RecordEntity {
70
- readonly key: string;
71
- readonly category: string;
72
- readonly label: string;
73
- readonly value: string | null;
74
- readonly unit: string | null;
75
- readonly observedAt: string | null;
76
- readonly status: string | null;
77
- /** Who measured it. `null` when the backend did not label it (an older backend never does). */
78
- readonly origin: RecordOrigin | null;
24
+ /** The pet's display name for headers and lead copy; absent, the consumer's own `your pet` forms. */
25
+ readonly petName?: string;
26
+ /** Host/test seam: inject a records controller instead of acquiring one from the runtime. */
27
+ readonly controller?: RecordsController;
28
+ /** Host/test seam over the clinic controller (search, authorization copy, the clinic request). */
29
+ readonly clinicController?: RecordsClinicController;
30
+ /** Host file picker for the upload screen and an awaiting-upload request. */
31
+ readonly onPickDocument?: RecordsDocumentPicker;
32
+ /** The records upload transport for this surface; overrides `EverfurConfig.uploadTransport`. */
33
+ readonly uploadTransport?: UploadTransport;
34
+ /** The consent-text version the content-exposure grant records (host/product owned). */
35
+ readonly consentVersion?: string;
36
+ /** The owner's name the clinic authorization is signed with (the owner can correct it before signing). */
37
+ readonly ownerName?: string;
38
+ /** A host signature component for the clinic authorization, instead of the built-in pad. */
39
+ readonly onCaptureSignature?: CaptureRecordsSignature;
40
+ /** The screen the flow starts on; the dashboard when omitted. */
41
+ readonly initialScreen?: RecordsScreen;
42
+ /** The root screen's back control; absent, the root draws none (the host navigator owns leaving). */
43
+ readonly onExit?: () => void;
44
+ readonly style?: StyleProp<ViewStyle>;
45
+ /** Your own placeholder while the entitlement verdict is pending on a cold mount. */
46
+ readonly renderPending?: () => ReactNode;
79
47
  }
80
- interface RecordSeriesPoint {
81
- readonly at: string;
82
- readonly value: number | null;
83
- readonly display: string | null;
84
- /** Who measured this reading. `null` when the backend did not label it - never assume `clinic_document`. */
85
- readonly origin: RecordOrigin | null;
48
+ declare function EverfurRecordsFlow(props: EverfurRecordsProps): ReactNode;
49
+ /** The public prebuilt records surface: the flow, starting at the dashboard. */
50
+ declare const EverfurRecords: typeof EverfurRecordsFlow;
51
+
52
+ interface EverfurRecordsDashboardProps extends RecordsScreenBaseProps {
53
+ /** Host/test seam: inject a controller instead of acquiring one from the runtime. */
54
+ readonly controller?: RecordsController;
55
+ /** The consent-text version the grant CTA records (host/product owned). */
56
+ readonly consentVersion?: string;
57
+ readonly style?: StyleProp<ViewStyle>;
58
+ /** Your own placeholder while the entitlement verdict is pending on a cold mount. */
59
+ readonly renderPending?: () => ReactNode;
86
60
  }
87
- /** A time series of one entity (e.g. a weight trend). */
88
- interface RecordSeries {
89
- readonly key: string;
90
- readonly label: string;
91
- readonly points: readonly RecordSeriesPoint[];
61
+ declare function EverfurRecordsDashboard(props: EverfurRecordsDashboardProps): ReactNode;
62
+
63
+ interface EverfurRecordsRequestProps extends RecordsScreenBaseProps {
64
+ readonly requestId: RecordsRequestId;
65
+ readonly controller?: RecordsController;
66
+ readonly onPickDocument?: RecordsDocumentPicker;
67
+ readonly uploadTransport?: UploadTransport;
68
+ readonly style?: StyleProp<ViewStyle>;
69
+ readonly renderPending?: () => ReactNode;
70
+ /** Test seam for the elapsed-days banner. */
71
+ readonly nowMs?: number;
92
72
  }
93
- /** A forward-looking item (a due vaccine / follow-up). */
94
- interface RecordForwardItem {
95
- readonly title: string;
96
- readonly detail: string | null;
97
- readonly dueAt: string | null;
73
+ declare function EverfurRecordsRequest(props: EverfurRecordsRequestProps): ReactNode;
74
+
75
+ interface EverfurRecordDetailProps extends RecordsScreenBaseProps {
76
+ readonly controller?: RecordsController;
77
+ readonly consentVersion?: string;
78
+ readonly style?: StyleProp<ViewStyle>;
79
+ readonly renderPending?: () => ReactNode;
98
80
  }
99
- /** Metadata for one source document, keyed by its id. No raw bytes / provenance. */
100
- interface RecordDocumentMeta {
101
- readonly docId: string;
102
- readonly title: string | null;
103
- readonly pageCount: number | null;
104
- readonly receivedAt: string | null;
81
+ declare function EverfurRecordDetail(props: EverfurRecordDetailProps): ReactNode;
82
+
83
+ interface EverfurRecordDocumentProps extends RecordsScreenBaseProps {
84
+ readonly controller?: RecordsController;
85
+ readonly consentVersion?: string;
86
+ readonly style?: StyleProp<ViewStyle>;
87
+ readonly renderPending?: () => ReactNode;
105
88
  }
106
- /**
107
- * The parsed record, ALREADY partner-redacted server-side (§5). `isEmpty` is the normal pre-parse render;
108
- * `withheld` is the §5 fail-closed suppression (redaction could not be proven safe) and renders the WITHHELD
109
- * state, never empty, never raw.
110
- */
111
- interface RecordsView {
112
- readonly petRef: PetRef;
113
- readonly schemaVersion: string;
114
- readonly isEmpty: boolean;
115
- readonly withheld: boolean;
116
- readonly generatedAt: string | null;
117
- readonly identity: readonly RecordIdentityField[];
118
- readonly entities: readonly RecordEntity[];
119
- readonly entitySeries: readonly RecordSeries[];
120
- readonly forwardLooking: readonly RecordForwardItem[];
121
- readonly documents: Readonly<Record<string, RecordDocumentMeta>>;
122
- /** BE-authored not-medical-advice notice, rendered verbatim. */
123
- readonly disclaimer: string;
89
+ declare function EverfurRecordDocument(props: EverfurRecordDocumentProps): ReactNode;
90
+
91
+ interface EverfurRecordsConsentProps extends RecordsScreenBaseProps {
92
+ /** The clinic the picker chose (a directory clinic, or a typed name with the owner's email). */
93
+ readonly clinic: ClinicDraft;
94
+ /** Initial value only; the owner can visibly confirm or correct it before signing. */
95
+ readonly ownerName?: string;
96
+ /** A host signature component, instead of the built-in pad. */
97
+ readonly onCaptureSignature?: CaptureRecordsSignature;
98
+ /** Called once the request is created, before the flow returns to the dashboard. */
99
+ readonly onCreated?: (request: RecordsRequestView) => void;
100
+ /** Host/test seam over the same signed-user controller contract. */
101
+ readonly controller?: RecordsClinicController;
102
+ readonly style?: StyleProp<ViewStyle>;
124
103
  }
125
- interface ConsentState {
126
- readonly petRef: PetRef;
127
- readonly granted: boolean;
128
- /** consent-text version the user agreed to. */
129
- readonly version: string | null;
130
- readonly grantedAt: string | null;
104
+ declare function EverfurRecordsConsent(props: EverfurRecordsConsentProps): ReactNode;
105
+
106
+ interface EverfurClinicPickerProps extends RecordsScreenBaseProps {
107
+ /** Host/test seams. */
108
+ readonly controller?: RecordsClinicController;
109
+ readonly recordsController?: RecordsController;
110
+ readonly style?: StyleProp<ViewStyle>;
131
111
  }
132
- interface CreateUploadRequestInput {
133
- readonly petRef: PetRef;
134
- /** /^[A-Za-z0-9._-]{8,128}$/ (§3.1). Idempotent: a replay returns the SAME request. */
135
- readonly idempotencyKey: string;
112
+ declare function EverfurClinicPicker(props: EverfurClinicPickerProps): ReactNode;
113
+
114
+ interface EverfurRecordsUploadProps extends RecordsScreenBaseProps {
115
+ readonly controller?: RecordsController;
116
+ readonly onPickDocument?: RecordsDocumentPicker;
117
+ readonly uploadTransport?: UploadTransport;
118
+ readonly style?: StyleProp<ViewStyle>;
119
+ readonly renderPending?: () => ReactNode;
136
120
  }
137
- interface GrantConsentInput {
138
- readonly petRef: PetRef;
139
- readonly consentVersion: string;
140
- readonly idempotencyKey: string;
121
+ declare function EverfurRecordsUpload(props: EverfurRecordsUploadProps): ReactNode;
122
+
123
+ interface EverfurClinicRequestProps extends ClinicRequestBaseProps {
124
+ readonly style?: StyleProp<ViewStyle>;
141
125
  }
142
126
  /**
143
- * Why a records read/write was access-denied (all fold to `EverfurErrorCode = 'accessDenied'`, §7). The
144
- * coarse reason selects the recovery affordance: `consent_required` -> consent CTA, `session_required` ->
145
- * establish-session CTA, `entitlement` -> the CapabilityGate disabled surface.
127
+ * The clinic request for a React Native host. A host with its own signature component passes
128
+ * `onCaptureSignature`; otherwise the built-in draw-or-type pad (`SignaturePad`, no native dependency) captures
129
+ * the signature as a small inline PNG. No new native dependency either way.
146
130
  */
147
- type RecordsDenialReason = 'consent_required' | 'session_required' | 'entitlement';
148
- /** Read the records denial reason off any settled error, defensively (null when absent). */
149
- declare function recordsDenialReasonOf(error: EverfurError | null): RecordsDenialReason | null;
131
+ declare function EverfurClinicRequest(props: EverfurClinicRequestProps): ReactNode;
150
132
 
151
- interface UploadDocumentInput {
152
- readonly requestId: RecordsRequestId;
153
- readonly file: FileHandle;
154
- readonly onProgress?: (fraction: number) => void;
155
- readonly signal?: AbortSignal;
156
- }
157
- interface RecordsController {
158
- /** Create the self-upload request. Idempotent on `idempotencyKey`. Lands `awaiting_upload`. */
159
- createUploadRequest(input: CreateUploadRequestInput): Promise<EverfurResult<RecordsRequestView>>;
160
- /** Two-phase presigned upload of ONE document (§3.2). Bytes go DIRECT to S3. Resolves at `received`. */
161
- uploadDocument(input: UploadDocumentInput): Promise<EverfurResult<UploadedDocument>>;
162
- /** Poll one request's parse lifecycle. */
163
- getRequest(id: RecordsRequestId): Promise<EverfurResult<RecordsRequestView>>;
164
- /** All of this user's requests, newest-first (server-ordered). */
165
- listRequests(): Promise<EverfurResult<readonly RecordsRequestView[]>>;
166
- /** The parsed, partner-redacted record. Consent-gated + redaction-fail-closed. */
167
- getRecord(pet: PetRef): Promise<EverfurResult<RecordsView>>;
168
- /** Consent read-back. Never a hard failure for an absent row -> `granted:false`. */
169
- getConsent(pet: PetRef): Promise<EverfurResult<ConsentState>>;
170
- /** Grant content-exposure consent. Fail-closed audited server-side. Idempotent. */
171
- grantConsent(input: GrantConsentInput): Promise<EverfurResult<ConsentState>>;
172
- /** Revoke consent (prospective). Drops any cached record for the pet from memory. Idempotent. */
173
- revokeConsent(pet: PetRef): Promise<EverfurResult<ConsentState>>;
174
- /** The last record read for a pet, held in memory only; cleared on revoke. Null when none. */
175
- peekCachedRecord(pet: PetRef): RecordsView | null;
176
- /** Emit `records.capability.denied` (the rn CapabilityGate disabled surface calls this once, R12). */
177
- reportCapabilityDenied(pet: PetRef | null): void;
133
+ interface EverfurClinicRequestBatchProps extends ClinicBatchBaseProps {
134
+ readonly style?: StyleProp<ViewStyle>;
178
135
  }
136
+ declare function EverfurClinicRequestBatch(props: EverfurClinicRequestBatchProps): ReactNode;
179
137
 
180
- type RecordsStatus = 'loading' | 'empty' | 'error' | 'populated';
181
- interface UseEverfurRecordsState {
182
- readonly status: RecordsStatus;
183
- readonly record: RecordsView | null;
184
- readonly requests: readonly RecordsRequestView[];
185
- /** the most-recent request, whose timeline the populated state renders. */
186
- readonly activeRequest: RecordsRequestView | null;
187
- readonly consent: ConsentState | null;
188
- readonly error: EverfurError | null;
189
- /** drives the recovery affordance: consent CTA / establish-session CTA / disabled. */
190
- readonly denialReason: RecordsDenialReason | null;
191
- /** §5.1 fail-closed suppression: render the withheld notice, never empty, never raw. */
192
- readonly withheld: boolean;
193
- readonly isUploading: boolean;
194
- readonly uploadProgress: number | null;
195
- /** Create a self-upload request the user attaches documents to. */
196
- createRequest(idempotencyKey: string): Promise<EverfurResult<RecordsRequestView>>;
197
- /** Two-phase presigned upload of one document to the active request. */
198
- uploadDocument(requestId: RecordsRequestView['id'], file: FileHandle): Promise<EverfurResult<UploadedDocument>>;
199
- /** Grant content-exposure consent, then fetch the record. */
200
- grantConsent(consentVersion: string, idempotencyKey: string): Promise<EverfurResult<ConsentState>>;
201
- /** Revoke consent (prospective); drops the record from view. */
202
- revokeConsent(): Promise<EverfurResult<ConsentState>>;
203
- /** Re-run the surface fetch (error retry). */
204
- refresh(): void;
138
+ interface SignaturePadProps {
139
+ /** The current signature as a base64 PNG, or null when the pad is empty. Called on every change. */
140
+ readonly onChange: (signaturePngBase64: string | null) => void;
141
+ readonly disabled?: boolean;
205
142
  }
206
- declare function useEverfurRecords(opts: {
207
- readonly petRef: PetRef;
208
- /** Host/test seam: inject a controller directly instead of acquiring one from the runtime. */
209
- readonly controller?: RecordsController;
210
- }): UseEverfurRecordsState;
143
+ declare function SignaturePad({ onChange, disabled }: SignaturePadProps): ReactNode;
211
144
 
212
- interface EverfurRecordsProps {
213
- readonly petRef: PetRef;
214
- /** Host/test seam: inject a controller instead of acquiring one from the runtime. */
215
- readonly controller?: RecordsController;
216
- /** Host file picker: resolves a picked FileHandle (native document picker lives in the host app). */
217
- readonly onPickDocument?: () => Promise<FileHandle | null>;
218
- /** The consent-text version the grant CTA records (host/product owned). */
219
- readonly consentVersion?: string;
220
- readonly style?: StyleProp<ViewStyle>;
221
- }
222
- declare function EverfurRecords(props: EverfurRecordsProps): ReactNode;
145
+ /** The subset of `fetch` this registration calls (the same shape the records upload transport takes). */
146
+ type RnSignatureFetch = (url: string, init: {
147
+ readonly method: 'POST';
148
+ readonly body: FormData;
149
+ readonly credentials: 'omit';
150
+ readonly signal?: AbortSignal;
151
+ }) => Promise<{
152
+ readonly ok: boolean;
153
+ }>;
154
+ declare function registerRnSignature(signaturePngBase64: string, controller: RecordsClinicController, signal: AbortSignal, fetchImpl?: RnSignatureFetch): Promise<{
155
+ readonly signatureId: string;
156
+ }>;
223
157
 
224
- export { type ConsentState, type CreateUploadRequestInput, DocumentId, EverfurError, EverfurRecords, type EverfurRecordsProps, EverfurResult, FileHandle, type GrantConsentInput, PetRef, RECORDS_TERMINAL, type RecordDocumentMeta, type RecordEntity, type RecordForwardItem, type RecordIdentityField, type RecordOrigin, type RecordSeries, type RecordSeriesPoint, type RecordsController, type RecordsDenialReason, RecordsRequestId, type RecordsRequestStatus, type RecordsRequestView, type RecordsStatus, type RecordsView, type UploadDocumentInput, type UploadedDocument, type UseEverfurRecordsState, isTerminalStatus, recordsDenialReasonOf, useEverfurRecords };
158
+ export { CaptureRecordsSignature, ClinicBatchBaseProps, ClinicDraft, ClinicRequestBaseProps, EverfurClinicPicker, type EverfurClinicPickerProps, EverfurClinicRequest, EverfurClinicRequestBatch, type EverfurClinicRequestBatchProps, type EverfurClinicRequestProps, EverfurRecordDetail, type EverfurRecordDetailProps, EverfurRecordDocument, type EverfurRecordDocumentProps, EverfurRecords, EverfurRecordsConsent, type EverfurRecordsConsentProps, EverfurRecordsDashboard, type EverfurRecordsDashboardProps, EverfurRecordsFlow, type EverfurRecordsProps, EverfurRecordsRequest, type EverfurRecordsRequestProps, EverfurRecordsUpload, type EverfurRecordsUploadProps, PetRef, RecordsClinicController, RecordsController, RecordsDocumentPicker, RecordsHostSeams, RecordsRequestId, RecordsRequestView, RecordsScreen, RecordsScreenBaseProps, type RnSignatureFetch, SignaturePad, type SignaturePadProps, UploadTransport, registerRnSignature };