@ovok/core 0.4.49-dev.504 → 0.4.49-dev.515

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 (391) hide show
  1. package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +3 -1
  2. package/dist/client/ai-fhir/methods/AIFhirResources.js +3 -1
  3. package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +8 -0
  4. package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +8 -0
  5. package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +5 -0
  6. package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +6 -0
  7. package/dist/client/auth/errors.d.ts +15 -2
  8. package/dist/client/auth/errors.js +12 -2
  9. package/dist/client/auth/methods/appleLogin.d.ts +1 -0
  10. package/dist/client/auth/methods/appleLogin.js +1 -0
  11. package/dist/client/auth/methods/changePassword.d.ts +1 -0
  12. package/dist/client/auth/methods/changePassword.js +1 -0
  13. package/dist/client/auth/methods/googleLogin.d.ts +1 -0
  14. package/dist/client/auth/methods/googleLogin.js +1 -0
  15. package/dist/client/auth/methods/login.d.ts +6 -0
  16. package/dist/client/auth/methods/login.js +6 -0
  17. package/dist/client/auth/methods/register.d.ts +5 -0
  18. package/dist/client/auth/methods/register.js +5 -0
  19. package/dist/client/auth/methods/registerPractitioner.d.ts +5 -0
  20. package/dist/client/auth/methods/registerPractitioner.js +5 -0
  21. package/dist/client/auth/methods/reloadSession.d.ts +3 -0
  22. package/dist/client/auth/methods/requestDeleteUser.d.ts +4 -5
  23. package/dist/client/auth/methods/requestDeleteUser.js +4 -5
  24. package/dist/client/auth/methods/setPasswordFromReset.d.ts +1 -0
  25. package/dist/client/auth/methods/setPasswordFromReset.js +1 -0
  26. package/dist/client/auth/session-fetch.d.ts +11 -0
  27. package/dist/client/auth/types/Account.d.ts +8 -1
  28. package/dist/client/auth/types/AppleLoginBody.d.ts +16 -0
  29. package/dist/client/auth/types/AppleLoginBody.js +5 -0
  30. package/dist/client/auth/types/AuthResponse.d.ts +12 -0
  31. package/dist/client/auth/types/ChangePasswordBody.d.ts +7 -0
  32. package/dist/client/auth/types/ChangePasswordResponse.d.ts +5 -0
  33. package/dist/client/auth/types/CompletePasswordResetBody.d.ts +8 -0
  34. package/dist/client/auth/types/GoogleLoginBody.d.ts +5 -0
  35. package/dist/client/auth/types/LoginBody.d.ts +15 -1
  36. package/dist/client/auth/types/LoginError.d.ts +21 -2
  37. package/dist/client/auth/types/LoginError.js +8 -2
  38. package/dist/client/auth/types/LoginResponse.d.ts +8 -1
  39. package/dist/client/auth/types/RegisterBody.d.ts +12 -0
  40. package/dist/client/auth/types/RegisterPractitionerBody.d.ts +5 -0
  41. package/dist/client/auth/types/RegisterResponse.d.ts +7 -0
  42. package/dist/client/auth/types/RequestDeleteUserBody.d.ts +7 -7
  43. package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +14 -0
  44. package/dist/client/auth/types/ResetPasswordBody.d.ts +5 -0
  45. package/dist/client/auth/types/Session.d.ts +14 -2
  46. package/dist/client/change-history/methods.d.ts +6 -0
  47. package/dist/client/change-history/methods.js +6 -0
  48. package/dist/client/change-history/types.d.ts +82 -0
  49. package/dist/client/chat/ai/methods/createAiSession.d.ts +6 -0
  50. package/dist/client/chat/ai/methods/createAiSession.js +6 -0
  51. package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +17 -0
  52. package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
  53. package/dist/client/cms/locale.d.ts +12 -2
  54. package/dist/client/cms/locale.js +9 -2
  55. package/dist/client/cms/methods.d.ts +6 -2
  56. package/dist/client/cms/methods.js +7 -3
  57. package/dist/client/cms/types.d.ts +44 -4
  58. package/dist/client/consent/methods.d.ts +16 -0
  59. package/dist/client/consent/methods.js +16 -0
  60. package/dist/client/consent/types.d.ts +53 -1
  61. package/dist/client/consent/types.js +10 -1
  62. package/dist/client/email/methods.d.ts +3 -0
  63. package/dist/client/email/methods.js +3 -0
  64. package/dist/client/email/types.d.ts +33 -0
  65. package/dist/client/errors/field-errors.d.ts +3 -0
  66. package/dist/client/errors/field-errors.js +3 -0
  67. package/dist/client/errors/ovok-error-utils.d.ts +6 -0
  68. package/dist/client/errors/ovok-error-utils.js +6 -0
  69. package/dist/client/errors/ovok-error.d.ts +36 -4
  70. package/dist/client/errors/ovok-error.js +15 -4
  71. package/dist/client/errors/rate-limit-error.d.ts +11 -2
  72. package/dist/client/errors/rate-limit-error.js +10 -2
  73. package/dist/client/errors/sign-in-required-error.d.ts +5 -2
  74. package/dist/client/errors/sign-in-required-error.js +5 -2
  75. package/dist/client/experience/methods.d.ts +38 -0
  76. package/dist/client/experience/methods.js +35 -0
  77. package/dist/client/experience/types.d.ts +316 -0
  78. package/dist/client/experience/types.js +1 -0
  79. package/dist/client/invites/methods.d.ts +27 -9
  80. package/dist/client/invites/methods.js +27 -9
  81. package/dist/client/invites/parse-accept-invite-link.d.ts +3 -1
  82. package/dist/client/invites/parse-accept-invite-link.js +3 -1
  83. package/dist/client/invites/types.d.ts +55 -0
  84. package/dist/client/invites/types.js +12 -0
  85. package/dist/client/notifications/methods.d.ts +15 -0
  86. package/dist/client/notifications/methods.js +15 -0
  87. package/dist/client/notifications/types.d.ts +249 -2
  88. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +3 -0
  89. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +3 -0
  90. package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +3 -0
  91. package/dist/client/observation/methods/getLatestObservationsByCodes.js +3 -0
  92. package/dist/client/observation/methods/observationsToMeasurements.d.ts +23 -1
  93. package/dist/client/observation/methods/observationsToMeasurements.js +8 -1
  94. package/dist/client/observation/methods/saveMeasurement.d.ts +3 -1
  95. package/dist/client/observation/methods/saveMeasurement.js +3 -1
  96. package/dist/client/observation/observation-bundle-utils.d.ts +6 -0
  97. package/dist/client/observation/observation-bundle-utils.js +6 -0
  98. package/dist/client/observation/series.d.ts +25 -3
  99. package/dist/client/observation/series.js +6 -2
  100. package/dist/client/observation/services/creator.d.ts +5 -0
  101. package/dist/client/observation/services/creator.js +5 -0
  102. package/dist/client/observation/services/uric-acid-service.js +0 -1
  103. package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +10 -0
  104. package/dist/client/observation/types/MeasurementTypeKey.d.ts +26 -0
  105. package/dist/client/observation/types/MeasurementTypeKey.js +26 -0
  106. package/dist/client/observation/types/ObservationCode.d.ts +64 -1
  107. package/dist/client/observation/types/ObservationCode.js +64 -1
  108. package/dist/client/observation/types/UrineAnalytes.d.ts +14 -0
  109. package/dist/client/observation/types/UrineAnalytes.js +1 -0
  110. package/dist/client/observation/types/generate-measurement/Sample.d.ts +33 -0
  111. package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +9 -0
  112. package/dist/client/observation/types/measurement/BabySleepMeasurement.d.ts +3 -0
  113. package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +7 -0
  114. package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
  115. package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +10 -0
  116. package/dist/client/observation/types/measurement/BloodPressureStates.js +10 -0
  117. package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +7 -0
  118. package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +8 -0
  119. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +18 -0
  120. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +18 -0
  121. package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +9 -0
  122. package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +7 -0
  123. package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +7 -0
  124. package/dist/client/observation/types/measurement/LipidPanelMeasurement.d.ts +12 -0
  125. package/dist/client/observation/types/measurement/Measurement.d.ts +9 -0
  126. package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +10 -0
  127. package/dist/client/observation/types/measurement/MeasurementSeries.d.ts +2 -0
  128. package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +10 -0
  129. package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +7 -0
  130. package/dist/client/observation/types/measurement/RespiratoryTherapyMeasurement.d.ts +3 -0
  131. package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +7 -0
  132. package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +23 -0
  133. package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +9 -0
  134. package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +29 -0
  135. package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +7 -0
  136. package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +7 -0
  137. package/dist/client/observation/types/service/MeasurementField.d.ts +5 -1
  138. package/dist/client/observation/utils/getObservationValueDisplay.d.ts +2 -0
  139. package/dist/client/offline/offline-measurement-queue.d.ts +56 -1
  140. package/dist/client/offline/offline-measurement-queue.js +21 -0
  141. package/dist/client/offline/shared-measurement-queue.d.ts +16 -1
  142. package/dist/client/offline/shared-measurement-queue.js +3 -1
  143. package/dist/client/ovok-client.d.ts +27 -6
  144. package/dist/client/ovok-client.js +8 -5
  145. package/dist/client/patient/methods.d.ts +21 -0
  146. package/dist/client/patient/methods.js +21 -0
  147. package/dist/client/patient/types.d.ts +131 -0
  148. package/dist/client/patient-sharing/methods.d.ts +18 -0
  149. package/dist/client/patient-sharing/methods.js +18 -0
  150. package/dist/client/patient-sharing/types.d.ts +89 -1
  151. package/dist/client/platform/methods.d.ts +22 -0
  152. package/dist/client/platform/methods.js +20 -0
  153. package/dist/client/platform/types.d.ts +194 -1
  154. package/dist/client/platform/types.js +24 -0
  155. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
  156. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +3 -0
  157. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.d.ts +3 -0
  158. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +3 -0
  159. package/dist/client/questionnaire-response/methods/populateQuestionnaire.d.ts +3 -0
  160. package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +3 -0
  161. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.d.ts +3 -0
  162. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +3 -0
  163. package/dist/client/questionnaire-response/types.d.ts +6 -0
  164. package/dist/client/signals/errors.d.ts +13 -2
  165. package/dist/client/signals/errors.js +9 -2
  166. package/dist/client/signals/methods.d.ts +9 -0
  167. package/dist/client/signals/methods.js +9 -0
  168. package/dist/client/signals/types.d.ts +31 -0
  169. package/dist/client/slim/methods.d.ts +268 -21
  170. package/dist/client/slim/methods.js +264 -21
  171. package/dist/client/slim/paging.d.ts +22 -2
  172. package/dist/client/slim/paging.js +6 -2
  173. package/dist/client/slim/types.d.ts +920 -1
  174. package/dist/client/storage.d.ts +15 -1
  175. package/dist/client/storage.js +7 -1
  176. package/dist/client/wearables/methods.d.ts +24 -0
  177. package/dist/client/wearables/methods.js +24 -0
  178. package/dist/client/wearables/types.d.ts +74 -0
  179. package/dist/conformance/api-requirements.d.ts +31 -5
  180. package/dist/conformance/api-requirements.js +47 -10
  181. package/dist/conformance/capability-requirements.d.ts +4 -26
  182. package/dist/conformance/capability-requirements.js +5 -27
  183. package/dist/conformance/capability.d.ts +9 -1
  184. package/dist/conformance/capability.js +3 -1
  185. package/dist/hooks/account-hooks.d.ts +35 -0
  186. package/dist/hooks/account-hooks.js +33 -0
  187. package/dist/hooks/api-hooks.d.ts +74 -4
  188. package/dist/hooks/api-hooks.js +56 -4
  189. package/dist/hooks/cms-hooks.d.ts +9 -3
  190. package/dist/hooks/cms-hooks.js +9 -3
  191. package/dist/hooks/email-hooks.d.ts +3 -0
  192. package/dist/hooks/email-hooks.js +3 -0
  193. package/dist/hooks/experience-hooks.d.ts +26 -0
  194. package/dist/hooks/experience-hooks.js +24 -0
  195. package/dist/hooks/index.d.ts +18 -0
  196. package/dist/hooks/index.js +18 -0
  197. package/dist/hooks/invites-hooks.d.ts +21 -2
  198. package/dist/hooks/invites-hooks.js +21 -2
  199. package/dist/hooks/notification-ack-hooks.d.ts +6 -2
  200. package/dist/hooks/notification-ack-hooks.js +6 -2
  201. package/dist/hooks/notification-hooks.d.ts +27 -3
  202. package/dist/hooks/notification-hooks.js +27 -3
  203. package/dist/hooks/notification-note-hooks.d.ts +41 -0
  204. package/dist/hooks/notification-note-hooks.js +33 -0
  205. package/dist/hooks/observation-hooks.d.ts +29 -0
  206. package/dist/hooks/observation-hooks.js +23 -1
  207. package/dist/hooks/patient-hooks.d.ts +53 -0
  208. package/dist/hooks/patient-hooks.js +48 -0
  209. package/dist/hooks/patient-sharing-hooks.d.ts +18 -0
  210. package/dist/hooks/patient-sharing-hooks.js +18 -0
  211. package/dist/hooks/platform-hooks.d.ts +32 -0
  212. package/dist/hooks/platform-hooks.js +23 -0
  213. package/dist/hooks/poll-hooks.d.ts +17 -1
  214. package/dist/hooks/poll-hooks.js +3 -1
  215. package/dist/hooks/signals-hooks.d.ts +3 -0
  216. package/dist/hooks/signals-hooks.js +3 -0
  217. package/dist/hooks/wearables-hooks.d.ts +23 -0
  218. package/dist/hooks/wearables-hooks.js +21 -0
  219. package/dist/next/auth/saved-accounts-store.d.ts +10 -0
  220. package/dist/next/auth/session.d.ts +17 -0
  221. package/dist/next/auth/user-session.d.ts +5 -0
  222. package/dist/next/config/ovok-config.d.ts +45 -0
  223. package/dist/next/errors/ovok-account-error.d.ts +14 -1
  224. package/dist/next/errors/ovok-account-error.js +8 -1
  225. package/dist/next/errors/ovok-errors.d.ts +88 -0
  226. package/dist/next/errors/ovok-errors.js +67 -0
  227. package/dist/next/http/http-client.d.ts +5 -0
  228. package/dist/next/http/transmit.d.ts +7 -0
  229. package/dist/next/http/url.d.ts +10 -0
  230. package/dist/next/ovok.d.ts +31 -1
  231. package/dist/next/ovok.js +5 -1
  232. package/dist/next/paging/page.d.ts +13 -1
  233. package/dist/next/react/context.d.ts +7 -0
  234. package/dist/next/react/context.js +7 -0
  235. package/dist/next/react/index.d.ts +24 -0
  236. package/dist/next/react/index.js +18 -0
  237. package/dist/next/react/query-hooks.d.ts +69 -0
  238. package/dist/next/react/query-hooks.js +31 -0
  239. package/dist/next/resources/accounts/accounts-resource.d.ts +6 -0
  240. package/dist/next/resources/accounts/accounts-resource.js +6 -0
  241. package/dist/next/resources/ai/ai-chat-resource.d.ts +7 -0
  242. package/dist/next/resources/ai/ai-chat-resource.js +5 -0
  243. package/dist/next/resources/ai/ai-resource.d.ts +13 -0
  244. package/dist/next/resources/ai/ai-resource.js +6 -0
  245. package/dist/next/resources/ai/chat-messages-resource.d.ts +7 -0
  246. package/dist/next/resources/ai/chat-messages-resource.js +7 -0
  247. package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
  248. package/dist/next/resources/ai/chat-sessions-resource.js +8 -0
  249. package/dist/next/resources/auth/auth-sessions-resource.d.ts +6 -1
  250. package/dist/next/resources/auth/auth-sessions-resource.js +6 -1
  251. package/dist/next/resources/auth/registration.d.ts +18 -1
  252. package/dist/next/resources/auth/social-login.d.ts +12 -0
  253. package/dist/next/resources/auth-resource.d.ts +54 -1
  254. package/dist/next/resources/auth-resource.js +23 -0
  255. package/dist/next/resources/bots/bots-resource.d.ts +15 -0
  256. package/dist/next/resources/bots/bots-resource.js +5 -0
  257. package/dist/next/resources/cms/cms-delivery.d.ts +14 -2
  258. package/dist/next/resources/cms/cms-documents-resource.d.ts +7 -1
  259. package/dist/next/resources/cms/cms-documents-resource.js +7 -1
  260. package/dist/next/resources/cms/cms-resource.d.ts +7 -0
  261. package/dist/next/resources/cms/cms-resource.js +5 -0
  262. package/dist/next/resources/cms/release-notes-resource.d.ts +6 -0
  263. package/dist/next/resources/cms/release-notes-resource.js +6 -0
  264. package/dist/next/resources/consent/consent-resource.d.ts +22 -0
  265. package/dist/next/resources/consent/consent-resource.js +20 -0
  266. package/dist/next/resources/content/content-resource.d.ts +18 -0
  267. package/dist/next/resources/content/content-resource.js +12 -0
  268. package/dist/next/resources/documents/documents-resource.d.ts +24 -0
  269. package/dist/next/resources/documents/documents-resource.js +10 -0
  270. package/dist/next/resources/email/email-resource.d.ts +6 -0
  271. package/dist/next/resources/email/email-resource.js +5 -0
  272. package/dist/next/resources/email/email-templates-resource.d.ts +6 -0
  273. package/dist/next/resources/email/email-templates-resource.js +6 -0
  274. package/dist/next/resources/fhir-resource.d.ts +36 -0
  275. package/dist/next/resources/fhir-resource.js +21 -0
  276. package/dist/next/resources/health-resource.d.ts +16 -0
  277. package/dist/next/resources/health-resource.js +5 -0
  278. package/dist/next/resources/invites/invite-flow-resource.d.ts +7 -1
  279. package/dist/next/resources/invites/invite-flow-resource.js +7 -1
  280. package/dist/next/resources/invites/invites-resource.d.ts +15 -0
  281. package/dist/next/resources/invites/invites-resource.js +5 -0
  282. package/dist/next/resources/localization/i18next-resource.d.ts +6 -0
  283. package/dist/next/resources/localization/i18next-resource.js +6 -0
  284. package/dist/next/resources/localization/locales-resource.d.ts +7 -0
  285. package/dist/next/resources/localization/locales-resource.js +7 -0
  286. package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
  287. package/dist/next/resources/localization/localizations-resource.js +9 -0
  288. package/dist/next/resources/measurements/measurements-resource.d.ts +53 -1
  289. package/dist/next/resources/measurements/measurements-resource.js +14 -0
  290. package/dist/next/resources/measurements/observation-builder.d.ts +5 -0
  291. package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +32 -0
  292. package/dist/next/resources/patient/fhir-records.d.ts +19 -1
  293. package/dist/next/resources/patient/fhir-records.js +19 -1
  294. package/dist/next/resources/patient/patient-resource.d.ts +15 -0
  295. package/dist/next/resources/patient/patient-resource.js +6 -0
  296. package/dist/next/resources/projects/project-features-resource.d.ts +7 -0
  297. package/dist/next/resources/projects/project-features-resource.js +7 -0
  298. package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
  299. package/dist/next/resources/projects/project-members-resource.js +9 -0
  300. package/dist/next/resources/projects/project-settings-resource.d.ts +8 -0
  301. package/dist/next/resources/projects/project-settings-resource.js +8 -0
  302. package/dist/next/resources/projects/projects-resource.d.ts +15 -0
  303. package/dist/next/resources/projects/projects-resource.js +5 -0
  304. package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +13 -0
  305. package/dist/next/resources/questionnaires/questionnaires-resource.js +13 -0
  306. package/dist/next/resources/realtime/realtime-resource.d.ts +11 -0
  307. package/dist/next/resources/realtime/realtime-resource.js +11 -0
  308. package/dist/next/resources/realtime/realtime-types.d.ts +16 -0
  309. package/dist/next/resources/session/saved-accounts-resource.d.ts +16 -0
  310. package/dist/next/resources/session/saved-accounts-resource.js +16 -0
  311. package/dist/next/resources/session/session-resource.d.ts +8 -0
  312. package/dist/next/resources/session/session-resource.js +7 -0
  313. package/dist/next/resources/sharing/sharing-invites-resource.d.ts +7 -0
  314. package/dist/next/resources/sharing/sharing-invites-resource.js +7 -0
  315. package/dist/next/resources/sharing/sharing-resource.d.ts +8 -0
  316. package/dist/next/resources/sharing/sharing-resource.js +5 -0
  317. package/dist/next/resources/sharing/sharing-settings-resource.d.ts +7 -0
  318. package/dist/next/resources/sharing/sharing-settings-resource.js +7 -0
  319. package/dist/next/resources/sharing/sharing-shares-resource.d.ts +7 -0
  320. package/dist/next/resources/sharing/sharing-shares-resource.js +7 -0
  321. package/dist/next/resources/signals/signals-gateway-resource.d.ts +15 -0
  322. package/dist/next/resources/signals/signals-gateway-resource.js +6 -0
  323. package/dist/next/resources/signals/signals-resource.d.ts +7 -0
  324. package/dist/next/resources/signals/signals-resource.js +5 -0
  325. package/dist/next/resources/signals/undeliverable-resource.d.ts +35 -0
  326. package/dist/next/resources/signals/undeliverable-resource.js +6 -0
  327. package/dist/next/resources/slim/slim-alarms-resource.d.ts +7 -0
  328. package/dist/next/resources/slim/slim-alarms-resource.js +7 -0
  329. package/dist/next/resources/slim/slim-change-history-resource.d.ts +6 -0
  330. package/dist/next/resources/slim/slim-change-history-resource.js +6 -0
  331. package/dist/next/resources/slim/slim-child-projects-resource.d.ts +21 -0
  332. package/dist/next/resources/slim/slim-child-projects-resource.js +8 -0
  333. package/dist/next/resources/slim/slim-devices-resource.d.ts +31 -0
  334. package/dist/next/resources/slim/slim-devices-resource.js +16 -0
  335. package/dist/next/resources/slim/slim-exports-resource.d.ts +6 -0
  336. package/dist/next/resources/slim/slim-exports-resource.js +6 -0
  337. package/dist/next/resources/slim/slim-locations-resource.d.ts +9 -0
  338. package/dist/next/resources/slim/slim-locations-resource.js +9 -0
  339. package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +6 -0
  340. package/dist/next/resources/slim/slim-medical-notifications-resource.js +6 -0
  341. package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +10 -0
  342. package/dist/next/resources/slim/slim-notification-notes-resource.js +10 -0
  343. package/dist/next/resources/slim/slim-notifications-resource.d.ts +10 -0
  344. package/dist/next/resources/slim/slim-notifications-resource.js +6 -0
  345. package/dist/next/resources/slim/slim-organizations-resource.d.ts +9 -0
  346. package/dist/next/resources/slim/slim-organizations-resource.js +9 -0
  347. package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +12 -0
  348. package/dist/next/resources/slim/slim-out-of-bed-resource.js +7 -0
  349. package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +6 -0
  350. package/dist/next/resources/slim/slim-patient-thresholds-resource.js +6 -0
  351. package/dist/next/resources/slim/slim-patients-resource.d.ts +11 -0
  352. package/dist/next/resources/slim/slim-patients-resource.js +10 -0
  353. package/dist/next/resources/slim/slim-policies-resource.d.ts +10 -0
  354. package/dist/next/resources/slim/slim-policies-resource.js +10 -0
  355. package/dist/next/resources/slim/slim-practitioners-resource.d.ts +6 -0
  356. package/dist/next/resources/slim/slim-practitioners-resource.js +6 -0
  357. package/dist/next/resources/slim/slim-projects-resource.d.ts +12 -0
  358. package/dist/next/resources/slim/slim-projects-resource.js +11 -0
  359. package/dist/next/resources/slim/slim-queries.d.ts +51 -0
  360. package/dist/next/resources/slim/slim-resource.d.ts +21 -0
  361. package/dist/next/resources/slim/slim-resource.js +6 -0
  362. package/dist/next/resources/slim/slim-sleep-resource.d.ts +6 -0
  363. package/dist/next/resources/slim/slim-sleep-resource.js +6 -0
  364. package/dist/next/resources/slim/slim-thresholds-resource.d.ts +5 -0
  365. package/dist/next/resources/slim/slim-thresholds-resource.js +5 -0
  366. package/dist/next/resources/slim/slim-trends-resource.d.ts +6 -0
  367. package/dist/next/resources/slim/slim-trends-resource.js +6 -0
  368. package/dist/next/resources/slim/slim-users-resource.d.ts +12 -0
  369. package/dist/next/resources/slim/slim-users-resource.js +6 -0
  370. package/dist/next/resources/slim/slim-zones-resource.d.ts +8 -0
  371. package/dist/next/resources/slim/slim-zones-resource.js +8 -0
  372. package/dist/next/resources/video-calls/video-call-access-resource.d.ts +13 -0
  373. package/dist/next/resources/video-calls/video-call-access-resource.js +8 -0
  374. package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +8 -0
  375. package/dist/next/resources/video-calls/video-call-appointments-resource.js +8 -0
  376. package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +8 -0
  377. package/dist/next/resources/video-calls/video-call-emails-resource.js +8 -0
  378. package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
  379. package/dist/next/resources/video-calls/video-calls-resource.js +6 -0
  380. package/dist/next/resources/wearables/wearable-connections-resource.d.ts +8 -0
  381. package/dist/next/resources/wearables/wearable-connections-resource.js +8 -0
  382. package/dist/next/resources/wearables/wearable-providers-resource.d.ts +10 -0
  383. package/dist/next/resources/wearables/wearable-providers-resource.js +10 -0
  384. package/dist/next/resources/wearables/wearables-resource.d.ts +7 -0
  385. package/dist/next/resources/wearables/wearables-resource.js +5 -0
  386. package/dist/next/storage/ovok-storage.d.ts +16 -0
  387. package/dist/next/storage/ovok-storage.js +8 -0
  388. package/dist/types/ValidationError.d.ts +9 -0
  389. package/dist/utils/patch/getPatchOperationType.d.ts +3 -0
  390. package/dist/utils/patch/getPatchOperationType.js +3 -0
  391. package/package.json +5 -2
