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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/README.md +23 -666
  2. package/dist/client/ai-fhir/methods/AIFhirResources.d.ts +3 -1
  3. package/dist/client/ai-fhir/methods/AIFhirResources.js +3 -1
  4. package/dist/client/ai-fhir/types/AIFhirPlan.d.ts +8 -0
  5. package/dist/client/ai-fhir/types/AIFhirPlanRequest.d.ts +8 -0
  6. package/dist/client/ai-fhir/types/AIFhirRequest.d.ts +5 -0
  7. package/dist/client/ai-fhir/types/AIFhirResponse.d.ts +6 -0
  8. package/dist/client/auth/errors.d.ts +15 -2
  9. package/dist/client/auth/errors.js +12 -2
  10. package/dist/client/auth/methods/appleLogin.d.ts +1 -0
  11. package/dist/client/auth/methods/appleLogin.js +1 -0
  12. package/dist/client/auth/methods/changePassword.d.ts +1 -0
  13. package/dist/client/auth/methods/changePassword.js +1 -0
  14. package/dist/client/auth/methods/googleLogin.d.ts +1 -0
  15. package/dist/client/auth/methods/googleLogin.js +1 -0
  16. package/dist/client/auth/methods/login.d.ts +6 -0
  17. package/dist/client/auth/methods/login.js +6 -0
  18. package/dist/client/auth/methods/register.d.ts +5 -0
  19. package/dist/client/auth/methods/register.js +5 -0
  20. package/dist/client/auth/methods/registerPractitioner.d.ts +5 -0
  21. package/dist/client/auth/methods/registerPractitioner.js +5 -0
  22. package/dist/client/auth/methods/reloadSession.d.ts +3 -0
  23. package/dist/client/auth/methods/requestDeleteUser.d.ts +4 -5
  24. package/dist/client/auth/methods/requestDeleteUser.js +4 -5
  25. package/dist/client/auth/methods/setPasswordFromReset.d.ts +1 -0
  26. package/dist/client/auth/methods/setPasswordFromReset.js +1 -0
  27. package/dist/client/auth/session-fetch.d.ts +11 -0
  28. package/dist/client/auth/types/Account.d.ts +8 -1
  29. package/dist/client/auth/types/AppleLoginBody.d.ts +16 -0
  30. package/dist/client/auth/types/AppleLoginBody.js +5 -0
  31. package/dist/client/auth/types/AuthResponse.d.ts +12 -0
  32. package/dist/client/auth/types/ChangePasswordBody.d.ts +7 -0
  33. package/dist/client/auth/types/ChangePasswordResponse.d.ts +5 -0
  34. package/dist/client/auth/types/CompletePasswordResetBody.d.ts +8 -0
  35. package/dist/client/auth/types/GoogleLoginBody.d.ts +5 -0
  36. package/dist/client/auth/types/LoginBody.d.ts +15 -1
  37. package/dist/client/auth/types/LoginError.d.ts +21 -2
  38. package/dist/client/auth/types/LoginError.js +8 -2
  39. package/dist/client/auth/types/LoginResponse.d.ts +8 -1
  40. package/dist/client/auth/types/RegisterBody.d.ts +12 -0
  41. package/dist/client/auth/types/RegisterPractitionerBody.d.ts +5 -0
  42. package/dist/client/auth/types/RegisterResponse.d.ts +7 -0
  43. package/dist/client/auth/types/RequestDeleteUserBody.d.ts +7 -7
  44. package/dist/client/auth/types/RequestDeleteUserResponse.d.ts +14 -0
  45. package/dist/client/auth/types/ResetPasswordBody.d.ts +5 -0
  46. package/dist/client/auth/types/Session.d.ts +14 -2
  47. package/dist/client/change-history/methods.d.ts +6 -0
  48. package/dist/client/change-history/methods.js +6 -0
  49. package/dist/client/change-history/types.d.ts +82 -0
  50. package/dist/client/chat/ai/methods/createAiSession.d.ts +6 -0
  51. package/dist/client/chat/ai/methods/createAiSession.js +6 -0
  52. package/dist/client/chat/ai/types/CreateAiSessionResponse.d.ts +17 -0
  53. package/dist/client/chat/ai/types/SessionMessagesResponse.d.ts +9 -0
  54. package/dist/client/cms/locale.d.ts +12 -2
  55. package/dist/client/cms/locale.js +9 -2
  56. package/dist/client/cms/methods.d.ts +6 -2
  57. package/dist/client/cms/methods.js +7 -3
  58. package/dist/client/cms/types.d.ts +44 -4
  59. package/dist/client/consent/methods.d.ts +16 -0
  60. package/dist/client/consent/methods.js +16 -0
  61. package/dist/client/consent/types.d.ts +53 -1
  62. package/dist/client/consent/types.js +10 -1
  63. package/dist/client/email/methods.d.ts +3 -0
  64. package/dist/client/email/methods.js +3 -0
  65. package/dist/client/email/types.d.ts +33 -0
  66. package/dist/client/errors/field-errors.d.ts +3 -0
  67. package/dist/client/errors/field-errors.js +3 -0
  68. package/dist/client/errors/ovok-error-utils.d.ts +6 -0
  69. package/dist/client/errors/ovok-error-utils.js +6 -0
  70. package/dist/client/errors/ovok-error.d.ts +36 -4
  71. package/dist/client/errors/ovok-error.js +15 -4
  72. package/dist/client/errors/rate-limit-error.d.ts +11 -2
  73. package/dist/client/errors/rate-limit-error.js +10 -2
  74. package/dist/client/errors/sign-in-required-error.d.ts +5 -2
  75. package/dist/client/errors/sign-in-required-error.js +5 -2
  76. package/dist/client/experience/methods.d.ts +38 -0
  77. package/dist/client/experience/methods.js +35 -0
  78. package/dist/client/experience/types.d.ts +316 -0
  79. package/dist/client/experience/types.js +1 -0
  80. package/dist/client/invites/methods.d.ts +27 -9
  81. package/dist/client/invites/methods.js +27 -9
  82. package/dist/client/invites/parse-accept-invite-link.d.ts +3 -1
  83. package/dist/client/invites/parse-accept-invite-link.js +3 -1
  84. package/dist/client/invites/types.d.ts +55 -0
  85. package/dist/client/invites/types.js +12 -0
  86. package/dist/client/notifications/methods.d.ts +15 -0
  87. package/dist/client/notifications/methods.js +15 -0
  88. package/dist/client/notifications/types.d.ts +249 -2
  89. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.d.ts +3 -0
  90. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +3 -0
  91. package/dist/client/observation/methods/getLatestObservationsByCodes.d.ts +3 -0
  92. package/dist/client/observation/methods/getLatestObservationsByCodes.js +3 -0
  93. package/dist/client/observation/methods/observationsToMeasurements.d.ts +23 -1
  94. package/dist/client/observation/methods/observationsToMeasurements.js +8 -1
  95. package/dist/client/observation/methods/saveMeasurement.d.ts +3 -1
  96. package/dist/client/observation/methods/saveMeasurement.js +3 -1
  97. package/dist/client/observation/observation-bundle-utils.d.ts +6 -0
  98. package/dist/client/observation/observation-bundle-utils.js +6 -0
  99. package/dist/client/observation/series.d.ts +25 -3
  100. package/dist/client/observation/series.js +6 -2
  101. package/dist/client/observation/services/creator.d.ts +5 -0
  102. package/dist/client/observation/services/creator.js +5 -0
  103. package/dist/client/observation/services/uric-acid-service.js +0 -1
  104. package/dist/client/observation/types/GetLatestObservationsByCodeParams.d.ts +10 -0
  105. package/dist/client/observation/types/MeasurementTypeKey.d.ts +26 -0
  106. package/dist/client/observation/types/MeasurementTypeKey.js +26 -0
  107. package/dist/client/observation/types/ObservationCode.d.ts +64 -1
  108. package/dist/client/observation/types/ObservationCode.js +64 -1
  109. package/dist/client/observation/types/UrineAnalytes.d.ts +14 -0
  110. package/dist/client/observation/types/UrineAnalytes.js +1 -0
  111. package/dist/client/observation/types/generate-measurement/Sample.d.ts +33 -0
  112. package/dist/client/observation/types/generate-observation-body/GenerateObservationBodyParams.d.ts +9 -0
  113. package/dist/client/observation/types/measurement/BabySleepMeasurement.d.ts +3 -0
  114. package/dist/client/observation/types/measurement/BloodGlucoseMeasurement.d.ts +7 -0
  115. package/dist/client/observation/types/measurement/BloodPressureMeasurement.d.ts +10 -0
  116. package/dist/client/observation/types/measurement/BloodPressureStates.d.ts +10 -0
  117. package/dist/client/observation/types/measurement/BloodPressureStates.js +10 -0
  118. package/dist/client/observation/types/measurement/BodyTemperatureMeasurement.d.ts +7 -0
  119. package/dist/client/observation/types/measurement/BodyWeightMeasurmement.d.ts +8 -0
  120. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.d.ts +18 -0
  121. package/dist/client/observation/types/measurement/EcgDiagnosticFlag.js +18 -0
  122. package/dist/client/observation/types/measurement/EcgMeasurement.d.ts +9 -0
  123. package/dist/client/observation/types/measurement/HeartRateMeasurement.d.ts +7 -0
  124. package/dist/client/observation/types/measurement/HeartRateVariabilityMeasurement.d.ts +7 -0
  125. package/dist/client/observation/types/measurement/LipidPanelMeasurement.d.ts +12 -0
  126. package/dist/client/observation/types/measurement/Measurement.d.ts +9 -0
  127. package/dist/client/observation/types/measurement/MeasurementDevice.d.ts +10 -0
  128. package/dist/client/observation/types/measurement/MeasurementSeries.d.ts +2 -0
  129. package/dist/client/observation/types/measurement/PulseOximeterMeasurement.d.ts +10 -0
  130. package/dist/client/observation/types/measurement/RespiratoryRateMeasurement.d.ts +7 -0
  131. package/dist/client/observation/types/measurement/RespiratoryTherapyMeasurement.d.ts +3 -0
  132. package/dist/client/observation/types/measurement/RestingHeartRateMeasurement.d.ts +7 -0
  133. package/dist/client/observation/types/measurement/SpirometryMeasurement.d.ts +23 -0
  134. package/dist/client/observation/types/measurement/StepCountMeasurement.d.ts +9 -0
  135. package/dist/client/observation/types/measurement/UrineAnalyzeMeasurement.d.ts +29 -0
  136. package/dist/client/observation/types/measurement/Vo2MaxMeasurement.d.ts +7 -0
  137. package/dist/client/observation/types/measurement/WalkingHeartRateAverageMeasurement.d.ts +7 -0
  138. package/dist/client/observation/types/service/MeasurementField.d.ts +5 -1
  139. package/dist/client/observation/utils/getObservationValueDisplay.d.ts +2 -0
  140. package/dist/client/offline/offline-measurement-queue.d.ts +56 -1
  141. package/dist/client/offline/offline-measurement-queue.js +21 -0
  142. package/dist/client/offline/shared-measurement-queue.d.ts +16 -1
  143. package/dist/client/offline/shared-measurement-queue.js +3 -1
  144. package/dist/client/ovok-client.d.ts +27 -6
  145. package/dist/client/ovok-client.js +8 -5
  146. package/dist/client/patient/methods.d.ts +21 -0
  147. package/dist/client/patient/methods.js +21 -0
  148. package/dist/client/patient/types.d.ts +131 -0
  149. package/dist/client/patient-sharing/methods.d.ts +18 -0
  150. package/dist/client/patient-sharing/methods.js +18 -0
  151. package/dist/client/patient-sharing/types.d.ts +89 -1
  152. package/dist/client/platform/methods.d.ts +22 -0
  153. package/dist/client/platform/methods.js +20 -0
  154. package/dist/client/platform/types.d.ts +194 -1
  155. package/dist/client/platform/types.js +24 -0
  156. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.d.ts +3 -0
  157. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +3 -0
  158. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.d.ts +3 -0
  159. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +3 -0
  160. package/dist/client/questionnaire-response/methods/populateQuestionnaire.d.ts +3 -0
  161. package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +3 -0
  162. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.d.ts +3 -0
  163. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +3 -0
  164. package/dist/client/questionnaire-response/types.d.ts +6 -0
  165. package/dist/client/signals/errors.d.ts +13 -2
  166. package/dist/client/signals/errors.js +9 -2
  167. package/dist/client/signals/methods.d.ts +9 -0
  168. package/dist/client/signals/methods.js +9 -0
  169. package/dist/client/signals/types.d.ts +31 -0
  170. package/dist/client/slim/methods.d.ts +268 -21
  171. package/dist/client/slim/methods.js +264 -21
  172. package/dist/client/slim/paging.d.ts +22 -2
  173. package/dist/client/slim/paging.js +6 -2
  174. package/dist/client/slim/types.d.ts +920 -1
  175. package/dist/client/storage.d.ts +15 -1
  176. package/dist/client/storage.js +7 -1
  177. package/dist/client/wearables/methods.d.ts +24 -0
  178. package/dist/client/wearables/methods.js +24 -0
  179. package/dist/client/wearables/types.d.ts +74 -0
  180. package/dist/conformance/api-requirements.d.ts +31 -5
  181. package/dist/conformance/api-requirements.js +47 -10
  182. package/dist/conformance/capability-requirements.d.ts +4 -26
  183. package/dist/conformance/capability-requirements.js +5 -27
  184. package/dist/conformance/capability.d.ts +9 -1
  185. package/dist/conformance/capability.js +3 -1
  186. package/dist/hooks/account-hooks.d.ts +35 -0
  187. package/dist/hooks/account-hooks.js +33 -0
  188. package/dist/hooks/api-hooks.d.ts +74 -4
  189. package/dist/hooks/api-hooks.js +56 -4
  190. package/dist/hooks/cms-hooks.d.ts +9 -3
  191. package/dist/hooks/cms-hooks.js +9 -3
  192. package/dist/hooks/email-hooks.d.ts +3 -0
  193. package/dist/hooks/email-hooks.js +3 -0
  194. package/dist/hooks/experience-hooks.d.ts +26 -0
  195. package/dist/hooks/experience-hooks.js +24 -0
  196. package/dist/hooks/index.d.ts +18 -0
  197. package/dist/hooks/index.js +18 -0
  198. package/dist/hooks/invites-hooks.d.ts +21 -2
  199. package/dist/hooks/invites-hooks.js +21 -2
  200. package/dist/hooks/notification-ack-hooks.d.ts +6 -2
  201. package/dist/hooks/notification-ack-hooks.js +6 -2
  202. package/dist/hooks/notification-hooks.d.ts +27 -3
  203. package/dist/hooks/notification-hooks.js +27 -3
  204. package/dist/hooks/notification-note-hooks.d.ts +41 -0
  205. package/dist/hooks/notification-note-hooks.js +33 -0
  206. package/dist/hooks/observation-hooks.d.ts +29 -0
  207. package/dist/hooks/observation-hooks.js +23 -1
  208. package/dist/hooks/patient-hooks.d.ts +53 -0
  209. package/dist/hooks/patient-hooks.js +48 -0
  210. package/dist/hooks/patient-sharing-hooks.d.ts +18 -0
  211. package/dist/hooks/patient-sharing-hooks.js +18 -0
  212. package/dist/hooks/platform-hooks.d.ts +32 -0
  213. package/dist/hooks/platform-hooks.js +23 -0
  214. package/dist/hooks/poll-hooks.d.ts +17 -1
  215. package/dist/hooks/poll-hooks.js +3 -1
  216. package/dist/hooks/signals-hooks.d.ts +3 -0
  217. package/dist/hooks/signals-hooks.js +3 -0
  218. package/dist/hooks/wearables-hooks.d.ts +23 -0
  219. package/dist/hooks/wearables-hooks.js +21 -0
  220. package/dist/index.d.ts +1 -965
  221. package/dist/index.js +1 -71
  222. package/dist/next/auth/saved-accounts-store.d.ts +10 -0
  223. package/dist/next/auth/session.d.ts +17 -0
  224. package/dist/next/auth/user-session.d.ts +5 -0
  225. package/dist/next/config/ovok-config.d.ts +45 -0
  226. package/dist/next/errors/ovok-account-error.d.ts +14 -1
  227. package/dist/next/errors/ovok-account-error.js +8 -1
  228. package/dist/next/errors/ovok-errors.d.ts +88 -0
  229. package/dist/next/errors/ovok-errors.js +67 -0
  230. package/dist/next/http/http-client.d.ts +5 -0
  231. package/dist/next/http/transmit.d.ts +7 -0
  232. package/dist/next/http/url.d.ts +10 -0
  233. package/dist/next/ovok.d.ts +31 -1
  234. package/dist/next/ovok.js +5 -1
  235. package/dist/next/paging/page.d.ts +13 -1
  236. package/dist/next/react/context.d.ts +7 -0
  237. package/dist/next/react/context.js +7 -0
  238. package/dist/next/react/index.d.ts +24 -0
  239. package/dist/next/react/index.js +18 -0
  240. package/dist/next/react/query-hooks.d.ts +69 -0
  241. package/dist/next/react/query-hooks.js +31 -0
  242. package/dist/next/resources/accounts/accounts-resource.d.ts +6 -0
  243. package/dist/next/resources/accounts/accounts-resource.js +6 -0
  244. package/dist/next/resources/ai/ai-chat-resource.d.ts +7 -0
  245. package/dist/next/resources/ai/ai-chat-resource.js +5 -0
  246. package/dist/next/resources/ai/ai-resource.d.ts +13 -0
  247. package/dist/next/resources/ai/ai-resource.js +6 -0
  248. package/dist/next/resources/ai/chat-messages-resource.d.ts +7 -0
  249. package/dist/next/resources/ai/chat-messages-resource.js +7 -0
  250. package/dist/next/resources/ai/chat-sessions-resource.d.ts +14 -0
  251. package/dist/next/resources/ai/chat-sessions-resource.js +8 -0
  252. package/dist/next/resources/auth/auth-sessions-resource.d.ts +6 -1
  253. package/dist/next/resources/auth/auth-sessions-resource.js +6 -1
  254. package/dist/next/resources/auth/registration.d.ts +18 -1
  255. package/dist/next/resources/auth/social-login.d.ts +12 -0
  256. package/dist/next/resources/auth-resource.d.ts +54 -1
  257. package/dist/next/resources/auth-resource.js +23 -0
  258. package/dist/next/resources/bots/bots-resource.d.ts +15 -0
  259. package/dist/next/resources/bots/bots-resource.js +5 -0
  260. package/dist/next/resources/cms/cms-delivery.d.ts +14 -2
  261. package/dist/next/resources/cms/cms-documents-resource.d.ts +7 -1
  262. package/dist/next/resources/cms/cms-documents-resource.js +7 -1
  263. package/dist/next/resources/cms/cms-resource.d.ts +7 -0
  264. package/dist/next/resources/cms/cms-resource.js +5 -0
  265. package/dist/next/resources/cms/release-notes-resource.d.ts +6 -0
  266. package/dist/next/resources/cms/release-notes-resource.js +6 -0
  267. package/dist/next/resources/consent/consent-resource.d.ts +22 -0
  268. package/dist/next/resources/consent/consent-resource.js +20 -0
  269. package/dist/next/resources/content/content-resource.d.ts +18 -0
  270. package/dist/next/resources/content/content-resource.js +12 -0
  271. package/dist/next/resources/documents/documents-resource.d.ts +24 -0
  272. package/dist/next/resources/documents/documents-resource.js +10 -0
  273. package/dist/next/resources/email/email-resource.d.ts +6 -0
  274. package/dist/next/resources/email/email-resource.js +5 -0
  275. package/dist/next/resources/email/email-templates-resource.d.ts +6 -0
  276. package/dist/next/resources/email/email-templates-resource.js +6 -0
  277. package/dist/next/resources/fhir-resource.d.ts +36 -0
  278. package/dist/next/resources/fhir-resource.js +21 -0
  279. package/dist/next/resources/health-resource.d.ts +16 -0
  280. package/dist/next/resources/health-resource.js +5 -0
  281. package/dist/next/resources/invites/invite-flow-resource.d.ts +7 -1
  282. package/dist/next/resources/invites/invite-flow-resource.js +7 -1
  283. package/dist/next/resources/invites/invites-resource.d.ts +15 -0
  284. package/dist/next/resources/invites/invites-resource.js +5 -0
  285. package/dist/next/resources/localization/i18next-resource.d.ts +6 -0
  286. package/dist/next/resources/localization/i18next-resource.js +6 -0
  287. package/dist/next/resources/localization/locales-resource.d.ts +7 -0
  288. package/dist/next/resources/localization/locales-resource.js +7 -0
  289. package/dist/next/resources/localization/localizations-resource.d.ts +17 -0
  290. package/dist/next/resources/localization/localizations-resource.js +9 -0
  291. package/dist/next/resources/measurements/measurements-resource.d.ts +53 -1
  292. package/dist/next/resources/measurements/measurements-resource.js +14 -0
  293. package/dist/next/resources/measurements/observation-builder.d.ts +5 -0
  294. package/dist/next/resources/measurements/offline-measurement-queue-types.d.ts +32 -0
  295. package/dist/next/resources/patient/fhir-records.d.ts +19 -1
  296. package/dist/next/resources/patient/fhir-records.js +19 -1
  297. package/dist/next/resources/patient/patient-resource.d.ts +15 -0
  298. package/dist/next/resources/patient/patient-resource.js +6 -0
  299. package/dist/next/resources/projects/project-features-resource.d.ts +7 -0
  300. package/dist/next/resources/projects/project-features-resource.js +7 -0
  301. package/dist/next/resources/projects/project-members-resource.d.ts +19 -0
  302. package/dist/next/resources/projects/project-members-resource.js +9 -0
  303. package/dist/next/resources/projects/project-settings-resource.d.ts +8 -0
  304. package/dist/next/resources/projects/project-settings-resource.js +8 -0
  305. package/dist/next/resources/projects/projects-resource.d.ts +15 -0
  306. package/dist/next/resources/projects/projects-resource.js +5 -0
  307. package/dist/next/resources/questionnaires/questionnaires-resource.d.ts +13 -0
  308. package/dist/next/resources/questionnaires/questionnaires-resource.js +13 -0
  309. package/dist/next/resources/realtime/realtime-resource.d.ts +11 -0
  310. package/dist/next/resources/realtime/realtime-resource.js +11 -0
  311. package/dist/next/resources/realtime/realtime-types.d.ts +16 -0
  312. package/dist/next/resources/session/saved-accounts-resource.d.ts +16 -0
  313. package/dist/next/resources/session/saved-accounts-resource.js +16 -0
  314. package/dist/next/resources/session/session-resource.d.ts +8 -0
  315. package/dist/next/resources/session/session-resource.js +7 -0
  316. package/dist/next/resources/sharing/sharing-invites-resource.d.ts +7 -0
  317. package/dist/next/resources/sharing/sharing-invites-resource.js +7 -0
  318. package/dist/next/resources/sharing/sharing-resource.d.ts +8 -0
  319. package/dist/next/resources/sharing/sharing-resource.js +5 -0
  320. package/dist/next/resources/sharing/sharing-settings-resource.d.ts +7 -0
  321. package/dist/next/resources/sharing/sharing-settings-resource.js +7 -0
  322. package/dist/next/resources/sharing/sharing-shares-resource.d.ts +7 -0
  323. package/dist/next/resources/sharing/sharing-shares-resource.js +7 -0
  324. package/dist/next/resources/signals/signals-gateway-resource.d.ts +15 -0
  325. package/dist/next/resources/signals/signals-gateway-resource.js +6 -0
  326. package/dist/next/resources/signals/signals-resource.d.ts +7 -0
  327. package/dist/next/resources/signals/signals-resource.js +5 -0
  328. package/dist/next/resources/signals/undeliverable-resource.d.ts +35 -0
  329. package/dist/next/resources/signals/undeliverable-resource.js +6 -0
  330. package/dist/next/resources/slim/slim-alarms-resource.d.ts +7 -0
  331. package/dist/next/resources/slim/slim-alarms-resource.js +7 -0
  332. package/dist/next/resources/slim/slim-change-history-resource.d.ts +6 -0
  333. package/dist/next/resources/slim/slim-change-history-resource.js +6 -0
  334. package/dist/next/resources/slim/slim-child-projects-resource.d.ts +21 -0
  335. package/dist/next/resources/slim/slim-child-projects-resource.js +8 -0
  336. package/dist/next/resources/slim/slim-devices-resource.d.ts +31 -0
  337. package/dist/next/resources/slim/slim-devices-resource.js +16 -0
  338. package/dist/next/resources/slim/slim-exports-resource.d.ts +6 -0
  339. package/dist/next/resources/slim/slim-exports-resource.js +6 -0
  340. package/dist/next/resources/slim/slim-locations-resource.d.ts +9 -0
  341. package/dist/next/resources/slim/slim-locations-resource.js +9 -0
  342. package/dist/next/resources/slim/slim-medical-notifications-resource.d.ts +6 -0
  343. package/dist/next/resources/slim/slim-medical-notifications-resource.js +6 -0
  344. package/dist/next/resources/slim/slim-notification-notes-resource.d.ts +10 -0
  345. package/dist/next/resources/slim/slim-notification-notes-resource.js +10 -0
  346. package/dist/next/resources/slim/slim-notifications-resource.d.ts +10 -0
  347. package/dist/next/resources/slim/slim-notifications-resource.js +6 -0
  348. package/dist/next/resources/slim/slim-organizations-resource.d.ts +9 -0
  349. package/dist/next/resources/slim/slim-organizations-resource.js +9 -0
  350. package/dist/next/resources/slim/slim-out-of-bed-resource.d.ts +12 -0
  351. package/dist/next/resources/slim/slim-out-of-bed-resource.js +7 -0
  352. package/dist/next/resources/slim/slim-patient-thresholds-resource.d.ts +6 -0
  353. package/dist/next/resources/slim/slim-patient-thresholds-resource.js +6 -0
  354. package/dist/next/resources/slim/slim-patients-resource.d.ts +11 -0
  355. package/dist/next/resources/slim/slim-patients-resource.js +10 -0
  356. package/dist/next/resources/slim/slim-policies-resource.d.ts +10 -0
  357. package/dist/next/resources/slim/slim-policies-resource.js +10 -0
  358. package/dist/next/resources/slim/slim-practitioners-resource.d.ts +6 -0
  359. package/dist/next/resources/slim/slim-practitioners-resource.js +6 -0
  360. package/dist/next/resources/slim/slim-projects-resource.d.ts +12 -0
  361. package/dist/next/resources/slim/slim-projects-resource.js +11 -0
  362. package/dist/next/resources/slim/slim-queries.d.ts +51 -0
  363. package/dist/next/resources/slim/slim-resource.d.ts +21 -0
  364. package/dist/next/resources/slim/slim-resource.js +6 -0
  365. package/dist/next/resources/slim/slim-sleep-resource.d.ts +6 -0
  366. package/dist/next/resources/slim/slim-sleep-resource.js +6 -0
  367. package/dist/next/resources/slim/slim-thresholds-resource.d.ts +5 -0
  368. package/dist/next/resources/slim/slim-thresholds-resource.js +5 -0
  369. package/dist/next/resources/slim/slim-trends-resource.d.ts +6 -0
  370. package/dist/next/resources/slim/slim-trends-resource.js +6 -0
  371. package/dist/next/resources/slim/slim-users-resource.d.ts +12 -0
  372. package/dist/next/resources/slim/slim-users-resource.js +6 -0
  373. package/dist/next/resources/slim/slim-zones-resource.d.ts +8 -0
  374. package/dist/next/resources/slim/slim-zones-resource.js +8 -0
  375. package/dist/next/resources/video-calls/video-call-access-resource.d.ts +13 -0
  376. package/dist/next/resources/video-calls/video-call-access-resource.js +8 -0
  377. package/dist/next/resources/video-calls/video-call-appointments-resource.d.ts +8 -0
  378. package/dist/next/resources/video-calls/video-call-appointments-resource.js +8 -0
  379. package/dist/next/resources/video-calls/video-call-emails-resource.d.ts +8 -0
  380. package/dist/next/resources/video-calls/video-call-emails-resource.js +8 -0
  381. package/dist/next/resources/video-calls/video-calls-resource.d.ts +14 -0
  382. package/dist/next/resources/video-calls/video-calls-resource.js +6 -0
  383. package/dist/next/resources/wearables/wearable-connections-resource.d.ts +8 -0
  384. package/dist/next/resources/wearables/wearable-connections-resource.js +8 -0
  385. package/dist/next/resources/wearables/wearable-providers-resource.d.ts +10 -0
  386. package/dist/next/resources/wearables/wearable-providers-resource.js +10 -0
  387. package/dist/next/resources/wearables/wearables-resource.d.ts +7 -0
  388. package/dist/next/resources/wearables/wearables-resource.js +5 -0
  389. package/dist/next/storage/ovok-storage.d.ts +16 -0
  390. package/dist/next/storage/ovok-storage.js +8 -0
  391. package/dist/types/ValidationError.d.ts +9 -0
  392. package/dist/utils/patch/getPatchOperationType.d.ts +3 -0
  393. package/dist/utils/patch/getPatchOperationType.js +3 -0
  394. package/package.json +51 -12
