@ovok/core 0.4.49-dev.503 → 0.4.49-dev.513

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 (394) hide show
  1. package/README.md +23 -666
  2. package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +3 -1
  3. package/dist/client/ai-fhir/methods/AIFhirResources.js +3 -1
  4. package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +8 -0
  5. package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +8 -0
  6. package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +5 -0
  7. package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +6 -0
  8. package/dist/client/auth/errors.d.ts +15 -2
  9. package/dist/client/auth/errors.js +12 -2
  10. package/dist/client/auth/methods/appleLogin.d.ts +1 -0
  11. package/dist/client/auth/methods/appleLogin.js +1 -0
  12. package/dist/client/auth/methods/changePassword.d.ts +1 -0
  13. package/dist/client/auth/methods/changePassword.js +1 -0
  14. package/dist/client/auth/methods/googleLogin.d.ts +1 -0
  15. package/dist/client/auth/methods/googleLogin.js +1 -0
  16. package/dist/client/auth/methods/login.d.ts +6 -0
  17. package/dist/client/auth/methods/login.js +6 -0
  18. package/dist/client/auth/methods/register.d.ts +5 -0
  19. package/dist/client/auth/methods/register.js +5 -0
  20. package/dist/client/auth/methods/registerPractitioner.d.ts +5 -0
  21. package/dist/client/auth/methods/registerPractitioner.js +5 -0
  22. package/dist/client/auth/methods/reloadSession.d.ts +3 -0
  23. package/dist/client/auth/methods/requestDeleteUser.d.ts +4 -5
  24. package/dist/client/auth/methods/requestDeleteUser.js +4 -5
  25. package/dist/client/auth/methods/setPasswordFromReset.d.ts +1 -0
  26. package/dist/client/auth/methods/setPasswordFromReset.js +1 -0
  27. package/dist/client/auth/session-fetch.d.ts +11 -0
  28. package/dist/client/auth/types/Account.d.ts +8 -1
  29. package/dist/client/auth/types/AppleLoginBody.d.ts +16 -0
  30. package/dist/client/auth/types/AppleLoginBody.js +5 -0
  31. package/dist/client/auth/types/AuthResponse.d.ts +12 -0
  32. package/dist/client/auth/types/ChangePasswordBody.d.ts +7 -0
  33. package/dist/client/auth/types/ChangePasswordResponse.d.ts +5 -0
  34. package/dist/client/auth/types/CompletePasswordResetBody.d.ts +8 -0
  35. package/dist/client/auth/types/GoogleLoginBody.d.ts +5 -0
  36. package/dist/client/auth/types/LoginBody.d.ts +15 -1
  37. package/dist/client/auth/types/LoginError.d.ts +21 -2
  38. package/dist/client/auth/types/LoginError.js +8 -2
  39. package/dist/client/auth/types/LoginResponse.d.ts +8 -1
  40. package/dist/client/auth/types/RegisterBody.d.ts +12 -0
  41. package/dist/client/auth/types/RegisterPractitionerBody.d.ts +5 -0
  42. package/dist/client/auth/types/RegisterResponse.d.ts +7 -0
  43. package/dist/client/auth/types/RequestDeleteUserBody.d.ts +7 -7
  44. package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +14 -0
  45. package/dist/client/auth/types/ResetPasswordBody.d.ts +5 -0
  46. package/dist/client/auth/types/Session.d.ts +14 -2
  47. package/dist/client/change-history/methods.d.ts +6 -0
  48. package/dist/client/change-history/methods.js +6 -0
  49. package/dist/client/change-history/types.d.ts +82 -0
  50. package/dist/client/chat/ai/methods/createAiSession.d.ts +6 -0
  51. package/dist/client/chat/ai/methods/createAiSession.js +6 -0
  52. package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +17 -0
  53. package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
  54. package/dist/client/cms/locale.d.ts +12 -2
  55. package/dist/client/cms/locale.js +9 -2
  56. package/dist/client/cms/methods.d.ts +6 -2
  57. package/dist/client/cms/methods.js +7 -3
  58. package/dist/client/cms/types.d.ts +44 -4
  59. package/dist/client/consent/methods.d.ts +16 -0
  60. package/dist/client/consent/methods.js +16 -0
  61. package/dist/client/consent/types.d.ts +53 -1
  62. package/dist/client/consent/types.js +10 -1
  63. package/dist/client/email/methods.d.ts +3 -0
  64. package/dist/client/email/methods.js +3 -0
  65. package/dist/client/email/types.d.ts +33 -0
  66. package/dist/client/errors/field-errors.d.ts +3 -0
  67. package/dist/client/errors/field-errors.js +3 -0
  68. package/dist/client/errors/ovok-error-utils.d.ts +6 -0
  69. package/dist/client/errors/ovok-error-utils.js +6 -0
  70. package/dist/client/errors/ovok-error.d.ts +36 -4
  71. package/dist/client/errors/ovok-error.js +15 -4
  72. package/dist/client/errors/rate-limit-error.d.ts +11 -2
  73. package/dist/client/errors/rate-limit-error.js +10 -2
  74. package/dist/client/errors/sign-in-required-error.d.ts +5 -2
  75. package/dist/client/errors/sign-in-required-error.js +5 -2
  76. package/dist/client/experience/methods.d.ts +38 -0
  77. package/dist/client/experience/methods.js +35 -0
  78. package/dist/client/experience/types.d.ts +316 -0
  79. package/dist/client/experience/types.js +1 -0
  80. package/dist/client/invites/methods.d.ts +27 -9
  81. package/dist/client/invites/methods.js +27 -9
  82. package/dist/client/invites/parse-accept-invite-link.d.ts +3 -1
  83. package/dist/client/invites/parse-accept-invite-link.js +3 -1
  84. package/dist/client/invites/types.d.ts +55 -0
  85. package/dist/client/invites/types.js +12 -0
  86. package/dist/client/notifications/methods.d.ts +15 -0
  87. package/dist/client/notifications/methods.js +15 -0
  88. package/dist/client/notifications/types.d.ts +249 -2
  89. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +3 -0
  90. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +3 -0
  91. package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +3 -0
  92. package/dist/client/observation/methods/getLatestObservationsByCodes.js +3 -0
  93. package/dist/client/observation/methods/observationsToMeasurements.d.ts +23 -1
  94. package/dist/client/observation/methods/observationsToMeasurements.js +8 -1
  95. package/dist/client/observation/methods/saveMeasurement.d.ts +3 -1
  96. package/dist/client/observation/methods/saveMeasurement.js +3 -1
  97. package/dist/client/observation/observation-bundle-utils.d.ts +6 -0
  98. package/dist/client/observation/observation-bundle-utils.js +6 -0
  99. package/dist/client/observation/series.d.ts +25 -3
  100. package/dist/client/observation/series.js +6 -2
  101. package/dist/client/observation/services/creator.d.ts +5 -0
  102. package/dist/client/observation/services/creator.js +5 -0
  103. package/dist/client/observation/services/uric-acid-service.js +0 -1
  104. package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +10 -0
  105. package/dist/client/observation/types/MeasurementTypeKey.d.ts +26 -0
  106. package/dist/client/observation/types/MeasurementTypeKey.js +26 -0
  107. package/dist/client/observation/types/ObservationCode.d.ts +64 -1
  108. package/dist/client/observation/types/ObservationCode.js +64 -1
  109. package/dist/client/observation/types/UrineAnalytes.d.ts +14 -0
  110. package/dist/client/observation/types/UrineAnalytes.js +1 -0
  111. package/dist/client/observation/types/generate-measurement/Sample.d.ts +33 -0
  112. package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +9 -0
  113. package/dist/client/observation/types/measurement/BabySleepMeasurement.d.ts +3 -0
  114. package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +7 -0
  115. package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
  116. package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +10 -0
  117. package/dist/client/observation/types/measurement/BloodPressureStates.js +10 -0
  118. package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +7 -0
  119. package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +8 -0
  120. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +18 -0
  121. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +18 -0
  122. package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +9 -0
  123. package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +7 -0
  124. package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +7 -0
  125. package/dist/client/observation/types/measurement/LipidPanelMeasurement.d.ts +12 -0
  126. package/dist/client/observation/types/measurement/Measurement.d.ts +9 -0
  127. package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +10 -0
  128. package/dist/client/observation/types/measurement/MeasurementSeries.d.ts +2 -0
  129. package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +10 -0
  130. package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +7 -0
  131. package/dist/client/observation/types/measurement/RespiratoryTherapyMeasurement.d.ts +3 -0
  132. package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +7 -0
  133. package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +23 -0
  134. package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +9 -0
  135. package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +29 -0
  136. package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +7 -0
  137. package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +7 -0
  138. package/dist/client/observation/types/service/MeasurementField.d.ts +5 -1
  139. package/dist/client/observation/utils/getObservationValueDisplay.d.ts +2 -0
  140. package/dist/client/offline/offline-measurement-queue.d.ts +56 -1
  141. package/dist/client/offline/offline-measurement-queue.js +21 -0
  142. package/dist/client/offline/shared-measurement-queue.d.ts +16 -1
  143. package/dist/client/offline/shared-measurement-queue.js +3 -1
  144. package/dist/client/ovok-client.d.ts +27 -6
  145. package/dist/client/ovok-client.js +8 -5
  146. package/dist/client/patient/methods.d.ts +21 -0
  147. package/dist/client/patient/methods.js +21 -0
  148. package/dist/client/patient/types.d.ts +131 -0
  149. package/dist/client/patient-sharing/methods.d.ts +18 -0
  150. package/dist/client/patient-sharing/methods.js +18 -0
  151. package/dist/client/patient-sharing/types.d.ts +89 -1
  152. package/dist/client/platform/methods.d.ts +22 -0
  153. package/dist/client/platform/methods.js +20 -0
  154. package/dist/client/platform/types.d.ts +194 -1
  155. package/dist/client/platform/types.js +24 -0
  156. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
  157. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +3 -0
  158. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.d.ts +3 -0
  159. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +3 -0
  160. package/dist/client/questionnaire-response/methods/populateQuestionnaire.d.ts +3 -0
  161. package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +3 -0
  162. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.d.ts +3 -0
  163. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +3 -0
  164. package/dist/client/questionnaire-response/types.d.ts +6 -0
  165. package/dist/client/signals/errors.d.ts +13 -2
  166. package/dist/client/signals/errors.js +9 -2
  167. package/dist/client/signals/methods.d.ts +9 -0
  168. package/dist/client/signals/methods.js +9 -0
  169. package/dist/client/signals/types.d.ts +31 -0
  170. package/dist/client/slim/methods.d.ts +268 -21
  171. package/dist/client/slim/methods.js +264 -21
  172. package/dist/client/slim/paging.d.ts +22 -2
  173. package/dist/client/slim/paging.js +6 -2
  174. package/dist/client/slim/types.d.ts +920 -1
  175. package/dist/client/storage.d.ts +15 -1
  176. package/dist/client/storage.js +7 -1
  177. package/dist/client/wearables/methods.d.ts +24 -0
  178. package/dist/client/wearables/methods.js +24 -0
  179. package/dist/client/wearables/types.d.ts +74 -0
  180. package/dist/conformance/api-requirements.d.ts +31 -5
  181. package/dist/conformance/api-requirements.js +47 -10
  182. package/dist/conformance/capability-requirements.d.ts +4 -26
  183. package/dist/conformance/capability-requirements.js +5 -27
  184. package/dist/conformance/capability.d.ts +9 -1
  185. package/dist/conformance/capability.js +3 -1
  186. package/dist/hooks/account-hooks.d.ts +35 -0
  187. package/dist/hooks/account-hooks.js +33 -0
  188. package/dist/hooks/api-hooks.d.ts +74 -4
  189. package/dist/hooks/api-hooks.js +56 -4
  190. package/dist/hooks/cms-hooks.d.ts +9 -3
  191. package/dist/hooks/cms-hooks.js +9 -3
  192. package/dist/hooks/email-hooks.d.ts +3 -0
  193. package/dist/hooks/email-hooks.js +3 -0
  194. package/dist/hooks/experience-hooks.d.ts +26 -0
  195. package/dist/hooks/experience-hooks.js +24 -0
  196. package/dist/hooks/index.d.ts +18 -0
  197. package/dist/hooks/index.js +18 -0
  198. package/dist/hooks/invites-hooks.d.ts +21 -2
  199. package/dist/hooks/invites-hooks.js +21 -2
  200. package/dist/hooks/notification-ack-hooks.d.ts +6 -2
  201. package/dist/hooks/notification-ack-hooks.js +6 -2
  202. package/dist/hooks/notification-hooks.d.ts +27 -3
  203. package/dist/hooks/notification-hooks.js +27 -3
  204. package/dist/hooks/notification-note-hooks.d.ts +41 -0
  205. package/dist/hooks/notification-note-hooks.js +33 -0
  206. package/dist/hooks/observation-hooks.d.ts +29 -0
  207. package/dist/hooks/observation-hooks.js +23 -1
  208. package/dist/hooks/patient-hooks.d.ts +53 -0
  209. package/dist/hooks/patient-hooks.js +48 -0
  210. package/dist/hooks/patient-sharing-hooks.d.ts +18 -0
  211. package/dist/hooks/patient-sharing-hooks.js +18 -0
  212. package/dist/hooks/platform-hooks.d.ts +32 -0
  213. package/dist/hooks/platform-hooks.js +23 -0
  214. package/dist/hooks/poll-hooks.d.ts +17 -1
  215. package/dist/hooks/poll-hooks.js +3 -1
  216. package/dist/hooks/signals-hooks.d.ts +3 -0
  217. package/dist/hooks/signals-hooks.js +3 -0
  218. package/dist/hooks/wearables-hooks.d.ts +23 -0
  219. package/dist/hooks/wearables-hooks.js +21 -0
  220. package/dist/index.d.ts +1 -965
  221. package/dist/index.js +1 -71
  222. package/dist/next/auth/saved-accounts-store.d.ts +10 -0
  223. package/dist/next/auth/session.d.ts +17 -0
  224. package/dist/next/auth/user-session.d.ts +5 -0
  225. package/dist/next/config/ovok-config.d.ts +45 -0
  226. package/dist/next/errors/ovok-account-error.d.ts +14 -1
  227. package/dist/next/errors/ovok-account-error.js +8 -1
  228. package/dist/next/errors/ovok-errors.d.ts +88 -0
  229. package/dist/next/errors/ovok-errors.js +67 -0
  230. package/dist/next/http/http-client.d.ts +5 -0
  231. package/dist/next/http/transmit.d.ts +7 -0
  232. package/dist/next/http/url.d.ts +10 -0
  233. package/dist/next/ovok.d.ts +31 -1
  234. package/dist/next/ovok.js +5 -1
  235. package/dist/next/paging/page.d.ts +13 -1
  236. package/dist/next/react/context.d.ts +7 -0
  237. package/dist/next/react/context.js +7 -0
  238. package/dist/next/react/index.d.ts +24 -0
  239. package/dist/next/react/index.js +18 -0
  240. package/dist/next/react/query-hooks.d.ts +69 -0
  241. package/dist/next/react/query-hooks.js +31 -0
  242. package/dist/next/resources/accounts/accounts-resource.d.ts +6 -0
  243. package/dist/next/resources/accounts/accounts-resource.js +6 -0
  244. package/dist/next/resources/ai/ai-chat-resource.d.ts +7 -0
  245. package/dist/next/resources/ai/ai-chat-resource.js +5 -0
  246. package/dist/next/resources/ai/ai-resource.d.ts +13 -0
  247. package/dist/next/resources/ai/ai-resource.js +6 -0
  248. package/dist/next/resources/ai/chat-messages-resource.d.ts +7 -0
  249. package/dist/next/resources/ai/chat-messages-resource.js +7 -0
  250. package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
  251. package/dist/next/resources/ai/chat-sessions-resource.js +8 -0
  252. package/dist/next/resources/auth/auth-sessions-resource.d.ts +6 -1
  253. package/dist/next/resources/auth/auth-sessions-resource.js +6 -1
  254. package/dist/next/resources/auth/registration.d.ts +18 -1
  255. package/dist/next/resources/auth/social-login.d.ts +12 -0
  256. package/dist/next/resources/auth-resource.d.ts +54 -1
  257. package/dist/next/resources/auth-resource.js +23 -0
  258. package/dist/next/resources/bots/bots-resource.d.ts +15 -0
  259. package/dist/next/resources/bots/bots-resource.js +5 -0
  260. package/dist/next/resources/cms/cms-delivery.d.ts +14 -2
  261. package/dist/next/resources/cms/cms-documents-resource.d.ts +7 -1
  262. package/dist/next/resources/cms/cms-documents-resource.js +7 -1
  263. package/dist/next/resources/cms/cms-resource.d.ts +7 -0
  264. package/dist/next/resources/cms/cms-resource.js +5 -0
  265. package/dist/next/resources/cms/release-notes-resource.d.ts +6 -0
  266. package/dist/next/resources/cms/release-notes-resource.js +6 -0
  267. package/dist/next/resources/consent/consent-resource.d.ts +22 -0
  268. package/dist/next/resources/consent/consent-resource.js +20 -0
  269. package/dist/next/resources/content/content-resource.d.ts +18 -0
  270. package/dist/next/resources/content/content-resource.js +12 -0
  271. package/dist/next/resources/documents/documents-resource.d.ts +24 -0
  272. package/dist/next/resources/documents/documents-resource.js +10 -0
  273. package/dist/next/resources/email/email-resource.d.ts +6 -0
  274. package/dist/next/resources/email/email-resource.js +5 -0
  275. package/dist/next/resources/email/email-templates-resource.d.ts +6 -0
  276. package/dist/next/resources/email/email-templates-resource.js +6 -0
  277. package/dist/next/resources/fhir-resource.d.ts +36 -0
  278. package/dist/next/resources/fhir-resource.js +21 -0
  279. package/dist/next/resources/health-resource.d.ts +16 -0
  280. package/dist/next/resources/health-resource.js +5 -0
  281. package/dist/next/resources/invites/invite-flow-resource.d.ts +7 -1
  282. package/dist/next/resources/invites/invite-flow-resource.js +7 -1
  283. package/dist/next/resources/invites/invites-resource.d.ts +15 -0
  284. package/dist/next/resources/invites/invites-resource.js +5 -0
  285. package/dist/next/resources/localization/i18next-resource.d.ts +6 -0
  286. package/dist/next/resources/localization/i18next-resource.js +6 -0
  287. package/dist/next/resources/localization/locales-resource.d.ts +7 -0
  288. package/dist/next/resources/localization/locales-resource.js +7 -0
  289. package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
  290. package/dist/next/resources/localization/localizations-resource.js +9 -0
  291. package/dist/next/resources/measurements/measurements-resource.d.ts +53 -1
  292. package/dist/next/resources/measurements/measurements-resource.js +14 -0
  293. package/dist/next/resources/measurements/observation-builder.d.ts +5 -0
  294. package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +32 -0
  295. package/dist/next/resources/patient/fhir-records.d.ts +19 -1
  296. package/dist/next/resources/patient/fhir-records.js +19 -1
  297. package/dist/next/resources/patient/patient-resource.d.ts +15 -0
  298. package/dist/next/resources/patient/patient-resource.js +6 -0
  299. package/dist/next/resources/projects/project-features-resource.d.ts +7 -0
  300. package/dist/next/resources/projects/project-features-resource.js +7 -0
  301. package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
  302. package/dist/next/resources/projects/project-members-resource.js +9 -0
  303. package/dist/next/resources/projects/project-settings-resource.d.ts +8 -0
  304. package/dist/next/resources/projects/project-settings-resource.js +8 -0
  305. package/dist/next/resources/projects/projects-resource.d.ts +15 -0
  306. package/dist/next/resources/projects/projects-resource.js +5 -0
  307. package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +13 -0
  308. package/dist/next/resources/questionnaires/questionnaires-resource.js +13 -0
  309. package/dist/next/resources/realtime/realtime-resource.d.ts +11 -0
  310. package/dist/next/resources/realtime/realtime-resource.js +11 -0
  311. package/dist/next/resources/realtime/realtime-types.d.ts +16 -0
  312. package/dist/next/resources/session/saved-accounts-resource.d.ts +16 -0
  313. package/dist/next/resources/session/saved-accounts-resource.js +16 -0
  314. package/dist/next/resources/session/session-resource.d.ts +8 -0
  315. package/dist/next/resources/session/session-resource.js +7 -0
  316. package/dist/next/resources/sharing/sharing-invites-resource.d.ts +7 -0
  317. package/dist/next/resources/sharing/sharing-invites-resource.js +7 -0
  318. package/dist/next/resources/sharing/sharing-resource.d.ts +8 -0
  319. package/dist/next/resources/sharing/sharing-resource.js +5 -0
  320. package/dist/next/resources/sharing/sharing-settings-resource.d.ts +7 -0
  321. package/dist/next/resources/sharing/sharing-settings-resource.js +7 -0
  322. package/dist/next/resources/sharing/sharing-shares-resource.d.ts +7 -0
  323. package/dist/next/resources/sharing/sharing-shares-resource.js +7 -0
  324. package/dist/next/resources/signals/signals-gateway-resource.d.ts +15 -0
  325. package/dist/next/resources/signals/signals-gateway-resource.js +6 -0
  326. package/dist/next/resources/signals/signals-resource.d.ts +7 -0
  327. package/dist/next/resources/signals/signals-resource.js +5 -0
  328. package/dist/next/resources/signals/undeliverable-resource.d.ts +35 -0
  329. package/dist/next/resources/signals/undeliverable-resource.js +6 -0
  330. package/dist/next/resources/slim/slim-alarms-resource.d.ts +7 -0
  331. package/dist/next/resources/slim/slim-alarms-resource.js +7 -0
  332. package/dist/next/resources/slim/slim-change-history-resource.d.ts +6 -0
  333. package/dist/next/resources/slim/slim-change-history-resource.js +6 -0
  334. package/dist/next/resources/slim/slim-child-projects-resource.d.ts +21 -0
  335. package/dist/next/resources/slim/slim-child-projects-resource.js +8 -0
  336. package/dist/next/resources/slim/slim-devices-resource.d.ts +31 -0
  337. package/dist/next/resources/slim/slim-devices-resource.js +16 -0
  338. package/dist/next/resources/slim/slim-exports-resource.d.ts +6 -0
  339. package/dist/next/resources/slim/slim-exports-resource.js +6 -0
  340. package/dist/next/resources/slim/slim-locations-resource.d.ts +9 -0
  341. package/dist/next/resources/slim/slim-locations-resource.js +9 -0
  342. package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +6 -0
  343. package/dist/next/resources/slim/slim-medical-notifications-resource.js +6 -0
  344. package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +10 -0
  345. package/dist/next/resources/slim/slim-notification-notes-resource.js +10 -0
  346. package/dist/next/resources/slim/slim-notifications-resource.d.ts +10 -0
  347. package/dist/next/resources/slim/slim-notifications-resource.js +6 -0
  348. package/dist/next/resources/slim/slim-organizations-resource.d.ts +9 -0
  349. package/dist/next/resources/slim/slim-organizations-resource.js +9 -0
  350. package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +12 -0
  351. package/dist/next/resources/slim/slim-out-of-bed-resource.js +7 -0
  352. package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +6 -0
  353. package/dist/next/resources/slim/slim-patient-thresholds-resource.js +6 -0
  354. package/dist/next/resources/slim/slim-patients-resource.d.ts +11 -0
  355. package/dist/next/resources/slim/slim-patients-resource.js +10 -0
  356. package/dist/next/resources/slim/slim-policies-resource.d.ts +10 -0
  357. package/dist/next/resources/slim/slim-policies-resource.js +10 -0
  358. package/dist/next/resources/slim/slim-practitioners-resource.d.ts +6 -0
  359. package/dist/next/resources/slim/slim-practitioners-resource.js +6 -0
  360. package/dist/next/resources/slim/slim-projects-resource.d.ts +12 -0
  361. package/dist/next/resources/slim/slim-projects-resource.js +11 -0
  362. package/dist/next/resources/slim/slim-queries.d.ts +51 -0
  363. package/dist/next/resources/slim/slim-resource.d.ts +21 -0
  364. package/dist/next/resources/slim/slim-resource.js +6 -0
  365. package/dist/next/resources/slim/slim-sleep-resource.d.ts +6 -0
  366. package/dist/next/resources/slim/slim-sleep-resource.js +6 -0
  367. package/dist/next/resources/slim/slim-thresholds-resource.d.ts +5 -0
  368. package/dist/next/resources/slim/slim-thresholds-resource.js +5 -0
  369. package/dist/next/resources/slim/slim-trends-resource.d.ts +6 -0
  370. package/dist/next/resources/slim/slim-trends-resource.js +6 -0
  371. package/dist/next/resources/slim/slim-users-resource.d.ts +12 -0
  372. package/dist/next/resources/slim/slim-users-resource.js +6 -0
  373. package/dist/next/resources/slim/slim-zones-resource.d.ts +8 -0
  374. package/dist/next/resources/slim/slim-zones-resource.js +8 -0
  375. package/dist/next/resources/video-calls/video-call-access-resource.d.ts +13 -0
  376. package/dist/next/resources/video-calls/video-call-access-resource.js +8 -0
  377. package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +8 -0
  378. package/dist/next/resources/video-calls/video-call-appointments-resource.js +8 -0
  379. package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +8 -0
  380. package/dist/next/resources/video-calls/video-call-emails-resource.js +8 -0
  381. package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
  382. package/dist/next/resources/video-calls/video-calls-resource.js +6 -0
  383. package/dist/next/resources/wearables/wearable-connections-resource.d.ts +8 -0
  384. package/dist/next/resources/wearables/wearable-connections-resource.js +8 -0
  385. package/dist/next/resources/wearables/wearable-providers-resource.d.ts +10 -0
  386. package/dist/next/resources/wearables/wearable-providers-resource.js +10 -0
  387. package/dist/next/resources/wearables/wearables-resource.d.ts +7 -0
  388. package/dist/next/resources/wearables/wearables-resource.js +5 -0
  389. package/dist/next/storage/ovok-storage.d.ts +16 -0
  390. package/dist/next/storage/ovok-storage.js +8 -0
  391. package/dist/types/ValidationError.d.ts +9 -0
  392. package/dist/utils/patch/getPatchOperationType.d.ts +3 -0
  393. package/dist/utils/patch/getPatchOperationType.js +3 -0
  394. package/package.json +51 -12
