@everfur/sdk 0.3.0 → 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 (165) hide show
  1. package/CHANGELOG.md +69 -4
  2. package/README.md +6 -1
  3. package/dist/{Chat-DwAC2vhB.d.ts → Chat-BZZ-Py5l.d.ts} +3 -3
  4. package/dist/{Chat-DPUD6dnc.d.cts → Chat-Dq4fffIO.d.cts} +3 -3
  5. package/dist/{DepthViews-DNEM96Se.d.ts → DepthViews-BG3E25MD.d.ts} +1 -1
  6. package/dist/{DepthViews-DP0R-DhB.d.cts → DepthViews-B_hIypI6.d.cts} +1 -1
  7. package/dist/{DepthViews-DbFhR4Du.d.cts → DepthViews-CL75jyRA.d.cts} +1 -1
  8. package/dist/{DepthViews-D_3hl4xk.d.ts → DepthViews-CkYri51q.d.ts} +1 -1
  9. package/dist/animations/index.cjs +1 -1
  10. package/dist/animations/index.d.cts +3 -3
  11. package/dist/animations/index.d.ts +3 -3
  12. package/dist/animations/index.js +1 -1
  13. package/dist/{attachments-CQgFrEQ7.d.cts → attachments-BorG422I.d.cts} +2 -2
  14. package/dist/{attachments-5NeobOCd.d.ts → attachments-BrUWQYNK.d.ts} +5 -4
  15. package/dist/{attachments-D8T5re7e.d.cts → attachments-D_SECjr1.d.cts} +5 -4
  16. package/dist/{attachments-Bw3iMQgu.d.ts → attachments-DpldrvIW.d.ts} +2 -2
  17. package/dist/bookingCopy-CqtDYvCR.d.ts +732 -0
  18. package/dist/bookingCopy-SREvkG19.d.cts +732 -0
  19. package/dist/{entitlementRepository-DSbzuyAW.d.ts → branding-CsRdeNwK.d.cts} +1 -133
  20. package/dist/{entitlementRepository-DKdXFgTo.d.cts → branding-CsRdeNwK.d.ts} +1 -133
  21. package/dist/callCopy-DoQKG3-L.d.cts +40 -0
  22. package/dist/callCopy-DoQKG3-L.d.ts +40 -0
  23. package/dist/casesRepository-DwtZVsbj.d.cts +51 -0
  24. package/dist/casesRepository-v6QczS9N.d.ts +51 -0
  25. package/dist/chat/index.cjs +1 -1
  26. package/dist/chat/index.d.cts +9 -8
  27. package/dist/chat/index.d.ts +9 -8
  28. package/dist/chat/index.js +1 -1
  29. package/dist/client/index.cjs +5 -5
  30. package/dist/client/index.d.cts +10 -8
  31. package/dist/client/index.d.ts +10 -8
  32. package/dist/client/index.js +5 -5
  33. package/dist/{config-CzTZGlfF.d.cts → config--Wu1Umhd.d.cts} +2 -2
  34. package/dist/{config-DW60uRb9.d.ts → config-C7eb_IMD.d.ts} +2 -2
  35. package/dist/consent/index.cjs +1 -1
  36. package/dist/consent/index.d.cts +5 -5
  37. package/dist/consent/index.d.ts +5 -5
  38. package/dist/consent/index.js +1 -1
  39. package/dist/{context-XvTzq1tE.d.cts → context-CL3lyuy1.d.cts} +6 -6
  40. package/dist/{context-DXhqHlPU.d.ts → context-CahAEha8.d.ts} +6 -6
  41. package/dist/{copy-Mjoo91aS.d.ts → copy-DdVFDL01.d.ts} +2 -2
  42. package/dist/{copy-bKDNigLb.d.cts → copy-UeUJVk8X.d.cts} +2 -2
  43. package/dist/core/index.cjs +7 -7
  44. package/dist/core/index.d.cts +118 -29
  45. package/dist/core/index.d.ts +118 -29
  46. package/dist/core/index.js +7 -7
  47. package/dist/{depth-CErXCU8J.d.cts → depth-D5HwcvKC.d.cts} +34 -3
  48. package/dist/{depth-DjDcJ6kH.d.ts → depth-DvPwPuT_.d.ts} +34 -3
  49. package/dist/entitlementRepository-B7egEdW6.d.ts +43 -0
  50. package/dist/entitlementRepository-BpJ7tiwl.d.cts +43 -0
  51. package/dist/{identity-DI4eVx9S.d.cts → identity-C2-08BZW.d.cts} +2 -2
  52. package/dist/{identity-BMx2SUOM.d.ts → identity-CEi9GRFZ.d.ts} +2 -2
  53. package/dist/index.cjs +6 -6
  54. package/dist/index.d.cts +17 -16
  55. package/dist/index.d.ts +17 -16
  56. package/dist/index.js +6 -6
  57. package/dist/notifications/index.cjs +2 -2
  58. package/dist/notifications/index.d.cts +2 -2
  59. package/dist/notifications/index.d.ts +2 -2
  60. package/dist/notifications/index.js +2 -2
  61. package/dist/optionalModule-DbJmsq5f.d.cts +21 -0
  62. package/dist/optionalModule-DbJmsq5f.d.ts +21 -0
  63. package/dist/{pets-CtQdRpWo.d.ts → pets-DJv2sj2H.d.ts} +1 -1
  64. package/dist/{pets-aB8q0JyX.d.cts → pets-JVCXgRgR.d.cts} +1 -1
  65. package/dist/{casesRepository-DHwtGRYY.d.cts → petsRepository-B_gKbAzJ.d.cts} +2 -48
  66. package/dist/{casesRepository-ClLv6qMl.d.ts → petsRepository-Bk6GDwLs.d.ts} +2 -48
  67. package/dist/photo/index.cjs +1 -1
  68. package/dist/photo/index.js +1 -1
  69. package/dist/{ports-DEBzEhbp.d.cts → ports-BY2ph0_y.d.cts} +5 -15
  70. package/dist/{ports-DMolTRzU.d.ts → ports-D7YW8qz9.d.ts} +5 -15
  71. package/dist/records/depth/index.cjs +2 -2
  72. package/dist/records/depth/index.d.cts +7 -7
  73. package/dist/records/depth/index.d.ts +7 -7
  74. package/dist/records/depth/index.js +2 -2
  75. package/dist/records/index.cjs +3 -3
  76. package/dist/records/index.d.cts +9 -9
  77. package/dist/records/index.d.ts +9 -9
  78. package/dist/records/index.js +3 -3
  79. package/dist/{requestFunnel-L-BQfi0z.d.cts → requestFunnel-BjDpqqvm.d.cts} +25 -2
  80. package/dist/{requestFunnel-CjW7uDuA.d.ts → requestFunnel-DFMGcluw.d.ts} +25 -2
  81. package/dist/{runtime-B8s-_hv8.d.cts → runtimeTypes-gZEJu-da.d.cts} +9 -99
  82. package/dist/{runtime-BR9ysG0J.d.ts → runtimeTypes-w5KqBMcs.d.ts} +9 -99
  83. package/dist/server/events/index.cjs +1 -1
  84. package/dist/server/events/index.d.cts +2 -2
  85. package/dist/server/events/index.d.ts +2 -2
  86. package/dist/server/events/index.js +1 -1
  87. package/dist/server/index.cjs +1 -1
  88. package/dist/server/index.d.cts +3 -3
  89. package/dist/server/index.d.ts +3 -3
  90. package/dist/server/index.js +1 -1
  91. package/dist/televet/booking/index.cjs +1 -0
  92. package/dist/televet/booking/index.d.cts +294 -0
  93. package/dist/televet/booking/index.d.ts +294 -0
  94. package/dist/televet/booking/index.js +1 -0
  95. package/dist/televet/call/index.cjs +1 -0
  96. package/dist/televet/call/index.d.cts +141 -0
  97. package/dist/televet/call/index.d.ts +141 -0
  98. package/dist/televet/call/index.js +1 -0
  99. package/dist/televet/index.cjs +1 -1
  100. package/dist/televet/index.d.cts +87 -5
  101. package/dist/televet/index.d.ts +87 -5
  102. package/dist/televet/index.js +1 -1
  103. package/dist/testing/index.cjs +3 -3
  104. package/dist/testing/index.d.cts +2 -2
  105. package/dist/testing/index.d.ts +2 -2
  106. package/dist/testing/index.js +3 -3
  107. package/dist/testing/rn/index.cjs +1 -1
  108. package/dist/testing/rn/index.d.cts +9 -8
  109. package/dist/testing/rn/index.d.ts +9 -8
  110. package/dist/testing/rn/index.js +1 -1
  111. package/dist/testing/web/index.cjs +1 -1
  112. package/dist/testing/web/index.d.cts +9 -8
  113. package/dist/testing/web/index.d.ts +9 -8
  114. package/dist/testing/web/index.js +1 -1
  115. package/dist/{timelineRows-DZed6dAM.d.ts → timelineRows-C15jxFFH.d.ts} +1 -1
  116. package/dist/{timelineRows-CaohZzXS.d.cts → timelineRows-odO8g9r2.d.cts} +1 -1
  117. package/dist/typeStyle-CKqVYD6L.d.cts +111 -0
  118. package/dist/typeStyle-DmoyacDG.d.ts +111 -0
  119. package/dist/{useRecordsDepth-BHBzJ76R.d.cts → useRecordsDepth-C6rjEaLn.d.cts} +1 -1
  120. package/dist/{useRecordsDepth-BU-OhzH6.d.ts → useRecordsDepth-crhBllQK.d.ts} +1 -1
  121. package/dist/video/index.cjs +1 -1
  122. package/dist/video/index.js +1 -1
  123. package/dist/{view-DtSPYpKa.d.ts → view-Bxwxp4xD.d.ts} +2 -2
  124. package/dist/{view-C3qPIXGX.d.cts → view-DyitEO0m.d.cts} +2 -2
  125. package/dist/web/consent/index.cjs +1 -1
  126. package/dist/web/consent/index.d.cts +5 -5
  127. package/dist/web/consent/index.d.ts +5 -5
  128. package/dist/web/consent/index.js +1 -1
  129. package/dist/web/index.cjs +7 -7
  130. package/dist/web/index.d.cts +18 -17
  131. package/dist/web/index.d.ts +18 -17
  132. package/dist/web/index.js +7 -7
  133. package/dist/web/notifications/index.cjs +2 -2
  134. package/dist/web/notifications/index.d.cts +3 -3
  135. package/dist/web/notifications/index.d.ts +3 -3
  136. package/dist/web/notifications/index.js +2 -2
  137. package/dist/web/records/depth/index.cjs +2 -2
  138. package/dist/web/records/depth/index.d.cts +7 -7
  139. package/dist/web/records/depth/index.d.ts +7 -7
  140. package/dist/web/records/depth/index.js +2 -2
  141. package/dist/web/records/index.cjs +3 -3
  142. package/dist/web/records/index.d.cts +102 -11
  143. package/dist/web/records/index.d.ts +102 -11
  144. package/dist/web/records/index.js +3 -3
  145. package/dist/web/televet/booking/index.cjs +1 -0
  146. package/dist/web/televet/booking/index.d.cts +349 -0
  147. package/dist/web/televet/booking/index.d.ts +349 -0
  148. package/dist/web/televet/booking/index.js +1 -0
  149. package/dist/web/televet/call/index.cjs +1 -0
  150. package/dist/web/televet/call/index.d.cts +142 -0
  151. package/dist/web/televet/call/index.d.ts +142 -0
  152. package/dist/web/televet/call/index.js +1 -0
  153. package/dist/web/televet/index.cjs +1 -1
  154. package/dist/web/televet/index.d.cts +90 -4
  155. package/dist/web/televet/index.d.ts +90 -4
  156. package/dist/web/televet/index.js +1 -1
  157. package/package.json +72 -4
  158. package/televet/booking/package.json +8 -0
  159. package/televet/call/package.json +8 -0
  160. package/web/televet/booking/native-blocked.cjs +12 -0
  161. package/web/televet/booking/package.json +8 -0
  162. package/web/televet/call/native-blocked.cjs +12 -0
  163. package/web/televet/call/package.json +8 -0
  164. package/dist/typeStyle-0TydiZ1w.d.cts +0 -19
  165. package/dist/typeStyle-CWMsoe6b.d.ts +0 -19