@@ -1,732 +1,1651 @@
1
+ /**
2
+ * One numbered page of a Slim list.
3
+ *
4
+ * @category slim
5
+ */
1
6
  export type SlimPage<T> = {
7
+ /** Total number of matching rows. */
2
8
  total: number;
9
+ /** 1-based number of this page. */
3
10
  page: number;
11
+ /** Rows per page requested. */
4
12
  count: number;
13
+ /** Rows on this page. */
5
14
  resources: T[];
6
15
  };
16
+ /**
17
+ * Lifecycle state of a resident.
18
+ *
19
+ * @category slim
20
+ */
7
21
  export type SlimResidentState = "active" | "archived" | "discharged" | "discharged-recent";
22
+ /**
23
+ * A resident's name of one kind.
24
+ *
25
+ * @category slim
26
+ */
8
27
  export type SlimHumanName = {
28
+ /** Kind of name. */
9
29
  use: "official" | "nickname" | "maiden";
30
+ /** Given names. */
10
31
  given?: string[];
32
+ /** Family name. */
11
33
  family?: string;
12
34
  };
35
+ /**
36
+ * A resident (patient) as returned by `getSlimPatient`.
37
+ *
38
+ * @category slim
39
+ */
13
40
  export type SlimPatient = {
41
+ /** Resource id. */
14
42
  id: string;
43
+ /** Names, one entry per use. */
15
44
  name: SlimHumanName[];
45
+ /** Administrative gender. */
16
46
  gender?: "male" | "female" | "other" | "unknown";
47
+ /** Birth date, ISO 8601 date. */
17
48
  birthDate?: string;
49
+ /** Id of the assigned device, or null. */
18
50
  deviceId: string | null;
51
+ /** Id of the zone the resident lives in. */
19
52
  organizationId?: string;
53
+ /** Id of the location. */
20
54
  locationId?: string;
55
+ /** Floor label. */
21
56
  floor?: string;
57
+ /** Room label. */
22
58
  room?: string;
59
+ /** Bed label. */
23
60
  bed?: string;
61
+ /** Lifecycle state of the resident. */
24
62
  residentState: SlimResidentState;
63
+ /** Admission date, ISO 8601. */
25
64
  admissionDate?: string;
65
+ /** Discharge date, ISO 8601. */
26
66
  dischargeDate?: string;
27
67
  };
