@ovok/core 0.4.49-rc.3 → 0.4.49-rc.5

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 (421) 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/bundle-entry-status.d.ts +3 -0
  90. package/dist/client/observation/bundle-entry-status.js +13 -0
  91. package/dist/client/observation/fhir-systems.d.ts +7 -0
  92. package/dist/client/observation/fhir-systems.js +8 -1
  93. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +3 -0
  94. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +10 -65
  95. package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +3 -0
  96. package/dist/client/observation/methods/getLatestObservationsByCodes.js +3 -0
  97. package/dist/client/observation/methods/observationsToMeasurements.d.ts +23 -1
  98. package/dist/client/observation/methods/observationsToMeasurements.js +72 -12
  99. package/dist/client/observation/methods/saveMeasurement.d.ts +3 -1
  100. package/dist/client/observation/methods/saveMeasurement.js +3 -1
  101. package/dist/client/observation/observation-bundle-utils.d.ts +11 -7
  102. package/dist/client/observation/observation-bundle-utils.js +61 -71
  103. package/dist/client/observation/observation-coding.d.ts +12 -0
  104. package/dist/client/observation/observation-coding.js +69 -0
  105. package/dist/client/observation/observation-groups.d.ts +12 -0
  106. package/dist/client/observation/observation-groups.js +51 -0
  107. package/dist/client/observation/reading-group-backfill.d.ts +13 -0
  108. package/dist/client/observation/reading-group-backfill.js +79 -0
  109. package/dist/client/observation/reading-group.d.ts +14 -0
  110. package/dist/client/observation/reading-group.js +85 -0
  111. package/dist/client/observation/series.d.ts +28 -5
  112. package/dist/client/observation/series.js +16 -6
  113. package/dist/client/observation/services/base-observation-service.d.ts +1 -1
  114. package/dist/client/observation/services/base-observation-service.js +6 -12
  115. package/dist/client/observation/services/blood-pressure.d.ts +2 -0
  116. package/dist/client/observation/services/blood-pressure.js +9 -5
  117. package/dist/client/observation/services/component-observation-services.js +2 -2
  118. package/dist/client/observation/services/creator.d.ts +5 -0
  119. package/dist/client/observation/services/creator.js +5 -0
  120. package/dist/client/observation/services/ecg-observation-fragments.d.ts +4 -0
  121. package/dist/client/observation/services/ecg-observation-fragments.js +30 -37
  122. package/dist/client/observation/services/ecg.d.ts +3 -1
  123. package/dist/client/observation/services/ecg.js +19 -19
  124. package/dist/client/observation/services/uric-acid-service.js +2 -13
  125. package/dist/client/observation/services/urine-analyte-values.d.ts +4 -0
  126. package/dist/client/observation/services/urine-analyte-values.js +27 -0
  127. package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +10 -0
  128. package/dist/client/observation/types/MeasurementTypeKey.d.ts +26 -0
  129. package/dist/client/observation/types/MeasurementTypeKey.js +26 -0
  130. package/dist/client/observation/types/ObservationCode.d.ts +64 -1
  131. package/dist/client/observation/types/ObservationCode.js +64 -1
  132. package/dist/client/observation/types/UrineAnalytes.d.ts +29 -0
  133. package/dist/client/observation/types/UrineAnalytes.js +18 -9
  134. package/dist/client/observation/types/generate-measurement/Sample.d.ts +33 -0
  135. package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +9 -0
  136. package/dist/client/observation/types/measurement/BabySleepMeasurement.d.ts +3 -0
  137. package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +7 -0
  138. package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
  139. package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +10 -0
  140. package/dist/client/observation/types/measurement/BloodPressureStates.js +10 -0
  141. package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +7 -0
  142. package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +8 -0
  143. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +18 -0
  144. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +18 -0
  145. package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +9 -0
  146. package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +7 -0
  147. package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +7 -0
  148. package/dist/client/observation/types/measurement/LipidPanelMeasurement.d.ts +12 -0
  149. package/dist/client/observation/types/measurement/Measurement.d.ts +9 -0
  150. package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +10 -0
  151. package/dist/client/observation/types/measurement/MeasurementSeries.d.ts +2 -0
  152. package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +10 -0
  153. package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +7 -0
  154. package/dist/client/observation/types/measurement/RespiratoryTherapyMeasurement.d.ts +3 -0
  155. package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +7 -0
  156. package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +23 -0
  157. package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +9 -0
  158. package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +29 -0
  159. package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +7 -0
  160. package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +7 -0
  161. package/dist/client/observation/types/service/MeasurementField.d.ts +5 -1
  162. package/dist/client/observation/utils/getDeviceObject.js +15 -32
  163. package/dist/client/observation/utils/getObservationValueDisplay.d.ts +2 -0
  164. package/dist/client/offline/offline-measurement-queue.d.ts +56 -1
  165. package/dist/client/offline/offline-measurement-queue.js +23 -8
  166. package/dist/client/offline/shared-measurement-queue.d.ts +16 -1
  167. package/dist/client/offline/shared-measurement-queue.js +3 -1
  168. package/dist/client/ovok-client.d.ts +28 -6
  169. package/dist/client/ovok-client.js +19 -11
  170. package/dist/client/patient/methods.d.ts +21 -0
  171. package/dist/client/patient/methods.js +21 -0
  172. package/dist/client/patient/types.d.ts +131 -0
  173. package/dist/client/patient-sharing/methods.d.ts +18 -0
  174. package/dist/client/patient-sharing/methods.js +18 -0
  175. package/dist/client/patient-sharing/types.d.ts +89 -1
  176. package/dist/client/platform/methods.d.ts +22 -0
  177. package/dist/client/platform/methods.js +20 -0
  178. package/dist/client/platform/types.d.ts +194 -1
  179. package/dist/client/platform/types.js +24 -0
  180. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
  181. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +3 -0
  182. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.d.ts +3 -0
  183. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +3 -0
  184. package/dist/client/questionnaire-response/methods/populateQuestionnaire.d.ts +3 -0
  185. package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +3 -0
  186. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.d.ts +3 -0
  187. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +3 -0
  188. package/dist/client/questionnaire-response/types.d.ts +6 -0
  189. package/dist/client/signals/errors.d.ts +13 -2
  190. package/dist/client/signals/errors.js +9 -2
  191. package/dist/client/signals/methods.d.ts +9 -0
  192. package/dist/client/signals/methods.js +9 -0
  193. package/dist/client/signals/types.d.ts +31 -0
  194. package/dist/client/slim/methods.d.ts +268 -21
  195. package/dist/client/slim/methods.js +264 -21
  196. package/dist/client/slim/paging.d.ts +22 -2
  197. package/dist/client/slim/paging.js +6 -2
  198. package/dist/client/slim/types.d.ts +920 -1
  199. package/dist/client/storage.d.ts +15 -1
  200. package/dist/client/storage.js +7 -1
  201. package/dist/client/wearables/methods.d.ts +24 -0
  202. package/dist/client/wearables/methods.js +24 -0
  203. package/dist/client/wearables/types.d.ts +74 -0
  204. package/dist/conformance/api-requirements.d.ts +31 -5
  205. package/dist/conformance/api-requirements.js +47 -10
  206. package/dist/conformance/capability-requirements.d.ts +4 -26
  207. package/dist/conformance/capability-requirements.js +5 -27
  208. package/dist/conformance/capability.d.ts +9 -1
  209. package/dist/conformance/capability.js +3 -1
  210. package/dist/hooks/account-hooks.d.ts +35 -0
  211. package/dist/hooks/account-hooks.js +33 -0
  212. package/dist/hooks/api-hooks.d.ts +74 -4
  213. package/dist/hooks/api-hooks.js +56 -4
  214. package/dist/hooks/cms-hooks.d.ts +9 -3
  215. package/dist/hooks/cms-hooks.js +9 -3
  216. package/dist/hooks/email-hooks.d.ts +3 -0
  217. package/dist/hooks/email-hooks.js +3 -0
  218. package/dist/hooks/experience-hooks.d.ts +26 -0
  219. package/dist/hooks/experience-hooks.js +24 -0
  220. package/dist/hooks/index.d.ts +18 -0
  221. package/dist/hooks/index.js +18 -0
  222. package/dist/hooks/invites-hooks.d.ts +21 -2
  223. package/dist/hooks/invites-hooks.js +21 -2
  224. package/dist/hooks/notification-ack-hooks.d.ts +6 -2
  225. package/dist/hooks/notification-ack-hooks.js +6 -2
  226. package/dist/hooks/notification-hooks.d.ts +27 -3
  227. package/dist/hooks/notification-hooks.js +27 -3
  228. package/dist/hooks/notification-note-hooks.d.ts +41 -0
  229. package/dist/hooks/notification-note-hooks.js +33 -0
  230. package/dist/hooks/observation-hooks.d.ts +30 -0
  231. package/dist/hooks/observation-hooks.js +26 -3
  232. package/dist/hooks/patient-hooks.d.ts +53 -0
  233. package/dist/hooks/patient-hooks.js +48 -0
  234. package/dist/hooks/patient-sharing-hooks.d.ts +18 -0
  235. package/dist/hooks/patient-sharing-hooks.js +18 -0
  236. package/dist/hooks/platform-hooks.d.ts +32 -0
  237. package/dist/hooks/platform-hooks.js +23 -0
  238. package/dist/hooks/poll-hooks.d.ts +17 -1
  239. package/dist/hooks/poll-hooks.js +3 -1
  240. package/dist/hooks/signals-hooks.d.ts +3 -0
  241. package/dist/hooks/signals-hooks.js +3 -0
  242. package/dist/hooks/wearables-hooks.d.ts +23 -0
  243. package/dist/hooks/wearables-hooks.js +21 -0
  244. package/dist/index.d.ts +1 -965
  245. package/dist/index.js +1 -71
  246. package/dist/next/auth/saved-accounts-store.d.ts +10 -0
  247. package/dist/next/auth/session.d.ts +17 -0
  248. package/dist/next/auth/user-session.d.ts +5 -0
  249. package/dist/next/config/ovok-config.d.ts +45 -0
  250. package/dist/next/errors/ovok-account-error.d.ts +14 -1
  251. package/dist/next/errors/ovok-account-error.js +8 -1
  252. package/dist/next/errors/ovok-errors.d.ts +88 -0
  253. package/dist/next/errors/ovok-errors.js +67 -0
  254. package/dist/next/http/http-client.d.ts +5 -0
  255. package/dist/next/http/transmit.d.ts +7 -0
  256. package/dist/next/http/url.d.ts +10 -0
  257. package/dist/next/ovok.d.ts +31 -1
  258. package/dist/next/ovok.js +5 -1
  259. package/dist/next/paging/page.d.ts +13 -1
  260. package/dist/next/react/context.d.ts +7 -0
  261. package/dist/next/react/context.js +7 -0
  262. package/dist/next/react/index.d.ts +24 -0
  263. package/dist/next/react/index.js +18 -0
  264. package/dist/next/react/query-hooks.d.ts +69 -0
  265. package/dist/next/react/query-hooks.js +31 -0
  266. package/dist/next/resources/accounts/accounts-resource.d.ts +6 -0
  267. package/dist/next/resources/accounts/accounts-resource.js +6 -0
  268. package/dist/next/resources/ai/ai-chat-resource.d.ts +7 -0
  269. package/dist/next/resources/ai/ai-chat-resource.js +5 -0
  270. package/dist/next/resources/ai/ai-resource.d.ts +13 -0
  271. package/dist/next/resources/ai/ai-resource.js +6 -0
  272. package/dist/next/resources/ai/chat-messages-resource.d.ts +7 -0
  273. package/dist/next/resources/ai/chat-messages-resource.js +7 -0
  274. package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
  275. package/dist/next/resources/ai/chat-sessions-resource.js +8 -0
  276. package/dist/next/resources/auth/auth-sessions-resource.d.ts +6 -1
  277. package/dist/next/resources/auth/auth-sessions-resource.js +6 -1
  278. package/dist/next/resources/auth/registration.d.ts +18 -1
  279. package/dist/next/resources/auth/social-login.d.ts +12 -0
  280. package/dist/next/resources/auth-resource.d.ts +54 -1
  281. package/dist/next/resources/auth-resource.js +23 -0
  282. package/dist/next/resources/bots/bots-resource.d.ts +15 -0
  283. package/dist/next/resources/bots/bots-resource.js +5 -0
  284. package/dist/next/resources/cms/cms-delivery.d.ts +14 -2
  285. package/dist/next/resources/cms/cms-documents-resource.d.ts +7 -1
  286. package/dist/next/resources/cms/cms-documents-resource.js +7 -1
  287. package/dist/next/resources/cms/cms-resource.d.ts +7 -0
  288. package/dist/next/resources/cms/cms-resource.js +5 -0
  289. package/dist/next/resources/cms/release-notes-resource.d.ts +6 -0
  290. package/dist/next/resources/cms/release-notes-resource.js +6 -0
  291. package/dist/next/resources/consent/consent-resource.d.ts +22 -0
  292. package/dist/next/resources/consent/consent-resource.js +20 -0
  293. package/dist/next/resources/content/content-resource.d.ts +18 -0
  294. package/dist/next/resources/content/content-resource.js +12 -0
  295. package/dist/next/resources/documents/documents-resource.d.ts +24 -0
  296. package/dist/next/resources/documents/documents-resource.js +10 -0
  297. package/dist/next/resources/email/email-resource.d.ts +6 -0
  298. package/dist/next/resources/email/email-resource.js +5 -0
  299. package/dist/next/resources/email/email-templates-resource.d.ts +6 -0
  300. package/dist/next/resources/email/email-templates-resource.js +6 -0
  301. package/dist/next/resources/fhir-resource.d.ts +36 -0
  302. package/dist/next/resources/fhir-resource.js +21 -0
  303. package/dist/next/resources/health-resource.d.ts +16 -0
  304. package/dist/next/resources/health-resource.js +5 -0
  305. package/dist/next/resources/invites/invite-flow-resource.d.ts +7 -1
  306. package/dist/next/resources/invites/invite-flow-resource.js +7 -1
  307. package/dist/next/resources/invites/invites-resource.d.ts +15 -0
  308. package/dist/next/resources/invites/invites-resource.js +5 -0
  309. package/dist/next/resources/localization/i18next-resource.d.ts +6 -0
  310. package/dist/next/resources/localization/i18next-resource.js +6 -0
  311. package/dist/next/resources/localization/locales-resource.d.ts +7 -0
  312. package/dist/next/resources/localization/locales-resource.js +7 -0
  313. package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
  314. package/dist/next/resources/localization/localizations-resource.js +9 -0
  315. package/dist/next/resources/measurements/measurements-resource.d.ts +64 -3
  316. package/dist/next/resources/measurements/measurements-resource.js +45 -6
  317. package/dist/next/resources/measurements/observation-builder.d.ts +6 -1
  318. package/dist/next/resources/measurements/observation-builder.js +16 -7
  319. package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +32 -0
  320. package/dist/next/resources/measurements/save-error.js +3 -4
  321. package/dist/next/resources/patient/fhir-records.d.ts +19 -1
  322. package/dist/next/resources/patient/fhir-records.js +19 -1
  323. package/dist/next/resources/patient/patient-resource.d.ts +15 -0
  324. package/dist/next/resources/patient/patient-resource.js +6 -0
  325. package/dist/next/resources/projects/project-features-resource.d.ts +7 -0
  326. package/dist/next/resources/projects/project-features-resource.js +7 -0
  327. package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
  328. package/dist/next/resources/projects/project-members-resource.js +9 -0
  329. package/dist/next/resources/projects/project-settings-resource.d.ts +8 -0
  330. package/dist/next/resources/projects/project-settings-resource.js +8 -0
  331. package/dist/next/resources/projects/projects-resource.d.ts +15 -0
  332. package/dist/next/resources/projects/projects-resource.js +5 -0
  333. package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +13 -0
  334. package/dist/next/resources/questionnaires/questionnaires-resource.js +13 -0
  335. package/dist/next/resources/realtime/realtime-resource.d.ts +11 -0
  336. package/dist/next/resources/realtime/realtime-resource.js +11 -0
  337. package/dist/next/resources/realtime/realtime-socket.js +12 -5
  338. package/dist/next/resources/realtime/realtime-types.d.ts +19 -1
  339. package/dist/next/resources/session/saved-accounts-resource.d.ts +16 -0
  340. package/dist/next/resources/session/saved-accounts-resource.js +16 -0
  341. package/dist/next/resources/session/session-resource.d.ts +8 -0
  342. package/dist/next/resources/session/session-resource.js +7 -0
  343. package/dist/next/resources/sharing/sharing-invites-resource.d.ts +7 -0
  344. package/dist/next/resources/sharing/sharing-invites-resource.js +7 -0
  345. package/dist/next/resources/sharing/sharing-resource.d.ts +8 -0
  346. package/dist/next/resources/sharing/sharing-resource.js +5 -0
  347. package/dist/next/resources/sharing/sharing-settings-resource.d.ts +7 -0
  348. package/dist/next/resources/sharing/sharing-settings-resource.js +7 -0
  349. package/dist/next/resources/sharing/sharing-shares-resource.d.ts +7 -0
  350. package/dist/next/resources/sharing/sharing-shares-resource.js +7 -0
  351. package/dist/next/resources/signals/signals-gateway-resource.d.ts +15 -0
  352. package/dist/next/resources/signals/signals-gateway-resource.js +6 -0
  353. package/dist/next/resources/signals/signals-resource.d.ts +7 -0
  354. package/dist/next/resources/signals/signals-resource.js +5 -0
  355. package/dist/next/resources/signals/undeliverable-resource.d.ts +35 -0
  356. package/dist/next/resources/signals/undeliverable-resource.js +6 -0
  357. package/dist/next/resources/slim/slim-alarms-resource.d.ts +7 -0
  358. package/dist/next/resources/slim/slim-alarms-resource.js +7 -0
  359. package/dist/next/resources/slim/slim-change-history-resource.d.ts +6 -0
  360. package/dist/next/resources/slim/slim-change-history-resource.js +6 -0
  361. package/dist/next/resources/slim/slim-child-projects-resource.d.ts +21 -0
  362. package/dist/next/resources/slim/slim-child-projects-resource.js +8 -0
  363. package/dist/next/resources/slim/slim-devices-resource.d.ts +31 -0
  364. package/dist/next/resources/slim/slim-devices-resource.js +16 -0
  365. package/dist/next/resources/slim/slim-exports-resource.d.ts +6 -0
  366. package/dist/next/resources/slim/slim-exports-resource.js +6 -0
  367. package/dist/next/resources/slim/slim-locations-resource.d.ts +9 -0
  368. package/dist/next/resources/slim/slim-locations-resource.js +9 -0
  369. package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +6 -0
  370. package/dist/next/resources/slim/slim-medical-notifications-resource.js +6 -0
  371. package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +10 -0
  372. package/dist/next/resources/slim/slim-notification-notes-resource.js +10 -0
  373. package/dist/next/resources/slim/slim-notifications-resource.d.ts +10 -0
  374. package/dist/next/resources/slim/slim-notifications-resource.js +6 -0
  375. package/dist/next/resources/slim/slim-organizations-resource.d.ts +9 -0
  376. package/dist/next/resources/slim/slim-organizations-resource.js +9 -0
  377. package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +12 -0
  378. package/dist/next/resources/slim/slim-out-of-bed-resource.js +7 -0
  379. package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +6 -0
  380. package/dist/next/resources/slim/slim-patient-thresholds-resource.js +6 -0
  381. package/dist/next/resources/slim/slim-patients-resource.d.ts +11 -0
  382. package/dist/next/resources/slim/slim-patients-resource.js +10 -0
  383. package/dist/next/resources/slim/slim-policies-resource.d.ts +10 -0
  384. package/dist/next/resources/slim/slim-policies-resource.js +10 -0
  385. package/dist/next/resources/slim/slim-practitioners-resource.d.ts +6 -0
  386. package/dist/next/resources/slim/slim-practitioners-resource.js +6 -0
  387. package/dist/next/resources/slim/slim-projects-resource.d.ts +12 -0
  388. package/dist/next/resources/slim/slim-projects-resource.js +11 -0
  389. package/dist/next/resources/slim/slim-queries.d.ts +51 -0
  390. package/dist/next/resources/slim/slim-resource.d.ts +21 -0
  391. package/dist/next/resources/slim/slim-resource.js +6 -0
  392. package/dist/next/resources/slim/slim-sleep-resource.d.ts +6 -0
  393. package/dist/next/resources/slim/slim-sleep-resource.js +6 -0
  394. package/dist/next/resources/slim/slim-thresholds-resource.d.ts +5 -0
  395. package/dist/next/resources/slim/slim-thresholds-resource.js +5 -0
  396. package/dist/next/resources/slim/slim-trends-resource.d.ts +6 -0
  397. package/dist/next/resources/slim/slim-trends-resource.js +6 -0
  398. package/dist/next/resources/slim/slim-users-resource.d.ts +12 -0
  399. package/dist/next/resources/slim/slim-users-resource.js +6 -0
  400. package/dist/next/resources/slim/slim-zones-resource.d.ts +8 -0
  401. package/dist/next/resources/slim/slim-zones-resource.js +8 -0
  402. package/dist/next/resources/video-calls/video-call-access-resource.d.ts +13 -0
  403. package/dist/next/resources/video-calls/video-call-access-resource.js +8 -0
  404. package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +8 -0
  405. package/dist/next/resources/video-calls/video-call-appointments-resource.js +8 -0
  406. package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +8 -0
  407. package/dist/next/resources/video-calls/video-call-emails-resource.js +8 -0
  408. package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
  409. package/dist/next/resources/video-calls/video-calls-resource.js +6 -0
  410. package/dist/next/resources/wearables/wearable-connections-resource.d.ts +8 -0
  411. package/dist/next/resources/wearables/wearable-connections-resource.js +8 -0
  412. package/dist/next/resources/wearables/wearable-providers-resource.d.ts +10 -0
  413. package/dist/next/resources/wearables/wearable-providers-resource.js +10 -0
  414. package/dist/next/resources/wearables/wearables-resource.d.ts +7 -0
  415. package/dist/next/resources/wearables/wearables-resource.js +5 -0
  416. package/dist/next/storage/ovok-storage.d.ts +16 -0
  417. package/dist/next/storage/ovok-storage.js +8 -0
  418. package/dist/types/ValidationError.d.ts +9 -0
  419. package/dist/utils/patch/getPatchOperationType.d.ts +3 -0
  420. package/dist/utils/patch/getPatchOperationType.js +3 -0
  421. package/package.json +52 -13