@@ -1,43 +1,41 @@
1
1
  export { K as KvPort } from '../cacheEpoch-DknKn3S0.cjs';
2
- export { B as BeforeLogoutContext, e as BeforeLogoutHook, C as CapabilityKind, f as CapabilityRegistry, g as CapabilityServices, h as ChatControllerRegistry, i as ChatScope, j as CreateEverfurRuntimeInput, k as CreateRuntimeOptions, l as EntitlementPoller, m as EntitlementPollerDeps, E as EntitlementSnapshot, n as EntitlementStore, o as EverfurRuntime, p as EverfurRuntimeConfig, L as LogLevel, a as LogRecord, b as LogSink, M as MIN_POLL_INTERVAL_SECONDS, N as NULL_SECURE_STORE, q as PollScheduler, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, R as RuntimeTheme, r as RuntimeUser, S as SecureStorePort, T as TimerHandle, s as createEntitlementPoller, t as createEverfurRuntime } from '../runtime-B8s-_hv8.cjs';
3
- export { T as TelemetryPort, n as noopTelemetry } from '../TelemetryPort-BDNr00hu.cjs';
2
+ import { C as CreateEverfurRuntimeInput, e as EverfurRuntime } from '../runtimeTypes-gZEJu-da.cjs';
3
+ export { B as BeforeLogoutContext, f as BeforeLogoutHook, g as CapabilityKind, h as CapabilityRegistry, i as CapabilityServices, j as ChatControllerRegistry, k as ChatScope, E as EntitlementSnapshot, l as EntitlementStore, m as EverfurRuntimeConfig, L as LogLevel, a as LogRecord, b as LogSink, N as NULL_SECURE_STORE, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, R as RuntimeTheme, n as RuntimeUser, S as SecureStorePort } from '../runtimeTypes-gZEJu-da.cjs';
4
+ import { T as TelemetryPort } from '../TelemetryPort-BDNr00hu.cjs';
5
+ export { n as noopTelemetry } from '../TelemetryPort-BDNr00hu.cjs';
4
6
  export { E as ErrorPolicyPort, d as defaultErrorPolicy } from '../ErrorPolicyPort-CNf4uQZP.cjs';
