@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
@@ -0,0 +1,285 @@
1
+ import { R as RecordsController } from '../../view-DyitEO0m.cjs';
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-DyitEO0m.cjs';
3
+ import { CSSProperties, ReactNode, PointerEvent } from 'react';
4
+ import { P as PetRef, R as RecordsRequestId } from '../../ids-B2GAAifq.cjs';
5
+ export { B as Brand, D as DocumentId, _ as __brand } from '../../ids-B2GAAifq.cjs';
6
+ 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-C6rjEaLn.cjs';
7
+ 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-C6rjEaLn.cjs';
8
+ import { d as RecordsRequestView } from '../../models-D2EUxPZY.cjs';
9
+ 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-D2EUxPZY.cjs';
10
+ import { E as EverfurError } from '../../EverfurResult-DN9pL2Ab.cjs';
11
+ export { a as EverfurErrorCategory, b as EverfurErrorCode, c as EverfurResult } from '../../EverfurResult-DN9pL2Ab.cjs';
12
+ 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-D5HwcvKC.cjs';
13
+ export { a as EverfurDocumentContributionsProps, c as EverfurRecordsDepthProps } from '../../DepthViews-CL75jyRA.cjs';
14
+ import { U as UploadTransport, F as FileHandle } from '../../ports-BN6RHF9W.cjs';
15
+ export { a as UploadPolicyWire } from '../../ports-BN6RHF9W.cjs';
16
+ import '../../requestFunnel-BjDpqqvm.cjs';
17
+ import '../../ErrorPolicyPort-CNf4uQZP.cjs';
18
+ import '../../config--Wu1Umhd.cjs';
19
+ import '../../identity-C2-08BZW.cjs';
20
+
21
+ type RecordsHistoryMode = 'memory' | 'browser';
22
+ interface EverfurRecordsProps extends RecordsHostSeams {
23
+ readonly petRef: PetRef;
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. */
29
+ readonly clinicController?: RecordsClinicController;
30
+ /** The consent-text version the content-exposure grant records (host/product owned). */
31
+ readonly consentVersion?: string;
32
+ /** The owner's name the clinic authorization is signed with (the owner can correct it before signing). */
33
+ readonly ownerName?: string;
34
+ /** A host signature component for the clinic authorization, instead of the built-in canvas. */
35
+ readonly onCaptureSignature?: CaptureRecordsSignature;
36
+ /** The screen the flow starts on; the dashboard when omitted. */
37
+ readonly initialScreen?: RecordsScreen;
38
+ /** `memory` (default) keeps the stack in state; `browser` mirrors it onto the history stack. */
39
+ readonly historyMode?: RecordsHistoryMode;
40
+ /** The root screen's back control; absent, the root draws none. */
41
+ readonly onExit?: () => void;
42
+ readonly style?: CSSProperties;
43
+ readonly className?: string;
44
+ /** Your own placeholder while the entitlement verdict is pending on a cold mount. */
45
+ readonly renderPending?: () => ReactNode;
46
+ }
47
+ declare function EverfurRecordsFlow(props: EverfurRecordsProps): ReactNode;
48
+ /** The public prebuilt records surface: the flow, starting at the dashboard. */
49
+ declare const EverfurRecords: typeof EverfurRecordsFlow;
50
+
51
+ interface EverfurRecordsPageProps extends RecordsScreenBaseProps {
52
+ readonly controller?: RecordsController;
53
+ readonly consentVersion?: string;
54
+ /**
55
+ * The heading level this page's title claims. Defaults to 2.
56
+ *
57
+ * THIS PAGE AND THE BOOKING FLOW USED TO DISAGREE, and that is why the prop exists. The page hardcoded
58
+ * `<h2>` and the televet booking chrome hardcoded `<h1>`, so a partner mounting both in one document got two
59
+ * competing top levels. A drop-in widget does not own the host page's `<h1>`: the shared default is 2 and a
60
+ * host whose page IS this surface passes 1. `src/web/headingLevel.ts` carries the full argument.
61
+ */
62
+ readonly headingLevel?: number;
63
+ readonly style?: CSSProperties;
64
+ readonly className?: string;
65
+ readonly renderPending?: () => ReactNode;
66
+ }
67
+ /**
68
+ * The records surface as a PAGE, mirroring the consumer web app.
69
+ *
70
+ * Use this when records are a page in your own web app. Use `EverfurRecords` (the flow) when they
71
+ * are a stack of screens, which is what a phone-width or framed embed wants.
72
+ */
73
+ declare function EverfurRecordsPage(props: EverfurRecordsPageProps): ReactNode;
74
+
75
+ interface EverfurRecordsDashboardProps extends RecordsScreenBaseProps {
76
+ readonly controller?: RecordsController;
77
+ readonly consentVersion?: string;
78
+ readonly style?: CSSProperties;
79
+ readonly className?: string;
80
+ readonly renderPending?: () => ReactNode;
81
+ }
82
+ declare function EverfurRecordsDashboard(props: EverfurRecordsDashboardProps): ReactNode;
83
+
84
+ interface EverfurRecordsRequestProps extends RecordsScreenBaseProps {
85
+ readonly requestId: RecordsRequestId;
86
+ readonly controller?: RecordsController;
87
+ readonly style?: CSSProperties;
88
+ readonly className?: string;
89
+ readonly renderPending?: () => ReactNode;
90
+ readonly nowMs?: number;
91
+ }
92
+ declare function EverfurRecordsRequest(props: EverfurRecordsRequestProps): ReactNode;
93
+
94
+ interface EverfurRecordDetailProps extends RecordsScreenBaseProps {
95
+ readonly controller?: RecordsController;
96
+ readonly consentVersion?: string;
97
+ readonly style?: CSSProperties;
98
+ readonly className?: string;
99
+ readonly renderPending?: () => ReactNode;
100
+ }
101
+ declare function EverfurRecordDetail(props: EverfurRecordDetailProps): ReactNode;
102
+
103
+ interface EverfurRecordDocumentProps extends RecordsScreenBaseProps {
104
+ readonly controller?: RecordsController;
105
+ readonly consentVersion?: string;
106
+ readonly style?: CSSProperties;
107
+ readonly className?: string;
108
+ readonly renderPending?: () => ReactNode;
109
+ }
110
+ declare function EverfurRecordDocument(props: EverfurRecordDocumentProps): ReactNode;
111
+
112
+ interface EverfurRecordsConsentProps extends RecordsScreenBaseProps {
113
+ readonly clinic: ClinicDraft;
114
+ readonly ownerName?: string;
115
+ readonly onCaptureSignature?: CaptureRecordsSignature;
116
+ readonly onCreated?: (request: RecordsRequestView) => void;
117
+ readonly controller?: RecordsClinicController;
118
+ readonly style?: CSSProperties;
119
+ readonly className?: string;
120
+ }
121
+ declare function EverfurRecordsConsent(props: EverfurRecordsConsentProps): ReactNode;
122
+
123
+ interface EverfurClinicPickerProps extends RecordsScreenBaseProps {
124
+ readonly controller?: RecordsClinicController;
125
+ readonly recordsController?: RecordsController;
126
+ readonly style?: CSSProperties;
127
+ readonly className?: string;
128
+ }
129
+ declare function EverfurClinicPicker(props: EverfurClinicPickerProps): ReactNode;
130
+
131
+ interface EverfurRecordsUploadProps extends RecordsScreenBaseProps {
132
+ readonly controller?: RecordsController;
133
+ readonly style?: CSSProperties;
134
+ readonly className?: string;
135
+ readonly renderPending?: () => ReactNode;
136
+ }
137
+ declare function EverfurRecordsUpload(props: EverfurRecordsUploadProps): ReactNode;
138
+
139
+ interface RequestDocumentsListProps {
140
+ readonly requestId: string;
141
+ /**
142
+ * The surface's own open state. False costs no network and asks for no signed URL it will not
143
+ * show; true starts the read. Defaults to true for a caller that is always visible.
144
+ */
145
+ readonly open?: boolean;
146
+ readonly testID?: string;
147
+ }
148
+ declare function RequestDocumentsList({ requestId, open, testID, }: RequestDocumentsListProps): ReactNode;
149
+
150
+ /** One uploaded file, resolved to exactly what the list renders. */
151
+ interface RequestDocumentRow {
152
+ /** Stable list key: the document's own wire id. */
153
+ readonly key: string;
154
+ readonly title: string;
155
+ /** Format, size and date, whichever the row has, joined with a middle dot. Null when none apply. */
156
+ readonly meta: string | null;
157
+ readonly downloadUrl: string;
158
+ }
159
+ /** The wire rows as the list renders them, order preserved (the server sends oldest first). */
160
+ declare function requestDocumentRows(items: readonly {
161
+ readonly sourceDocId: string;
162
+ readonly fileName: string | null;
163
+ readonly docFormat: string | null;
164
+ readonly byteSize: number | null;
165
+ readonly receivedAt: string | null;
166
+ readonly downloadUrl: string;
167
+ }[]): readonly RequestDocumentRow[];
168
+
169
+ type RequestDocumentsStatus = 'loading' | 'empty' | 'error' | 'populated';
170
+ interface UseRequestDocumentsState {
171
+ readonly status: RequestDocumentsStatus;
172
+ /** The rows as the list renders them, oldest first (the server's order, preserved). */
173
+ readonly rows: readonly RequestDocumentRow[];
174
+ readonly error: EverfurError | null;
175
+ /** Read again, which mints fresh signed links. The error state's retry control calls this. */
176
+ readonly refresh: () => void;
177
+ }
178
+ /**
179
+ * One documents read for one request, run when `enabled` turns true and on `refresh`.
180
+ *
181
+ * `enabled:false` settles to `empty` with no error and never touches the network, so a closed sheet
182
+ * or a collapsed row costs nothing and asks for no signed URLs it will not show.
183
+ */
184
+ declare function useRequestDocuments(requestId: string, opts?: {
185
+ readonly enabled?: boolean;
186
+ }): UseRequestDocumentsState;
187
+
188
+ interface EverfurClinicRequestProps extends ClinicRequestBaseProps {
189
+ readonly style?: CSSProperties;
190
+ readonly className?: string;
191
+ }
192
+ /** Opt-in clinic release flow, reusing the consumer picker/scope/signature mechanics. */
193
+ declare function EverfurClinicRequest(props: EverfurClinicRequestProps): ReactNode;
194
+
195
+ interface EverfurClinicRequestBatchProps extends ClinicBatchBaseProps {
196
+ readonly style?: CSSProperties;
197
+ readonly className?: string;
198
+ }
199
+ declare function EverfurClinicRequestBatch(props: EverfurClinicRequestBatchProps): ReactNode;
200
+
201
+ interface WebRecordsUploadTransportOptions {
202
+ /**
203
+ * Test seam: the XMLHttpRequest constructor to use. Defaults to the global one. A host has no reason to
204
+ * set it.
205
+ */
206
+ readonly xhr?: () => XMLHttpRequest;
207
+ }
208
+ /**
209
+ * Create the browser records upload transport. Pass it as `uploadTransport` on the web `EverfurConfig`:
210
+ *
211
+ * ```tsx
212
+ * <EverfurProvider config={{ publishableKey, apiBaseUrl, uploadTransport: createWebRecordsUploadTransport() }} ...>
213
+ * ```
214
+ *
215
+ * It needs the picked file's bytes on `FileHandle.blob` (see `fileToHandle`). A handle with no blob rejects
216
+ * before any request is made.
217
+ */
218
+ declare function createWebRecordsUploadTransport(options?: WebRecordsUploadTransportOptions): UploadTransport;
219
+
220
+ /** The `accept` hint for the picker. A hint only: the signature check above is what decides. */
221
+ declare const RECORDS_DOCUMENT_ACCEPT = "application/pdf,.pdf";
222
+ /** True when the blob starts with the PDF signature. An unreadable blob is not a PDF. */
223
+ declare function isPdfBlob(blob: Blob): Promise<boolean>;
224
+ /**
225
+ * Build the records `FileHandle` for a browser `File` (or any Blob). `mimeType` is `application/pdf` only when
226
+ * the bytes carry the PDF signature; `sizeBytes` is the real size, so an oversize file is refused by the
227
+ * controller before initiate as well.
228
+ */
229
+ declare function fileToHandle(file: Blob): Promise<FileHandle>;
230
+ /**
231
+ * The same gate the controller applies before initiate (PDF, 0 < size <= 25 MiB), for a surface that must
232
+ * decide BEFORE it creates a request: a refused file should not leave an empty request behind.
233
+ */
234
+ declare function isUploadableHandle(handle: FileHandle): boolean;
235
+ /**
236
+ * Open the browser's file chooser for one document and resolve its handle, or null when the user picks
237
+ * nothing. For a host that builds its own records UI on `useEverfurRecords`; the prebuilt surface renders its
238
+ * own input instead. Must be called from a user gesture (a click handler), or the browser blocks the chooser.
239
+ *
240
+ * The input is attached to the document while the chooser is open (Safari does not open a detached input)
241
+ * and removed once it settles. A browser that never fires `cancel` leaves the promise pending when the user
242
+ * dismisses the chooser; nothing is held but the closure.
243
+ */
244
+ declare function pickDocument(doc?: Document): Promise<FileHandle | null>;
245
+
246
+ interface SignatureCanvasState {
247
+ readonly canvas: React.RefObject<HTMLCanvasElement>;
248
+ readonly mode: 'draw' | 'type';
249
+ readonly typed: string;
250
+ readonly signed: boolean;
251
+ readonly setTyped: (value: string) => void;
252
+ readonly toggle: () => void;
253
+ readonly clear: () => void;
254
+ readonly onPointerDown: (event: PointerEvent<HTMLCanvasElement>) => void;
255
+ readonly onPointerMove: (event: PointerEvent<HTMLCanvasElement>) => void;
256
+ readonly onPointerUp: () => void;
257
+ /** The consumer's initiate / direct S3 / complete chain over the current canvas; throws on failure. */
258
+ readonly register: (controller: RecordsClinicController, signal: AbortSignal) => Promise<{
259
+ readonly signatureId: string;
260
+ }>;
261
+ }
262
+ declare function useSignatureCanvas(onEdit?: () => void): SignatureCanvasState;
263
+ /**
264
+ * The pad, and the ONE place the draw-or-type decision is rendered.
265
+ *
266
+ * THE WAY OUT SITS ABOVE THE CANVAS, which is the consumer web app's decision and not a preference.
267
+ * everfur-frontend RequestRecordsDialog.tsx:658-663 records why, and it records it as something mobile
268
+ * learned the hard way: with the alternative under the pad, a person who cannot draw has to scroll past the
269
+ * thing they are stuck on to discover that they do not have to. The rn sibling (src/rn/records/ConsentScreen
270
+ * .tsx:156-161) still draws its toggle below its `SignaturePad`, so this is one of the places where mirroring
271
+ * rn would have been the wrong app.
272
+ *
273
+ * AND IT IS RENDERED HERE, ONCE, BECAUSE THIS COMPONENT IS THE PAD. Requesting records is the only path by
274
+ * which a clinic's records enter the product, so the typed alternative is what keeps that path reachable for a
275
+ * keyboard-only or motor-impaired owner: not degraded, unreachable. Owning the label and the toggle next to
276
+ * the canvas whose mode they describe is what stops a caller from drawing a SECOND toggle against its own copy
277
+ * of the mode, which is exactly the defect this replaced (two identical toggles, and the caller's label going
278
+ * stale the moment the pad's own toggle was the one pressed).
279
+ */
280
+ declare function SignatureCanvas({ pad, disabled }: {
281
+ readonly pad: SignatureCanvasState;
282
+ readonly disabled: boolean;
283
+ }): ReactNode;
284
+
285
+ export { CaptureRecordsSignature, ClinicBatchBaseProps, ClinicDraft, ClinicRequestBaseProps, EverfurClinicPicker, type EverfurClinicPickerProps, EverfurClinicRequest, EverfurClinicRequestBatch, type EverfurClinicRequestBatchProps, type EverfurClinicRequestProps, EverfurError, EverfurRecordDetail, type EverfurRecordDetailProps, EverfurRecordDocument, type EverfurRecordDocumentProps, EverfurRecords, EverfurRecordsConsent, type EverfurRecordsConsentProps, EverfurRecordsDashboard, type EverfurRecordsDashboardProps, EverfurRecordsFlow, EverfurRecordsPage, type EverfurRecordsPageProps, type EverfurRecordsProps, EverfurRecordsRequest, type EverfurRecordsRequestProps, EverfurRecordsUpload, type EverfurRecordsUploadProps, FileHandle, PetRef, RECORDS_DOCUMENT_ACCEPT, RecordsClinicController, RecordsController, type RecordsHistoryMode, RecordsHostSeams, RecordsRequestId, RecordsRequestView, RecordsScreen, RecordsScreenBaseProps, type RequestDocumentRow, RequestDocumentsList, type RequestDocumentsListProps, type RequestDocumentsStatus, SignatureCanvas, type SignatureCanvasState, UploadTransport, type UseRequestDocumentsState, type WebRecordsUploadTransportOptions, createWebRecordsUploadTransport, fileToHandle, isPdfBlob, isUploadableHandle, pickDocument, requestDocumentRows, useRequestDocuments, useSignatureCanvas };
@@ -0,0 +1,285 @@
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';
3
+ import { CSSProperties, ReactNode, PointerEvent } from 'react';
4
+ import { P as PetRef, R as RecordsRequestId } from '../../ids-B2GAAifq.js';
5
+ export { B as Brand, D as DocumentId, _ as __brand } from '../../ids-B2GAAifq.js';
6
+ 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';
7
+ 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';
8
+ import { d as RecordsRequestView } from '../../models-B-Uh2LTf.js';
9
+ 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';
10
+ import { E as EverfurError } from '../../EverfurResult-DN9pL2Ab.js';
11
+ export { a as EverfurErrorCategory, b as EverfurErrorCode, c as EverfurResult } from '../../EverfurResult-DN9pL2Ab.js';
12
+ 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';
13
+ export { a as EverfurDocumentContributionsProps, c as EverfurRecordsDepthProps } from '../../DepthViews-BG3E25MD.js';
14
+ import { U as UploadTransport, F as FileHandle } from '../../ports-BN6RHF9W.js';
15
+ export { a as UploadPolicyWire } from '../../ports-BN6RHF9W.js';
16
+ import '../../requestFunnel-DFMGcluw.js';
17
+ import '../../ErrorPolicyPort-CwbfmxzJ.js';
18
+ import '../../config-C7eb_IMD.js';
19
+ import '../../identity-CEi9GRFZ.js';
20
+
21
+ type RecordsHistoryMode = 'memory' | 'browser';
22
+ interface EverfurRecordsProps extends RecordsHostSeams {
23
+ readonly petRef: PetRef;
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. */
29
+ readonly clinicController?: RecordsClinicController;
30
+ /** The consent-text version the content-exposure grant records (host/product owned). */
31
+ readonly consentVersion?: string;
32
+ /** The owner's name the clinic authorization is signed with (the owner can correct it before signing). */
33
+ readonly ownerName?: string;
34
+ /** A host signature component for the clinic authorization, instead of the built-in canvas. */
35
+ readonly onCaptureSignature?: CaptureRecordsSignature;
36
+ /** The screen the flow starts on; the dashboard when omitted. */
37
+ readonly initialScreen?: RecordsScreen;
38
+ /** `memory` (default) keeps the stack in state; `browser` mirrors it onto the history stack. */
39
+ readonly historyMode?: RecordsHistoryMode;
40
+ /** The root screen's back control; absent, the root draws none. */
41
+ readonly onExit?: () => void;
42
+ readonly style?: CSSProperties;
43
+ readonly className?: string;
44
+ /** Your own placeholder while the entitlement verdict is pending on a cold mount. */
45
+ readonly renderPending?: () => ReactNode;
46
+ }
47
+ declare function EverfurRecordsFlow(props: EverfurRecordsProps): ReactNode;
48
+ /** The public prebuilt records surface: the flow, starting at the dashboard. */
49
+ declare const EverfurRecords: typeof EverfurRecordsFlow;
50
+
51
+ interface EverfurRecordsPageProps extends RecordsScreenBaseProps {
52
+ readonly controller?: RecordsController;
53
+ readonly consentVersion?: string;
54
+ /**
55
+ * The heading level this page's title claims. Defaults to 2.
56
+ *
57
+ * THIS PAGE AND THE BOOKING FLOW USED TO DISAGREE, and that is why the prop exists. The page hardcoded
58
+ * `<h2>` and the televet booking chrome hardcoded `<h1>`, so a partner mounting both in one document got two
59
+ * competing top levels. A drop-in widget does not own the host page's `<h1>`: the shared default is 2 and a
60
+ * host whose page IS this surface passes 1. `src/web/headingLevel.ts` carries the full argument.
61
+ */
62
+ readonly headingLevel?: number;
63
+ readonly style?: CSSProperties;
64
+ readonly className?: string;
65
+ readonly renderPending?: () => ReactNode;
66
+ }
67
+ /**
68
+ * The records surface as a PAGE, mirroring the consumer web app.
69
+ *
70
+ * Use this when records are a page in your own web app. Use `EverfurRecords` (the flow) when they
71
+ * are a stack of screens, which is what a phone-width or framed embed wants.
72
+ */
73
+ declare function EverfurRecordsPage(props: EverfurRecordsPageProps): ReactNode;
74
+
75
+ interface EverfurRecordsDashboardProps extends RecordsScreenBaseProps {
76
+ readonly controller?: RecordsController;
77
+ readonly consentVersion?: string;
78
+ readonly style?: CSSProperties;
79
+ readonly className?: string;
80
+ readonly renderPending?: () => ReactNode;
81
+ }
82
+ declare function EverfurRecordsDashboard(props: EverfurRecordsDashboardProps): ReactNode;
83
+
84
+ interface EverfurRecordsRequestProps extends RecordsScreenBaseProps {
85
+ readonly requestId: RecordsRequestId;
86
+ readonly controller?: RecordsController;
87
+ readonly style?: CSSProperties;
88
+ readonly className?: string;
89
+ readonly renderPending?: () => ReactNode;
90
+ readonly nowMs?: number;
91
+ }
92
+ declare function EverfurRecordsRequest(props: EverfurRecordsRequestProps): ReactNode;
93
+
94
+ interface EverfurRecordDetailProps extends RecordsScreenBaseProps {
95
+ readonly controller?: RecordsController;
96
+ readonly consentVersion?: string;
97
+ readonly style?: CSSProperties;
98
+ readonly className?: string;
99
+ readonly renderPending?: () => ReactNode;
100
+ }
101
+ declare function EverfurRecordDetail(props: EverfurRecordDetailProps): ReactNode;
102
+
103
+ interface EverfurRecordDocumentProps extends RecordsScreenBaseProps {
104
+ readonly controller?: RecordsController;
105
+ readonly consentVersion?: string;
106
+ readonly style?: CSSProperties;
107
+ readonly className?: string;
108
+ readonly renderPending?: () => ReactNode;
109
+ }
110
+ declare function EverfurRecordDocument(props: EverfurRecordDocumentProps): ReactNode;
111
+
112
+ interface EverfurRecordsConsentProps extends RecordsScreenBaseProps {
113
+ readonly clinic: ClinicDraft;
114
+ readonly ownerName?: string;
115
+ readonly onCaptureSignature?: CaptureRecordsSignature;
116
+ readonly onCreated?: (request: RecordsRequestView) => void;
117
+ readonly controller?: RecordsClinicController;
118
+ readonly style?: CSSProperties;
119
+ readonly className?: string;
120
+ }
121
+ declare function EverfurRecordsConsent(props: EverfurRecordsConsentProps): ReactNode;
122
+
123
+ interface EverfurClinicPickerProps extends RecordsScreenBaseProps {
124
+ readonly controller?: RecordsClinicController;
125
+ readonly recordsController?: RecordsController;
126
+ readonly style?: CSSProperties;
127
+ readonly className?: string;
128
+ }
129
+ declare function EverfurClinicPicker(props: EverfurClinicPickerProps): ReactNode;
130
+
131
+ interface EverfurRecordsUploadProps extends RecordsScreenBaseProps {
132
+ readonly controller?: RecordsController;
133
+ readonly style?: CSSProperties;
134
+ readonly className?: string;
135
+ readonly renderPending?: () => ReactNode;
136
+ }
137
+ declare function EverfurRecordsUpload(props: EverfurRecordsUploadProps): ReactNode;
138
+
139
+ interface RequestDocumentsListProps {
140
+ readonly requestId: string;
141
+ /**
142
+ * The surface's own open state. False costs no network and asks for no signed URL it will not
143
+ * show; true starts the read. Defaults to true for a caller that is always visible.
144
+ */
145
+ readonly open?: boolean;
146
+ readonly testID?: string;
147
+ }
148
+ declare function RequestDocumentsList({ requestId, open, testID, }: RequestDocumentsListProps): ReactNode;
149
+
150
+ /** One uploaded file, resolved to exactly what the list renders. */
151
+ interface RequestDocumentRow {
152
+ /** Stable list key: the document's own wire id. */
153
+ readonly key: string;
154
+ readonly title: string;
155
+ /** Format, size and date, whichever the row has, joined with a middle dot. Null when none apply. */
156
+ readonly meta: string | null;
157
+ readonly downloadUrl: string;
158
+ }
159
+ /** The wire rows as the list renders them, order preserved (the server sends oldest first). */
160
+ declare function requestDocumentRows(items: readonly {
161
+ readonly sourceDocId: string;
162
+ readonly fileName: string | null;
163
+ readonly docFormat: string | null;
164
+ readonly byteSize: number | null;
165
+ readonly receivedAt: string | null;
166
+ readonly downloadUrl: string;
167
+ }[]): readonly RequestDocumentRow[];
168
+
169
+ type RequestDocumentsStatus = 'loading' | 'empty' | 'error' | 'populated';
170
+ interface UseRequestDocumentsState {
171
+ readonly status: RequestDocumentsStatus;
172
+ /** The rows as the list renders them, oldest first (the server's order, preserved). */
173
+ readonly rows: readonly RequestDocumentRow[];
174
+ readonly error: EverfurError | null;
175
+ /** Read again, which mints fresh signed links. The error state's retry control calls this. */
176
+ readonly refresh: () => void;
177
+ }
178
+ /**
179
+ * One documents read for one request, run when `enabled` turns true and on `refresh`.
180
+ *
181
+ * `enabled:false` settles to `empty` with no error and never touches the network, so a closed sheet
182
+ * or a collapsed row costs nothing and asks for no signed URLs it will not show.
183
+ */
184
+ declare function useRequestDocuments(requestId: string, opts?: {
185
+ readonly enabled?: boolean;
186
+ }): UseRequestDocumentsState;
187
+
188
+ interface EverfurClinicRequestProps extends ClinicRequestBaseProps {
189
+ readonly style?: CSSProperties;
190
+ readonly className?: string;
191
+ }
192
+ /** Opt-in clinic release flow, reusing the consumer picker/scope/signature mechanics. */
193
+ declare function EverfurClinicRequest(props: EverfurClinicRequestProps): ReactNode;
194
+
195
+ interface EverfurClinicRequestBatchProps extends ClinicBatchBaseProps {
196
+ readonly style?: CSSProperties;
197
+ readonly className?: string;
198
+ }
199
+ declare function EverfurClinicRequestBatch(props: EverfurClinicRequestBatchProps): ReactNode;
200
+
201
+ interface WebRecordsUploadTransportOptions {
202
+ /**
203
+ * Test seam: the XMLHttpRequest constructor to use. Defaults to the global one. A host has no reason to
204
+ * set it.
205
+ */
206
+ readonly xhr?: () => XMLHttpRequest;
207
+ }
208
+ /**
209
+ * Create the browser records upload transport. Pass it as `uploadTransport` on the web `EverfurConfig`:
210
+ *
211
+ * ```tsx
212
+ * <EverfurProvider config={{ publishableKey, apiBaseUrl, uploadTransport: createWebRecordsUploadTransport() }} ...>
213
+ * ```
214
+ *
215
+ * It needs the picked file's bytes on `FileHandle.blob` (see `fileToHandle`). A handle with no blob rejects
216
+ * before any request is made.
217
+ */
218
+ declare function createWebRecordsUploadTransport(options?: WebRecordsUploadTransportOptions): UploadTransport;
219
+
220
+ /** The `accept` hint for the picker. A hint only: the signature check above is what decides. */
221
+ declare const RECORDS_DOCUMENT_ACCEPT = "application/pdf,.pdf";
222
+ /** True when the blob starts with the PDF signature. An unreadable blob is not a PDF. */
223
+ declare function isPdfBlob(blob: Blob): Promise<boolean>;
224
+ /**
225
+ * Build the records `FileHandle` for a browser `File` (or any Blob). `mimeType` is `application/pdf` only when
226
+ * the bytes carry the PDF signature; `sizeBytes` is the real size, so an oversize file is refused by the
227
+ * controller before initiate as well.
228
+ */
229
+ declare function fileToHandle(file: Blob): Promise<FileHandle>;
230
+ /**
231
+ * The same gate the controller applies before initiate (PDF, 0 < size <= 25 MiB), for a surface that must
232
+ * decide BEFORE it creates a request: a refused file should not leave an empty request behind.
233
+ */
234
+ declare function isUploadableHandle(handle: FileHandle): boolean;
235
+ /**
236
+ * Open the browser's file chooser for one document and resolve its handle, or null when the user picks
237
+ * nothing. For a host that builds its own records UI on `useEverfurRecords`; the prebuilt surface renders its
238
+ * own input instead. Must be called from a user gesture (a click handler), or the browser blocks the chooser.
239
+ *
240
+ * The input is attached to the document while the chooser is open (Safari does not open a detached input)
241
+ * and removed once it settles. A browser that never fires `cancel` leaves the promise pending when the user
242
+ * dismisses the chooser; nothing is held but the closure.
243
+ */
244
+ declare function pickDocument(doc?: Document): Promise<FileHandle | null>;
245
+
246
+ interface SignatureCanvasState {
247
+ readonly canvas: React.RefObject<HTMLCanvasElement>;
248
+ readonly mode: 'draw' | 'type';
249
+ readonly typed: string;
250
+ readonly signed: boolean;
251
+ readonly setTyped: (value: string) => void;
252
+ readonly toggle: () => void;
253
+ readonly clear: () => void;
254
+ readonly onPointerDown: (event: PointerEvent<HTMLCanvasElement>) => void;
255
+ readonly onPointerMove: (event: PointerEvent<HTMLCanvasElement>) => void;
256
+ readonly onPointerUp: () => void;
257
+ /** The consumer's initiate / direct S3 / complete chain over the current canvas; throws on failure. */
258
+ readonly register: (controller: RecordsClinicController, signal: AbortSignal) => Promise<{
259
+ readonly signatureId: string;
260
+ }>;
261
+ }
262
+ declare function useSignatureCanvas(onEdit?: () => void): SignatureCanvasState;
263
+ /**
264
+ * The pad, and the ONE place the draw-or-type decision is rendered.
265
+ *
266
+ * THE WAY OUT SITS ABOVE THE CANVAS, which is the consumer web app's decision and not a preference.
267
+ * everfur-frontend RequestRecordsDialog.tsx:658-663 records why, and it records it as something mobile
268
+ * learned the hard way: with the alternative under the pad, a person who cannot draw has to scroll past the
269
+ * thing they are stuck on to discover that they do not have to. The rn sibling (src/rn/records/ConsentScreen
270
+ * .tsx:156-161) still draws its toggle below its `SignaturePad`, so this is one of the places where mirroring
271
+ * rn would have been the wrong app.
272
+ *
273
+ * AND IT IS RENDERED HERE, ONCE, BECAUSE THIS COMPONENT IS THE PAD. Requesting records is the only path by
274
+ * which a clinic's records enter the product, so the typed alternative is what keeps that path reachable for a
275
+ * keyboard-only or motor-impaired owner: not degraded, unreachable. Owning the label and the toggle next to
276
+ * the canvas whose mode they describe is what stops a caller from drawing a SECOND toggle against its own copy
277
+ * of the mode, which is exactly the defect this replaced (two identical toggles, and the caller's label going
278
+ * stale the moment the pad's own toggle was the one pressed).
279
+ */
280
+ declare function SignatureCanvas({ pad, disabled }: {
281
+ readonly pad: SignatureCanvasState;
282
+ readonly disabled: boolean;
283
+ }): ReactNode;
284
+
285
+ export { CaptureRecordsSignature, ClinicBatchBaseProps, ClinicDraft, ClinicRequestBaseProps, EverfurClinicPicker, type EverfurClinicPickerProps, EverfurClinicRequest, EverfurClinicRequestBatch, type EverfurClinicRequestBatchProps, type EverfurClinicRequestProps, EverfurError, EverfurRecordDetail, type EverfurRecordDetailProps, EverfurRecordDocument, type EverfurRecordDocumentProps, EverfurRecords, EverfurRecordsConsent, type EverfurRecordsConsentProps, EverfurRecordsDashboard, type EverfurRecordsDashboardProps, EverfurRecordsFlow, EverfurRecordsPage, type EverfurRecordsPageProps, type EverfurRecordsProps, EverfurRecordsRequest, type EverfurRecordsRequestProps, EverfurRecordsUpload, type EverfurRecordsUploadProps, FileHandle, PetRef, RECORDS_DOCUMENT_ACCEPT, RecordsClinicController, RecordsController, type RecordsHistoryMode, RecordsHostSeams, RecordsRequestId, RecordsRequestView, RecordsScreen, RecordsScreenBaseProps, type RequestDocumentRow, RequestDocumentsList, type RequestDocumentsListProps, type RequestDocumentsStatus, SignatureCanvas, type SignatureCanvasState, UploadTransport, type UseRequestDocumentsState, type WebRecordsUploadTransportOptions, createWebRecordsUploadTransport, fileToHandle, isPdfBlob, isUploadableHandle, pickDocument, requestDocumentRows, useRequestDocuments, useSignatureCanvas };