@@ -1,86 +1,217 @@
1
1
  import { Appointment, Bundle, CarePlan, CommunicationRequest, Device, Observation, Questionnaire, QuestionnaireResponse, Schedule, Slot } from "@medplum/fhirtypes";
2
+ /**
3
+ * Response of `getCurrentPatientProfile`.
4
+ *
5
+ * @category patient
6
+ */
2
7
  export type OvokCurrentPatientProfile = {
8
+ /** Project the patient belongs to. */
3
9
  project: {
10
+ /** Always `Project`. */
4
11
  resourceType: "Project";
12
+ /** ID of the project. */
5
13
  id: string;
14
+ /** Project name. */
6
15
  name: string;
16
+ /** Whether the project runs in strict mode. */
7
17
  strictMode: boolean;
8
18
  };
19
+ /** The patient's project membership. */
9
20
  membership: {
21
+ /** Always `ProjectMembership`. */
10
22
  resourceType: "ProjectMembership";
23
+ /** ID of the membership. */
11
24
  id: string;
25
+ /** Reference to the user. */
12
26
  user: {
27
+ /** Reference string of the user. */
13
28
  reference: string;
29
+ /** Display name of the user. */
14
30
  display: string;
15
31
  };
16
32
  };
33
+ /** The patient's own Patient resource. */
17
34
  profile: {
35
+ /** Always `Patient`. */
18
36
  resourceType: "Patient";
37
+ /** ID of the patient. */
19
38
  id: string;
39
+ /** Names of the patient. */
20
40
  name: Array<{
41
+ /** Given names. */
21
42
  given: string[];
43
+ /** Family name. */
22
44
  family: string;
23
45
  }>;
46
+ /** Contact points of the patient. */
24
47
  telecom: Array<{
48
+ /** Contact system, such as `email` or `phone`. */
25
49
  system: string;
50
+ /** Contact use, such as `home` or `mobile`. */
26
51
  use: string;
52
+ /** Contact value. */
27
53
  value: string;
28
54
  }>;
29
55
  };
56
+ /** User interface configuration. */
30
57
  config: {
58
+ /** Always `UserConfiguration`. */
31
59
  resourceType: "UserConfiguration";
60
+ /** Menu sections. */
32
61
  menu: Array<{
62
+ /** Menu section title. */
33
63
  title: string;
64
+ /** Links in the menu section. */
34
65
  link: Array<{
66
+ /** Link label. */
35
67
  name: string;
68
+ /** Link target. */
36
69
  target: string;
37
70
  }>;
38
71
  }>;
39
72
  };
73
+ /** The patient's access policy. */
40
74
  accessPolicy: {
75
+ /** Always `AccessPolicy`. */
41
76
  resourceType: "AccessPolicy";
77
+ /** Resource types the policy covers. */
42
78
  resource: Array<{
79
+ /** Resource type the policy covers. */
43
80
  resourceType: string;
44
81
  }>;
82
+ /** IP rules the policy applies. */
45
83
  ipAccessRule: Array<{
84
+ /** IP address or range. */
46
85
  ip: string;
47
86
  }>;
48
87
  };
88
+ /** Security state of the account. */
49
89
  security: {
90
+ /** Whether multi-factor authentication is enrolled. */
50
91
  mfaEnrolled: boolean;
92
+ /** Active sessions. */
51
93
  sessions: Array<{
94
+ /** Session ID. */
52
95
  id: string;
96
+ /** ISO 8601 time the session was last updated. */
53
97
  lastUpdated: string;
98
+ /** Method used to sign in. */
54
99
  authMethod: string;
100
+ /** Remote address the session came from. */
55
101
  remoteAddress: string;
56
102
  }>;
57
103
  };
58
104
  };