68
+ /**
69
+ * A resident row in `listSlimPatients`.
70
+ *
71
+ * @category slim
72
+ */
28
73
  export type SlimPatientListItem = {
74
+ /** Resident id. */
29
75
  id: string;
76
+ /** Official name. */
30
77
  name: string;
78
+ /** Nickname, or null when none. */
31
79
  nickname: string | null;
80
+ /** Lifecycle state of the resident. */
32
81
  residentState: SlimResidentState;
82
+ /** Admission date, or null. */
33
83
  admissionDate: string | null;
84
+ /** Discharge date, or null. */
34
85
  dischargeDate: string | null;
86
+ /** Id of the zone, or null. */
35
87
  organizationId: string | null;
88
+ /** Name of the organization. */
36
89
  organizationName: string | null;
90
+ /** Id of the location, or null. */
37
91
  locationId: string | null;
92
+ /** Name of the location. */
38
93
  locationName: string | null;
94
+ /** Id of the assigned device, or null. */
39
95
  deviceId: string | null;
96
+ /** Name of the device. */
40
97
  deviceName: string | null;
98
+ /** Scope of the medical-notification settings, or null when unset. */
41
99
  medicalSettings: SlimSettingsScope | null;
100
+ /** Scope of the bed-activity (out-of-bed) settings, or null when unset. */
42
101
  bedActivitySettings: SlimSettingsScope | null;
43
102
  };