5
7
  export { C as CameraPort, a as CaptureOptions, M as MediaSource, u as unavailableCamera } from '../CameraPort-Cv31Pz7g.cjs';
6
8
  export { F as FileHandle, b as FilePort } from '../ports-BN6RHF9W.cjs';
7
- import { l as SuggestedPromptCategory, m as ChatController } from '../ports-DEBzEhbp.cjs';
8
- export { n as CHAT_FEEDBACK_TYPES, o as CHECKIN_ANSWERABLE_STATUS, C as ChatCheckin, a as ChatCheckinTarget, p as ChatControllerDeps, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, q as ChatHandlers, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, r as ChatSnapshot, j as ChatStatus, k as Citation, F as FEEDBACK_NOTES_MAX_CHARS, M as MAX_IMAGE_KEYS_PER_MESSAGE, s as MESSAGE_MAX_CHARS, S as SendOptions, t as Timers, u as createChatController, v as isCheckinSettled } from '../ports-DEBzEhbp.cjs';
9
+ export { O as OptionalModule, o as optionalModule } from '../optionalModule-DbJmsq5f.cjs';
10
+ import { m as ChatControllerDeps, l as ChatController, n as SuggestedPromptCategory } from '../ports-BY2ph0_y.cjs';
11
+ export { o as CHAT_FEEDBACK_TYPES, p as CHECKIN_ANSWERABLE_STATUS, C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, q as ChatHandlers, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, r as ChatSnapshot, j as ChatStatus, k as Citation, F as FEEDBACK_NOTES_MAX_CHARS, M as MAX_IMAGE_KEYS_PER_MESSAGE, S as SendOptions, s as Timers, t as isCheckinSettled } from '../ports-BY2ph0_y.cjs';
9
12
  import { E as EverfurError } from '../EverfurResult-DN9pL2Ab.cjs';
10
13
  import { P as PetRef, C as ConversationId } from '../ids-B2GAAifq.cjs';
11
- export { f as ATTACHMENT_ACCEPT, g as ATTACHMENT_BACKOFF_MS, h as ATTACHMENT_INITIATE_PATH, i as ATTACHMENT_MAX_ATTEMPTS, j as ATTACHMENT_MIME_TYPES, k as ATTACHMENT_QUEUE_CONCURRENCY, A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, l as AttachmentQueueDeps, m as AttachmentQueueSnapshot, d as AttachmentState, e as AttachmentStatus, n as AttachmentUploadPolicy, M as MAX_ATTACHMENTS_PER_MESSAGE, o as MAX_ATTACHMENT_BYTES, p as MAX_FILENAME_LENGTH, V as ValidatedAttachment, q as attachmentSize, r as createAttachmentQueue, s as formatBytes, t as initiateAttachmentUpload, u as isAttachmentMime, v as sanitizeFilename, w as uploadAttachmentBytes, x as validateAttachment } from '../attachments-CQgFrEQ7.cjs';
12
- export { G as SdkPlatform } from '../config-CzTZGlfF.cjs';
13
- export { c as EverfurThemeInput } from '../entitlementRepository-DKdXFgTo.cjs';
14
- export { C as CreateClinicRequestBatchInput, F as FACT_FIELD_BY_KIND, v as FACT_VALUE_FIELD, w as FactFieldValue, x as FactValueKind, H as HttpRecordsClinicRepositoryDeps, y as HttpRecordsRepositoryDeps, z 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, A as RecordFactEditInput, B as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, D as RecordMarker, E as RecordMarkerLatest, G as RecordMarkerPoint, I as RecordMarkerSummary, J as RecordMarkersView, K as RecordPdfLink, k as RecordPhysicalExam, L as RecordShare, M as RecordShareLink, N as RecordsAuthorizationSignature, O as RecordsClinicBatch, P as RecordsClinicBatchClient, Q as RecordsClinicBatchItem, S as RecordsClinicBatchResult, T as RecordsClinicTarget, m as RecordsDepthClient, U as RecordsSignatureSuggestion, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, V as createRecordsClinicBatchClient, W as createRecordsDepthClient, X as factCorrectionFor, Y as factValueCorrection, Z as inferFactValueKind, _ as isFactReviewerLocked, s as mapDocumentContributions, t as mapRecordDepth, $ as mapRecordMarkers, a0 as mapRecordPdfLink, a1 as mapRecordShareLink, a2 as mapRecordShareList, u as mapRecordsTimeline, a3 as mapSignatureSuggestions, a4 as resolveShareUrl } from '../depth-CErXCU8J.cjs';
14
+ export { f as ATTACHMENT_ACCEPT, g as ATTACHMENT_BACKOFF_MS, h as ATTACHMENT_INITIATE_PATH, i as ATTACHMENT_MAX_ATTEMPTS, j as ATTACHMENT_MIME_TYPES, k as ATTACHMENT_QUEUE_CONCURRENCY, A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, l as AttachmentQueueDeps, m as AttachmentQueueSnapshot, d as AttachmentState, e as AttachmentStatus, n as AttachmentUploadPolicy, M as MAX_ATTACHMENTS_PER_MESSAGE, o as MAX_ATTACHMENT_BYTES, p as MAX_FILENAME_LENGTH, V as ValidatedAttachment, q as attachmentSize, r as createAttachmentQueue, s as formatBytes, t as initiateAttachmentUpload, u as isAttachmentMime, v as sanitizeFilename, w as uploadAttachmentBytes, x as validateAttachment } from '../attachments-BorG422I.cjs';
15
+ import { p as EventSourceFactory, G as SdkPlatform } from '../config--Wu1Umhd.cjs';
16
+ import { a as EntitlementResolution, F as FetchEntitlementsArgs } from '../entitlementRepository-BpJ7tiwl.cjs';
17
+ import { E as EntitlementDecision } from '../resolve-D4Ywz5OS.cjs';
18
+ import { A as AuthContext } from '../identity-C2-08BZW.cjs';
19
+ import { C as ClientBranding } from '../branding-CsRdeNwK.cjs';
20
+ export { E as EverfurThemeInput } from '../branding-CsRdeNwK.cjs';
21
+ export { C as CreateClinicRequestBatchInput, F as FACT_FIELD_BY_KIND, w as FACT_VALUE_FIELD, x as FactFieldValue, y as FactValueKind, H as HttpRecordsClinicRepositoryDeps, z as HttpRecordsRepositoryDeps, 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, O as RecordsAuthorizationSignature, P as RecordsClinicBatch, Q as RecordsClinicBatchClient, S as RecordsClinicBatchItem, T as RecordsClinicBatchResult, U as RecordsClinicTarget, m as RecordsDepthClient, n as RecordsRequestDocument, V as RecordsSignatureSuggestion, o as RecordsTimelineMedication, p as RecordsTimelineVaccine, q as RecordsTimelineView, r as RecordsTimelineVisit, s as RecordsTimelineWeight, W as createRecordsClinicBatchClient, X as createRecordsDepthClient, Y as factCorrectionFor, Z as factValueCorrection, _ as inferFactValueKind, $ as isFactReviewerLocked, t as mapDocumentContributions, u as mapRecordDepth, a0 as mapRecordMarkers, a1 as mapRecordPdfLink, a2 as mapRecordShareLink, a3 as mapRecordShareList, v as mapRecordsTimeline, a4 as mapSignatureSuggestions, a5 as resolveShareUrl } from '../depth-D5HwcvKC.cjs';
15
22
  export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin, f as RecordsRequestGroupView, d as RecordsRequestView } from '../models-D2EUxPZY.cjs';