105
+ /**
106
+ * Query of `getPatientLatestObservations`.
107
+ *
108
+ * @category patient
109
+ */
59
110
  export type OvokPatientLatestObservationsQuery = {
111
+ /** Patient reference to read observations of. */
60
112
  patient?: string;
113
+ /** Maximum number of observations per code. */
61
114
  max?: number;
115
+ /** Observation code or codes to read. */
62
116
  code?: string | string[];
63
117
  };
118
+ /**
119
+ * Search parameters for scheduling resources.
120
+ *
121
+ * @category patient
122
+ */
64
123
  export type OvokPatientSchedulingQuery = Record<string, string | number | boolean | undefined>;
124
+ /**
125
+ * Search parameters for patient resources.
126
+ *
127
+ * @category patient
128
+ */
65
129
  export type OvokPatientResourceQuery = OvokPatientSchedulingQuery;
130
+ /**
131
+ * Query of `getPatientDashboard`.
132
+ *
133
+ * @category patient
134
+ */
66
135
  export type OvokPatientDashboardQuery = {
136
+ /** Query for the latest observations. */
67
137
  latestObservations?: OvokPatientLatestObservationsQuery;
138
+ /** Query for the measurement history. */
68
139
  measurementHistory?: OvokPatientResourceQuery;
140
+ /** Query for the care plans. */
69
141
  carePlans?: OvokPatientResourceQuery;
70
142
  };