103
+ /**
104
+ * Where a monitoring setting applies: off, project-wide, or per resident.
105
+ *
106
+ * @category slim
107
+ */
44
108
  export type SlimSettingsScope = "inactive" | "global" | "individual";
109
+ /**
110
+ * Filters, sorting and paging for `listSlimPatients`.
111
+ *
112
+ * @category slim
113
+ */
45
114
  export type SlimPatientListQuery = {
115
+ /** 1-based page number. */
46
116
  page?: number;
117
+ /** Rows per page. */
47
118
  count?: number;
119
+ /** Field to sort by. */
48
120
  sortBy?: string;
121
+ /** Sort direction. */
49
122
  orderBy?: "ASC" | "DESC";
123
+ /** Free-text search. */
50
124
  search?: string;
125
+ /** Resident state to list, or `all`. */
51
126
  residentState?: SlimResidentState | "all";
127
+ /** Include recently discharged residents. */
52
128
  includeDischargedRecent?: boolean;
129
+ /** Only residents in this zone. */
53
130
  organizationId?: string;
131
+ /** Filter by whether the resident has a device. */
54
132
  hasDevice?: boolean;
133
+ /** Only residents with this medical-settings scope. */
55
134
  medicalSettings?: SlimSettingsScope;
135
+ /** Only residents with this bed-activity-settings scope. */
56
136
  bedActivitySettings?: SlimSettingsScope;
57
137
  };
138
+ /**
139
+ * Body of `createSlimPatient`.
140
+ *
141
+ * @category slim
142
+ */
58
143
  export type SlimCreatePatient = {
144
+ /** Names, one entry per use. */
59
145
  name: SlimHumanName[];
146
+ /** Administrative gender. */
60
147
  gender?: "male" | "female" | "other" | "unknown";
148
+ /** Birth date, ISO 8601 date. */
61
149
  birthDate?: string;
150
+ /** Device to assign; null for none. */
62
151
  deviceId?: string | null;
152
+ /** Zone of the resident; requires a location or device. */
63
153
  organizationId?: string;
154
+ /** Location to place the resident in. */
64
155
  locationId?: string;
156
+ /** Admission date, ISO 8601. */
65
157
  admissionDate?: string;
66
158
  };
67
- /** Replaces the editable fields; omitting locationId unassigns the resident's devices. */
159
+ /**
160
+ * Replaces the editable fields; omitting locationId unassigns the resident's devices.
161
+ *
162
+ * @category slim
163
+ */
68
164
  export type SlimUpdatePatient = Partial<SlimCreatePatient> & {
165
+ /** New lifecycle state. */
69
166
  residentState?: SlimResidentState;
167
+ /** Discharge date, ISO 8601. */
70
168
  dischargeDate?: string;
71
169
  };
170
+ /**
171
+ * A device as returned by `getSlimDevice`.
172
+ *
173
+ * @category slim
174
+ */
72
175
  export type SlimDevice = {
176
+ /** Device name (its serial). */
73
177
  name: string;
178
+ /** Device status. */
74
179
  status?: "active" | "inactive" | "entered-in-error" | "unknown";
180
+ /** Reasons for the status. */
75
181
  statusReason: Array<{
182
+ /** Reason code. */
76
183
  code: string;
184
+ /** Human-readable reason, or null. */
77
185
  display: string | null;
78
186
  }>;
187
+ /** Id of the device on the IoT platform. */
79
188
  thingsboardId?: string;
189
+ /** Id of the zone. */
80
190
  organizationId?: string;
191
+ /** Name of the zone, or null. */
81
192
  organizationName: string | null;
193
+ /** Id of the location. */
82
194
  locationId?: string;
195
+ /** Name of the location, or null. */
83
196
  locationName: string | null;
197
+ /** Id of the assigned resident. */
84
198
  patientId?: string;
199
+ /** Name of the assigned resident, or null. */
85
200
  patientName: string | null;
201
+ /** Floor label. */
86
202
  floor?: string;
203
+ /** Room label. */
87
204
  room?: string;
205
+ /** Bed label. */
88
206
  bed?: string;
89
207
  };
208
+ /**
209
+ * A device row in `listSlimDevices`.
210
+ *
211
+ * @category slim
212
+ */
90
213
  export type SlimDeviceListItem = {
214
+ /** Resource id. */
91
215
  id: string;
216
+ /** Device name (its serial). */
92
217
  name: string;
218
+ /** Id of the device on the IoT platform. */
93
219
  thingsboardId?: string;
220
+ /** Whether the device is active. */
94
221
  status: "active" | "inactive";
222
+ /** Id of the zone, or null. */
95
223
  organizationId: string | null;
224
+ /** Name of the organization. */
96
225
  organizationName: string | null;
226
+ /** Id of the location, or null. */
97
227
  locationId: string | null;
228
+ /** Name of the location. */
98
229
  locationName: string | null;
230
+ /** Id of the assigned resident, or null. */
99
231
  patientId: string | null;
232
+ /** Name of the resident. */
100
233
  patientName: string | null;
234
+ /** ISO 8601 time of the last activity, or null. */
101
235
  lastActivityTime?: string | null;
236
+ /** ISO 8601 creation time, or null. */
102
237
  createdAt?: string | null;
103
238
  };
239
+ /**
240
+ * Filters, sorting and paging for `listSlimDevices`.
241
+ *
242
+ * @category slim
243
+ */
104
244
  export type SlimDeviceListQuery = {
245
+ /** 1-based page number. */
105
246
  page?: number;
247
+ /** Rows per page. */
106
248
  count?: number;
249
+ /** Field to sort by. */
107
250
  sortBy?: string;
251
+ /** Sort direction. */
108
252
  orderBy?: "ASC" | "DESC";
253
+ /** Free-text search. */
109
254
  search?: string;
255
+ /** Free-text search on the resident name. */
110
256
  patientSearch?: string;
257
+ /** Only devices in this zone. */
111
258
  organizationId?: string;
259
+ /** Only devices at this location. */
112
260
  locationId?: string;
261
+ /** Only the device of this resident. */
113
262
  patientId?: string;
263
+ /** Filter by active or inactive devices. */
114
264
  active?: boolean;
115
265
  };
266
+ /**
267
+ * Body of `createSlimDevice`.
268
+ *
269
+ * @category slim
270
+ */
116
271
  export type SlimCreateDevice = {
272
+ /** Device name (its serial). */
117
273
  name: string;
274
+ /** Id of the device on the IoT platform. */
118
275
  thingsboardId?: string;
276
+ /** Zone of the device. */
119
277
  organizationId?: string;
278
+ /** Location to place the device in. */
120
279
  locationId?: string;
280
+ /** Resident to assign. */
121
281
  patientId?: string;
122
282
  };
283
+ /**
284
+ * Body of `updateSlimDevice`.
285
+ *
286
+ * @category slim
287
+ */
123
288
  export type SlimUpdateDevice = {
289
+ /** New device name; renaming moves the serial. */
124
290
  name: string;
291
+ /** Id of the device on the IoT platform. */
125
292
  thingsboardId?: string;
293
+ /** Zone of the device; null clears it. */
126
294
  organizationId?: string | null;
295
+ /** Location of the device; null unassigns it. */
127
296
  locationId?: string | null;
297
+ /** Resident to assign; null unassigns. */
128
298
  patientId?: string | null;
129
299
  };
300
+ /**
301
+ * Body of `assignSlimDeviceToProject`.
302
+ *
303
+ * @category slim
304
+ */
130
305
  export type SlimAssignDevice = {
306
+ /** Id of the device to assign. */
131
307
  deviceId: string;
308
+ /** Id of the target project. */
132
309
  projectId: string;
310
+ /** Location in the target project, when placing it. */
133
311
  locationId?: string;
134
312
  };
313
+ /**
314
+ * One latest telemetry reading.
315
+ *
316
+ * @category slim
317
+ */
135
318
  export type SlimTelemetryValue = {
319
+ /** Reading value, or null. */
136
320
  value: string | number | boolean | null;
321
+ /** Reading time as epoch milliseconds, or null. */
137
322
  ts: number | null;
138
323
  };
324
+ /**
325
+ * Latest telemetry readings of a device, keyed by vital.
326
+ *
327
+ * @category slim
328
+ */
139
329
  export type SlimTelemetrySummary = Record<string, SlimTelemetryValue>;
330
+ /**
331
+ * Alert state of a device, keyed by vital.
332
+ *
333
+ * @category slim
334
+ */
140
335
  export type SlimAlertSummary = Record<string, unknown>;
336
+ /**
337
+ * Filters, sorting and paging for the live device reads.
338
+ *
339
+ * @category slim
340
+ */
141
341
  export type SlimLiveQuery = {
342
+ /** 1-based page number. */
142
343
  page?: number;
344
+ /** Rows per page. */
143
345
  count?: number;
346
+ /** Field to sort by. */
144
347
  sortBy?: string;
348
+ /** Sort direction. */
145
349
  orderBy?: "ASC" | "DESC";
350
+ /** Free-text search. */
146
351
  search?: string;
352
+ /** Only this device. */
147
353
  deviceId?: string;
354
+ /** Only devices in this zone. */
148
355
  organizationId?: string;
356
+ /** Filter by effective sleep status. */
149
357
  effectiveSleepStatus?: string;
358
+ /** Only devices of residents in this state. */
150
359
  residentState?: SlimResidentState;
360
+ /** Include devices without a resident. */
151
361
  includeUnassigned?: boolean;
152
362
  };
363
+ /**
364
+ * Latest telemetry and alerts for a page of devices, keyed by device id.
365
+ *
366
+ * @category slim
367
+ */
153
368
  export type SlimLiveTelemetry = {
369
+ /** Total matching devices. */
154
370
  total: number;
371
+ /** 1-based page number. */
155
372
  page: number;
373
+ /** Rows per page. */
156
374
  count: number;
375
+ /** Telemetry per device id. */
157
376
  telemetry: Record<string, SlimTelemetrySummary>;
377
+ /** Alerts per device id. */
158
378
  alerts: Record<string, SlimAlertSummary>;
159
379
  };
380
+ /**
381
+ * Latest telemetry and alerts of one device.
382
+ *
383
+ * @category slim
384
+ */
160
385
  export type SlimDeviceTelemetry = {
386
+ /** Id of the device. */
161
387
  deviceId: string;
388
+ /** Latest readings, when available. */
162
389
  telemetry?: SlimTelemetrySummary;
390
+ /** Alert state, when available. */
163
391
  alerts?: SlimAlertSummary;
164
392
  };