@@ -1,26 +1,78 @@
1
+ /**
2
+ * Stored terms-and-conditions consent of a user.
3
+ *
4
+ * @category consent
5
+ */
1
6
  export type LegalConsentRecord = {
7
+ /** Id of the consent record. */
2
8
  consentId: string;
9
+ /** `active` while accepted, `revoked` once withdrawn or superseded. */
3
10
  status: "active" | "revoked";
11
+ /** URL of the terms version the consent refers to. */
4
12
  termsUrl?: string | null;
13
+ /** ISO 8601 time the terms last changed. */
5
14
  termsUpdatedAt?: string | null;
15
+ /** ISO 8601 time the user accepted. */
6
16
  acceptedAt?: string | null;
17
+ /** ISO 8601 time the consent was revoked. */
7
18
  revokedAt?: string | null;
19
+ /** Why it was revoked: `tos-updated` when the terms changed, `withdrawn` when the user withdrew. */
8
20
  revokedReason?: "tos-updated" | "withdrawn" | null;
9
21
  };
22
+ /**
23
+ * Response of the legal consent routes.
24
+ *
25
+ * @category consent
26
+ */
10
27
  export type LegalConsentResponse = {
28
+ /** The user's consent, or `null` when none exists. */
11
29
  legal: LegalConsentRecord | null;
12
30
  };