143
+ /**
144
+ * An appointment of the patient.
145
+ *
146
+ * @category patient
147
+ */
71
148
  export type OvokPatientAppointment = Appointment;
149
+ /**
150
+ * A schedule.
151
+ *
152
+ * @category patient
153
+ */
72
154
  export type OvokPatientSchedule = Schedule;
155
+ /**
156
+ * A bookable slot.
157
+ *
158
+ * @category patient
159
+ */
73
160
  export type OvokPatientSlot = Slot;
161
+ /**
162
+ * A measurement, stored as an Observation.
163
+ *
164
+ * @category patient
165
+ */
74
166
  export type OvokPatientMeasurement = Observation;
167
+ /**
168
+ * A care plan.
169
+ *
170
+ * @category patient
171
+ */
75
172
  export type OvokPatientCarePlan = CarePlan;
173
+ /**
174
+ * A device.
175
+ *
176
+ * @category patient
177
+ */
76
178
  export type OvokPatientDevice = Device;
179
+ /**
180
+ * A notification, stored as a CommunicationRequest.
181
+ *
182
+ * @category patient
183
+ */
77
184
  export type OvokPatientNotification = CommunicationRequest;
185
+ /**
186
+ * A questionnaire.
187
+ *
188
+ * @category patient
189
+ */
78
190
  export type OvokPatientQuestionnaire = Questionnaire;