16
- export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-DHwtGRYY.cjs';
17
- import '../resolve-D4Ywz5OS.cjs';
18
- import '../identity-DI4eVx9S.cjs';
19
- import '../requestFunnel-L-BQfi0z.cjs';
23
+ export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-DwtZVsbj.cjs';
24
+ import '../petsRepository-B_gKbAzJ.cjs';
20
25
  import '../profile-CSs1wlXT.cjs';
26
+ import '../requestFunnel-BjDpqqvm.cjs';
21
27
 
22
- /** The settled outcome of a guarded optional-module load. Never a throw. */
23
- type OptionalModule<T> = {
24
- readonly available: true;
25
- readonly module: T;
26
- } | {
27
- readonly available: false;
28
- readonly module: null;
29
- readonly reason: string;
30
- };
31
28
  /**
32
- * Load an optional native peer behind a guard. `load` is the host-provided thunk (typically a `require`).
33
- * An optional `validate` type-guard rejects a present-but-wrong-shape module (a version whose surface drifted)
34
- * without throwing. Returns a settled result; NEVER throws.
29
+ * The server's own limits on a chat message, mirrored here so a violation is caught before any UI is
30
+ * rendered for it. `SendWidgetMessageRequest.message` on EFBackend main declares
31
+ * `min_length=1, max_length=4000`; the server remains authoritative and still enforces both.
35
32
  *
36
- * @param name human-readable peer name, only used to build the `reason` string.
37
- * @param load the thunk that resolves the module (e.g. `() => require('expo-secure-store')`).
38
- * @param validate optional shape guard; when it returns false the module is treated as unavailable.
33
+ * These are NOT in the generated contract projection, so they are pinned here with their source rather
34
+ * than derived. If the server relaxes either bound, this is the one place to update.
39
35
  */
40
- declare function optionalModule<T>(name: string, load: () => unknown, validate?: (candidate: unknown) => candidate is T): OptionalModule<T>;
36
+ declare const MESSAGE_MAX_CHARS = 4000;
37
+
38
+ declare function createChatController(deps: ChatControllerDeps): ChatController;
41
39
 