393
+ /**
394
+ * Ids of the observations holding each vital's value.
395
+ *
396
+ * @category slim
397
+ */
165
398
  export type SlimObservationIds = {
399
+ /** Observation id for heart rate, or null. */
166
400
  heartRate: string | null;
401
+ /** Observation id for respiratory rate, or null. */
167
402
  respiratoryRate: string | null;
403
+ /** Observation id for sleep status, or null. */
168
404
  sleepStatus: string | null;
405
+ /** Observation id for presence status, or null. */
169
406
  presenceStatus: string | null;
407
+ /** Observation id of the latest batch, or null. */
170
408
  batch?: string | null;
171
409
  };
410
+ /**
411
+ * A notification (alarm or out-of-bed episode); extra fields depend on its type.
412
+ *
413
+ * @category slim
414
+ */
172
415
  export type SlimNotification = {
416
+ /** Id of the notification. */
173
417
  commId: string;
418
+ /** Notification status. */
174
419
  status: string;
420
+ /** ISO 8601 time the notification was raised. */
175
421
  authoredOn: string;
422
+ /** Notification type. */
176
423
  type: string;
424
+ /** Number of notes on the notification, or null when not counted. */
177
425
  noteCount: number | null;
178
426
  [key: string]: unknown;
179
427
  };
428
+ /**
429
+ * Filters and paging for the notification list reads.
430
+ *
431
+ * @category slim
432
+ */
180
433
  export type SlimNotificationsQuery = {
434
+ /** Only notifications of this resident. */
181
435
  patient?: string;
436
+ /** Only notifications of this device. */
182
437
  device?: string;
438
+ /** Only this status. */
183
439
  status?: string;
440
+ /** Only this notification type. */
184
441
  type?: string;
442
+ /** Start of the date range, ISO 8601. */
185
443
  startDate?: string;
444
+ /** End of the date range, ISO 8601. */
186
445
  endDate?: string;
446
+ /** Cursor from the previous response. */
187
447
  cursor?: string;
448
+ /** 1-based page number. */
188
449
  page?: number;
450
+ /** Rows per page. */
189
451
  count?: number;
190
452
  };
453
+ /**
454
+ * A page of notifications, with the reason when the result was cut short.
455
+ *
456
+ * @category slim
457
+ */
191
458
  export type SlimNotificationsResponse = SlimPage<SlimNotification> & {
459
+ /** Set when the result was cut short, otherwise null. */
192
460
  truncated: {
461
+ /** `result-cap` when the row cap was reached, `scan-budget` when the scan budget ran out. */
193
462
  reason: "result-cap" | "scan-budget";
463
+ /** The limit that was reached. */
194
464
  limit: number;
195
465
  } | null;
196
466
  };
467
+ /**
468
+ * The most recent notifications.
469
+ *
470
+ * @category slim
471
+ */
197
472
  export type SlimRecentNotificationsResponse = {
473
+ /** Most recent notifications. */
198
474
  recent: SlimNotification[];
475
+ /** Total number of recent notifications. */
199
476
  total: number;
477
+ /** Whether the recent-notifications cache was already populated. */
200
478
  warm: boolean;
479
+ /**
480
+ * Cache store the rows came from.
481
+ *
482
+ * @hidden
483
+ */
201
484
  source: "redis" | "medplum";
202
485
  };
486
+ /**
487
+ * The project's v1 vital-sign limits.
488
+ *
489
+ * @category slim
490
+ */
203
491
  export type SlimThreshold = {
492
+ /** Id of the stored limits, when any. */
204
493
  id?: string;
494
+ /** Id of the project. */
205
495
  projectId?: string;
496
+ /** Whether the limits are in force. */
206
497
  status: "active" | "retired";
498
+ /** ISO 8601 date of the limits. */
207
499
  date?: string;
500
+ /** Limits per vital. */
208
501
  settings: Record<string, SlimThresholdSettingV1>;
209
502
  };
503
+ /**
504
+ * Whether limits come from the organization or the resident.
505
+ *
506
+ * @category slim
507
+ */
210
508
  export type SlimThresholdModeV1 = "organization" | "patient";
509
+ /**
510
+ * Limit mode as read: also `patient-auto` for limits derived automatically per resident.
511
+ *
512
+ * @category slim
513
+ */
211
514
  export type SlimThresholdReadableModeV1 = SlimThresholdModeV1 | "patient-auto";
515
+ /**
516
+ * Limits for one vital in the v1 format; further keys carry the limit values.
517
+ *
518
+ * @category slim
519
+ */
212
520
  export type SlimThresholdSettingV1 = {
521
+ /** Where the limits come from. */
213
522
  mode?: SlimThresholdReadableModeV1;
523
+ /** Relative (baseline-derived) limit settings. */
214
524
  relative?: {
525
+ /** Whether relative limits are on. */
215
526
  enabled: boolean;
216
527
  [key: string]: unknown;
217
528
  };
218
529
  [key: string]: unknown;
219
530
  };
531
+ /**
532
+ * Limits for one vital in a v1 update.
533
+ *
534
+ * @category slim
535
+ */
220
536
  export type SlimThresholdSettingUpdateV1 = Omit<SlimThresholdSettingV1, "mode"> & {
537
+ /** Where the limits come from. */
221
538
  mode?: SlimThresholdModeV1;
222
539
  };
540
+ /**
541
+ * v1 limit updates, keyed by vital.
542
+ *
543
+ * @category slim
544
+ */
223
545
  export type SlimThresholdSettingsUpdateV1 = Record<string, SlimThresholdSettingUpdateV1>;
546
+ /**
547
+ * Limits for one vital in the v2 format; further keys carry the limit values.
548
+ *
549
+ * @category slim
550
+ */
224
551
  export type SlimThresholdV2Setting = {
552
+ /** Limit mode. */
225
553
  mode: string;
554
+ /** Allowed deviation from the baseline, in percent, or null. */
226
555
  deviationPercent: number | null;
227
556
  /** Null when the bed window is 23 hours 59 minutes or longer. */
228
557
  baselineAverage: number | null;
558
+ /** Band currently in force, or null. */
229
559
  effectiveBand: {
560
+ /** Lower bound of the band. */
230
561
  min: number;
562
+ /** Upper bound of the band. */
231
563
  max: number;
232
564
  } | null;
233
565
  [key: string]: unknown;
234
566
  };
567
+ /**
568
+ * Whether a resident's limits reached the Signals service; null when not applicable.
569
+ *
570
+ * @category slim
571
+ */
235
572
  export type SignalsSyncStatus = {
573
+ /** Always `ok`: the limits reached Signals. */
236
574
  status: "ok";
237
575
  } | {
576
+ /** Always `pending`: the limits are not yet confirmed by Signals. */
238
577
  status: "pending";
578
+ /** Why the sync is pending. */
239
579
  reason: string;
240
580
  } | {
581
+ /** Always `unverified`: delivery to Signals could not be checked. */
241
582
  status: "unverified";
583
+ /** Why delivery could not be verified. */
242
584
  reason: string;
243
585
  } | null;
586
+ /**
587
+ * The project's v2 vital-sign limits.
588
+ *
589
+ * @category slim
590
+ */
244
591
  export type SlimThresholdV2 = {
592
+ /** Id of the stored limits, or null when none. */
245
593
  id: string | null;
594
+ /** Id of the project. */
246
595
  projectId?: string;
596
+ /** Whether the limits are in force. */
247
597
  status?: "active" | "retired";
598
+ /** ISO 8601 date. */
248
599
  date?: string;
600
+ /** Limits per vital. */
249
601
  settings: Record<string, SlimThresholdV2Setting>;
250
602
  };
603
+ /**
604
+ * A resident's v2 limits and their Signals sync state.
605
+ *
606
+ * @category slim
607
+ */
251
608
  export type SlimPatientThresholdV2 = {
609
+ /** Id of the resident. */
252
610
  patientId: string;
611
+ /** Limits per vital. */
253
612
  settings: Record<string, SlimThresholdV2Setting>;
613
+ /** Whether the limits reached Signals. */
254
614
  signalsSync: SignalsSyncStatus;
255
615
  [key: string]: unknown;
256
616
  };
617
+ /**
618
+ * Body of the v2 limit updates; send only the vitals to change.
619
+ *
620
+ * @category slim
621
+ */
257
622
  export type SlimThresholdV2Update = {
623
+ /** Changed limits per vital. */
258
624
  settings: Record<string, Partial<SlimThresholdV2Setting>>;
259
625
  };
626
+ /**
627
+ * One data point of a trend graph.
628
+ *
629
+ * @category slim
630
+ */
260
631
  export type SlimTrendPoint = {
632
+ /** ISO 8601 time of the point. */
261
633
  timestamp: string;
634
+ /** Time as epoch milliseconds. */
262
635
  timestampMs: number;
636
+ /** Value, or null when there is no reading. */
263
637
  data: number | null;
638
+ /** Upper limit at this point. */
264
639
  maxThreshold?: number;
640
+ /** Lower limit at this point. */
265
641
  minThreshold?: number;
642
+ /** Upper baseline at this point. */
266
643
  maxBaseLine?: number;
644
+ /** Lower baseline at this point. */
267
645
  minBaseLine?: number;
646
+ /** ISO 8601 time of the underlying reading. */
268
647
  pointTimestamp?: string;
648
+ /** Time range the point aggregates. */
269
649
  pointTimestampRange?: {
650
+ /** Start of the aggregated range, ISO 8601. */
270
651
  start?: string;
652
+ /** End of the aggregated range, ISO 8601. */
271
653
  end?: string;
272
654
  };
655
+ /** Device manufacturer. */
273
656
  deviceManufacturer?: string;
657
+ /** Device model. */
274
658
  deviceModel?: string;
659
+ /** Id of the device that produced the point. */
275
660
  deviceId?: string;
276
661
  };
662
+ /**
663
+ * Vital that a real-time trend graph can show.
664
+ *
665
+ * @category slim
666
+ */
277
667
  export type SlimGraphType = "heartRate" | "respiratoryRate" | "oxygenSaturation" | "pulseRate" | "perfusionIndex" | "bodyTemperature" | "systolicBloodPressure" | "diastolicBloodPressure" | "heartRateVariability";
668
+ /**
669
+ * Vital that a historical trend graph can show.
670
+ *
671
+ * @category slim
672
+ */
278
673
  export type SlimHistoricalGraphType = "heartRate" | "respiratoryRate";
674
+ /**
675
+ * Summary statistics of a trend series.
676
+ *
677
+ * @category slim
678
+ */
279
679
  export type SlimTrendStats = {
680
+ /** Average, or null without data. */
280
681
  average: number | null;
682
+ /** Maximum, or null without data. */
281
683
  max: number | null;
684
+ /** Minimum, or null without data. */
282
685
  min: number | null;
686
+ /** Number of points. */
283
687
  total: number;
284
688
  };
689
+ /**
690
+ * Trend points and statistics of one device.
691
+ *
692
+ * @category slim
693
+ */
285
694
  export type SlimTrendDeviceData = {
695
+ /** Points in time order. */
286
696
  dataPoints: SlimTrendPoint[];
697
+ /** Summary statistics. */
287
698
  stats: SlimTrendStats;
288
699
  };