31
+ /**
32
+ * Stored medical-notifications consent of a user.
33
+ *
34
+ * @category consent
35
+ */
13
36
  export type MedicalConsentRecord = {
37
+ /** Id of the consent record. */
14
38
  consentId: string;
39
+ /** ISO 8601 time the user accepted, or `null`. */
15
40
  acceptedAt: string | null;
16
41
  };
42
+ /**
43
+ * Response of the medical consent routes.
44
+ *
45
+ * @category consent
46
+ */
17
47
  export type MedicalConsentResponse = {
48
+ /** The user's consent, or `null` when none exists. */
18
49
  medical: MedicalConsentRecord | null;
19
50
  };
51
+ /**
52
+ * Request body that accepts or withdraws the legal consent.
53
+ *
54
+ * @category consent
55
+ */
20
56
  export type LegalConsentUpdate = {
57
+ /** `true` to accept, `false` to withdraw. */
21
58
  termsAndConditionsConsent: boolean;
22
59
  };
60
+ /**
61
+ * Request body that grants or withdraws the medical consent.
62
+ *
63
+ * @category consent
64
+ */
23
65
  export type MedicalConsentUpdate = {
66
+ /** `true` to grant, `false` to withdraw. */
24
67
  medicalSettingsNotificationsConsent: boolean;
25
68
  };