42
40
  interface ChatBootstrapInput {
43
41
  /** omit => general conversation */
@@ -78,12 +76,103 @@ declare function bootstrapChat(input: ChatBootstrapInput, deps: {
78
76
  readonly controller: ChatController;
79
77
  }): Promise<ChatBootstrapResult>;
80
78
 
79
+ /** Minimum re-poll interval; a server ttl below this is clamped so we never hot-loop the endpoint. */
80
+ declare const MIN_POLL_INTERVAL_SECONDS = 30;
81
+ /** Injectable timer seam so a suite drives the re-poll clock deterministically (default: global timers). */
82
+ type TimerHandle = ReturnType<typeof setTimeout>;
83
+ interface PollScheduler {
84
+ set(callback: () => void, ms: number): TimerHandle;
85
+ clear(handle: TimerHandle): void;
86
+ }
87
+ interface EntitlementPollerDeps {
88
+ /** Re-derived every poll so a token refresh / user re-scope is reflected on the next hop. */
89
+ readonly authFor: () => AuthContext;
90
+ /**
91
+ * Push a fresh verdict into the runtime store. Called ONLY on a 200 'updated'. Carries the server-driven
92
+ * branding parsed from the SAME body (null when absent/unparseable -> the compiled default theme); branding
93
+ * is additive and orthogonal to the decisions.
94
+ */
95
+ readonly update: (decisions: readonly EntitlementDecision[], branding: ClientBranding | null) => void;
96
+ /** Optional region hint forwarded to the endpoint. */
97
+ readonly region?: string;
98
+ /** Called synchronously as each fetch starts; the runtime marks the store pending for a scope's first one. */
99
+ readonly onFetch?: () => void;
100
+ /**
101
+ * Called when a fetch settles for the current scope, whatever the outcome (`updated` after `update`,
102
+ * `notModified`, `failed`, a thrown resolve). Not called for a fetch a refresh() or stop() superseded.
103
+ */
104
+ readonly onSettled?: () => void;
105
+ readonly telemetry?: TelemetryPort;
106
+ /** Test seam; defaults to global timers (unref'd so a live poll never pins a Node event loop). */
107
+ readonly scheduler?: PollScheduler;
108
+ /** Test seam; defaults to the real repository call. */
109
+ readonly resolve?: (auth: AuthContext, args: FetchEntitlementsArgs) => Promise<EntitlementResolution>;
110
+ /** Floor override for tests; defaults to MIN_POLL_INTERVAL_SECONDS. */
111
+ readonly floorSeconds?: number;
112
+ /** Test seam for deterministic failure-retry jitter; defaults to Math.random. */
113
+ readonly rng?: () => number;
114
+ }
115
+ interface EntitlementPoller {
116
+ /** Idempotent. Kicks an immediate first poll, then self-schedules on the returned cadence. */
117
+ start(): void;
118
+ /** Idempotent. Clears the pending timer and prevents any post-stop update (dispose calls this). */
119
+ stop(): void;
120
+ /**
121
+ * Drop the cached revision and re-poll immediately. A user / pet re-scope invalidates the cached verdict, so
122
+ * the next request must be UNCONDITIONAL (no If-None-Match) to force a fresh 200 for the new scope.
123
+ */
124
+ refresh(): void;
125
+ /**
126
+ * Settle ONE verdict fetch and report it: the poll already in flight when one is (the warm-up rides the
127
+ * first tick rather than racing it), otherwise a fresh one. On a poller that was never started it fetches
128
+ * once and arms nothing. Resolves null when a stop() or refresh() superseded the fetch before it landed.
129
+ */
130
+ prime(): Promise<EntitlementResolution | null>;
131
+ }
132
+ declare function createEntitlementPoller(deps: EntitlementPollerDeps): EntitlementPoller;
133
+
81
134
  /**
82
135
  * How long `logout()` waits for the before-logout hooks before it proceeds without them. The device unregistration
83
136
  * the notifications hook issues is one request; a partner's sign-out screen must never hang on a slow network.
84
137
  */
85
138
  declare const LOGOUT_HOOK_BUDGET_MS = 3000;
86
139
 
140
+ /** Runtime-construction options, distinct from the partner-facing config (host wiring / test seams). */
141
+ interface CreateRuntimeOptions {
142
+ /**
143
+ * Whether to start the entitlement poller. Default: start ONLY when the transport was NOT injected (a real,
144
+ * base-URL runtime). An injected transport is the test seam, so auto-start stays OFF to keep MockTransport
145
+ * suites network-free; pass `true` to exercise the wired poller against a MockTransport.
146
+ */
147
+ readonly startEntitlementPolling?: boolean;
148
+ /** Test seam: an injected scheduler so a suite can drive the entitlement re-poll timer deterministically. */
149
+ readonly pollScheduler?: PollScheduler;
150
+ /**
151
+ * Host-wiring seam: the EventSource factory the built HTTP transport falls back to when a streaming
152
+ * `res.body` is unavailable (stock RN fetch). The rn facade injects react-native-sse here so streaming works
153
+ * on stock React Native; core NEVER imports react-native-sse (it stays framework-free and only threads this
154
+ * through). Absent (web/expo, or an injected transport) => the fetch-body streaming path is used.
155
+ */
156
+ readonly eventSourceFactory?: EventSourceFactory;
157
+ /**
158
+ * Host-wiring seam: which entry point built this runtime, sent as X-Everfur-SDK-Platform on every request.
159
+ * The rn facade leaves it at the default; the web facade names `web`. Never read from partner config, for
160
+ * the reason on `SdkPlatform`.
161
+ */
162
+ readonly platform?: SdkPlatform;
163
+ }
164
+ /**
165
+ * Construct the runtime once (EverfurProvider mount). Builds the transport (injected test seam, else the
166
+ * real HTTP transport from the resolved client config), the IdentityProvider when a user is set, the
167
+ * capability registry, the entitlement store, and (for a real runtime) the entitlement poller.
168
+ * A config that cannot be resolved (missing publishableKey, or an unresolvable / non-https base URL when
169
+ * no transport is injected) does NOT throw: it yields a DISABLED runtime whose transport refuses and
170
+ * whose every capability settles to the deliberate off-state at `disabled.level === 'sdk_config'`.
171
+ * @throws {EverfurConfigError} only for a supplied ACTIVE secureStore, which expresses a security
172
+ * intent the SDK cannot yet honour and must not silently discard.
173
+ */
174
+ declare function createEverfurRuntime(input: CreateEverfurRuntimeInput, opts?: CreateRuntimeOptions): EverfurRuntime;
175
+
87
176
  /** The pad's fixed canvas, in bitmap pixels (a 3:1 signature strip). */
88
177
  declare const SIGNATURE_CANVAS: Readonly<{
89
178
  width: 360;
@@ -113,4 +202,4 @@ declare function rasterizeTypedName(name: string): SignatureBitmap;
113
202
  */
114
203
  declare function encodeSignaturePng(bitmap: SignatureBitmap): string;
115
204
 
116
- export { type ChatBootstrapDiagnostics, type ChatBootstrapInput, type ChatBootstrapResult, ChatController, LOGOUT_HOOK_BUDGET_MS, type OptionalModule, SIGNATURE_CANVAS, type SignatureBitmap, type SignaturePoint, SuggestedPromptCategory, bootstrapChat, encodeSignaturePng, optionalModule, rasterizeStrokes, rasterizeTypedName };
205
+ export { type ChatBootstrapDiagnostics, type ChatBootstrapInput, type ChatBootstrapResult, ChatController, ChatControllerDeps, CreateEverfurRuntimeInput, type CreateRuntimeOptions, type EntitlementPoller, type EntitlementPollerDeps, EverfurRuntime, LOGOUT_HOOK_BUDGET_MS, MESSAGE_MAX_CHARS, MIN_POLL_INTERVAL_SECONDS, type PollScheduler, SIGNATURE_CANVAS, SdkPlatform, type SignatureBitmap, type SignaturePoint, SuggestedPromptCategory, TelemetryPort, type TimerHandle, bootstrapChat, createChatController, createEntitlementPoller, createEverfurRuntime, encodeSignaturePng, rasterizeStrokes, rasterizeTypedName };
@@ -1,43 +1,41 @@
1
1
  export { K as KvPort } from '../cacheEpoch-DknKn3S0.js';
2
- export { B as BeforeLogoutContext, e as BeforeLogoutHook, C as CapabilityKind, f as CapabilityRegistry, g as CapabilityServices, h as ChatControllerRegistry, i as ChatScope, j as CreateEverfurRuntimeInput, k as CreateRuntimeOptions, l as EntitlementPoller, m as EntitlementPollerDeps, E as EntitlementSnapshot, n as EntitlementStore, o as EverfurRuntime, p as EverfurRuntimeConfig, L as LogLevel, a as LogRecord, b as LogSink, M as MIN_POLL_INTERVAL_SECONDS, N as NULL_SECURE_STORE, q as PollScheduler, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, R as RuntimeTheme, r as RuntimeUser, S as SecureStorePort, T as TimerHandle, s as createEntitlementPoller, t as createEverfurRuntime } from '../runtime-BR9ysG0J.js';
3
- export { T as TelemetryPort, n as noopTelemetry } from '../TelemetryPort-BDNr00hu.js';
2
+ import { C as CreateEverfurRuntimeInput, e as EverfurRuntime } from '../runtimeTypes-w5KqBMcs.js';
3
+ export { B as BeforeLogoutContext, f as BeforeLogoutHook, g as CapabilityKind, h as CapabilityRegistry, i as CapabilityServices, j as ChatControllerRegistry, k as ChatScope, E as EntitlementSnapshot, l as EntitlementStore, m as EverfurRuntimeConfig, L as LogLevel, a as LogRecord, b as LogSink, N as NULL_SECURE_STORE, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, R as RuntimeTheme, n as RuntimeUser, S as SecureStorePort } from '../runtimeTypes-w5KqBMcs.js';
4
+ import { T as TelemetryPort } from '../TelemetryPort-BDNr00hu.js';
5
+ export { n as noopTelemetry } from '../TelemetryPort-BDNr00hu.js';
4
6
  export { E as ErrorPolicyPort, d as defaultErrorPolicy } from '../ErrorPolicyPort-CwbfmxzJ.js';
5
7
  export { C as CameraPort, a as CaptureOptions, M as MediaSource, u as unavailableCamera } from '../CameraPort-Cv31Pz7g.js';
6
8
  export { F as FileHandle, b as FilePort } from '../ports-BN6RHF9W.js';
7
- import { l as SuggestedPromptCategory, m as ChatController } from '../ports-DMolTRzU.js';
8
- export { n as CHAT_FEEDBACK_TYPES, o as CHECKIN_ANSWERABLE_STATUS, C as ChatCheckin, a as ChatCheckinTarget, p as ChatControllerDeps, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, q as ChatHandlers, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, r as ChatSnapshot, j as ChatStatus, k as Citation, F as FEEDBACK_NOTES_MAX_CHARS, M as MAX_IMAGE_KEYS_PER_MESSAGE, s as MESSAGE_MAX_CHARS, S as SendOptions, t as Timers, u as createChatController, v as isCheckinSettled } from '../ports-DMolTRzU.js';
9
+ export { O as OptionalModule, o as optionalModule } from '../optionalModule-DbJmsq5f.js';
10
+ import { m as ChatControllerDeps, l as ChatController, n as SuggestedPromptCategory } from '../ports-D7YW8qz9.js';
11
+ export { o as CHAT_FEEDBACK_TYPES, p as CHECKIN_ANSWERABLE_STATUS, C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, q as ChatHandlers, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, r as ChatSnapshot, j as ChatStatus, k as Citation, F as FEEDBACK_NOTES_MAX_CHARS, M as MAX_IMAGE_KEYS_PER_MESSAGE, S as SendOptions, s as Timers, t as isCheckinSettled } from '../ports-D7YW8qz9.js';
9
12
  import { E as EverfurError } from '../EverfurResult-DN9pL2Ab.js';
10
13
  import { P as PetRef, C as ConversationId } from '../ids-B2GAAifq.js';
11
- export { f as ATTACHMENT_ACCEPT, g as ATTACHMENT_BACKOFF_MS, h as ATTACHMENT_INITIATE_PATH, i as ATTACHMENT_MAX_ATTEMPTS, j as ATTACHMENT_MIME_TYPES, k as ATTACHMENT_QUEUE_CONCURRENCY, A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, l as AttachmentQueueDeps, m as AttachmentQueueSnapshot, d as AttachmentState, e as AttachmentStatus, n as AttachmentUploadPolicy, M as MAX_ATTACHMENTS_PER_MESSAGE, o as MAX_ATTACHMENT_BYTES, p as MAX_FILENAME_LENGTH, V as ValidatedAttachment, q as attachmentSize, r as createAttachmentQueue, s as formatBytes, t as initiateAttachmentUpload, u as isAttachmentMime, v as sanitizeFilename, w as uploadAttachmentBytes, x as validateAttachment } from '../attachments-Bw3iMQgu.js';
12
- export { G as SdkPlatform } from '../config-DW60uRb9.js';
13
- export { c as EverfurThemeInput } from '../entitlementRepository-DSbzuyAW.js';
14
- export { C as CreateClinicRequestBatchInput, F as FACT_FIELD_BY_KIND, v as FACT_VALUE_FIELD, w as FactFieldValue, x as FactValueKind, H as HttpRecordsClinicRepositoryDeps, y as HttpRecordsRepositoryDeps, z 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, A as RecordFactEditInput, B as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, D as RecordMarker, E as RecordMarkerLatest, G as RecordMarkerPoint, I as RecordMarkerSummary, J as RecordMarkersView, K as RecordPdfLink, k as RecordPhysicalExam, L as RecordShare, M as RecordShareLink, N as RecordsAuthorizationSignature, O as RecordsClinicBatch, P as RecordsClinicBatchClient, Q as RecordsClinicBatchItem, S as RecordsClinicBatchResult, T as RecordsClinicTarget, m as RecordsDepthClient, U as RecordsSignatureSuggestion, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, V as createRecordsClinicBatchClient, W as createRecordsDepthClient, X as factCorrectionFor, Y as factValueCorrection, Z as inferFactValueKind, _ as isFactReviewerLocked, s as mapDocumentContributions, t as mapRecordDepth, $ as mapRecordMarkers, a0 as mapRecordPdfLink, a1 as mapRecordShareLink, a2 as mapRecordShareList, u as mapRecordsTimeline, a3 as mapSignatureSuggestions, a4 as resolveShareUrl } from '../depth-DjDcJ6kH.js';
14
+ export { f as ATTACHMENT_ACCEPT, g as ATTACHMENT_BACKOFF_MS, h as ATTACHMENT_INITIATE_PATH, i as ATTACHMENT_MAX_ATTEMPTS, j as ATTACHMENT_MIME_TYPES, k as ATTACHMENT_QUEUE_CONCURRENCY, A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, l as AttachmentQueueDeps, m as AttachmentQueueSnapshot, d as AttachmentState, e as AttachmentStatus, n as AttachmentUploadPolicy, M as MAX_ATTACHMENTS_PER_MESSAGE, o as MAX_ATTACHMENT_BYTES, p as MAX_FILENAME_LENGTH, V as ValidatedAttachment, q as attachmentSize, r as createAttachmentQueue, s as formatBytes, t as initiateAttachmentUpload, u as isAttachmentMime, v as sanitizeFilename, w as uploadAttachmentBytes, x as validateAttachment } from '../attachments-DpldrvIW.js';
15
+ import { p as EventSourceFactory, G as SdkPlatform } from '../config-C7eb_IMD.js';
16
+ import { a as EntitlementResolution, F as FetchEntitlementsArgs } from '../entitlementRepository-B7egEdW6.js';
17
+ import { E as EntitlementDecision } from '../resolve-D4Ywz5OS.js';
18
+ import { A as AuthContext } from '../identity-CEi9GRFZ.js';
19
+ import { C as ClientBranding } from '../branding-CsRdeNwK.js';
20
+ export { E as EverfurThemeInput } from '../branding-CsRdeNwK.js';
21
+ export { C as CreateClinicRequestBatchInput, F as FACT_FIELD_BY_KIND, w as FACT_VALUE_FIELD, x as FactFieldValue, y as FactValueKind, H as HttpRecordsClinicRepositoryDeps, z as HttpRecordsRepositoryDeps, 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, O as RecordsAuthorizationSignature, P as RecordsClinicBatch, Q as RecordsClinicBatchClient, S as RecordsClinicBatchItem, T as RecordsClinicBatchResult, U as RecordsClinicTarget, m as RecordsDepthClient, n as RecordsRequestDocument, V as RecordsSignatureSuggestion, o as RecordsTimelineMedication, p as RecordsTimelineVaccine, q as RecordsTimelineView, r as RecordsTimelineVisit, s as RecordsTimelineWeight, W as createRecordsClinicBatchClient, X as createRecordsDepthClient, Y as factCorrectionFor, Z as factValueCorrection, _ as inferFactValueKind, $ as isFactReviewerLocked, t as mapDocumentContributions, u as mapRecordDepth, a0 as mapRecordMarkers, a1 as mapRecordPdfLink, a2 as mapRecordShareLink, a3 as mapRecordShareList, v as mapRecordsTimeline, a4 as mapSignatureSuggestions, a5 as resolveShareUrl } from '../depth-DvPwPuT_.js';
15
22
  export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin, f as RecordsRequestGroupView, d as RecordsRequestView } from '../models-B-Uh2LTf.js';
16
- export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-ClLv6qMl.js';
17
- import '../resolve-D4Ywz5OS.js';
18
- import '../identity-BMx2SUOM.js';
19
- import '../requestFunnel-CjW7uDuA.js';
23
+ export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-v6QczS9N.js';
24
+ import '../petsRepository-Bk6GDwLs.js';
20
25
  import '../profile-CSs1wlXT.js';
26
+ import '../requestFunnel-DFMGcluw.js';
21
27
 
22
- /** The settled outcome of a guarded optional-module load. Never a throw. */
23
- type OptionalModule<T> = {
24
- readonly available: true;
25
- readonly module: T;
26
- } | {
27
- readonly available: false;
28
- readonly module: null;
29
- readonly reason: string;
30
- };
31
28
  /**
32
- * Load an optional native peer behind a guard. `load` is the host-provided thunk (typically a `require`).
33
- * An optional `validate` type-guard rejects a present-but-wrong-shape module (a version whose surface drifted)
34
- * without throwing. Returns a settled result; NEVER throws.
29
+ * The server's own limits on a chat message, mirrored here so a violation is caught before any UI is
30
+ * rendered for it. `SendWidgetMessageRequest.message` on EFBackend main declares
31
+ * `min_length=1, max_length=4000`; the server remains authoritative and still enforces both.
35
32
  *
36
- * @param name human-readable peer name, only used to build the `reason` string.
37
- * @param load the thunk that resolves the module (e.g. `() => require('expo-secure-store')`).
38
- * @param validate optional shape guard; when it returns false the module is treated as unavailable.
33
+ * These are NOT in the generated contract projection, so they are pinned here with their source rather
34
+ * than derived. If the server relaxes either bound, this is the one place to update.
39
35
  */
40
- declare function optionalModule<T>(name: string, load: () => unknown, validate?: (candidate: unknown) => candidate is T): OptionalModule<T>;
36
+ declare const MESSAGE_MAX_CHARS = 4000;
37
+
38
+ declare function createChatController(deps: ChatControllerDeps): ChatController;
41
39
 
42
40
  interface ChatBootstrapInput {
43
41
  /** omit => general conversation */
@@ -78,12 +76,103 @@ declare function bootstrapChat(input: ChatBootstrapInput, deps: {
78
76
  readonly controller: ChatController;
79
77
  }): Promise<ChatBootstrapResult>;
80
78
 
79
+ /** Minimum re-poll interval; a server ttl below this is clamped so we never hot-loop the endpoint. */
80
+ declare const MIN_POLL_INTERVAL_SECONDS = 30;
81
+ /** Injectable timer seam so a suite drives the re-poll clock deterministically (default: global timers). */
82
+ type TimerHandle = ReturnType<typeof setTimeout>;
83
+ interface PollScheduler {
84
+ set(callback: () => void, ms: number): TimerHandle;
85
+ clear(handle: TimerHandle): void;
86
+ }
87
+ interface EntitlementPollerDeps {
88
+ /** Re-derived every poll so a token refresh / user re-scope is reflected on the next hop. */
89
+ readonly authFor: () => AuthContext;
90
+ /**
91
+ * Push a fresh verdict into the runtime store. Called ONLY on a 200 'updated'. Carries the server-driven
92
+ * branding parsed from the SAME body (null when absent/unparseable -> the compiled default theme); branding
93
+ * is additive and orthogonal to the decisions.
94
+ */
95
+ readonly update: (decisions: readonly EntitlementDecision[], branding: ClientBranding | null) => void;
96
+ /** Optional region hint forwarded to the endpoint. */
97
+ readonly region?: string;
98
+ /** Called synchronously as each fetch starts; the runtime marks the store pending for a scope's first one. */
99
+ readonly onFetch?: () => void;
100
+ /**
101
+ * Called when a fetch settles for the current scope, whatever the outcome (`updated` after `update`,
102
+ * `notModified`, `failed`, a thrown resolve). Not called for a fetch a refresh() or stop() superseded.
103
+ */
104
+ readonly onSettled?: () => void;
105
+ readonly telemetry?: TelemetryPort;
106
+ /** Test seam; defaults to global timers (unref'd so a live poll never pins a Node event loop). */
107
+ readonly scheduler?: PollScheduler;
108
+ /** Test seam; defaults to the real repository call. */
109
+ readonly resolve?: (auth: AuthContext, args: FetchEntitlementsArgs) => Promise<EntitlementResolution>;
110
+ /** Floor override for tests; defaults to MIN_POLL_INTERVAL_SECONDS. */
111
+ readonly floorSeconds?: number;
112
+ /** Test seam for deterministic failure-retry jitter; defaults to Math.random. */
113
+ readonly rng?: () => number;
114
+ }
115
+ interface EntitlementPoller {
116
+ /** Idempotent. Kicks an immediate first poll, then self-schedules on the returned cadence. */
117
+ start(): void;
118
+ /** Idempotent. Clears the pending timer and prevents any post-stop update (dispose calls this). */
119
+ stop(): void;
120
+ /**
121
+ * Drop the cached revision and re-poll immediately. A user / pet re-scope invalidates the cached verdict, so
122
+ * the next request must be UNCONDITIONAL (no If-None-Match) to force a fresh 200 for the new scope.
123
+ */
124
+ refresh(): void;
125
+ /**
126
+ * Settle ONE verdict fetch and report it: the poll already in flight when one is (the warm-up rides the
127
+ * first tick rather than racing it), otherwise a fresh one. On a poller that was never started it fetches
128
+ * once and arms nothing. Resolves null when a stop() or refresh() superseded the fetch before it landed.
129
+ */
130
+ prime(): Promise<EntitlementResolution | null>;
131
+ }
132
+ declare function createEntitlementPoller(deps: EntitlementPollerDeps): EntitlementPoller;
133
+
81
134
  /**
82
135
  * How long `logout()` waits for the before-logout hooks before it proceeds without them. The device unregistration
83
136
  * the notifications hook issues is one request; a partner's sign-out screen must never hang on a slow network.
84
137
  */
85
138
  declare const LOGOUT_HOOK_BUDGET_MS = 3000;
86
139
 
140
+ /** Runtime-construction options, distinct from the partner-facing config (host wiring / test seams). */
141
+ interface CreateRuntimeOptions {
142
+ /**
143
+ * Whether to start the entitlement poller. Default: start ONLY when the transport was NOT injected (a real,
144
+ * base-URL runtime). An injected transport is the test seam, so auto-start stays OFF to keep MockTransport
145
+ * suites network-free; pass `true` to exercise the wired poller against a MockTransport.
146
+ */
147
+ readonly startEntitlementPolling?: boolean;
148
+ /** Test seam: an injected scheduler so a suite can drive the entitlement re-poll timer deterministically. */
149
+ readonly pollScheduler?: PollScheduler;
150
+ /**
151
+ * Host-wiring seam: the EventSource factory the built HTTP transport falls back to when a streaming
152
+ * `res.body` is unavailable (stock RN fetch). The rn facade injects react-native-sse here so streaming works
153
+ * on stock React Native; core NEVER imports react-native-sse (it stays framework-free and only threads this
154
+ * through). Absent (web/expo, or an injected transport) => the fetch-body streaming path is used.
155
+ */
156
+ readonly eventSourceFactory?: EventSourceFactory;
157
+ /**
158
+ * Host-wiring seam: which entry point built this runtime, sent as X-Everfur-SDK-Platform on every request.
159
+ * The rn facade leaves it at the default; the web facade names `web`. Never read from partner config, for
160
+ * the reason on `SdkPlatform`.
161
+ */
162
+ readonly platform?: SdkPlatform;
163
+ }
164
+ /**
165
+ * Construct the runtime once (EverfurProvider mount). Builds the transport (injected test seam, else the
166
+ * real HTTP transport from the resolved client config), the IdentityProvider when a user is set, the
167
+ * capability registry, the entitlement store, and (for a real runtime) the entitlement poller.
168
+ * A config that cannot be resolved (missing publishableKey, or an unresolvable / non-https base URL when
169
+ * no transport is injected) does NOT throw: it yields a DISABLED runtime whose transport refuses and
170
+ * whose every capability settles to the deliberate off-state at `disabled.level === 'sdk_config'`.
171
+ * @throws {EverfurConfigError} only for a supplied ACTIVE secureStore, which expresses a security
172
+ * intent the SDK cannot yet honour and must not silently discard.
173
+ */
174
+ declare function createEverfurRuntime(input: CreateEverfurRuntimeInput, opts?: CreateRuntimeOptions): EverfurRuntime;
175
+
87
176
  /** The pad's fixed canvas, in bitmap pixels (a 3:1 signature strip). */
88
177
  declare const SIGNATURE_CANVAS: Readonly<{
89
178
  width: 360;
@@ -113,4 +202,4 @@ declare function rasterizeTypedName(name: string): SignatureBitmap;
113
202
  */
114
203
  declare function encodeSignaturePng(bitmap: SignatureBitmap): string;
115
204
 
116
- export { type ChatBootstrapDiagnostics, type ChatBootstrapInput, type ChatBootstrapResult, ChatController, LOGOUT_HOOK_BUDGET_MS, type OptionalModule, SIGNATURE_CANVAS, type SignatureBitmap, type SignaturePoint, SuggestedPromptCategory, bootstrapChat, encodeSignaturePng, optionalModule, rasterizeStrokes, rasterizeTypedName };
205
+ export { type ChatBootstrapDiagnostics, type ChatBootstrapInput, type ChatBootstrapResult, ChatController, ChatControllerDeps, CreateEverfurRuntimeInput, type CreateRuntimeOptions, type EntitlementPoller, type EntitlementPollerDeps, EverfurRuntime, LOGOUT_HOOK_BUDGET_MS, MESSAGE_MAX_CHARS, MIN_POLL_INTERVAL_SECONDS, type PollScheduler, SIGNATURE_CANVAS, SdkPlatform, type SignatureBitmap, type SignaturePoint, SuggestedPromptCategory, TelemetryPort, type TimerHandle, bootstrapChat, createChatController, createEntitlementPoller, createEverfurRuntime, encodeSignaturePng, rasterizeStrokes, rasterizeTypedName };