700
+ /**
701
+ * Trend graphs keyed by graph type, then by device id.
702
+ *
703
+ * @category slim
704
+ */
289
705
  export type SlimTrends = Partial<Record<SlimGraphType, Record<string, SlimTrendDeviceData>>>;
706
+ /**
707
+ * One sleep metric with its comparison to the average.
708
+ *
709
+ * @category slim
710
+ */
290
711
  export type SlimSleepMetric = {
712
+ /** Value for the night, or null. */
291
713
  current: number | string | null;
714
+ /** Average over the compared nights, or null. */
292
715
  average: number | string | null;
716
+ /** Difference from the average, or null. */
293
717
  diff: number | null;
294
718
  };
719
+ /**
720
+ * Sleep metrics keyed by night, then by metric name.
721
+ *
722
+ * @category slim
723
+ */
295
724
  export type SlimSleepStatistics = Record<string, Record<string, SlimSleepMetric>>;
725
+ /**
726
+ * A location (floor, room, bed) with its device and resident.
727
+ *
728
+ * @category slim
729
+ */
296
730
  export type SlimLocation = {
731
+ /** Location id. */
297
732
  id: string;
733
+ /** Location name. */
298
734
  name: string;
735
+ /** Floor label. */
299
736
  floor?: string;
737
+ /** Room label. */
300
738
  room?: string;
739
+ /** Bed label. */
301
740
  bed?: string;
741
+ /** Id of the zone. */
302
742
  organizationId?: string;
743
+ /** Name of the zone. */
303
744
  organizationName?: string;
745
+ /** Name of the device here. */
304
746
  deviceName?: string;
747
+ /** Name of the resident here. */
305
748
  patientName?: string;
749
+ /** Id of the device here. */
306
750
  deviceId?: string;
751
+ /** Id of the resident here. */
307
752
  patientId?: string;
308
753
  };
754
+ /**
755
+ * Filters and paging for `listSlimLocations`.
756
+ *
757
+ * @category slim
758
+ */
309
759
  export type SlimLocationQuery = {
760
+ /** Free-text search. */
310
761
  search?: string;
762
+ /** Floor label. */
311
763
  floor?: string;
764
+ /** Room label. */
312
765
  room?: string;
766
+ /** Bed label. */
313
767
  bed?: string;
768
+ /** Only locations in this zone. */
314
769
  organizationId?: string;
770
+ /** Only the location of this device. */
315
771
  deviceId?: string;
772
+ /** 1-based page number. */
316
773
  page?: number;
774
+ /** Rows per page. */
317
775
  count?: number;
318
776
  };
777
+ /**
778
+ * Body of `createSlimLocation`.
779
+ *
780
+ * @category slim
781
+ */
319
782
  export type SlimCreateLocation = {
783
+ /** Location name. */
320
784
  name: string;
785
+ /** Floor label. */
321
786
  floor?: string;
787
+ /** Room label. */
322
788
  room?: string;
789
+ /** Bed label. */
323
790
  bed?: string;
791
+ /** Zone of the location. */
324
792
  organizationId?: string;
325
793
  };
794
+ /**
795
+ * Body of `updateSlimLocation`.
796
+ *
797
+ * @category slim
798
+ */
326
799
  export type SlimUpdateLocation = SlimCreateLocation & {
800
+ /** Zone of the location; null clears it. */
327
801
  organizationId?: string | null;
802
+ /** Device to place here; null removes it. */
328
803
  deviceId?: string | null;
804
+ /** Resident to place here. */
329
805
  patientId?: string;
330
806
  };
807
+ /**
808
+ * A zone with its device counts.
809
+ *
810
+ * @category slim
811
+ */
331
812
  export type SlimZone = {
813
+ /** Id of the zone. */
332
814
  zoneId: string;
815
+ /** Name of the zone. */
333
816
  zoneName: string;
817
+ /** All devices in the zone. */
334
818
  deviceCount: number;
819
+ /** Devices assigned to a resident. */
335
820
  assignedResidentDeviceCount: number;
821
+ /** Devices currently active. */
336
822
  activeDeviceCount: number;
823
+ /** Devices currently inactive. */
337
824
  inactiveDeviceCount: number;
338
825
  };
826
+ /**
827
+ * A zone with its locations, devices and residents.
828
+ *
829
+ * @category slim
830
+ */
339
831
  export type SlimZoneDetail = {
832
+ /** Zone id. */
340
833
  id: string;
834
+ /** Zone name. */
341
835
  name: string;
836
+ /** Locations in the zone. */
342
837
  locations: Array<{
838
+ /** Location id. */
343
839
  id: string;
840
+ /** Location name. */
344
841
  name: string;
842
+ /** Floor label. */
345
843
  floor?: string;
844
+ /** Room label. */
346
845
  room?: string;
846
+ /** Bed label. */
347
847
  bed?: string;
848
+ /** Devices at the location. */
348
849
  devices: Array<{
850
+ /** Device id. */
349
851
  id: string;
852
+ /** Device name. */
350
853
  name?: string;
351
854
  }>;
855
+ /** Residents at the location. */
352
856
  residents: Array<{
857
+ /** Resident id. */
353
858
  id: string;
859
+ /** Resident name. */
354
860
  name?: string;
355
861
  }>;
356
862
  }>;
357
863
  };
864
+ /**
865
+ * A generated PDF report and its download link.
866
+ *
867
+ * @category slim
868
+ */
358
869
  export type SlimExportPdf = {
870
+ /** Stored document record. */
359
871
  documentReference: Record<string, unknown>;
872
+ /** Stored PDF content record. */
360
873
  binary: Record<string, unknown>;
874
+ /** URL to download the PDF. */
361
875
  downloadUrl: string;
876
+ /** ISO 8601 time the download link expires. */
362
877
  expiresAt?: string;
363
878
  };
879
+ /**
880
+ * Body of `exportSlimPatientPdf`.
881
+ *
882
+ * @category slim
883
+ */
364
884
  export type SlimExportPdfRequest = {
885
+ /** Report code. */
365
886
  code: string;
887
+ /** Email addresses to send the PDF to. */
366
888
  mailTo?: string[];
889
+ /** IANA time zone. */
367
890
  timeZone?: string;
891
+ /** Report language code. */
368
892
  language: string;
893
+ /** Id of the resident to report on. */
369
894
  patientId: string;
895
+ /** Reporting period. */
370
896
  period: {
897
+ /** Start of the period, ISO 8601. */
371
898
  start: string;
899
+ /** End of the period, ISO 8601. */
372
900
  end: string;
373
901
  };
374
902
  };
903
+ /**
904
+ * A project address.
905
+ *
906
+ * @category slim
907
+ */
375
908
  export type SlimProjectAddress = {
909
+ /** Purpose of the address. */
376
910
  use?: "work" | "temp" | "old" | "billing";
911
+ /** Kind of address. */
377
912
  type?: "postal" | "physical" | "both";
913
+ /** Full text. */
378
914
  text?: string;
915
+ /** Street address lines. */
379
916
  line?: string[];
917
+ /** City. */
380
918
  city?: string;
919
+ /** District. */
381
920
  district?: string;
921
+ /** State or region. */
382
922
  state?: string;
923
+ /** Postal code. */
383
924
  postalCode?: string;
925
+ /** Country. */
384
926
  country?: string;
385
927
  };
928
+ /**
929
+ * A project contact person.
930
+ *
931
+ * @category slim
932
+ */
386
933
  export type SlimProjectContact = {
934
+ /** Phone, email and other contact points. */
387
935
  telecom?: Array<{
936
+ /** Contact system. */
388
937
  system?: "email" | "phone" | "fax" | "pager" | "url" | "sms" | "other";
938
+ /** Purpose of the contact point. */
389
939
  use?: "work" | "temp" | "old" | "mobile";
940
+ /** Contact value. */
390
941
  value?: string;
391
942
  }>;
943
+ /** Name of the contact. */
392
944
  name?: {
945
+ /** Kind of name. */
393
946
  use?: "temp" | "old" | "official" | "usual" | "nickname" | "anonymous" | "maiden";
947
+ /** Name prefixes. */
394
948
  prefix?: string[];
949
+ /** Given names. */
395
950
  given?: string[];
951
+ /** Family name. */
396
952
  family?: string;
953
+ /** Name suffixes. */
397
954
  suffix?: string[];
398
955
  };
956
+ /** Address of the contact. */
399
957
  address?: SlimProjectAddress;
400
958
  };
959
+ /**
960
+ * A project.
961
+ *
962
+ * @category slim
963
+ */
401
964
  export type SlimProject = {
965
+ /** Always `Project`. */
402
966
  resourceType: "Project";
967
+ /** Project id. */
403
968
  id: string;
969
+ /** Project name. */
404
970
  name: string;
971
+ /** Addresses. */
405
972
  address?: SlimProjectAddress[];
973
+ /** Contacts. */
406
974
  contact?: SlimProjectContact[];
975
+ /** Project settings. */
407
976
  settings?: {
977
+ /** IANA time zone of the project. */
408
978
  timeZone?: string;
979
+ /** Daily window used for trends. */
409
980
  trendsPeriod?: {
981
+ /** Start of the daily window, as a time of day. */
410
982
  start: string;
983
+ /** Window length in seconds. */
411
984
  durationSeconds: number;
412
985
  };
413
986
  };
414
987
  };
988
+ /**
989
+ * The current project with its parent and children.
990
+ *
991
+ * @category slim
992
+ */
415
993
  export type SlimProjectRelationships = {
994
+ /** The project of the caller, or null. */
416
995
  currentProject: SlimProject | null;
996
+ /** The parent project, or null. */
417
997
  parentProject: SlimProject | null;
998
+ /** Child projects. */
418
999
  childProjects: SlimProject[];
419
1000
  };
1001
+ /**
1002
+ * The current project with its parent and children, each with a device count.
1003
+ *
1004
+ * @category slim
1005
+ */
420
1006
  export type SlimProjectRelationshipsV2 = {
1007
+ /** The project of the caller, or null. */
421
1008
  currentProject: (SlimProject & {
1009
+ /** Devices in the project. */
422
1010
  deviceCount: number;
423
1011
  }) | null;
1012
+ /** The parent project, or null. */
424
1013
  parentProject: (SlimProject & {
1014
+ /** Devices in the project. */
425
1015
  deviceCount: number;
426
1016
  }) | null;
1017
+ /** Child projects. */
427
1018
  childProjects: Array<SlimProject & {
1019
+ /** Devices in the project. */
428
1020
  deviceCount: number;
429
1021
  }>;
430
1022
  };
1023
+ /**
1024
+ * Body of the child-project create and project update calls.
1025
+ *
1026
+ * @category slim
1027
+ */
431
1028
  export type SlimChildProjectInput = {
1029
+ /** Project id, when updating. */
432
1030
  id?: string;
1031
+ /** Project name. */
433
1032
  name: string;
1033
+ /** Addresses. */
434
1034
  address?: SlimProjectAddress[];
1035
+ /** Contacts. */
435
1036
  contact?: SlimProjectContact[];
1037
+ /** Extra extension data, passed through. */
436
1038
  extension?: unknown;
1039
+ /** Project settings. */
437
1040
  settings?: SlimProject["settings"];
438
1041
  };