191
+ /**
192
+ * A questionnaire response.
193
+ *
194
+ * @category patient
195
+ */
79
196
  export type OvokPatientQuestionnaireResponse = QuestionnaireResponse;
197
+ /**
198
+ * Response of `getPatientDashboard`.
199
+ *
200
+ * @category patient
201
+ */
80
202
  export type OvokPatientDashboard = {
203
+ /** The patient's profile. */
81
204
  profile: OvokCurrentPatientProfile;
205
+ /** Latest observations per code. */
82
206
  latestObservations: OvokPatientObservationBundle;
207
+ /** Measurement history. */
83
208
  measurementHistory: OvokPatientMeasurement[];
209
+ /** Care plans. */
84
210
  carePlans: OvokPatientCarePlan[];
85
211
  };
212
+ /**
213
+ * Bundle of Observations.
214
+ *
215
+ * @category patient
216
+ */
86
217
  export type OvokPatientObservationBundle = Bundle<Observation>;
@@ -1,9 +1,27 @@
1
1
  import type { MedplumRequestOptions } from "@medplum/core";
2
2
  import { OvokClient } from "../ovok-client";
3
3
  import { CreatePatientSharingInvite, PatientSharingInvite, PatientSharingSettings, PatientSharingShare, PatientSharingShares, RedeemPatientSharingInvite, PatientSharingSettingsUpdate } from "./types";
4
+ /**
5
+ * Creates an invite that lets another patient receive the given observation codes, via `POST /v1/patient-sharing/invites`.
6
+ */
4
7
  export declare function createPatientSharingInvite(this: OvokClient, body: CreatePatientSharingInvite, requestOptions?: MedplumRequestOptions): Promise<PatientSharingInvite>;
8
+ /**
9
+ * Redeems a patient sharing invite, via `POST /v1/patient-sharing/invites/redeem`.
10
+ */
5
11
  export declare function redeemPatientSharingInvite(this: OvokClient, body: RedeemPatientSharingInvite, requestOptions?: MedplumRequestOptions): Promise<PatientSharingShare>;