26
- export declare function needsLegalConsentReacceptance(legal: LegalConsentRecord | null | undefined): boolean;
69
+ /**
70
+ * Tells whether the user must accept the terms again: no consent yet, or it was revoked because the terms changed.
71
+ *
72
+ * @param legal - Consent record from `getLegalConsent`.
73
+ *
74
+ * @category consent
75
+ */
76
+ export declare function needsLegalConsentReacceptance(
77
+ /** The user's consent, or `null` when none exists. */
78
+ legal: LegalConsentRecord | null | undefined): boolean;
@@ -1,7 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.needsLegalConsentReacceptance = needsLegalConsentReacceptance;
4
- function needsLegalConsentReacceptance(legal) {
4
+ /**
5
+ * Tells whether the user must accept the terms again: no consent yet, or it was revoked because the terms changed.
6
+ *
7
+ * @param legal - Consent record from `getLegalConsent`.
8
+ *
9
+ * @category consent
10
+ */
11
+ function needsLegalConsentReacceptance(
12
+ /** The user's consent, or `null` when none exists. */
13
+ legal) {
5
14
  return legal == null ||
6
15
  (legal.status === "revoked" && legal.revokedReason === "tos-updated");
7
16
  }
@@ -1,4 +1,7 @@
1
1
  import type { MedplumRequestOptions } from "@medplum/core";
2
2
  import { OvokClient } from "../ovok-client";
3
3
  import { OvokEmailTemplates } from "./types";
4
+ /**
5
+ * Lists the project's email templates from `GET /v1/email/templates`.
6
+ */
4
7
  export declare function getEmailTemplates(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<OvokEmailTemplates>;
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEmailTemplates = getEmailTemplates;
4
4
  const request_options_1 = require("../request-options");
5
+ /**
6
+ * Lists the project's email templates from `GET /v1/email/templates`.
7
+ */
5
8
  function getEmailTemplates(requestOptions) {
6
9
  return this.get("/v1/email/templates", ...(0, request_options_1.optionalArg)(requestOptions));
7
10
  }
@@ -1,21 +1,54 @@
1
+ /**
2
+ * Who an email template is sent to.
3
+ *
4
+ * @category email
5
+ */
1
6
  export type OvokEmailAudience = "patient" | "practitioner";
7
+ /**
8
+ * A parameter a template accepts.
9
+ *
10
+ * @category email
11
+ */
2
12
  export type OvokEmailTemplateParam = {
13
+ /** Parameter name. */
3
14
  name: string;
15
+ /** Parameter type. */
4
16
  type: string;
17
+ /** Whether the parameter may be null. */
5
18
  nullable: boolean;
6
19
  };
20
+ /**
21
+ * An email template.
22
+ *
23
+ * @category email
24
+ */
7
25
  export type OvokEmailTemplate = {
26
+ /** Template name. */
8
27
  name: string;
28
+ /** Recipient kind of the template. */
9
29
  audience: OvokEmailAudience;
30
+ /** Parameters the template accepts. */
10
31
  params: OvokEmailTemplateParam[];
32
+ /** Example parameter values. */
11
33
  example: Record<string, unknown>;
34
+ /** Placeholder syntax of the template for each email provider. */
12
35
  syntax: {
36
+ /** Syntax for SendGrid. */
13
37
  sendgrid: string;
38
+ /** Syntax for Brevo. */
14
39
  brevo: string;
40
+ /** Syntax for Resend. */
15
41
  resend: string;
42
+ /** Syntax for SMTP. */
16
43
  smtp: string;
17
44
  };
18
45
  };
46
+ /**
47
+ * Response of `getEmailTemplates`.
48
+ *
49
+ * @category email
50
+ */
19
51
  export type OvokEmailTemplates = {
52
+ /** The email templates. */
20
53
  templates: OvokEmailTemplate[];
21
54
  };
@@ -1,2 +1,5 @@
1
1
  import { ValidationError } from "../../types/ValidationError";
2
+ /**
3
+ * Extracts per-field validation errors from an error payload, whichever envelope the server used.
4
+ */
2
5
  export declare function readFieldErrors(payload: Record<string, unknown> | undefined): ValidationError[];
@@ -36,6 +36,9 @@ function readProblemErrors(values, worded) {
36
36
  return [{ code, message, path }];
37
37
  });
38
38
  }