1042
+ /**
1043
+ * Filters, sorting and paging for the project-user lists.
1044
+ *
1045
+ * @category slim
1046
+ */
439
1047
  export type SlimProjectUsersQuery = {
1048
+ /** Only this profile type. */
440
1049
  profileType?: "Practitioner";
1050
+ /** Field to sort by. */
441
1051
  sortBy?: "profileName" | "userName" | "accessPolicyName";
1052
+ /** Sort direction. */
442
1053
  orderBy?: "ASC" | "DESC";
1054
+ /** Free-text search. */
443
1055
  search?: string;
1056
+ /** Only users with this access policy. */
444
1057
  accessPolicyId?: string;
1058
+ /** Only this profile. */
445
1059
  profileId?: string;
1060
+ /** Only this user. */
446
1061
  userId?: string;
1062
+ /** 1-based page number. */
447
1063
  page?: number;
1064
+ /** Rows per page. */
448
1065
  count?: number;
449
1066
  };
1067
+ /**
1068
+ * A project user with its profile, membership and access policy.
1069
+ *
1070
+ * @category slim
1071
+ */
450
1072
  export type SlimProjectUser = {
1073
+ /** The user. */
451
1074
  user: {
1075
+ /** Always `User`. */
452
1076
  resourceType: "User";
1077
+ /** User id. */
453
1078
  id: string;
1079
+ /** First name. */
454
1080
  firstName?: string;
1081
+ /** Last name. */
455
1082
  lastName?: string;
1083
+ /** Email address. */
456
1084
  email?: string;
1085
+ /** Project reference. */
457
1086
  project?: {
1087
+ /** Resource reference. */
458
1088
  reference?: string;
1089
+ /** Human-readable text. */
459
1090
  display?: string;
460
1091
  };
1092
+ /** Resource metadata. */
461
1093
  meta?: {
1094
+ /** Id of the owning project. */
462
1095
  project?: string;
1096
+ /** ISO 8601 time of the last update. */
463
1097
  lastUpdated?: string;
464
1098
  };
465
1099
  };
1100
+ /** The profile. */
466
1101
  profile: {
1102
+ /** Always `Practitioner`. */
467
1103
  resourceType: "Practitioner";
1104
+ /** Profile id. */
468
1105
  id: string;
1106
+ /** Names of the practitioner. */
469
1107
  name?: Array<{
1108
+ /** Kind of name. */
470
1109
  use?: string;
1110
+ /** Full name text. */
471
1111
  text?: string;
1112
+ /** Family name. */
472
1113
  family?: string;
1114
+ /** Given names. */
473
1115
  given?: string[];
1116
+ /** Name prefixes. */
474
1117
  prefix?: string[];
1118
+ /** Name suffixes. */
475
1119
  suffix?: string[];
476
1120
  }>;
1121
+ /** Resource metadata. */
477
1122
  meta?: {
1123
+ /** Id of the owning project. */
478
1124
  project?: string;
1125
+ /** ISO 8601 time of the last update. */
479
1126
  lastUpdated?: string;
480
1127
  };
481
1128
  };
1129
+ /** The project membership. */
482
1130
  membership: {
1131
+ /** Always `ProjectMembership`. */
483
1132
  resourceType: "ProjectMembership";
1133
+ /** Membership id. */
484
1134
  id: string;
1135
+ /** Project reference. */
485
1136
  project?: {
1137
+ /** Resource reference. */
486
1138
  reference?: string;
1139
+ /** Human-readable text. */
487
1140
  display?: string;
488
1141
  };
1142
+ /** The user. */
489
1143
  user?: {
1144
+ /** Resource reference. */
490
1145
  reference?: string;
1146
+ /** Human-readable text. */
491
1147
  display?: string;
492
1148
  };
1149
+ /** The profile. */
493
1150
  profile?: {
1151
+ /** Resource reference. */
494
1152
  reference?: string;
1153
+ /** Human-readable text. */
495
1154
  display?: string;
496
1155
  };
1156
+ /** The access policy. */
497
1157
  accessPolicy?: {
1158
+ /** Resource reference. */
498
1159
  reference?: string;
1160
+ /** Human-readable text. */
499
1161
  display?: string;
500
1162
  };
1163
+ /** Resource metadata. */
501
1164
  meta?: {
1165
+ /** Id of the owning project. */
502
1166
  project?: string;
1167
+ /** ISO 8601 time of the last update. */
503
1168
  lastUpdated?: string;
504
1169
  };
505
1170
  };
1171
+ /** `Pending` until the invite is accepted. */
506
1172
  status: "Active" | "Pending";
1173
+ /** The access policy. */
507
1174
  accessPolicy?: {
1175
+ /** Always `AccessPolicy`. */
508
1176
  resourceType: "AccessPolicy";
1177
+ /** Access policy id. */
509
1178
  id: string;
1179
+ /** Access policy name. */
510
1180
  name?: string;
511
1181
  };
512
1182
  };
1183
+ /**
1184
+ * A page of project users.
1185
+ *
1186
+ * @category slim
1187
+ */
513
1188
  export type SlimProjectUsersPage = SlimPage<SlimProjectUser>;
1189
+ /**
1190
+ * Device counts of a project.
1191
+ *
1192
+ * @category slim
1193
+ */
514
1194
  export type SlimProjectDeviceCounts = {
1195
+ /** Id of the project. */
515
1196
  projectId: string;
1197
+ /** All devices in the project. */
516
1198
  totalDeviceCount: number;
1199
+ /** Devices assigned to a resident. */
517
1200
  assignedResidentDeviceCount: number;
1201
+ /** Devices without a resident. */
518
1202
  unassignedDeviceCount: number;
1203
+ /** Devices currently active. */
519
1204
  activeDeviceCount: number;
1205
+ /** Devices currently inactive. */
520
1206
  inactiveDeviceCount: number;
1207
+ /** Radar devices. */
521
1208
  radarDeviceCount: number;
1209
+ /** Withings devices. */
522
1210
  withingsDeviceCount: number;
523
1211
  };
1212
+ /**
1213
+ * Resident counts of a project.
1214
+ *
1215
+ * @category slim
1216
+ */
524
1217
  export type SlimProjectPatientCounts = {
1218
+ /** Id of the project. */
525
1219
  projectId: string;
1220
+ /** All residents in the project. */
526
1221
  totalPatientCount: number;
1222
+ /** Active residents. */
527
1223
  activePatientCount: number;
1224
+ /** Recently discharged residents. */
528
1225
  dischargedRecentPatientCount: number;
1226
+ /** Discharged residents. */
529
1227
  dischargedPatientCount: number;
1228
+ /** Archived residents. */
530
1229
  archivedPatientCount: number;
531
1230
  };
1231
+ /**
1232
+ * Access rule for one resource type; further keys are passed through.
1233
+ *
1234
+ * @category slim
1235
+ */
532
1236
  export type SlimPolicyResource = {
1237
+ /** Resource type the rule covers. */
533
1238
  resourceType: string;
1239
+ /** Allowed interactions, such as read or write. */
534
1240
  interaction?: string[];
1241
+ /** Search criteria limiting the rule. */
535
1242
  criteria?: string;
1243
+ /** Whether matching resources are read-only. */
536
1244
  readonly?: boolean;
537
1245
  [key: string]: unknown;
538
1246
  };
1247
+ /**
1248
+ * An access policy.
1249
+ *
1250
+ * @category slim
1251
+ */
539
1252
  export type SlimPolicy = {
1253
+ /** Always `AccessPolicy`. */
540
1254
  resourceType: "AccessPolicy";
1255
+ /** Policy id. */
541
1256
  id: string;
1257
+ /** Policy name. */
542
1258
  name: string;
1259
+ /** Rules per resource type. */
543
1260
  resource?: SlimPolicyResource[];
1261
+ /** Resource metadata. */
544
1262
  meta?: {
1263
+ /** Id of the owning project. */
545
1264
  project?: string;
1265
+ /** Author of the policy. */
546
1266
  author?: {
1267
+ /** Reference to the author. */
547
1268
  reference: string;
548
1269
  };
1270
+ /** ISO 8601 time of the last update. */
549
1271
  lastUpdated?: string;
550
1272
  };
551
1273
  };
1274
+ /**
1275
+ * A user or profile bound to an access policy.
1276
+ *
1277
+ * @category slim
1278
+ */
552
1279
  export type SlimPolicyMember = {
1280
+ /** Reference to the member. */
553
1281
  reference: string;
1282
+ /** Display name of the member. */
554
1283
  display?: string;
555
1284
  };
1285
+ /**
1286
+ * An access policy with its members.
1287
+ *
1288
+ * @category slim
1289
+ */
556
1290
  export type SlimPolicyResponse = {
1291
+ /** The access policy. */
557
1292
  policy: SlimPolicy;
1293
+ /** Members of the policy. */
558
1294
  members: SlimPolicyMember[];
559
1295
  };
1296
+ /**
1297
+ * Filters, sorting and paging for `listSlimPolicies`.
1298
+ *
1299
+ * @category slim
1300
+ */
560
1301
  export type SlimPolicyListQuery = {
1302
+ /** 1-based page number. */
561
1303
  page?: number;
1304
+ /** Rows per page. */
562
1305
  count?: number;
1306
+ /** Field to sort by. */
563
1307
  sortBy?: "_id" | "_lastUpdated" | "name";
1308
+ /** Sort direction. */
564
1309
  orderBy?: "ASC" | "DESC";
1310
+ /** Only policies of this project. */
565
1311
  projectId?: string;
1312
+ /** Only policies of this profile. */
566
1313
  profile?: string;
1314
+ /** Free-text search. */
567
1315
  search?: string;
568
1316
  };
1317
+ /**
1318
+ * A page of access policies.
1319
+ *
1320
+ * @category slim
1321
+ */
569
1322
  export type SlimPolicyList = {
1323
+ /** Total number of policies. */
570
1324
  total: number;
1325
+ /** Policies on this page. */
571
1326
  resources: SlimPolicyResponse[];
572
1327
  };
1328
+ /**
1329
+ * Body of `createSlimPolicy`.
1330
+ *
1331
+ * @category slim
1332
+ */
573
1333
  export type SlimCreatePolicy = {
1334
+ /** The access policy. */
574
1335
  policy: {
1336
+ /** Always `AccessPolicy`. */
575
1337
  resourceType: "AccessPolicy";
1338
+ /** Policy name. */
576
1339
  name: string;
1340
+ /** Rules per resource type. */
577
1341
  resource: Array<{
1342
+ /** Resource type the rule covers. */
578
1343
  resourceType: string;
1344
+ /** Allowed interactions, such as read or write. */
579
1345
  interaction: string[];
580
1346
  }>;
581
1347
  };
1348
+ /** Members of the policy. */
582
1349
  members: SlimPolicyMember[];
583
1350
  };