@@ -5,6 +5,11 @@ const query_string_1 = require("../../../client/query-string");
5
5
  const auth_resource_1 = require("../auth-resource");
6
6
  const fhir_records_1 = require("./fhir-records");
7
7
  const LATEST_OBSERVATIONS_PATH = "fhir/Observation/$lastn";
8
+ /**
9
+ * The signed-in patient's own records.
10
+ *
11
+ * @category patient
12
+ */
8
13
  class PatientResource {
9
14
  constructor(http, fhir) {
10
15
  this.http = http;
@@ -18,6 +23,7 @@ class PatientResource {
18
23
  this.devices = new fhir_records_1.FhirRecordsResource(fhir, "Device");
19
24
  this.notifications = new fhir_records_1.FhirRecordsResource(fhir, "CommunicationRequest");
20
25
  }
26
+ /** Reads the latest observations. Calls `GET fhir/Observation/$lastn`. */
21
27
  latestObservations(params = {}, options) {
22
28
  const { patient, max, code } = params;
23
29
  return this.http.get(`${LATEST_OBSERVATIONS_PATH}${(0, query_string_1.toQueryString)({ patient, max, code })}`, options);
@@ -1,9 +1,16 @@
1
1
  import type { OvokProjectFeature, OvokProjectFeatures } from "../../../client/platform/types";
2
2
  import { HttpClient } from "../../http/http-client";
3
3
  import { RequestOptions } from "../../http/transmit";
4
+ /**
5
+ * Features enabled on the current project.
6
+ *
7
+ * @category projects
8
+ */
4
9
  export declare class ProjectFeaturesResource {
5
10
  private readonly http;
6
11
  constructor(http: HttpClient);
12
+ /** Reads the project's features. Calls `GET v1/projects/me/features`. */
7
13
  retrieve(options?: RequestOptions): Promise<OvokProjectFeatures>;
14
+ /** Updates the project's features. Calls `PATCH v1/projects/me/features`. */
8
15
  update(features: OvokProjectFeature[], options?: RequestOptions): Promise<OvokProjectFeatures>;
9
16
  }
@@ -2,13 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProjectFeaturesResource = void 0;
4
4
  const FEATURES_PATH = "v1/projects/me/features";
5
+ /**
6
+ * Features enabled on the current project.
7
+ *
8
+ * @category projects
9
+ */
5
10
  class ProjectFeaturesResource {
6
11
  constructor(http) {
7
12
  this.http = http;
8
13
  }
14
+ /** Reads the project's features. Calls `GET v1/projects/me/features`. */
9
15
  retrieve(options) {
10
16
  return this.http.get(FEATURES_PATH, options);
11
17
  }
18
+ /** Updates the project's features. Calls `PATCH v1/projects/me/features`. */
12
19
  update(features, options) {
13
20
  const body = { features };
14
21
  return this.http.patch(FEATURES_PATH, body, options);
@@ -2,18 +2,37 @@ import type { OvokInviteProjectMember, OvokProjectMember, OvokProjectMemberRespo
2
2
  import { HttpClient } from "../../http/http-client";
3
3
  import { RequestOptions } from "../../http/transmit";
4
4
  import { PagePromise } from "../../paging/page";
5
+ /**
6
+ * Filters and paging for listing project members.
7
+ *
8
+ * @category projects
9
+ */
5
10
  export type ProjectMemberListQuery = {
11
+ /** Only members with this access policy. */
6
12
  accessPolicyId?: string;
13
+ /** Only the member with this profile id. */
7
14
  profileId?: string;
15
+ /** Only the member with this user id. */
8
16
  userId?: string;
17
+ /** Page number to fetch. */
9
18
  page?: number;
19
+ /** Members per page. */
10
20
  count?: number;
11
21
  };
22
+ /**
23
+ * Members of the current project.
24
+ *
25
+ * @category projects
26
+ */
12
27
  export declare class ProjectMembersResource {
13
28
  private readonly http;
14
29
  constructor(http: HttpClient);
30
+ /** Lists project members page by page. Calls `GET v1/projects/me/members`. */
15
31
  list(query?: ProjectMemberListQuery, options?: RequestOptions): PagePromise<OvokProjectMember>;
32
+ /** Invites a member to the project. Calls `POST v1/projects/me/members`. */
16
33
  invite(body: OvokInviteProjectMember, options?: RequestOptions): Promise<OvokProjectMemberResponse>;
34
+ /** Updates a membership. Calls `PATCH v1/projects/me/members/{membershipId}`. */
17
35
  update(membershipId: string, body: OvokUpdateProjectMember, options?: RequestOptions): Promise<OvokProjectMemberResponse>;
36
+ /** Removes a member from the project. Calls `DELETE v1/projects/me/members/{membershipId}`. */
18
37
  remove(membershipId: string, options?: RequestOptions): Promise<OvokRemoveProjectMemberResponse>;
19
38
  }
@@ -5,19 +5,28 @@ const url_1 = require("../../http/url");
5
5
  const numbered_pages_1 = require("../../paging/numbered-pages");
6
6
  const MEMBERS_PATH = "v1/projects/me/members";
7
7
  const memberPath = (membershipId) => `${MEMBERS_PATH}/${(0, url_1.pathSegment)(membershipId)}`;
8
+ /**
9
+ * Members of the current project.
10
+ *
11
+ * @category projects
12
+ */
8
13
  class ProjectMembersResource {
9
14
  constructor(http) {
10
15
  this.http = http;
11
16
  }
17
+ /** Lists project members page by page. Calls `GET v1/projects/me/members`. */
12
18
  list(query = {}, options) {
13
19
  return (0, numbered_pages_1.numberedRoutePages)((path) => this.http.get(path, options), MEMBERS_PATH, query);
14
20
  }
21
+ /** Invites a member to the project. Calls `POST v1/projects/me/members`. */
15
22
  invite(body, options) {
16
23
  return this.http.post(MEMBERS_PATH, body, options);
17
24
  }
25
+ /** Updates a membership. Calls `PATCH v1/projects/me/members/{membershipId}`. */
18
26
  update(membershipId, body, options) {
19
27
  return this.http.patch(memberPath(membershipId), body, options);
20
28
  }
29
+ /** Removes a member from the project. Calls `DELETE v1/projects/me/members/{membershipId}`. */
21
30
  remove(membershipId, options) {
22
31
  return this.http.delete(memberPath(membershipId), options);
23
32
  }
@@ -1,10 +1,18 @@
1
1
  import type { OvokProjectSettingKey, OvokProjectSettings, OvokProjectTextSettingKey } from "../../../client/platform/types";
2
2
  import { HttpClient } from "../../http/http-client";
3
3
  import { RequestOptions } from "../../http/transmit";
4
+ /**
5
+ * Settings of the current project.
6
+ *
7
+ * @category projects
8
+ */
4
9
  export declare class ProjectSettingsResource {
5
10
  private readonly http;
6
11
  constructor(http: HttpClient);
12
+ /** Reads all project settings. Calls `GET v1/project/settings`. */
7
13
  retrieve(options?: RequestOptions): Promise<OvokProjectSettings>;
14
+ /** Turns a project setting on or off. Calls `PUT v1/project/settings/{key}`. */
8
15
  update(key: OvokProjectSettingKey, enabled: boolean, options?: RequestOptions): Promise<OvokProjectSettings>;
16
+ /** Sets or clears a text setting. Calls `PUT v1/project/settings/values/{key}`. */
9
17
  updateText(key: OvokProjectTextSettingKey, value: string | null, options?: RequestOptions): Promise<OvokProjectSettings>;
10
18
  }
@@ -4,16 +4,24 @@ exports.ProjectSettingsResource = void 0;
4
4
  const url_1 = require("../../http/url");
5
5
  const SETTINGS_PATH = "v1/project/settings";
6
6
  const TEXT_SETTINGS_PATH = `${SETTINGS_PATH}/values`;
7
+ /**
8
+ * Settings of the current project.
9
+ *
10
+ * @category projects
11
+ */
7
12
  class ProjectSettingsResource {
8
13
  constructor(http) {
9
14
  this.http = http;
10
15
  }
16
+ /** Reads all project settings. Calls `GET v1/project/settings`. */
11
17
  retrieve(options) {
12
18
  return this.http.get(SETTINGS_PATH, options);
13
19
  }
20
+ /** Turns a project setting on or off. Calls `PUT v1/project/settings/{key}`. */
14
21
  update(key, enabled, options) {
15
22
  return this.http.put(`${SETTINGS_PATH}/${(0, url_1.pathSegment)(key)}`, { enabled }, options);
16
23
  }
24
+ /** Sets or clears a text setting. Calls `PUT v1/project/settings/values/{key}`. */
17
25
  updateText(key, value, options) {
18
26
  return this.http.put(`${TEXT_SETTINGS_PATH}/${(0, url_1.pathSegment)(key)}`, { value }, options);
19
27
  }
@@ -5,14 +5,29 @@ import { PagePromise } from "../../paging/page";
5
5
  import { ProjectFeaturesResource } from "./project-features-resource";
6
6
  import { ProjectMembersResource } from "./project-members-resource";
7
7
  import { ProjectSettingsResource } from "./project-settings-resource";
8
+ /**
9
+ * Paging for listing administered projects.
10
+ *
11
+ * @category projects
12
+ */
8
13
  export type ProjectListQuery = {
14
+ /** Page number to fetch. */
9
15
  page?: number;
16
+ /** Projects per page. */
10
17
  count?: number;
11
18
  };
19
+ /**
20
+ * The projects the signed-in user administers, with their members, features and settings.
21
+ *
22
+ * @category projects
23
+ */
12
24
  export declare class ProjectsResource {
13
25
  private readonly http;
26
+ /** Members of the current project. */
14
27
  readonly members: ProjectMembersResource;
28
+ /** Features enabled for the current project. */
15
29
  readonly features: ProjectFeaturesResource;
30
+ /** Settings of the current project. */
16
31
  readonly settings: ProjectSettingsResource;
17
32
  constructor(http: HttpClient);
18
33
  /** The projects the caller administers, wherever they are signed in. */
@@ -6,6 +6,11 @@ const project_features_resource_1 = require("./project-features-resource");
6
6
  const project_members_resource_1 = require("./project-members-resource");
7
7
  const project_settings_resource_1 = require("./project-settings-resource");
8
8
  const PROJECTS_PATH = "v1/projects";
9
+ /**
10
+ * The projects the signed-in user administers, with their members, features and settings.
11
+ *
12
+ * @category projects
13
+ */
9
14
  class ProjectsResource {
10
15
  constructor(http) {
11
16
  this.http = http;
@@ -2,17 +2,30 @@ import type { Bundle, Observation, Parameters, QuestionnaireResponse } from "@me
2
2
  import { HttpClient } from "../../http/http-client";
3
3
  import { RequestOptions } from "../../http/transmit";
4
4
  import { FhirResource } from "../fhir-resource";
5
+ /**
6
+ * Questionnaire operations.
7
+ *
8
+ * @category questionnaires
9
+ */
5
10
  export declare class QuestionnairesResource {
6
11
  private readonly http;
7
12
  constructor(http: HttpClient);
13
+ /** Pre-fills a Questionnaire with `$populate`. Calls `POST fhir/Questionnaire/{questionnaireId}/$populate`. */
8
14
  populate(questionnaireId: string, parameters?: Parameters, options?: RequestOptions): Promise<Parameters>;
9
15
  }
16
+ /**
17
+ * Saves and processes QuestionnaireResponses.
18
+ *
19
+ * @category questionnaires
20
+ */
10
21
  export declare class QuestionnaireResponsesResource {
11
22
  private readonly http;
12
23
  private readonly fhir;
13
24
  constructor(http: HttpClient, fhir: FhirResource);
25
+ /** Saves a QuestionnaireResponse. Calls the FHIR base path as a transaction. */
14
26
  submit(response: QuestionnaireResponse, options?: RequestOptions): Promise<Bundle>;
15
27
  /** One transaction, so the response is never saved without its observations. */
16
28
  submitWithObservations(response: QuestionnaireResponse, observations: Observation[], options?: RequestOptions): Promise<Bundle>;
29
+ /** Runs `$extract` on a stored QuestionnaireResponse. Calls `POST fhir/QuestionnaireResponse/{id}/$extract`. */
17
30
  extract(questionnaireResponseId: string, options?: RequestOptions): Promise<Parameters>;
18
31
  }
@@ -2,20 +2,32 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.QuestionnaireResponsesResource = exports.QuestionnairesResource = void 0;
4
4
  const url_1 = require("../../http/url");
5
+ /**
6
+ * Questionnaire operations.
7
+ *
8
+ * @category questionnaires
9
+ */
5
10
  class QuestionnairesResource {
6
11
  constructor(http) {
7
12
  this.http = http;
8
13
  }
14
+ /** Pre-fills a Questionnaire with `$populate`. Calls `POST fhir/Questionnaire/{questionnaireId}/$populate`. */
9
15
  populate(questionnaireId, parameters = { resourceType: "Parameters", parameter: [] }, options) {
10
16
  return this.http.post(`fhir/Questionnaire/${(0, url_1.pathSegment)(questionnaireId)}/$populate`, parameters, options);
11
17
  }
12
18
  }
13
19
  exports.QuestionnairesResource = QuestionnairesResource;
20
+ /**
21
+ * Saves and processes QuestionnaireResponses.
22
+ *
23
+ * @category questionnaires
24
+ */
14
25
  class QuestionnaireResponsesResource {
15
26
  constructor(http, fhir) {
16
27
  this.http = http;
17
28
  this.fhir = fhir;
18
29
  }
30
+ /** Saves a QuestionnaireResponse. Calls the FHIR base path as a transaction. */
19
31
  submit(response, options) {
20
32
  return this.submitWithObservations(response, [], options);
21
33
  }
@@ -24,6 +36,7 @@ class QuestionnaireResponsesResource {
24
36
  const entry = [createEntry(response), ...observations.map(createEntry)];
25
37
  return this.fhir.batch({ resourceType: "Bundle", type: "transaction", entry }, options);
26
38
  }
39
+ /** Runs `$extract` on a stored QuestionnaireResponse. Calls `POST fhir/QuestionnaireResponse/{id}/$extract`. */
27
40
  extract(questionnaireResponseId, options) {
28
41
  return this.http.post(`fhir/QuestionnaireResponse/${(0, url_1.pathSegment)(questionnaireResponseId)}/$extract`, {}, options);
29
42
  }
@@ -3,11 +3,22 @@ import { FhirResource } from "../fhir-resource";
3
3
  import { SessionResource } from "../session/session-resource";
4
4
  import { RealtimeNotificationHandler, RealtimeUnsubscribe } from "./realtime-types";
5
5
  export type { RealtimeNotification, RealtimeNotificationHandler, RealtimeUnsubscribe, } from "./realtime-types";
6
+ /**
7
+ * Live notifications of resource changes over a websocket.
8
+ *
9
+ * @category realtime
10
+ */
6
11
  export declare class RealtimeResource {
7
12
  private readonly http;
8
13
  private readonly fhir;
9
14
  private readonly baseUrl;
10
15
  private readonly session;
11
16
  constructor(http: HttpClient, fhir: FhirResource, baseUrl: string, session: SessionResource);
17
+ /**
18
+ * Subscribes to resources matching the FHIR search `criteria` and calls `handler` for each change. Creates a `Subscription` resource and opens a websocket.
19
+ *
20
+ * @returns A function that unsubscribes.
21
+ * @throws OvokValidationError when `criteria` is empty.
22
+ */
12
23
  subscribe(criteria: string, handler: RealtimeNotificationHandler): Promise<RealtimeUnsubscribe>;
13
24
  }
@@ -3,6 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RealtimeResource = void 0;
4
4
  const ovok_errors_1 = require("../../errors/ovok-errors");
5
5
  const realtime_connection_1 = require("./realtime-connection");
6
+ /**
7
+ * Live notifications of resource changes over a websocket.
8
+ *
9
+ * @category realtime
10
+ */
6
11
  class RealtimeResource {
7
12
  constructor(http, fhir, baseUrl, session) {
8
13
  this.http = http;
@@ -10,6 +15,12 @@ class RealtimeResource {
10
15
  this.baseUrl = baseUrl;
11
16
  this.session = session;
12
17
  }
18
+ /**
19
+ * Subscribes to resources matching the FHIR search `criteria` and calls `handler` for each change. Creates a `Subscription` resource and opens a websocket.
20
+ *
21
+ * @returns A function that unsubscribes.
22
+ * @throws OvokValidationError when `criteria` is empty.
23
+ */
13
24
  async subscribe(criteria, handler) {
14
25
  if (criteria.trim() === "") {
15
26
  throw new ovok_errors_1.OvokValidationError((0, ovok_errors_1.detailsFor)("A realtime subscription criteria string is required."));
@@ -1,6 +1,22 @@
1
1
  import type { SubscriptionStatus } from "@medplum/fhirtypes";
2
+ /**
3
+ * A notification that a resource matching a subscription changed.
4
+ *
5
+ * @category realtime
6
+ */
2
7
  export type RealtimeNotification = SubscriptionStatus & {
8
+ /** Always `"event-notification"`. */
3
9
  type: "event-notification";
4
10
  };
11
+ /**
12
+ * Callback invoked for each realtime notification.
13
+ *
14
+ * @category realtime
15
+ */
5
16
  export type RealtimeNotificationHandler = (notification: RealtimeNotification) => void;
17
+ /**
18
+ * Ends a realtime subscription.
19
+ *
20
+ * @category realtime
21
+ */
6
22
  export type RealtimeUnsubscribe = () => Promise<void>;
@@ -2,12 +2,28 @@ import { SavedAccount } from "../../auth/saved-accounts-store";
2
2
  import { UserSession } from "../../auth/user-session";
3
3
  import { HttpClient } from "../../http/http-client";
4
4
  import { RequestOptions } from "../../http/transmit";
5
+ /**
6
+ * Accounts saved on this device, for switching between them.
7
+ *
8
+ * @category session
9
+ */
5
10
  export declare class SavedAccountsResource {
6
11
  private readonly http;
7
12
  private readonly session;
8
13
  constructor(http: HttpClient, session: UserSession | null);
14
+ /** Lists the saved accounts, marking the active one. */
9
15
  list(): Promise<SavedAccount[]>;
16
+ /**
17
+ * Makes a saved account the active session.
18
+ *
19
+ * @throws OvokAccountError when the account is missing or its session has expired.
20
+ */
10
21
  switch(accountId: string): Promise<void>;
22
+ /**
23
+ * Signs a saved account out and removes it. Calls `DELETE auth/session/current` for that account unless it has expired.
24
+ *
25
+ * @throws OvokAccountError when the account is not saved.
26
+ */
11
27
  remove(accountId: string, options?: RequestOptions): Promise<void>;
12
28
  private userSession;
13
29
  }
@@ -4,17 +4,33 @@ exports.SavedAccountsResource = void 0;
4
4
  const ovok_account_error_1 = require("../../errors/ovok-account-error");
5
5
  const ovok_errors_1 = require("../../errors/ovok-errors");
6
6
  const CURRENT_SESSION_PATH = "auth/session/current";
7
+ /**
8
+ * Accounts saved on this device, for switching between them.
9
+ *
10
+ * @category session
11
+ */
7
12
  class SavedAccountsResource {
8
13
  constructor(http, session) {
9
14
  this.http = http;
10
15
  this.session = session;
11
16
  }
17
+ /** Lists the saved accounts, marking the active one. */
12
18
  list() {
13
19
  return this.userSession().listSavedAccounts();
14
20
  }
21
+ /**
22
+ * Makes a saved account the active session.
23
+ *
24
+ * @throws OvokAccountError when the account is missing or its session has expired.
25
+ */
15
26
  switch(accountId) {
16
27
  return this.userSession().switchSavedAccount(accountId);
17
28
  }
29
+ /**
30
+ * Signs a saved account out and removes it. Calls `DELETE auth/session/current` for that account unless it has expired.
31
+ *
32
+ * @throws OvokAccountError when the account is not saved.
33
+ */
18
34
  async remove(accountId, options) {
19
35
  const session = this.userSession();
20
36
  const account = await session.getSavedAccount(accountId);
@@ -2,11 +2,19 @@ import type { Session } from "../../auth/session";
2
2
  import type { SessionChangeListener, UserSession } from "../../auth/user-session";
3
3
  import { HttpClient } from "../../http/http-client";
4
4
  import { SavedAccountsResource } from "./saved-accounts-resource";
5
+ /**
6
+ * The current user session and the accounts saved on this device.
7
+ *
8
+ * @category session
9
+ */
5
10
  export declare class SessionResource {
6
11
  private readonly session;
12
+ /** Accounts saved on this device. */
7
13
  readonly savedAccounts: SavedAccountsResource;
8
14
  constructor(http: HttpClient, session: UserSession | null);
15
+ /** Calls `listener` whenever the session starts, changes or ends; returns a function that stops listening. */
9
16
  onChange(listener: SessionChangeListener): () => void;
17
+ /** Returns the current session, or null when signed out. */
10
18
  current(): Promise<Session | null>;
11
19
  }
12
20
  export type { Session };
@@ -2,15 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SessionResource = void 0;
4
4
  const saved_accounts_resource_1 = require("./saved-accounts-resource");
5
+ /**
6
+ * The current user session and the accounts saved on this device.
7
+ *
8
+ * @category session
9
+ */
5
10
  class SessionResource {
6
11
  constructor(http, session) {
7
12
  this.session = session;
8
13
  this.savedAccounts = new saved_accounts_resource_1.SavedAccountsResource(http, session);
9
14
  }
15
+ /** Calls `listener` whenever the session starts, changes or ends; returns a function that stops listening. */
10
16
  onChange(listener) {
11
17
  var _a, _b;
12
18
  return (_b = (_a = this.session) === null || _a === void 0 ? void 0 : _a.onChange(listener)) !== null && _b !== void 0 ? _b : (() => undefined);
13
19
  }
20
+ /** Returns the current session, or null when signed out. */
14
21
  current() {
15
22
  var _a, _b;
16
23
  return (_b = (_a = this.session) === null || _a === void 0 ? void 0 : _a.current()) !== null && _b !== void 0 ? _b : Promise.resolve(null);
@@ -1,9 +1,16 @@
1
1
  import type { CreatePatientSharingInvite, PatientSharingInvite, PatientSharingShare, RedeemPatientSharingInvite } from "../../../client/patient-sharing/types";
2
2
  import { HttpClient } from "../../http/http-client";
3
3
  import { RequestOptions } from "../../http/transmit";
4
+ /**
5
+ * Invites to share a patient's records.
6
+ *
7
+ * @category sharing
8
+ */
4
9
  export declare class SharingInvitesResource {
5
10
  private readonly http;
6
11
  constructor(http: HttpClient);
12
+ /** Creates a sharing invite. Calls `POST v1/patient-sharing/invites`. */
7
13
  create(body: CreatePatientSharingInvite, options?: RequestOptions): Promise<PatientSharingInvite>;
14
+ /** Redeems a sharing invite. Calls `POST v1/patient-sharing/invites/redeem`. */
8
15
  redeem(body: RedeemPatientSharingInvite, options?: RequestOptions): Promise<PatientSharingShare>;
9
16
  }
@@ -3,13 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SharingInvitesResource = void 0;
4
4
  const INVITES_PATH = "v1/patient-sharing/invites";
5
5
  const REDEEM_PATH = `${INVITES_PATH}/redeem`;
6
+ /**
7
+ * Invites to share a patient's records.
8
+ *
9
+ * @category sharing
10
+ */
6
11
  class SharingInvitesResource {
7
12
  constructor(http) {
8
13
  this.http = http;
9
14
  }
15
+ /** Creates a sharing invite. Calls `POST v1/patient-sharing/invites`. */
10
16
  create(body, options) {
11
17
  return this.http.post(INVITES_PATH, body, options);
12
18
  }
19
+ /** Redeems a sharing invite. Calls `POST v1/patient-sharing/invites/redeem`. */
13
20
  redeem(body, options) {
14
21
  return this.http.post(REDEEM_PATH, body, options);
15
22
  }
@@ -2,9 +2,17 @@ import { HttpClient } from "../../http/http-client";
2
2
  import { SharingInvitesResource } from "./sharing-invites-resource";
3
3
  import { SharingSettingsResource } from "./sharing-settings-resource";
4
4
  import { SharingSharesResource } from "./sharing-shares-resource";
5
+ /**
6
+ * Record sharing: invites, shares and sharing settings.
7
+ *
8
+ * @category sharing
9
+ */
5
10
  export declare class SharingResource {
11
+ /** Sharing invites. */
6
12
  readonly invites: SharingInvitesResource;
13
+ /** Active shares. */
7
14
  readonly shares: SharingSharesResource;
15
+ /** Sharing settings. */
8
16
  readonly settings: SharingSettingsResource;
9
17
  constructor(http: HttpClient);
10
18
  }
@@ -4,6 +4,11 @@ exports.SharingResource = void 0;
4
4
  const sharing_invites_resource_1 = require("./sharing-invites-resource");
5
5
  const sharing_settings_resource_1 = require("./sharing-settings-resource");
6
6
  const sharing_shares_resource_1 = require("./sharing-shares-resource");
7
+ /**
8
+ * Record sharing: invites, shares and sharing settings.
9
+ *
10
+ * @category sharing
11
+ */
7
12
  class SharingResource {
8
13
  constructor(http) {
9
14
  this.invites = new sharing_invites_resource_1.SharingInvitesResource(http);
@@ -1,9 +1,16 @@
1
1
  import type { PatientSharingSettings, PatientSharingSettingsUpdate } from "../../../client/patient-sharing/types";
2
2
  import { HttpClient } from "../../http/http-client";
3
3
  import { RequestOptions } from "../../http/transmit";
4
+ /**
5
+ * Patient sharing settings.
6
+ *
7
+ * @category sharing
8
+ */
4
9
  export declare class SharingSettingsResource {
5
10
  private readonly http;
6
11
  constructor(http: HttpClient);
12
+ /** Reads the sharing settings. Calls `GET v1/patient-sharing/settings`. */
7
13
  retrieve(options?: RequestOptions): Promise<PatientSharingSettings>;
14
+ /** Replaces the sharing settings. Calls `PUT v1/patient-sharing/settings`. */
8
15
  update(settings: PatientSharingSettingsUpdate, options?: RequestOptions): Promise<PatientSharingSettings>;
9
16
  }
@@ -2,13 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SharingSettingsResource = void 0;
4
4
  const SETTINGS_PATH = "v1/patient-sharing/settings";
5
+ /**
6
+ * Patient sharing settings.
7
+ *
8
+ * @category sharing
9
+ */
5
10
  class SharingSettingsResource {
6
11
  constructor(http) {
7
12
  this.http = http;
8
13
  }
14
+ /** Reads the sharing settings. Calls `GET v1/patient-sharing/settings`. */
9
15
  retrieve(options) {
10
16
  return this.http.get(SETTINGS_PATH, options);
11
17
  }
18
+ /** Replaces the sharing settings. Calls `PUT v1/patient-sharing/settings`. */
12
19
  update(settings, options) {
13
20
  return this.http.put(SETTINGS_PATH, settings, options);
14
21
  }
@@ -1,9 +1,16 @@
1
1
  import type { PatientSharingShares } from "../../../client/patient-sharing/types";
2
2
  import { HttpClient } from "../../http/http-client";
3
3
  import { RequestOptions } from "../../http/transmit";
4
+ /**
5
+ * Patient data shares the signed-in user gave and received.
6
+ *
7
+ * @category sharing
8
+ */
4
9
  export declare class SharingSharesResource {
5
10
  private readonly http;
6
11
  constructor(http: HttpClient);
12
+ /** Lists shares, given and received. Calls `GET v1/patient-sharing/shares`. */
7
13
  list(options?: RequestOptions): Promise<PatientSharingShares>;
14
+ /** Revokes a share. Calls `DELETE v1/patient-sharing/shares/{consentId}`. */
8
15
  revoke(consentId: string, options?: RequestOptions): Promise<void>;
9
16
  }
@@ -13,13 +13,20 @@ const withEveryGroup = (shares) => {
13
13
  received: (_c = shares.received) !== null && _c !== void 0 ? _c : [],
14
14
  });
15
15
  };
16
+ /**
17
+ * Patient data shares the signed-in user gave and received.
18
+ *
19
+ * @category sharing
20
+ */
16
21
  class SharingSharesResource {
17
22
  constructor(http) {
18
23
  this.http = http;
19
24
  }
25
+ /** Lists shares, given and received. Calls `GET v1/patient-sharing/shares`. */
20
26
  async list(options) {
21
27
  return withEveryGroup(await this.http.get(SHARES_PATH, options));
22
28
  }
29
+ /** Revokes a share. Calls `DELETE v1/patient-sharing/shares/{consentId}`. */
23
30
  revoke(consentId, options) {
24
31
  return this.http.delete(`${SHARES_PATH}/${(0, url_1.pathSegment)(consentId)}`, options);
25
32
  }
@@ -1,14 +1,29 @@
1
1
  import { HttpClient, HttpMethod } from "../../http/http-client";
2
2
  import { RequestOptions } from "../../http/transmit";
3
3
  import { QueryParams } from "../../http/url";
4
+ /**
5
+ * A request to forward to the Signals API.
6
+ *
7
+ * @category signals
8
+ */
4
9
  export type SignalsGatewayRequest = {
10
+ /** HTTP method. */
5
11
  method: HttpMethod;
12
+ /** Path segments after `v1/signals/api`; each must be non-empty and free of slashes and control characters. */
6
13
  path: readonly string[];
14
+ /** Query parameters. */
7
15
  query?: QueryParams;
16
+ /** JSON request body. */
8
17
  body?: unknown;
9
18
  };
19
+ /**
20
+ * Gateway to the Signals API.
21
+ *
22
+ * @category signals
23
+ */
10
24
  export declare class SignalsGatewayResource {
11
25
  private readonly http;
12
26
  constructor(http: HttpClient);
27
+ /** Forwards a request to `v1/signals/api/{path}`. */
13
28
  request<T = unknown>(request: SignalsGatewayRequest, options?: RequestOptions): Promise<T>;
14
29
  }