39
+ /**
40
+ * Extracts per-field validation errors from an error payload, whichever envelope the server used.
41
+ */
39
42
  function readFieldErrors(payload) {
40
43
  const nested = (0, ovok_error_utils_1.asRecord)(payload === null || payload === void 0 ? void 0 : payload.error);
41
44
  const listed = Array.isArray(nested === null || nested === void 0 ? void 0 : nested.errors)
@@ -5,7 +5,13 @@ export declare const toError: (reason: unknown) => Error;
5
5
  export declare const namedError: (name: string, message: string) => Error;
6
6
  /** Sets `cause` the way the SDK's typed errors expose it: read-only and not enumerable. */
7
7
  export declare const withCause: <T extends Error>(error: T, cause: unknown) => T;
8
+ /**
9
+ * Returns the value as a plain object, or undefined when it is not one.
10
+ */
8
11
  export declare const asRecord: (value: unknown) => Record<string, unknown> | undefined;
12
+ /**
13
+ * Picks the most useful message from an error payload, falling back to the error itself.
14
+ */
9
15
  export declare function readMessage(payload: Record<string, unknown> | undefined, error: unknown): string;
10
16
  export declare function codeValue(value: unknown): string | undefined;
11
17
  export declare function codeFromOutcome(value: unknown): string | undefined;
@@ -19,8 +19,14 @@ exports.namedError = namedError;
19
19
  /** Sets `cause` the way the SDK's typed errors expose it: read-only and not enumerable. */
20
20
  const withCause = (error, cause) => Object.defineProperty(error, "cause", { configurable: true, enumerable: false, value: cause, writable: false });
21
21
  exports.withCause = withCause;
22
+ /**
23
+ * Returns the value as a plain object, or undefined when it is not one.
24
+ */
22
25
  const asRecord = (value) => value && typeof value === "object" ? value : undefined;
23
26
  exports.asRecord = asRecord;
27
+ /**
28
+ * Picks the most useful message from an error payload, falling back to the error itself.
29
+ */
24
30
  function readMessage(payload, error) {
25
31
  var _a, _b, _c;
26
32
  const nestedMessage = stringValue((_a = (0, exports.asRecord)(payload === null || payload === void 0 ? void 0 : payload.error)) === null || _a === void 0 ? void 0 : _a.message);
@@ -1,11 +1,20 @@
1
1
  import { ValidationError } from "../../types/ValidationError";
2
2
  export { asRecord, readMessage } from "./ovok-error-utils";
3
3
  export { readFieldErrors } from "./field-errors";
4
+ /**
5
+ * A readable message plus the per-field validation errors.
6
+ */
4
7
  export type ParsedOvokError = {
8
+ /** Human-readable error message. */
5
9
  message: string;
10
+ /** Per-field validation errors, empty when the error is not about specific fields. */
6
11
  fieldErrors: ValidationError[];
7
12
  };
13
+ /**
14
+ * Everything the SDK can read from an error: message, field errors, status and request ids.
15
+ */
8
16
  export type OvokErrorDetails = ParsedOvokError & {
17
+ /** HTTP status, or undefined when none could be read. */
9
18
  status: number | undefined;
10
19
  /** The condition the server named; undefined when the error is known only by its status. */
11
20
  code: string | undefined;
@@ -13,29 +22,52 @@ export type OvokErrorDetails = ParsedOvokError & {
13
22
  type?: string;
14
23
  /** Equals the `x-trace-id` response header; quote it when reporting an error. */
15
24
  traceId?: string;
25
+ /** Server request id, for support. */
16
26
  requestId?: string;
27
+ /** Milliseconds to wait before retrying, when the server said so. */
17
28
  retryAfterMs?: number;
29
+ /** Names of required items the request lacked. */
18
30
  missing: string[];
19
31
  };
20
- /** Reads the error details Medplum preserves from Ovok's non-FHIR responses. */
32
+ /**
33
+ * Reads status, code, message, field errors and request ids from any error thrown by an Ovok call.
34
+ */
21
35
  export declare const readOvokError: (error: unknown) => OvokErrorDetails;
22
- /** A typed HTTP error for Ovok API responses whose status carries application meaning. */
36
+ /**
37
+ * A typed HTTP error for Ovok API responses whose status carries application meaning.
38
+ */
23
39
  export declare class OvokApiError extends Error {
40
+ /** HTTP status of the response. */
24
41
  readonly status: number;
42
+ /** The condition the server named, if any. */
25
43
  readonly code: string | undefined;
44
+ /** Problem type URI of the error, if any. */
26
45
  readonly type: string | undefined;
46
+ /** Trace id from the `x-trace-id` response header, if any. */
27
47
  readonly traceId: string | undefined;
48
+ /** Per-field validation errors. */
28
49
  readonly fieldErrors: ValidationError[];
50
+ /** Names of required items the request lacked. */
29
51
  readonly missing: string[];
52
+ /** Server request id, for support. */
30
53
  readonly requestId: string | undefined;
54
+ /** Milliseconds to wait before retrying, when the server said so. */
31
55
  readonly retryAfterMs: number | undefined;
56
+ /** The original error that was wrapped. */
32
57
  readonly cause: unknown;
33
58
  constructor(details: OvokErrorDetails, cause: unknown);
34
59
  }
60
+ /**
61
+ * Returns true when the error is an `OvokApiError`.
62
+ */
35
63
  export declare function isOvokApiError(error: unknown): error is OvokApiError;
36
- /** Types the status-bearing write failures without changing auth or rate-limit handling. */
64
+ /**
65
+ * Types the status-bearing write failures without changing auth or rate-limit handling.
66
+ */
37
67
  export declare function mapOvokApiError(error: unknown, options?: {
38
68
  includeAccessErrors?: boolean;
39
69
  }): unknown;
40
- /** Normalizes Ovok's Nest and FHIR error envelopes without exposing transport details. */
70
+ /**
71
+ * Normalizes Ovok's Nest and FHIR error envelopes without exposing transport details.
72
+ */
41
73
  export declare const parseOvokError: (error: unknown) => ParsedOvokError;
@@ -27,7 +27,9 @@ const HTTP_REASON_PHRASES = new Set([
27
27
  "internal server error",
28
28
  "service unavailable",
29
29
  ]);
30
- /** Reads the error details Medplum preserves from Ovok's non-FHIR responses. */
30
+ /**
31
+ * Reads status, code, message, field errors and request ids from any error thrown by an Ovok call.
32
+ */
31
33
  const readOvokError = (error) => {
32
34
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
33
35
  if (error instanceof OvokApiError) {
@@ -86,7 +88,9 @@ const readOvokError = (error) => {
86
88
  };
87
89
  };
88
90
  exports.readOvokError = readOvokError;
89
- /** A typed HTTP error for Ovok API responses whose status carries application meaning. */
91
+ /**
92
+ * A typed HTTP error for Ovok API responses whose status carries application meaning.
93
+ */
90
94
  class OvokApiError extends Error {
91
95
  constructor(details, cause) {
92
96
  var _a;
@@ -104,10 +108,15 @@ class OvokApiError extends Error {
104
108
  }
105
109
  }
106
110
  exports.OvokApiError = OvokApiError;
111
+ /**
112
+ * Returns true when the error is an `OvokApiError`.
113
+ */
107
114
  function isOvokApiError(error) {
108
115
  return error instanceof OvokApiError;
109
116
  }
110
- /** Types the status-bearing write failures without changing auth or rate-limit handling. */
117
+ /**
118
+ * Types the status-bearing write failures without changing auth or rate-limit handling.
119
+ */
111
120
  function mapOvokApiError(error, options = {}) {
112
121
  var _a;
113
122
  if (isOvokApiError(error)) {
@@ -121,7 +130,9 @@ function mapOvokApiError(error, options = {}) {
121
130
  ? new OvokApiError(details, error)
122
131
  : error;
123
132
  }
124
- /** Normalizes Ovok's Nest and FHIR error envelopes without exposing transport details. */
133
+ /**
134
+ * Normalizes Ovok's Nest and FHIR error envelopes without exposing transport details.
135
+ */
125
136
  const parseOvokError = (error) => {
126
137
  const { message, fieldErrors } = (0, exports.readOvokError)(error);
127
138
  return { message, fieldErrors };
@@ -1,11 +1,20 @@
1
- /** A typed error returned when the server asks the client to slow down. */
1
+ /**
2
+ * A typed error returned when the server asks the client to slow down.
3
+ */
2
4
  export declare class RateLimitError extends Error {
5
+ /** Always `"rate_limit"`. */
3
6
  readonly code: "rate_limit";
7
+ /** Milliseconds to wait before retrying, when the server said how long. */
4
8
  readonly retryAfterMs: number | undefined;
5
9
  constructor(retryAfterMs?: number, options?: {
6
10
  cause?: unknown;
7
11
  });
8
12
  }
13
+ /**
14
+ * Returns true when the error is a `RateLimitError`.
15
+ */
9
16
  export declare function isRateLimitError(error: unknown): error is RateLimitError;
10
- /** Converts Medplum's untyped throttling outcome to the Core error contract. */
17
+ /**
18
+ * Converts a throttling response into a `RateLimitError`; other errors pass through unchanged.
19
+ */
11
20
  export declare function mapRateLimitError(error: unknown): unknown;
@@ -7,10 +7,13 @@ const core_1 = require("@medplum/core");
7
7
  const ovok_error_1 = require("./ovok-error");
8
8
  const ovok_error_utils_1 = require("./ovok-error-utils");
9
9
  const RATE_LIMIT_RESET_EXTENSION_URL = "https://medplum.com/fhir/StructureDefinition/rate-limit-reset";
10
- /** A typed error returned when the server asks the client to slow down. */
10
+ /**
11
+ * A typed error returned when the server asks the client to slow down.
12
+ */
11
13
  class RateLimitError extends Error {
12
14
  constructor(retryAfterMs, options) {
13
15
  super("Too many requests");
16
+ /** Always `"rate_limit"`. */
14
17
  this.code = "rate_limit";
15
18
  this.name = "RateLimitError";
16
19
  this.retryAfterMs = retryAfterMs;
@@ -20,10 +23,15 @@ class RateLimitError extends Error {
20
23
  }
21
24
  }
22
25
  exports.RateLimitError = RateLimitError;
26
+ /**
27
+ * Returns true when the error is a `RateLimitError`.
28
+ */
23
29
  function isRateLimitError(error) {
24
30
  return error instanceof RateLimitError;
25
31
  }
26
- /** Converts Medplum's untyped throttling outcome to the Core error contract. */
32
+ /**
33
+ * Converts a throttling response into a `RateLimitError`; other errors pass through unchanged.
34
+ */
27
35
  function mapRateLimitError(error) {
28
36
  var _a;
29
37
  if (isRateLimitError(error)) {
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * A typed error for a read that needs a signed-in session when there is none.
3
- * It is thrown before any request: MedplumClient answers a 401 by clearing
4
- * its storage and calling `onUnauthenticated`.
3
+ * It is thrown before any request, so a missing session never triggers a 401 sign-out.
5
4
  */
6
5
  export declare class SignInRequiredError extends Error {
6
+ /** Always `"sign_in_required"`. */
7
7
  readonly code: "sign_in_required";
8
8
  constructor(message: string);
9
9
  }
10
+ /**
11
+ * Returns true when the error is a `SignInRequiredError`.
12
+ */
10
13
  export declare function isSignInRequiredError(error: unknown): error is SignInRequiredError;
@@ -4,17 +4,20 @@ exports.SignInRequiredError = void 0;
4
4
  exports.isSignInRequiredError = isSignInRequiredError;
5
5
  /**
6
6
  * A typed error for a read that needs a signed-in session when there is none.
7
- * It is thrown before any request: MedplumClient answers a 401 by clearing
8
- * its storage and calling `onUnauthenticated`.
7
+ * It is thrown before any request, so a missing session never triggers a 401 sign-out.
9
8
  */
10
9
  class SignInRequiredError extends Error {
11
10
  constructor(message) {
12
11
  super(message);
12
+ /** Always `"sign_in_required"`. */
13
13
  this.code = "sign_in_required";
14
14
  this.name = "SignInRequiredError";
15
15
  }
16
16
  }
17
17
  exports.SignInRequiredError = SignInRequiredError;
18
+ /**
19
+ * Returns true when the error is a `SignInRequiredError`.
20
+ */
18
21
  function isSignInRequiredError(error) {
19
22
  return error instanceof SignInRequiredError;
20
23
  }
@@ -1,8 +1,15 @@
1
1
  import type { MedplumRequestOptions } from "@medplum/core";
2
2
  import { OvokClient } from "../ovok-client";
3
3
  import { OvokChatMessage, OvokChatMessageInput, OvokChatMessageQuery, OvokChatMessagesResponse, OvokChatSession, OvokChatSessionQuery, OvokChatSessionsResponse, OvokConsentSignatureResponse, OvokContent, OvokContentBody, OvokContentQuery, OvokContentSearchResponse, OvokCreateChatSession, OvokDocumentFile, OvokDocumentMetadataUpdate, OvokDocumentReplacement, OvokDocumentSearchQuery, OvokDocumentSearchResponse, OvokDocumentUploadRequest, OvokMappedContentSearchResponse, OvokTranslationRequest, OvokTranslationResponse, OvokVideoCallAccess, OvokVideoCallAppointment, OvokVideoCallAppointmentInput, OvokVideoCallAppointmentQuery, OvokVideoCallGuestAccess, OvokVideoCallMailRequest, OvokVideoCallMailResponse } from "./types";
4
+ /**
5
+ * Requests the signed PDF of a consent (`POST /consent/signature/{consentId}`).
6
+ *
7
+ * @param consentId - Id of the Consent resource to sign.
8
+ */
4
9
  export declare function requestConsentSignature(this: OvokClient, consentId: string, requestOptions?: MedplumRequestOptions): Promise<OvokConsentSignatureResponse>;
10
+ /** Registers a document and returns the upload options for its file (`POST /document`). */
5
11
  export declare function createDocumentUpload(this: OvokClient, body: OvokDocumentUploadRequest, requestOptions?: MedplumRequestOptions): Promise<OvokDocumentFile>;
12
+ /** Searches the user's documents (`GET /document`). */
6
13
  export declare function listDocuments(this: OvokClient, params?: OvokDocumentSearchQuery, requestOptions?: MedplumRequestOptions): Promise<OvokDocumentSearchResponse>;
7
14
  /** Returns the authenticated document endpoint; navigating/fetching it follows the backend redirect. */
8
15
  export declare function getDocumentDownloadUrl(this: OvokClient, documentId: string, params?: {
@@ -16,39 +23,70 @@ export declare function getPublicDocumentDownloadUrl(this: OvokClient, token: st
16
23
  height?: string | number;
17
24
  fit?: string;
18
25
  }): Promise<string>;
26
+ /** Deletes a document (`DELETE /document/{documentId}`). */
19
27
  export declare function deleteDocument(this: OvokClient, documentId: string, requestOptions?: MedplumRequestOptions): Promise<{
28
+ /** Confirmation message from the server. */
20
29
  message: string;
21
30
  }>;
31
+ /** Changes a document's file name, content type or visibility (`PATCH /document/{documentId}`). */
22
32
  export declare function updateDocumentMetadata(this: OvokClient, documentId: string, body: OvokDocumentMetadataUpdate, requestOptions?: MedplumRequestOptions): Promise<OvokDocumentFile>;
33
+ /** Returns upload options to replace a document's file (`POST /document/{documentId}`). */
23
34
  export declare function generateDocumentReplacementUpload(this: OvokClient, documentId: string, body: OvokDocumentReplacement, requestOptions?: MedplumRequestOptions): Promise<OvokDocumentFile>;
35
+ /** Searches CMS content of a type with the matching parent-project content (`GET /cms/{type}/map/{language}`). */
24
36
  export declare function searchMappedContent(this: OvokClient, type: string, language: string, params?: OvokContentQuery, requestOptions?: MedplumRequestOptions): Promise<OvokMappedContentSearchResponse>;
37
+ /** Copies all CMS content of a type and language from the parent project (`POST /cms/{type}/{language}/copy-from-parent-project`). */
25
38
  export declare function copyContentsFromParent(this: OvokClient, type: string, language: string, requestOptions?: MedplumRequestOptions): Promise<{
39
+ /** Whether the copy succeeded. */
26
40
  success: boolean;
27
41
  }>;
42
+ /** Copies one CMS content item from the parent project (`POST /cms/{type}/{language}/{key}/copy-from-parent-project`). */
28
43
  export declare function copyContentFromParent(this: OvokClient, type: string, language: string, key: string, requestOptions?: MedplumRequestOptions): Promise<{
44
+ /** Whether the copy succeeded. */
29
45
  success: boolean;
30
46
  }>;
47
+ /** Creates a CMS content item (`POST /cms/{type}/{language}`). */
31
48
  export declare function createContent(this: OvokClient, type: string, language: string, body: OvokContentBody, requestOptions?: MedplumRequestOptions): Promise<OvokContent>;
49
+ /** Replaces a CMS content item (`PUT /cms/{type}/{language}/{key}`). */
32
50
  export declare function updateContent(this: OvokClient, type: string, language: string, key: string, body: OvokContentBody, requestOptions?: MedplumRequestOptions): Promise<OvokContent>;
51
+ /** Reads a CMS content item (`GET /cms/{type}/{language}/{key}`). */
33
52
  export declare function getContent(this: OvokClient, type: string, language: string, key: string, requestOptions?: MedplumRequestOptions): Promise<OvokContent>;
53
+ /** Deletes a CMS content item (`DELETE /cms/{type}/{language}/{key}`). */
34
54
  export declare function deleteContent(this: OvokClient, type: string, language: string, key: string, requestOptions?: MedplumRequestOptions): Promise<void>;
55
+ /** Searches CMS content of a type and language (`GET /cms/{type}/{language}`). */
35
56
  export declare function searchContent(this: OvokClient, type: string, language: string, params?: OvokContentQuery, requestOptions?: MedplumRequestOptions): Promise<OvokContentSearchResponse>;
57
+ /** Creates a video-call appointment (`POST /video-call/livekit/appointment`). */
36
58
  export declare function createVideoCallAppointment(this: OvokClient, body: OvokVideoCallAppointmentInput, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAppointment>;
59
+ /** Updates a video-call appointment (`PUT /video-call/livekit/appointment/{appointmentId}`). */
37
60
  export declare function updateVideoCallAppointment(this: OvokClient, appointmentId: string, body: OvokVideoCallAppointmentInput, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAppointment>;
61
+ /** Lists video-call appointments, optionally within a date range (`GET /video-call/livekit/appointment`). */
38
62
  export declare function listVideoCallAppointments(this: OvokClient, params?: OvokVideoCallAppointmentQuery, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAppointment[]>;
63
+ /** Checks the user's permission to join a video call (`GET /video-call/livekit/access-permission/{appointmentId}`). */
39
64
  export declare function getVideoCallAccessPermission(this: OvokClient, appointmentId: string, requestOptions?: MedplumRequestOptions): Promise<Record<string, unknown>>;
65
+ /** Creates access to a video call for a guest by email (`POST /video-call/livekit/guest-access/{appointmentId}`). */
40
66
  export declare function createVideoCallGuestAccess(this: OvokClient, appointmentId: string, body: OvokVideoCallGuestAccess, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAccess>;
67
+ /** Creates access to a video call for the signed-in user (`POST /video-call/livekit/user-access/{appointmentId}`). */
41
68
  export declare function createVideoCallUserAccess(this: OvokClient, appointmentId: string, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallAccess>;
69
+ /** Emails invitations to a video-call appointment (`POST /video-call/livekit/mail/invite`). */
42
70
  export declare function sendVideoCallInvite(this: OvokClient, body: OvokVideoCallMailRequest, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallMailResponse>;
71
+ /** Emails an update of a video-call appointment (`POST /video-call/livekit/mail/update`). */
43
72
  export declare function sendVideoCallUpdate(this: OvokClient, body: OvokVideoCallMailRequest, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallMailResponse>;
73
+ /** Emails a cancellation of a video-call appointment (`POST /video-call/livekit/mail/cancel`). */
44
74
  export declare function sendVideoCallCancellation(this: OvokClient, body: OvokVideoCallMailRequest, requestOptions?: MedplumRequestOptions): Promise<OvokVideoCallMailResponse>;
75
+ /** Notifies the participants that a video call is active (`POST /video-call/livekit/notification/active-call/{appointmentId}`). */
45
76
  export declare function sendVideoCallActiveNotification(this: OvokClient, appointmentId: string, requestOptions?: MedplumRequestOptions): Promise<Record<string, unknown>>;
77
+ /** Translates texts between two languages (`POST /ai/translation`). */
46
78
  export declare function translate(this: OvokClient, body: OvokTranslationRequest, requestOptions?: MedplumRequestOptions): Promise<OvokTranslationResponse>;
79
+ /** Creates an AI chat session (`POST /ai/session`). */
47
80
  export declare function createChatSession(this: OvokClient, body: OvokCreateChatSession, requestOptions?: MedplumRequestOptions): Promise<OvokChatSession>;
81
+ /** Sends a message in an AI chat session (`POST /ai/session/{sessionId}/message`). */
48
82
  export declare function sendChatMessage(this: OvokClient, sessionId: string, body: OvokChatMessageInput, requestOptions?: MedplumRequestOptions): Promise<OvokChatMessage>;
83
+ /** Lists AI chat sessions (`GET /ai/session`). */
49
84
  export declare function listChatSessions(this: OvokClient, params?: OvokChatSessionQuery, requestOptions?: MedplumRequestOptions): Promise<OvokChatSessionsResponse>;
85
+ /** Reads an AI chat session (`GET /ai/session/{sessionId}`). */
50
86
  export declare function getChatSession(this: OvokClient, sessionId: string, params?: {
51
87
  messageCount?: number;
52
88
  }, requestOptions?: MedplumRequestOptions): Promise<OvokChatSession>;
89
+ /** Lists the messages of an AI chat session (`GET /ai/session/{sessionId}/message`). */
53
90
  export declare function listChatMessages(this: OvokClient, sessionId: string, params?: OvokChatMessageQuery, requestOptions?: MedplumRequestOptions): Promise<OvokChatMessagesResponse>;
91
+ /** Runs an AI FHIR search with an untyped body (`POST /ai/fhir/search`). */
54
92
  export declare function searchAIFhir(this: OvokClient, request: Record<string, unknown>, requestOptions?: MedplumRequestOptions): Promise<Record<string, unknown>>;