1351
+ /**
1352
+ * Body of `updateSlimPolicy`; the policy must carry its id.
1353
+ *
1354
+ * @category slim
1355
+ */
584
1356
  export type SlimUpdatePolicy = Omit<SlimCreatePolicy, "policy"> & {
1357
+ /** The policy to save. */
585
1358
  policy: SlimCreatePolicy["policy"] & {
1359
+ /** Id of the policy to update. */
586
1360
  id: string;
587
1361
  };
588
1362
  };
1363
+ /**
1364
+ * An organization.
1365
+ *
1366
+ * @category slim
1367
+ */
589
1368
  export type SlimOrganization = {
1369
+ /** Organization id. */
590
1370
  id: string;
1371
+ /** Organization name. */
591
1372
  name: string;
1373
+ /** Id of the parent organization. */
592
1374
  parentOrganizationId?: string;
1375
+ /** Description. */
593
1376
  description?: string;
594
1377
  };
1378
+ /**
1379
+ * Body of the organization create and update calls.
1380
+ *
1381
+ * @category slim
1382
+ */
595
1383
  export type SlimOrganizationInput = {
1384
+ /** Organization name. */
596
1385
  name: string;
1386
+ /** Id of the parent organization. */
597
1387
  parentOrganizationId?: string;
1388
+ /** Description; null clears it. */
598
1389
  description?: string | null;
599
1390
  };
1391
+ /**
1392
+ * Body of `inviteSlimPractitioner`.
1393
+ *
1394
+ * @category slim
1395
+ */
600
1396
  export type SlimPractitionerInviteInput = {
1397
+ /** Email address of the invitee. */
601
1398
  email: string;
1399
+ /** Given name. */
602
1400
  name: string;
1401
+ /** Surname. */
603
1402
  surname: string;
1403
+ /** Id of the access policy. */
604
1404
  accessPolicyId: string;
1405
+ /** Whether to invite as an administrator. */
605
1406
  admin?: boolean;
1407
+ /** Project to invite to; defaults to the current project. */
606
1408
  projectId?: string;
607
1409
  };
1410
+ /**
1411
+ * The pending membership and profile created by an invite.
1412
+ *
1413
+ * @category slim
1414
+ */
608
1415
  export type SlimPractitionerInviteResponse = {
1416
+ /** The project membership. */
609
1417
  membership: {
1418
+ /** Always `ProjectMembership`. */
610
1419
  resourceType: "ProjectMembership";
1420
+ /** Membership id. */
611
1421
  id: string;
1422
+ /** Project reference. */
612
1423
  project?: {
1424
+ /** Resource reference. */
613
1425
  reference: string;
1426
+ /** Human-readable text. */
614
1427
  display?: string;
615
1428
  };
1429
+ /** The user. */
616
1430
  user?: {
1431
+ /** Resource reference. */
617
1432
  reference: string;
618
1433
  };
1434
+ /** The profile. */
619
1435
  profile?: {
1436
+ /** Resource reference. */
620
1437
  reference: string;
621
1438
  };
1439
+ /** The access policy. */
622
1440
  accessPolicy?: {
1441
+ /** Resource reference. */
623
1442
  reference: string;
1443
+ /** Human-readable text. */
624
1444
  display: string;
625
1445
  };
1446
+ /** Resource metadata. */
626
1447
  meta?: {
1448
+ /** Id of the owning project. */
627
1449
  project?: string;
1450
+ /** Author reference. */
628
1451
  author?: {
1452
+ /** Resource reference. */
629
1453
  reference: string;
630
1454
  };
1455
+ /** ISO 8601 time of the last update. */
631
1456
  lastUpdated?: string;
632
1457
  };
633
1458
  };
1459
+ /** The profile. */
634
1460
  profile: {
1461
+ /** Always `Practitioner`. */
635
1462
  resourceType: "Practitioner";
1463
+ /** Profile id. */
636
1464
  id: string;
1465
+ /** Names of the practitioner. */
637
1466
  name?: unknown[];
1467
+ /** Resource metadata. */
638
1468
  meta?: {
1469
+ /** Id of the owning project. */
639
1470
  project?: string;
1471
+ /** ISO 8601 time of the last update. */
640
1472
  lastUpdated?: string;
641
1473
  };
642
1474
  };
1475
+ /** Always `Pending` until the invite is accepted. */
643
1476
  status: "Pending";
644
1477
  };
1478
+ /**
1479
+ * Kind of user profile.
1480
+ *
1481
+ * @category slim
1482
+ */
645
1483
  export type SlimUserProfileType = "Patient" | "Practitioner";
1484
+ /**
1485
+ * Health of one dependency; fields present depend on the dependency.
1486
+ *
1487
+ * @category slim
1488
+ */
646
1489
  export type SlimHealthDependency = {
1490
+ /** Whether the dependency is up. */
647
1491
  status: "up" | "down";
1492
+ /** Version. */
648
1493
  version?: string;
1494
+ /** Whether the database is reachable. */
649
1495
  postgres?: boolean;
1496
+ /** Whether the cache is reachable. */
650
1497
  redis?: boolean;
1498
+ /** Host platform. */
651
1499
  platform?: string;
1500
+ /** Runtime version. */
652
1501
  runtime?: string;
1502
+ /** Response time in milliseconds. */
653
1503
  responseTimeMs?: number;
1504
+ /** Server metrics. */
654
1505
  serverMetrics?: {
1506
+ /** Database metrics. */
655
1507
  db: {
1508
+ /** Idle database connections. */
656
1509
  idleConnections?: number;
1510
+ /** Queries waiting for a client connection. */
657
1511
  queriesAwaitingClient?: number;
1512
+ /** Health-check round trip, in seconds. */
658
1513
  healthcheckRttSeconds?: number;
659
1514
  };
1515
+ /** Memory metrics. */
660
1516
  memory: {
1517
+ /** Used heap, in bytes. */
661
1518
  usedHeapBytes?: number;
1519
+ /** Old-space size, in bytes. */
662
1520
  oldSpaceBytes?: number;
1521
+ /** New-space size, in bytes. */
663
1522
  newSpaceBytes?: number;
664
1523
  };
1524
+ /** Job queue depths. */
665
1525
  queues: {
1526
+ /** Batch jobs waiting. */
666
1527
  batchWaiting?: number;
1528
+ /** Batch jobs delayed. */
667
1529
  batchDelayed?: number;
1530
+ /** Cron jobs waiting. */
668
1531
  cronWaiting?: number;
1532
+ /** Cron jobs delayed. */
669
1533
  cronDelayed?: number;
1534
+ /** Subscription jobs waiting. */
670
1535
  subscriptionWaiting?: number;
1536
+ /** Subscription jobs delayed. */
671
1537
  subscriptionDelayed?: number;
672
1538
  };
1539
+ /** FHIR operation counts. */
673
1540
  fhirOps?: {
1541
+ /** Read operations. */
674
1542
  readCount?: number;
1543
+ /** Search operations. */
675
1544
  searchCount?: number;
1545
+ /** Create operations. */
676
1546
  createCount?: number;
1547
+ /** Update operations. */
677
1548
  updateCount?: number;
1549
+ /** Delete operations. */
678
1550
  deleteCount?: number;
1551
+ /** Patch operations. */
679
1552
  patchCount?: number;
680
1553
  };
1554
+ /** Server timing metrics. */
681
1555
  server?: {
1556
+ /** Longest indexing duration, in milliseconds. */
682
1557
  indexingDurationMsMax?: number;
1558
+ /** Longest validation duration, in milliseconds. */
683
1559
  validationDurationMsMax?: number;
684
1560
  };
685
1561
  };
1562
+ /** Uptime in seconds. */
686
1563
  uptimeSeconds?: number;
1564
+ /** Connected clients. */
687
1565
  connectedClients?: number;
1566
+ /** Used memory, in bytes. */
688
1567
  usedMemoryBytes?: number;
1568
+ /** Used memory, human-readable. */
689
1569
  usedMemoryHuman?: string;
1570
+ /** Peak memory, in bytes. */
690
1571
  peakMemoryBytes?: number;
1572
+ /** Peak memory, human-readable. */
691
1573
  peakMemoryHuman?: string;
1574
+ /** Operations per second. */
692
1575
  opsPerSecond?: number;
1576
+ /** Cache hit ratio. */
693
1577
  hitRate?: number;
1578
+ /** Evicted keys. */
694
1579
  evictedKeys?: number;
1580
+ /** Blocked clients. */
695
1581
  blockedClients?: number;
696
1582
  };
1583
+ /**
1584
+ * Service health report.
1585
+ *
1586
+ * @category slim
1587
+ */
697
1588
  export type SlimHealth = {
1589
+ /** Overall service status. */
698
1590
  status: "healthy" | "degraded" | "unhealthy";
1591
+ /** Deployment environment name. */
699
1592
  environment: string;
1593
+ /** Deployed version, or null. */
700
1594
  version: string | null;
1595
+ /** Uptime in seconds. */
701
1596
  uptimeSeconds: number;
1597
+ /** ISO 8601 time of the report. */
702
1598
  timestamp: string;
1599
+ /** Public endpoints. */
703
1600
  endpoints: {
1601
+ /** API base URL. */
704
1602
  api: string;
1603
+ /** FHIR base URL. */
705
1604
  fhir: string;
706
1605
  };
1606
+ /** Dependency health. */
707
1607
  externalSystems: {
1608
+ /** FHIR store health. */
708
1609
  fhirStore: SlimHealthDependency;
1610
+ /** Whether the cache is reachable. */
709
1611
  redis: SlimHealthDependency;
710
1612
  };
1613
+ /** Cache statistics. */
711
1614
  cache?: {
1615
+ /** Cache hits. */
712
1616
  hits: number;
1617
+ /** Cache misses. */
713
1618
  misses: number;
1619
+ /** Cache errors. */
714
1620
  errors: number;
1621
+ /** Cache hit ratio. */
715
1622
  hitRate?: number;
716
1623
  };
1624
+ /** Process metrics. */
717
1625
  ovok?: {
1626
+ /** CPU usage. */
718
1627
  cpuUsage?: number;
1628
+ /** Memory in use, in bytes. */
719
1629
  memoryUsageBytes?: number;
1630
+ /** Event-loop lag in milliseconds. */
720
1631
  eventLoopLagMs?: number;
721
1632
  };
1633
+ /** Host system metrics. */
722
1634
  system?: {
1635
+ /** CPU utilization. */
723
1636
  cpuUtilization?: number;
1637
+ /** 1-minute load average. */
724
1638
  loadAverage1m?: number;
1639
+ /** 5-minute load average. */
725
1640
  loadAverage5m?: number;
1641
+ /** 15-minute load average. */
726
1642
  loadAverage15m?: number;
1643
+ /** Memory in use, in bytes. */
727
1644
  memoryUsageBytes?: number;
728
1645
  };
1646
+ /** Observability links. */
729
1647
  observability: {
1648
+ /** Observability dashboard link, or null. */
730
1649
  signoz: string | null;
731
1650
  };
732
1651
  };