12
+ /**
13
+ * Lists the signed-in user's shares from `GET /v1/patient-sharing/shares`; absent lists come back empty.
14
+ */
6
15
  export declare function listPatientSharing(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<PatientSharingShares>;
16
+ /**
17
+ * Revokes a share by Consent ID, via `DELETE /v1/patient-sharing/shares/{consentId}`.
18
+ */
7
19
  export declare function revokePatientSharing(this: OvokClient, consentId: string, requestOptions?: MedplumRequestOptions): Promise<void>;
20
+ /**
21
+ * Reads the project's patient sharing settings from `GET /v1/patient-sharing/settings`.
22
+ */
8
23
  export declare function getPatientSharingSettings(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<PatientSharingSettings>;
24
+ /**
25
+ * Updates the project's patient sharing settings, via `PUT /v1/patient-sharing/settings`.
26
+ */
9
27
  export declare function updatePatientSharingSettings(this: OvokClient, settings: PatientSharingSettingsUpdate, requestOptions?: MedplumRequestOptions): Promise<PatientSharingSettings>;
@@ -7,15 +7,24 @@ exports.revokePatientSharing = revokePatientSharing;
7
7
  exports.getPatientSharingSettings = getPatientSharingSettings;
8
8
  exports.updatePatientSharingSettings = updatePatientSharingSettings;
9
9
  const request_options_1 = require("../request-options");
10
+ /**
11
+ * Creates an invite that lets another patient receive the given observation codes, via `POST /v1/patient-sharing/invites`.
12
+ */
10
13
  function createPatientSharingInvite(body, requestOptions) {
11
14
  return this.post("/v1/patient-sharing/invites", body, undefined, requestOptions);
12
15
  }
16
+ /**
17
+ * Redeems a patient sharing invite, via `POST /v1/patient-sharing/invites/redeem`.
18
+ */
13
19
  function redeemPatientSharingInvite(body, requestOptions) {
14
20
  return this.post("/v1/patient-sharing/invites/redeem", body, undefined, requestOptions).then((share) => {
15
21
  this.invalidateUrl("/v1/patient-sharing/shares");
16
22
  return share;
17
23
  });
18
24
  }
25
+ /**
26
+ * Lists the signed-in user's shares from `GET /v1/patient-sharing/shares`; absent lists come back empty.
27
+ */
19
28
  function listPatientSharing(requestOptions) {
20
29
  return this.get("/v1/patient-sharing/shares", ...(0, request_options_1.optionalArg)(requestOptions)).then((shares) => {
21
30
  var _a, _b, _c;
@@ -27,13 +36,22 @@ function listPatientSharing(requestOptions) {
27
36
  });
28
37
  });
29
38
  }
39
+ /**
40
+ * Revokes a share by Consent ID, via `DELETE /v1/patient-sharing/shares/{consentId}`.
41
+ */
30
42
  async function revokePatientSharing(consentId, requestOptions) {
31
43
  await this.delete(`/v1/patient-sharing/shares/${encodeURIComponent(consentId)}`, ...(0, request_options_1.optionalArg)(requestOptions));
32
44
  this.invalidateUrl("/v1/patient-sharing/shares");
33
45
  }
46
+ /**
47
+ * Reads the project's patient sharing settings from `GET /v1/patient-sharing/settings`.
48
+ */
34
49
  function getPatientSharingSettings(requestOptions) {
35
50
  return this.get("/v1/patient-sharing/settings", ...(0, request_options_1.optionalArg)(requestOptions));
36
51
  }
52
+ /**
53
+ * Updates the project's patient sharing settings, via `PUT /v1/patient-sharing/settings`.
54
+ */
37
55
  function updatePatientSharingSettings(settings, requestOptions) {
38
56
  return this.put("/v1/patient-sharing/settings", settings, undefined, requestOptions);
39
57
  }
@@ -1,64 +1,152 @@
1
+ /**
2
+ * A created patient sharing invite.
3
+ *
4
+ * @category sharing
5
+ */
1
6
  export type PatientSharingInvite = {
7
+ /** ID of the invite. */
2
8
  inviteId: string;
9
+ /** Code the recipient redeems the invite with. */
3
10
  code: string;
11
+ /** ISO 8601 time the invite expires. */
4
12
  expiresAt: string;
5
13
  };
14
+ /**
15
+ * Observation codes one patient shares with another.
16
+ *
17
+ * @category sharing
18
+ */
6
19
  export type PatientSharingShare = {
20
+ /** ID of the Consent that records the share. */
7
21
  consentId: string;
22
+ /** Patient who shares. */
8
23
  sharer: PatientSharingParty;
24
+ /** Patient who receives. */
9
25
  recipient: PatientSharingParty;
26
+ /** Observation codes that are shared. */
10
27
  codes: string[];
28
+ /** ISO 8601 start of the share, or null when not set. */
11
29
  startedAt: string | null;
30
+ /** ISO 8601 end of the share, or null when open-ended. */
12
31
  endsAt: string | null;
13
32
  };
33
+ /**
34
+ * A patient taking part in a share.
35
+ *
36
+ * @category sharing
37
+ */
14
38
  export type PatientSharingParty = {
39
+ /** ID of the patient. */
15
40
  patientId: string;
41
+ /** Display name, or null when unknown. */
16
42
  name: string | null;
17
43
  };
44
+ /**
45
+ * A patient's share of their record with a practitioner.
46
+ *
47
+ * @category sharing
48
+ */
18
49
  export type PatientSharingPractitionerShare = {
50
+ /** ID of the Consent that records the share. */
19
51
  consentId: string;
52
+ /** Patient who shares. */
20
53
  sharer: PatientSharingParty;
54
+ /** Practitioner who receives. */
21
55
  practitioner: {
56
+ /** ID of the practitioner. */
22
57
  practitionerId: string;
58
+ /** Display name, or null when unknown. */
23
59
  name: string | null;
24
60
  };
61
+ /** ISO 8601 start of the share, or null when not set. */
25
62
  startedAt: string | null;
63
+ /** ISO 8601 end of the share, or null when open-ended. */
26
64
  endsAt: string | null;
27
65
  };
28
- /** Observation codes a patient shares with a related person (a carer). */
66
+ /**
67
+ * Observation codes a patient shares with a related person (a carer).
68
+ *
69
+ * @category sharing
70
+ */
29
71
  export type PatientSharingRelatedPersonShare = {
72
+ /** ID of the Consent that records the share. */
30
73
  consentId: string;
74
+ /** Patient who shares. */
31
75
  sharer: PatientSharingParty;
76
+ /** Carer who receives. */
32
77
  relatedPerson: {
78
+ /** ID of the related person. */
33
79
  relatedPersonId: string;
80
+ /** Display name, or null when unknown. */
34
81
  name: string | null;
35
82
  };
83
+ /** Observation codes that are shared. */
36
84
  codes: string[];
85
+ /** ISO 8601 start of the share, or null when not set. */
37
86
  startedAt: string | null;
87
+ /** ISO 8601 end of the share, or null when open-ended. */
38
88
  endsAt: string | null;
39
89
  };
90
+ /**
91
+ * The signed-in user's shares.
92
+ *
93
+ * @category sharing
94
+ */
40
95
  export type PatientSharingShares = {
96
+ /** Shares the user gave to other patients. */
41
97
  outgoing: PatientSharingShare[];
98
+ /** Shares other patients gave to the user. */
42
99
  incoming: PatientSharingShare[];
100
+ /** Shares with practitioners. */
43
101
  practitioners: PatientSharingPractitionerShare[];
102
+ /** Shares with carers. */
44
103
  relatedPersons: PatientSharingRelatedPersonShare[];
45
104
  /** For a signed-in carer: the shares patients gave them. Empty for a patient. */
46
105
  received: PatientSharingRelatedPersonShare[];
47
106
  };
107
+ /**
108
+ * Request to create a patient sharing invite.
109
+ *
110
+ * @category sharing
111
+ */
48
112
  export type CreatePatientSharingInvite = {
113
+ /** Observation codes to share. */
49
114
  codes: string[];
115
+ /** ISO 8601 end of the share, or null for no end. */
50
116
  endsAt: string | null;
51
117
  };
118
+ /**
119
+ * Request to redeem a patient sharing invite.
120
+ *
121
+ * @category sharing
122
+ */
52
123
  export type RedeemPatientSharingInvite = {
124
+ /** ID of the invite. */
53
125
  inviteId: string;
126
+ /** Code from the invite. */
54
127
  code: string;
55
128
  };
129
+ /**
130
+ * Project settings for patient sharing.
131
+ *
132
+ * @category sharing
133
+ */
56
134
  export type PatientSharingSettings = {
135
+ /** Whether patient sharing is on. */
57
136
  enabled: boolean;
137
+ /** ID of the access policy applied to shares, or null. */
58
138
  accessPolicyId: string | null;
139
+ /** Whether patients may share with practitioners. */
59
140
  practitionerSharingEnabled: boolean;
60
141
  };
142
+ /**
143
+ * Request to update patient sharing settings.
144
+ *
145
+ * @category sharing
146
+ */
61
147
  export type PatientSharingSettingsUpdate = {
148
+ /** Whether patient sharing is on. */
62
149
  enabled: boolean;
150
+ /** Whether patients may share with practitioners; null leaves it unchanged. */
63
151
  practitionerSharingEnabled?: boolean | null;
64
152
  };
@@ -1,11 +1,14 @@
1
1
  import type { MedplumRequestOptions } from "@medplum/core";
2
2
  import { OvokClient } from "../ovok-client";
3
3
  import { OvokAccount, OvokAdministeredProject, OvokI18nDocument, OvokI18nValue, OvokInviteProjectMember, OvokLocalization, OvokLocalizationQuery, OvokLocalizationUpdate, OvokLocales, OvokPage, OvokPatientObservations, OvokProjectFeature, OvokProjectFeatures, OvokProjectMember, OvokProjectMemberResponse, OvokProjectSettings, OvokProjectSettingKey, OvokProjectTextSettingKey, OvokRemoveProjectMemberResponse, OvokUpdateProjectMember } from "./types";
4
+ /** Lists the accounts of the signed-in user from `GET /accounts`. */
4
5
  export declare function getAccounts(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<OvokAccount[]>;
6
+ /** Lists the projects the signed-in user administers, via `GET /v1/projects`. */
5
7
  export declare function listAdministeredProjects(this: OvokClient, params?: {
6
8
  page?: number;
7
9
  count?: number;
8
10
  }, requestOptions?: MedplumRequestOptions): Promise<OvokPage<OvokAdministeredProject>>;
11
+ /** Lists the members of the current project, via `GET /v1/projects/me/members`. */
9
12
  export declare function listProjectMembers(this: OvokClient, params?: {
10
13
  accessPolicyId?: string;
11
14
  profileId?: string;
@@ -13,25 +16,44 @@ export declare function listProjectMembers(this: OvokClient, params?: {
13
16
  page?: number;
14
17
  count?: number;
15
18
  }, requestOptions?: MedplumRequestOptions): Promise<OvokPage<OvokProjectMember>>;
19
+ /** Invites a member to the current project, via `POST /v1/projects/me/members`. */
16
20
  export declare function inviteProjectMember(this: OvokClient, body: OvokInviteProjectMember, requestOptions?: MedplumRequestOptions): Promise<OvokProjectMemberResponse>;
21
+ /** Updates a project member, via `PATCH /v1/projects/me/members/{membershipId}`. */
17
22
  export declare function updateProjectMember(this: OvokClient, membershipId: string, body: OvokUpdateProjectMember, requestOptions?: MedplumRequestOptions): Promise<OvokProjectMemberResponse>;
23
+ /** Removes a project member, via `DELETE /v1/projects/me/members/{membershipId}`. */
18
24
  export declare function removeProjectMember(this: OvokClient, membershipId: string, requestOptions?: MedplumRequestOptions): Promise<OvokRemoveProjectMemberResponse>;
25
+ /** Reads the enabled features of the current project from `GET /v1/projects/me/features`. */
19
26
  export declare function getProjectFeatures(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<OvokProjectFeatures>;
27
+ /** Sets the enabled features of the current project, via `PATCH /v1/projects/me/features`. */
20
28
  export declare function updateProjectFeatures(this: OvokClient, features: OvokProjectFeature[], requestOptions?: MedplumRequestOptions): Promise<OvokProjectFeatures>;
29
+ /** Reads the current project's settings from `GET /v1/project/settings`. */
21
30
  export declare function getProjectSettings(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<OvokProjectSettings>;
31
+ /** Turns a boolean project setting on or off, via `PUT /v1/project/settings/{key}`. */
22
32
  export declare function updateProjectSetting(this: OvokClient, key: OvokProjectSettingKey, enabled: boolean, requestOptions?: MedplumRequestOptions): Promise<OvokProjectSettings>;
33
+ /** Sets a text project setting (null clears it), via `PUT /v1/project/settings/values/{key}`. */
23
34
  export declare function updateProjectTextSetting(this: OvokClient, key: OvokProjectTextSettingKey, value: string | null, requestOptions?: MedplumRequestOptions): Promise<OvokProjectSettings>;
35
+ /** Reads the project's languages from `GET /locales`. */
24
36
  export declare function getLocales(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<OvokLocales>;
37
+ /** Updates the project's languages, via `PATCH /locales`. */
25
38
  export declare function updateLocales(this: OvokClient, locales: OvokLocales, requestOptions?: MedplumRequestOptions): Promise<OvokLocales>;
39
+ /** Lists the translations of a language, via `GET /localization/{language}`. */
26
40
  export declare function listLocalizations(this: OvokClient, language: string, params?: OvokLocalizationQuery, requestOptions?: MedplumRequestOptions): Promise<{
41
+ /** Total number of translations of the language. */
27
42
  total: number;
43
+ /** The translations in this page. */
28
44
  resources: OvokLocalization[];
29
45
  }>;
46
+ /** Reads one translation, via `GET /localization/{language}/{key}`. */
30
47
  export declare function getLocalization(this: OvokClient, language: string, key: string, requestOptions?: MedplumRequestOptions): Promise<OvokLocalization>;
48
+ /** Sets one translation, via `PUT /localization/{language}/{key}`. */
31
49
  export declare function updateLocalization(this: OvokClient, language: string, key: string, body: OvokLocalizationUpdate, requestOptions?: MedplumRequestOptions): Promise<OvokLocalization>;
50
+ /** Deletes one translation, via `DELETE /localization/{language}/{key}`. */
32
51
  export declare function deleteLocalization(this: OvokClient, language: string, key: string, requestOptions?: MedplumRequestOptions): Promise<void>;
52
+ /** Reads a language's translations as an i18next document, via `GET /localization/i18next/{language}`. */
33
53
  export declare function getI18nextDocument(this: OvokClient, language: string, requestOptions?: MedplumRequestOptions): Promise<OvokI18nDocument>;
54
+ /** Updates a language's translations from an i18next document, via `PATCH /localization/i18next/{language}`. */
34
55
  export declare function updateI18nextDocument(this: OvokClient, language: string, document: Record<string, OvokI18nValue>, requestOptions?: MedplumRequestOptions): Promise<void>;
56
+ /** Reads the latest observations of a patient, via `GET /patient/{patientId}/observation`. */
35
57
  export declare function getPatientLastObservations(this: OvokClient, patientId: string, params: {
36
58
  code: string;
37
59
  max?: number;
@@ -22,64 +22,84 @@ exports.updateI18nextDocument = updateI18nextDocument;
22
22
  exports.getPatientLastObservations = getPatientLastObservations;
23
23
  const query_string_1 = require("../query-string");
24
24
  const request_options_1 = require("../request-options");
25
+ /** Lists the accounts of the signed-in user from `GET /accounts`. */
25
26
  async function getAccounts(requestOptions) {
26
27
  return this.get("/accounts", ...(0, request_options_1.optionalArg)(requestOptions));
27
28
  }
29
+ /** Lists the projects the signed-in user administers, via `GET /v1/projects`. */
28
30
  async function listAdministeredProjects(params = {}, requestOptions) {
29
31
  return this.get(`/v1/projects${(0, query_string_1.toQueryString)(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
30
32
  }
33
+ /** Lists the members of the current project, via `GET /v1/projects/me/members`. */
31
34
  async function listProjectMembers(params = {}, requestOptions) {
32
35
  return this.get(`/v1/projects/me/members${(0, query_string_1.toQueryString)(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
33
36
  }
37
+ /** Invites a member to the current project, via `POST /v1/projects/me/members`. */
34
38
  async function inviteProjectMember(body, requestOptions) {
35
39
  return this.post("/v1/projects/me/members", body, undefined, requestOptions);
36
40
  }
41
+ /** Updates a project member, via `PATCH /v1/projects/me/members/{membershipId}`. */
37
42
  async function updateProjectMember(membershipId, body, requestOptions) {
38
43
  return (await this.patch(`/v1/projects/me/members/${encodeURIComponent(membershipId)}`, body, ...(0, request_options_1.optionalArg)(requestOptions)));
39
44
  }
45
+ /** Removes a project member, via `DELETE /v1/projects/me/members/{membershipId}`. */
40
46
  async function removeProjectMember(membershipId, requestOptions) {
41
47
  return (await this.delete(`/v1/projects/me/members/${encodeURIComponent(membershipId)}`, ...(0, request_options_1.optionalArg)(requestOptions)));
42
48
  }
49
+ /** Reads the enabled features of the current project from `GET /v1/projects/me/features`. */
43
50
  async function getProjectFeatures(requestOptions) {
44
51
  return this.get("/v1/projects/me/features", ...(0, request_options_1.optionalArg)(requestOptions));
45
52
  }
53
+ /** Sets the enabled features of the current project, via `PATCH /v1/projects/me/features`. */
46
54
  async function updateProjectFeatures(features, requestOptions) {
47
55
  const body = { features };
48
56
  return (await this.patch("/v1/projects/me/features", body, ...(0, request_options_1.optionalArg)(requestOptions)));
49
57
  }
58
+ /** Reads the current project's settings from `GET /v1/project/settings`. */
50
59
  async function getProjectSettings(requestOptions) {
51
60
  return this.get("/v1/project/settings", ...(0, request_options_1.optionalArg)(requestOptions));
52
61
  }
62
+ /** Turns a boolean project setting on or off, via `PUT /v1/project/settings/{key}`. */
53
63
  async function updateProjectSetting(key, enabled, requestOptions) {
54
64
  return (await this.put(`/v1/project/settings/${encodeURIComponent(key)}`, { enabled }, undefined, requestOptions));
55
65
  }
66
+ /** Sets a text project setting (null clears it), via `PUT /v1/project/settings/values/{key}`. */
56
67
  async function updateProjectTextSetting(key, value, requestOptions) {
57
68
  return (await this.put(`/v1/project/settings/values/${encodeURIComponent(key)}`, { value }, undefined, requestOptions));
58
69
  }
70
+ /** Reads the project's languages from `GET /locales`. */
59
71
  async function getLocales(requestOptions) {
60
72
  return this.get("/locales", ...(0, request_options_1.optionalArg)(requestOptions));
61
73
  }
74
+ /** Updates the project's languages, via `PATCH /locales`. */
62
75
  async function updateLocales(locales, requestOptions) {
63
76
  return (await this.patch("/locales", locales, ...(0, request_options_1.optionalArg)(requestOptions)));
64
77
  }
78
+ /** Lists the translations of a language, via `GET /localization/{language}`. */
65
79
  async function listLocalizations(language, params = {}, requestOptions) {
66
80
  return this.get(`/localization/${encodeURIComponent(language)}${(0, query_string_1.toQueryString)(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
67
81
  }
82
+ /** Reads one translation, via `GET /localization/{language}/{key}`. */
68
83
  async function getLocalization(language, key, requestOptions) {
69
84
  return this.get(`/localization/${encodeURIComponent(language)}/${encodeURIComponent(key)}`, ...(0, request_options_1.optionalArg)(requestOptions));
70
85
  }
86
+ /** Sets one translation, via `PUT /localization/{language}/{key}`. */
71
87
  async function updateLocalization(language, key, body, requestOptions) {
72
88
  return (await this.put(`/localization/${encodeURIComponent(language)}/${encodeURIComponent(key)}`, body, undefined, requestOptions));
73
89
  }
90
+ /** Deletes one translation, via `DELETE /localization/{language}/{key}`. */
74
91
  async function deleteLocalization(language, key, requestOptions) {
75
92
  await this.delete(`/localization/${encodeURIComponent(language)}/${encodeURIComponent(key)}`, ...(0, request_options_1.optionalArg)(requestOptions));
76
93
  }
94
+ /** Reads a language's translations as an i18next document, via `GET /localization/i18next/{language}`. */
77
95
  async function getI18nextDocument(language, requestOptions) {
78
96
  return this.get(`/localization/i18next/${encodeURIComponent(language)}`, ...(0, request_options_1.optionalArg)(requestOptions));
79
97
  }
98
+ /** Updates a language's translations from an i18next document, via `PATCH /localization/i18next/{language}`. */
80
99
  async function updateI18nextDocument(language, document, requestOptions) {
81
100
  await this.patch(`/localization/i18next/${encodeURIComponent(language)}`, document, ...(0, request_options_1.optionalArg)(requestOptions));
82
101
  }
102
+ /** Reads the latest observations of a patient, via `GET /patient/{patientId}/observation`. */
83
103
  async function getPatientLastObservations(patientId, params, requestOptions) {
84
104
  return this.get(`/patient/${encodeURIComponent(patientId)}/observation${(0, query_string_1.toQueryString)(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
85
105
  }