@ovok/core 0.4.36 → 0.4.38

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 (127) hide show
  1. package/dist/client/auth/account-storage.d.ts +1 -0
  2. package/dist/client/auth/account-storage.js +2 -1
  3. package/dist/{utils → client}/auth/exchange-code.d.ts +1 -1
  4. package/dist/{utils → client}/auth/generate-code-challenge-and-verifier.js +5 -17
  5. package/dist/{utils → client}/auth/handle-tenant-code.d.ts +1 -1
  6. package/dist/{utils → client}/auth/handle-tenant-code.js +1 -1
  7. package/dist/client/auth/methods/appleLogin.js +2 -6
  8. package/dist/client/auth/methods/changePassword.js +2 -1
  9. package/dist/client/auth/methods/getSessions.js +2 -1
  10. package/dist/client/auth/methods/googleLogin.js +2 -6
  11. package/dist/client/auth/methods/login.js +26 -44
  12. package/dist/client/auth/methods/logout.js +2 -1
  13. package/dist/client/auth/methods/requestDeleteUser.js +5 -4
  14. package/dist/client/auth/methods/revokeSessions.js +2 -1
  15. package/dist/client/auth/methods/socialLogin.d.ts +7 -0
  16. package/dist/client/auth/methods/socialLogin.js +11 -0
  17. package/dist/client/auth/session-fetch.d.ts +35 -0
  18. package/dist/client/auth/session-fetch.js +206 -0
  19. package/dist/client/auth/session-http.d.ts +11 -0
  20. package/dist/client/auth/session-http.js +169 -0
  21. package/dist/client/auth/sha256.d.ts +2 -0
  22. package/dist/client/auth/sha256.js +65 -0
  23. package/dist/{utils → client}/auth/start-login.d.ts +2 -2
  24. package/dist/client/change-history/methods.js +2 -1
  25. package/dist/client/cms/methods.js +16 -28
  26. package/dist/client/consent/methods.js +3 -2
  27. package/dist/client/email/methods.js +2 -1
  28. package/dist/client/errors/ovok-error-utils.d.ts +6 -0
  29. package/dist/client/errors/ovok-error-utils.js +10 -1
  30. package/dist/client/errors/ovok-error.js +6 -13
  31. package/dist/client/errors/rate-limit-error.js +2 -6
  32. package/dist/client/experience/methods.js +28 -37
  33. package/dist/client/invites/methods.js +8 -12
  34. package/dist/client/notifications/methods.js +5 -5
  35. package/dist/client/observation/fhir-systems.d.ts +4 -0
  36. package/dist/client/observation/fhir-systems.js +7 -0
  37. package/dist/client/observation/methods/generateObservationBodiesByMeasurement.js +23 -29
  38. package/dist/client/observation/methods/getLatestObservationsByCodes.js +6 -9
  39. package/dist/client/observation/methods/observationsToMeasurements.js +44 -91
  40. package/dist/client/observation/services/base-observation-service.js +4 -3
  41. package/dist/client/observation/services/blood-pressure.js +1 -4
  42. package/dist/client/observation/services/{baby-sleep.d.ts → component-observation-services.d.ts} +18 -13
  43. package/dist/client/observation/services/component-observation-services.js +69 -0
  44. package/dist/client/observation/services/creator.d.ts +1 -2
  45. package/dist/client/observation/services/creator.js +15 -33
  46. package/dist/client/observation/services/ecg-observation-fragments.js +5 -6
  47. package/dist/client/observation/services/ecg.js +3 -2
  48. package/dist/client/observation/services/lipid-panel.js +8 -12
  49. package/dist/client/observation/services/measurement-time.d.ts +4 -0
  50. package/dist/client/observation/services/measurement-time.js +6 -0
  51. package/dist/client/observation/services/single-value-services.d.ts +36 -0
  52. package/dist/client/observation/services/single-value-services.js +100 -0
  53. package/dist/client/observation/services/uric-acid-service.js +6 -7
  54. package/dist/client/observation/types/generate-measurement/HealthConnectTypes.d.ts +2 -458
  55. package/dist/client/observation/types/generate-measurement/HealthConnectTypes.js +0 -6
  56. package/dist/client/offline/offline-measurement-queue.js +31 -28
  57. package/dist/client/ovok-client.d.ts +7 -15
  58. package/dist/client/ovok-client.js +54 -398
  59. package/dist/client/patient/methods.js +27 -36
  60. package/dist/client/patient-sharing/methods.js +4 -4
  61. package/dist/client/platform/methods.js +21 -30
  62. package/dist/client/platform/types.d.ts +3 -6
  63. package/dist/client/query-string.d.ts +3 -0
  64. package/dist/client/query-string.js +15 -0
  65. package/dist/client/questionnaire-response/methods/createQuestionnaireResponseWithObservations.js +2 -1
  66. package/dist/client/questionnaire-response/methods/extractQuestionnaireObservations.js +1 -2
  67. package/dist/client/questionnaire-response/methods/populateQuestionnaire.js +1 -2
  68. package/dist/client/questionnaire-response/methods/submitQuestionnaireResponse.js +2 -1
  69. package/dist/client/request-options.d.ts +2 -0
  70. package/dist/client/request-options.js +6 -0
  71. package/dist/client/signals/errors.js +2 -6
  72. package/dist/client/signals/methods.js +22 -22
  73. package/dist/client/slim/live-read.d.ts +4 -0
  74. package/dist/client/slim/live-read.js +87 -0
  75. package/dist/client/slim/methods.d.ts +3 -0
  76. package/dist/client/slim/methods.js +73 -166
  77. package/dist/client/storage.js +3 -2
  78. package/dist/conformance/capability-requirements.js +1 -1
  79. package/dist/conformance/capability.js +8 -7
  80. package/dist/hooks/account-hooks.js +6 -68
  81. package/dist/hooks/api-hooks.d.ts +10 -6
  82. package/dist/hooks/api-hooks.js +29 -88
  83. package/dist/hooks/cms-hooks.js +8 -13
  84. package/dist/hooks/email-hooks.js +1 -40
  85. package/dist/hooks/experience-hooks.js +4 -60
  86. package/dist/hooks/index.d.ts +2 -2
  87. package/dist/hooks/index.js +4 -4
  88. package/dist/hooks/invites-hooks.js +0 -1
  89. package/dist/hooks/notification-hooks.d.ts +4 -1
  90. package/dist/hooks/notification-hooks.js +29 -86
  91. package/dist/hooks/notification-invalidation.d.ts +6 -0
  92. package/dist/hooks/notification-invalidation.js +52 -0
  93. package/dist/hooks/notification-note-hooks.js +13 -28
  94. package/dist/hooks/observation-hooks.js +2 -4
  95. package/dist/hooks/patient-hooks.js +13 -113
  96. package/dist/hooks/patient-sharing-hooks.js +2 -7
  97. package/dist/hooks/platform-hooks.js +3 -51
  98. package/dist/hooks/poll-hooks.js +10 -8
  99. package/dist/hooks/signals-alert-hooks.js +4 -6
  100. package/dist/hooks/signals-hooks.js +2 -45
  101. package/package.json +1 -1
  102. package/dist/client/observation/services/baby-sleep.js +0 -69
  103. package/dist/client/observation/services/blood-glucose.d.ts +0 -12
  104. package/dist/client/observation/services/blood-glucose.js +0 -36
  105. package/dist/client/observation/services/body-temperature.d.ts +0 -13
  106. package/dist/client/observation/services/body-temperature.js +0 -36
  107. package/dist/client/observation/services/body-weight.d.ts +0 -13
  108. package/dist/client/observation/services/body-weight.js +0 -36
  109. package/dist/client/observation/services/heart-rate-variability.d.ts +0 -13
  110. package/dist/client/observation/services/heart-rate-variability.js +0 -38
  111. package/dist/client/observation/services/heart-rate.d.ts +0 -13
  112. package/dist/client/observation/services/heart-rate.js +0 -39
  113. package/dist/client/observation/services/respiratory-rate.d.ts +0 -13
  114. package/dist/client/observation/services/respiratory-rate.js +0 -38
  115. package/dist/client/observation/services/respiratory-therapy.d.ts +0 -28
  116. package/dist/client/observation/services/respiratory-therapy.js +0 -69
  117. package/dist/client/observation/services/resting-heart-rate.d.ts +0 -13
  118. package/dist/client/observation/services/resting-heart-rate.js +0 -38
  119. package/dist/client/observation/services/vo2-max.d.ts +0 -13
  120. package/dist/client/observation/services/vo2-max.js +0 -38
  121. package/dist/client/observation/services/walking-heart-rate-average.d.ts +0 -12
  122. package/dist/client/observation/services/walking-heart-rate-average.js +0 -38
  123. package/dist/utils/auth/sha256.d.ts +0 -8
  124. package/dist/utils/auth/sha256.js +0 -300
  125. /package/dist/{utils → client}/auth/exchange-code.js +0 -0
  126. /package/dist/{utils → client}/auth/generate-code-challenge-and-verifier.d.ts +0 -0
  127. /package/dist/{utils → client}/auth/start-login.js +0 -0
@@ -21,80 +21,71 @@ exports.getPatientDevice = getPatientDevice;
21
21
  exports.listPatientNotifications = listPatientNotifications;
22
22
  exports.getPatientNotification = getPatientNotification;
23
23
  exports.getPatientDashboard = getPatientDashboard;
24
- const query = (params) => {
25
- const values = new URLSearchParams();
26
- for (const [key, value] of Object.entries(params)) {
27
- if (value !== undefined) {
28
- values.set(key, String(value));
29
- }
30
- }
31
- const encoded = values.toString();
32
- return encoded === "" ? "" : `?${encoded}`;
33
- };
24
+ const query_string_1 = require("../query-string");
25
+ const request_options_1 = require("../request-options");
34
26
  async function getCurrentPatientProfile(requestOptions) {
35
- return this.get("/auth/me", ...(requestOptions === undefined ? [] : [requestOptions]));
27
+ return this.get("/auth/me", ...(0, request_options_1.optionalArg)(requestOptions));
36
28
  }
37
29
  async function getPatientLatestObservations(params = {}, requestOptions) {
38
- const code = Array.isArray(params.code) ? params.code.join(",") : params.code;
39
- return this.get(`/fhir/Observation/$lastn${query({
30
+ return this.get(`/fhir/Observation/$lastn${(0, query_string_1.toQueryString)({
40
31
  patient: params.patient,
41
32
  max: params.max,
42
- code,
43
- })}`, { ...{ cache: "no-cache" }, ...requestOptions });
33
+ code: params.code,
34
+ })}`, { cache: "no-cache", ...requestOptions });
44
35
  }
45
36
  async function listPatientAppointments(params = {}, requestOptions) {
46
- return this.searchResources("Appointment", params, ...(requestOptions === undefined ? [] : [requestOptions]));
37
+ return this.searchResources("Appointment", params, ...(0, request_options_1.optionalArg)(requestOptions));
47
38
  }
48
39
  async function getPatientAppointment(appointmentId, requestOptions) {
49
- return this.readResource("Appointment", appointmentId, ...(requestOptions === undefined ? [] : [requestOptions]));
40
+ return this.readResource("Appointment", appointmentId, ...(0, request_options_1.optionalArg)(requestOptions));
50
41
  }
51
42
  async function createPatientAppointment(appointment, requestOptions) {
52
- return this.createResource(appointment, ...(requestOptions === undefined ? [] : [requestOptions]));
43
+ return this.createResource(appointment, ...(0, request_options_1.optionalArg)(requestOptions));
53
44
  }
54
45
  async function updatePatientAppointment(appointment, requestOptions) {
55
- return this.updateResource(appointment, ...(requestOptions === undefined ? [] : [requestOptions]));
46
+ return this.updateResource(appointment, ...(0, request_options_1.optionalArg)(requestOptions));
56
47
  }
57
48
  async function listPatientSchedules(params = {}, requestOptions) {
58
- return this.searchResources("Schedule", params, ...(requestOptions === undefined ? [] : [requestOptions]));
49
+ return this.searchResources("Schedule", params, ...(0, request_options_1.optionalArg)(requestOptions));
59
50
  }
60
51
  async function listPatientSlots(params = {}, requestOptions) {
61
- return this.searchResources("Slot", params, ...(requestOptions === undefined ? [] : [requestOptions]));
52
+ return this.searchResources("Slot", params, ...(0, request_options_1.optionalArg)(requestOptions));
62
53
  }
63
54
  async function listPatientMeasurementHistory(params = {}, requestOptions) {
64
- return (await this.searchResources("Observation", params, ...(requestOptions === undefined ? [] : [requestOptions])));
55
+ return (await this.searchResources("Observation", params, ...(0, request_options_1.optionalArg)(requestOptions)));
65
56
  }
66
57
  async function getPatientMeasurement(measurementId, requestOptions) {
67
- return this.readResource("Observation", measurementId, ...(requestOptions === undefined ? [] : [requestOptions]));
58
+ return this.readResource("Observation", measurementId, ...(0, request_options_1.optionalArg)(requestOptions));
68
59
  }
69
60
  async function listPatientCarePlans(params = {}, requestOptions) {
70
- return (await this.searchResources("CarePlan", params, ...(requestOptions === undefined ? [] : [requestOptions])));
61
+ return (await this.searchResources("CarePlan", params, ...(0, request_options_1.optionalArg)(requestOptions)));
71
62
  }
72
63
  async function getPatientCarePlan(carePlanId, requestOptions) {
73
- return this.readResource("CarePlan", carePlanId, ...(requestOptions === undefined ? [] : [requestOptions]));
64
+ return this.readResource("CarePlan", carePlanId, ...(0, request_options_1.optionalArg)(requestOptions));
74
65
  }
75
66
  async function listPatientQuestionnaires(params = {}, requestOptions) {
76
- return (await this.searchResources("Questionnaire", params, ...(requestOptions === undefined ? [] : [requestOptions])));
67
+ return (await this.searchResources("Questionnaire", params, ...(0, request_options_1.optionalArg)(requestOptions)));
77
68
  }
78
69
  async function getPatientQuestionnaire(questionnaireId, requestOptions) {
79
- return this.readResource("Questionnaire", questionnaireId, ...(requestOptions === undefined ? [] : [requestOptions]));
70
+ return this.readResource("Questionnaire", questionnaireId, ...(0, request_options_1.optionalArg)(requestOptions));
80
71
  }
81
72
  async function listPatientQuestionnaireResponses(params = {}, requestOptions) {
82
- return (await this.searchResources("QuestionnaireResponse", params, ...(requestOptions === undefined ? [] : [requestOptions])));
73
+ return (await this.searchResources("QuestionnaireResponse", params, ...(0, request_options_1.optionalArg)(requestOptions)));
83
74
  }
84
75
  async function getPatientQuestionnaireResponse(questionnaireResponseId, requestOptions) {
85
- return this.readResource("QuestionnaireResponse", questionnaireResponseId, ...(requestOptions === undefined ? [] : [requestOptions]));
76
+ return this.readResource("QuestionnaireResponse", questionnaireResponseId, ...(0, request_options_1.optionalArg)(requestOptions));
86
77
  }
87
78
  async function listPatientDevices(params = {}, requestOptions) {
88
- return (await this.searchResources("Device", params, ...(requestOptions === undefined ? [] : [requestOptions])));
79
+ return (await this.searchResources("Device", params, ...(0, request_options_1.optionalArg)(requestOptions)));
89
80
  }
90
81
  async function getPatientDevice(deviceId, requestOptions) {
91
- return this.readResource("Device", deviceId, ...(requestOptions === undefined ? [] : [requestOptions]));
82
+ return this.readResource("Device", deviceId, ...(0, request_options_1.optionalArg)(requestOptions));
92
83
  }
93
84
  async function listPatientNotifications(params = {}, requestOptions) {
94
- return (await this.searchResources("CommunicationRequest", params, ...(requestOptions === undefined ? [] : [requestOptions])));
85
+ return (await this.searchResources("CommunicationRequest", params, ...(0, request_options_1.optionalArg)(requestOptions)));
95
86
  }
96
87
  async function getPatientNotification(notificationId, requestOptions) {
97
- return this.readResource("CommunicationRequest", notificationId, ...(requestOptions === undefined ? [] : [requestOptions]));
88
+ return this.readResource("CommunicationRequest", notificationId, ...(0, request_options_1.optionalArg)(requestOptions));
98
89
  }
99
90
  async function getPatientDashboard(params = {}, requestOptions) {
100
91
  var _a, _b, _c, _d, _e, _f;
@@ -103,16 +94,16 @@ async function getPatientDashboard(params = {}, requestOptions) {
103
94
  const latestObservations = await this.getPatientLatestObservations({
104
95
  ...params.latestObservations,
105
96
  patient: (_b = (_a = params.latestObservations) === null || _a === void 0 ? void 0 : _a.patient) !== null && _b !== void 0 ? _b : patient,
106
- }, ...(requestOptions === undefined ? [] : [requestOptions]));
97
+ }, ...(0, request_options_1.optionalArg)(requestOptions));
107
98
  const [measurementHistory, carePlans] = await Promise.all([
108
99
  this.listPatientMeasurementHistory({
109
100
  ...params.measurementHistory,
110
101
  patient: (_d = (_c = params.measurementHistory) === null || _c === void 0 ? void 0 : _c.patient) !== null && _d !== void 0 ? _d : patient,
111
- }, ...(requestOptions === undefined ? [] : [requestOptions])),
102
+ }, ...(0, request_options_1.optionalArg)(requestOptions)),
112
103
  this.listPatientCarePlans({
113
104
  ...params.carePlans,
114
105
  patient: (_f = (_e = params.carePlans) === null || _e === void 0 ? void 0 : _e.patient) !== null && _f !== void 0 ? _f : patient,
115
- }, ...(requestOptions === undefined ? [] : [requestOptions])),
106
+ }, ...(0, request_options_1.optionalArg)(requestOptions)),
116
107
  ]);
117
108
  return { carePlans, latestObservations, measurementHistory, profile };
118
109
  }
@@ -6,7 +6,7 @@ exports.listPatientSharing = listPatientSharing;
6
6
  exports.revokePatientSharing = revokePatientSharing;
7
7
  exports.getPatientSharingSettings = getPatientSharingSettings;
8
8
  exports.updatePatientSharingSettings = updatePatientSharingSettings;
9
- const segment = (value) => encodeURIComponent(value);
9
+ const request_options_1 = require("../request-options");
10
10
  function createPatientSharingInvite(body, requestOptions) {
11
11
  return this.post("/v1/patient-sharing/invites", body, undefined, requestOptions);
12
12
  }
@@ -17,7 +17,7 @@ function redeemPatientSharingInvite(body, requestOptions) {
17
17
  });
18
18
  }
19
19
  function listPatientSharing(requestOptions) {
20
- return this.get("/v1/patient-sharing/shares", ...(requestOptions === undefined ? [] : [requestOptions])).then((shares) => {
20
+ return this.get("/v1/patient-sharing/shares", ...(0, request_options_1.optionalArg)(requestOptions)).then((shares) => {
21
21
  var _a;
22
22
  return ({
23
23
  ...shares,
@@ -26,11 +26,11 @@ function listPatientSharing(requestOptions) {
26
26
  });
27
27
  }
28
28
  async function revokePatientSharing(consentId, requestOptions) {
29
- await this.delete(`/v1/patient-sharing/shares/${segment(consentId)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
29
+ await this.delete(`/v1/patient-sharing/shares/${encodeURIComponent(consentId)}`, ...(0, request_options_1.optionalArg)(requestOptions));
30
30
  this.invalidateUrl("/v1/patient-sharing/shares");
31
31
  }
32
32
  function getPatientSharingSettings(requestOptions) {
33
- return this.get("/v1/patient-sharing/settings", ...(requestOptions === undefined ? [] : [requestOptions]));
33
+ return this.get("/v1/patient-sharing/settings", ...(0, request_options_1.optionalArg)(requestOptions));
34
34
  }
35
35
  function updatePatientSharingSettings(settings, requestOptions) {
36
36
  return this.put("/v1/patient-sharing/settings", settings, undefined, requestOptions);
@@ -20,75 +20,66 @@ exports.deleteLocalization = deleteLocalization;
20
20
  exports.getI18nextDocument = getI18nextDocument;
21
21
  exports.updateI18nextDocument = updateI18nextDocument;
22
22
  exports.getPatientLastObservations = getPatientLastObservations;
23
- const query = (params) => {
24
- const values = new URLSearchParams();
25
- for (const [key, value] of Object.entries(params)) {
26
- if (value !== undefined) {
27
- values.set(key, String(value));
28
- }
29
- }
30
- const encoded = values.toString();
31
- return encoded === "" ? "" : `?${encoded}`;
32
- };
33
- const segment = (value) => encodeURIComponent(value);
23
+ const query_string_1 = require("../query-string");
24
+ const request_options_1 = require("../request-options");
34
25
  async function getAccounts(requestOptions) {
35
- return this.get("/accounts", ...(requestOptions === undefined ? [] : [requestOptions]));
26
+ return this.get("/accounts", ...(0, request_options_1.optionalArg)(requestOptions));
36
27
  }
37
28
  async function listAdministeredProjects(params = {}, requestOptions) {
38
- return this.get(`/v1/projects${query(params)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
29
+ return this.get(`/v1/projects${(0, query_string_1.toQueryString)(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
39
30
  }
40
31
  async function listProjectMembers(params = {}, requestOptions) {
41
- return this.get(`/v1/projects/me/members${query(params)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
32
+ return this.get(`/v1/projects/me/members${(0, query_string_1.toQueryString)(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
42
33
  }
43
34
  async function inviteProjectMember(body, requestOptions) {
44
35
  return this.post("/v1/projects/me/members", body, undefined, requestOptions);
45
36
  }
46
37
  async function updateProjectMember(membershipId, body, requestOptions) {
47
- return (await this.patch(`/v1/projects/me/members/${segment(membershipId)}`, body, ...(requestOptions === undefined ? [] : [requestOptions])));
38
+ return (await this.patch(`/v1/projects/me/members/${encodeURIComponent(membershipId)}`, body, ...(0, request_options_1.optionalArg)(requestOptions)));
48
39
  }
49
40
  async function removeProjectMember(membershipId, requestOptions) {
50
- return (await this.delete(`/v1/projects/me/members/${segment(membershipId)}`, ...(requestOptions === undefined ? [] : [requestOptions])));
41
+ return (await this.delete(`/v1/projects/me/members/${encodeURIComponent(membershipId)}`, ...(0, request_options_1.optionalArg)(requestOptions)));
51
42
  }
52
43
  async function getProjectFeatures(requestOptions) {
53
- return this.get("/v1/projects/me/features", ...(requestOptions === undefined ? [] : [requestOptions]));
44
+ return this.get("/v1/projects/me/features", ...(0, request_options_1.optionalArg)(requestOptions));
54
45
  }
55
46
  async function updateProjectFeatures(features, requestOptions) {
56
47
  const body = { features };
57
- return (await this.patch("/v1/projects/me/features", body, ...(requestOptions === undefined ? [] : [requestOptions])));
48
+ return (await this.patch("/v1/projects/me/features", body, ...(0, request_options_1.optionalArg)(requestOptions)));
58
49
  }
59
50
  async function getProjectSettings(requestOptions) {
60
- return this.get("/v1/project/settings", ...(requestOptions === undefined ? [] : [requestOptions]));
51
+ return this.get("/v1/project/settings", ...(0, request_options_1.optionalArg)(requestOptions));
61
52
  }
62
53
  async function updateProjectSetting(key, enabled, requestOptions) {
63
- return (await this.put(`/v1/project/settings/${segment(key)}`, { enabled }, undefined, requestOptions));
54
+ return (await this.put(`/v1/project/settings/${encodeURIComponent(key)}`, { enabled }, undefined, requestOptions));
64
55
  }
65
56
  async function updateProjectTextSetting(key, value, requestOptions) {
66
- return (await this.put(`/v1/project/settings/values/${segment(key)}`, { value }, undefined, requestOptions));
57
+ return (await this.put(`/v1/project/settings/values/${encodeURIComponent(key)}`, { value }, undefined, requestOptions));
67
58
  }
68
59
  async function getLocales(requestOptions) {
69
- return this.get("/locales", ...(requestOptions === undefined ? [] : [requestOptions]));
60
+ return this.get("/locales", ...(0, request_options_1.optionalArg)(requestOptions));
70
61
  }
71
62
  async function updateLocales(locales, requestOptions) {
72
- return (await this.patch("/locales", locales, ...(requestOptions === undefined ? [] : [requestOptions])));
63
+ return (await this.patch("/locales", locales, ...(0, request_options_1.optionalArg)(requestOptions)));
73
64
  }
74
65
  async function listLocalizations(language, params = {}, requestOptions) {
75
- return this.get(`/localization/${segment(language)}${query(params)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
66
+ return this.get(`/localization/${encodeURIComponent(language)}${(0, query_string_1.toQueryString)(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
76
67
  }
77
68
  async function getLocalization(language, key, requestOptions) {
78
- return this.get(`/localization/${segment(language)}/${segment(key)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
69
+ return this.get(`/localization/${encodeURIComponent(language)}/${encodeURIComponent(key)}`, ...(0, request_options_1.optionalArg)(requestOptions));
79
70
  }
80
71
  async function updateLocalization(language, key, body, requestOptions) {
81
- return (await this.put(`/localization/${segment(language)}/${segment(key)}`, body, undefined, requestOptions));
72
+ return (await this.put(`/localization/${encodeURIComponent(language)}/${encodeURIComponent(key)}`, body, undefined, requestOptions));
82
73
  }
83
74
  async function deleteLocalization(language, key, requestOptions) {
84
- await this.delete(`/localization/${segment(language)}/${segment(key)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
75
+ await this.delete(`/localization/${encodeURIComponent(language)}/${encodeURIComponent(key)}`, ...(0, request_options_1.optionalArg)(requestOptions));
85
76
  }
86
77
  async function getI18nextDocument(language, requestOptions) {
87
- return this.get(`/localization/i18next/${segment(language)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
78
+ return this.get(`/localization/i18next/${encodeURIComponent(language)}`, ...(0, request_options_1.optionalArg)(requestOptions));
88
79
  }
89
80
  async function updateI18nextDocument(language, document, requestOptions) {
90
- await this.patch(`/localization/i18next/${segment(language)}`, document, ...(requestOptions === undefined ? [] : [requestOptions]));
81
+ await this.patch(`/localization/i18next/${encodeURIComponent(language)}`, document, ...(0, request_options_1.optionalArg)(requestOptions));
91
82
  }
92
83
  async function getPatientLastObservations(patientId, params, requestOptions) {
93
- return this.get(`/patient/${segment(patientId)}/observation${query(params)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
84
+ return this.get(`/patient/${encodeURIComponent(patientId)}/observation${(0, query_string_1.toQueryString)(params)}`, ...(0, request_options_1.optionalArg)(requestOptions));
94
85
  }
@@ -1,10 +1,7 @@
1
1
  import { Bundle, Observation } from "@medplum/fhirtypes";
2
- export type OvokPage<T> = {
3
- total: number;
4
- page: number;
5
- count: number;
6
- resources: T[];
7
- };
2
+ import { SlimPage } from "../slim/types";
3
+ /** The same page shape as `SlimPage`. */
4
+ export type OvokPage<T> = SlimPage<T>;
8
5
  export type OvokAccount = {
9
6
  email: string;
10
7
  name: string;
@@ -0,0 +1,3 @@
1
+ export type QueryValue = string | number | boolean | readonly string[] | undefined;
2
+ /** `?a=1&b=x,y`, skipping undefined values; an empty result is `""`. Arrays are comma-joined. */
3
+ export declare const toQueryString: (params: Record<string, QueryValue>) => string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toQueryString = void 0;
4
+ /** `?a=1&b=x,y`, skipping undefined values; an empty result is `""`. Arrays are comma-joined. */
5
+ const toQueryString = (params) => {
6
+ const values = new URLSearchParams();
7
+ for (const [key, value] of Object.entries(params)) {
8
+ if (value !== undefined) {
9
+ values.set(key, Array.isArray(value) ? value.join(",") : String(value));
10
+ }
11
+ }
12
+ const encoded = values.toString();
13
+ return encoded === "" ? "" : `?${encoded}`;
14
+ };
15
+ exports.toQueryString = toQueryString;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createQuestionnaireResponseWithObservations = createQuestionnaireResponseWithObservations;
4
+ const request_options_1 = require("../../request-options");
4
5
  async function createQuestionnaireResponseWithObservations(questionnaireResponse, observations, requestOptions) {
5
6
  const bundle = {
6
7
  resourceType: "Bundle",
@@ -24,5 +25,5 @@ async function createQuestionnaireResponseWithObservations(questionnaireResponse
24
25
  })),
25
26
  ],
26
27
  };
27
- return this.executeBatch(bundle, ...(requestOptions === undefined ? [] : [requestOptions]));
28
+ return this.executeBatch(bundle, ...(0, request_options_1.optionalArg)(requestOptions));
28
29
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.extractQuestionnaireObservations = extractQuestionnaireObservations;
4
- const segment = (value) => encodeURIComponent(value);
5
4
  async function extractQuestionnaireObservations(questionnaireResponseId, requestOptions) {
6
- return this.post(`/fhir/QuestionnaireResponse/${segment(questionnaireResponseId)}/$extract`, {}, undefined, requestOptions);
5
+ return this.post(`/fhir/QuestionnaireResponse/${encodeURIComponent(questionnaireResponseId)}/$extract`, {}, undefined, requestOptions);
7
6
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.populateQuestionnaire = populateQuestionnaire;
4
- const segment = (value) => encodeURIComponent(value);
5
4
  async function populateQuestionnaire(questionnaireId, parameters = { resourceType: "Parameters", parameter: [] }, requestOptions) {
6
- return this.post(`/fhir/Questionnaire/${segment(questionnaireId)}/$populate`, parameters, undefined, requestOptions);
5
+ return this.post(`/fhir/Questionnaire/${encodeURIComponent(questionnaireId)}/$populate`, parameters, undefined, requestOptions);
7
6
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.submitQuestionnaireResponse = submitQuestionnaireResponse;
4
+ const request_options_1 = require("../../request-options");
4
5
  async function submitQuestionnaireResponse(questionnaireResponse, observations = [], requestOptions) {
5
- return this.createQuestionnaireResponseWithObservations(questionnaireResponse, observations, ...(requestOptions === undefined ? [] : [requestOptions]));
6
+ return this.createQuestionnaireResponseWithObservations(questionnaireResponse, observations, ...(0, request_options_1.optionalArg)(requestOptions));
6
7
  }
@@ -0,0 +1,2 @@
1
+ /** Forwards an optional trailing argument only when the caller gave one, so call arity stays the same. */
2
+ export declare const optionalArg: <T>(value: T | undefined) => never[] | readonly [T & ({} | null)];
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.optionalArg = void 0;
4
+ /** Forwards an optional trailing argument only when the caller gave one, so call arity stays the same. */
5
+ const optionalArg = (value) => (value === undefined ? [] : [value]);
6
+ exports.optionalArg = optionalArg;
@@ -4,6 +4,7 @@ exports.SignalsError = void 0;
4
4
  exports.isSignalsError = isSignalsError;
5
5
  exports.mapSignalsError = mapSignalsError;
6
6
  const ovok_error_1 = require("../errors/ovok-error");
7
+ const ovok_error_utils_1 = require("../errors/ovok-error-utils");
7
8
  const SIGNALS_ERROR_STATUSES = {
8
9
  signals_threshold_not_editable: 409,
9
10
  signals_patient_not_enrolled: 409,
@@ -33,12 +34,7 @@ class SignalsError extends Error {
33
34
  this.status = status;
34
35
  this.fieldErrors = (_a = options.fieldErrors) !== null && _a !== void 0 ? _a : [];
35
36
  if (options.cause !== undefined) {
36
- Object.defineProperty(this, "cause", {
37
- configurable: true,
38
- enumerable: false,
39
- value: options.cause,
40
- writable: false,
41
- });
37
+ (0, ovok_error_utils_1.withCause)(this, options.cause);
42
38
  }
43
39
  }
44
40
  }
@@ -22,29 +22,29 @@ exports.getSignalsRawAlert = getSignalsRawAlert;
22
22
  exports.acknowledgeSignalsRawAlert = acknowledgeSignalsRawAlert;
23
23
  exports.getSignalsSettings = getSignalsSettings;
24
24
  exports.updateSignalsSettings = updateSignalsSettings;
25
- const segment = (value) => encodeURIComponent(value);
25
+ const request_options_1 = require("../request-options");
26
26
  /**
27
27
  * Enables Signals for an existing patient. The operation is idempotent; retry after 409 or 503.
28
28
  * Observations saved through Ovok are forwarded by the backend, so callers should not submit
29
29
  * the same readings to Signals separately.
30
30
  */
31
31
  function enableSignalsForPatient(patientId, requestOptions) {
32
- return this.post(`/fhir/Patient/${segment(patientId)}/$enable-signals`, undefined, undefined, requestOptions);
32
+ return this.post(`/fhir/Patient/${encodeURIComponent(patientId)}/$enable-signals`, undefined, undefined, requestOptions);
33
33
  }
34
34
  function getSignalsThresholds(patientId, requestOptions) {
35
- return this.get(`/v1/signals/patients/${segment(patientId)}/thresholds`, ...(requestOptions === undefined ? [] : [requestOptions]));
35
+ return this.get(`/v1/signals/patients/${encodeURIComponent(patientId)}/thresholds`, ...(0, request_options_1.optionalArg)(requestOptions));
36
36
  }
37
37
  function listUnconfirmedLimits(requestOptions) {
38
- return this.get("/signals/config/unconfirmed", ...(requestOptions === undefined ? [] : [requestOptions]));
38
+ return this.get("/signals/config/unconfirmed", ...(0, request_options_1.optionalArg)(requestOptions));
39
39
  }
40
40
  function repushUnconfirmedLimits(requestOptions) {
41
41
  return this.post("/signals/config/unconfirmed/repush", undefined, undefined, requestOptions);
42
42
  }
43
43
  function setSignalsThreshold(patientId, code, body, requestOptions) {
44
- return this.put(`/v1/signals/patients/${segment(patientId)}/thresholds/${segment(code)}`, body, undefined, requestOptions);
44
+ return this.put(`/v1/signals/patients/${encodeURIComponent(patientId)}/thresholds/${encodeURIComponent(code)}`, body, undefined, requestOptions);
45
45
  }
46
46
  function removeSignalsThreshold(patientId, code, reason, requestOptions) {
47
- return this.delete(`/v1/signals/patients/${segment(patientId)}/thresholds/${segment(code)}?reason=${segment(reason)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
47
+ return this.delete(`/v1/signals/patients/${encodeURIComponent(patientId)}/thresholds/${encodeURIComponent(code)}?reason=${encodeURIComponent(reason)}`, ...(0, request_options_1.optionalArg)(requestOptions));
48
48
  }
49
49
  // Each route's own filters, in the order they are sent: a key outside the list is never sent, so
50
50
  // a wider object passed as an episode query can't turn into a refused request.
@@ -66,40 +66,40 @@ function serializeSignalsAlertsQuery(query = {}, keys = EPISODE_QUERY_KEYS) {
66
66
  .map((key) => {
67
67
  const value = values[key];
68
68
  const text = Array.isArray(value) ? value.join(",") : String(value);
69
- return `${segment(key)}=${segment(text)}`;
69
+ return `${encodeURIComponent(key)}=${encodeURIComponent(text)}`;
70
70
  })
71
71
  .join("&");
72
72
  }
73
73
  function listSignalsAlerts(query = {}, requestOptions) {
74
74
  const serialized = serializeSignalsAlertsQuery(query);
75
- return this.get(`/v1/signals/alerts${serialized ? `?${serialized}` : ""}`, { ...{ cache: "reload" }, ...requestOptions });
75
+ return this.get(`/v1/signals/alerts${serialized ? `?${serialized}` : ""}`, { cache: "reload", ...requestOptions });
76
76
  }
77
77
  function getSignalsAlert(episodeId, requestOptions) {
78
- return this.get(`/v1/signals/alerts/${segment(episodeId)}`, { ...{ cache: "reload" }, ...requestOptions });
78
+ return this.get(`/v1/signals/alerts/${encodeURIComponent(episodeId)}`, { cache: "reload", ...requestOptions });
79
79
  }
80
80
  function acknowledgeSignalsAlert(episodeId, requestOptions) {
81
- return this.post(`/v1/signals/alerts/${segment(episodeId)}/ack`, undefined, undefined, requestOptions);
81
+ return this.post(`/v1/signals/alerts/${encodeURIComponent(episodeId)}/ack`, undefined, undefined, requestOptions);
82
82
  }
83
83
  function listSignalsAlertNotes(episodeId, requestOptions) {
84
- return this.get(`/v1/signals/alerts/${segment(episodeId)}/notes`, { ...{ cache: "reload" }, ...requestOptions });
84
+ return this.get(`/v1/signals/alerts/${encodeURIComponent(episodeId)}/notes`, { cache: "reload", ...requestOptions });
85
85
  }
86
86
  function createSignalsAlertNote(episodeId, body, requestOptions) {
87
- return this.post(`/v1/signals/alerts/${segment(episodeId)}/notes`, body, undefined, requestOptions);
87
+ return this.post(`/v1/signals/alerts/${encodeURIComponent(episodeId)}/notes`, body, undefined, requestOptions);
88
88
  }
89
89
  function listSignalsRawAlertNotes(alertId, requestOptions) {
90
- return this.get(`/v1/signals/raw-alerts/${segment(alertId)}/notes`, { ...{ cache: "reload" }, ...requestOptions });
90
+ return this.get(`/v1/signals/raw-alerts/${encodeURIComponent(alertId)}/notes`, { cache: "reload", ...requestOptions });
91
91
  }
92
92
  function createSignalsRawAlertNote(alertId, body, requestOptions) {
93
- return this.post(`/v1/signals/raw-alerts/${segment(alertId)}/notes`, body, undefined, requestOptions);
93
+ return this.post(`/v1/signals/raw-alerts/${encodeURIComponent(alertId)}/notes`, body, undefined, requestOptions);
94
94
  }
95
95
  function updateSignalsNote(noteId, body, requestOptions) {
96
- return this.put(`/v1/signals/notes/${segment(noteId)}`, body, undefined, requestOptions);
96
+ return this.put(`/v1/signals/notes/${encodeURIComponent(noteId)}`, body, undefined, requestOptions);
97
97
  }
98
98
  function patchSignalsNote(noteId, body, requestOptions) {
99
- return this.patch(`/v1/signals/notes/${segment(noteId)}`, body, ...(requestOptions === undefined ? [] : [requestOptions]));
99
+ return this.patch(`/v1/signals/notes/${encodeURIComponent(noteId)}`, body, ...(0, request_options_1.optionalArg)(requestOptions));
100
100
  }
101
101
  async function deleteSignalsNote(noteId, requestOptions) {
102
- await this.delete(`/v1/signals/notes/${segment(noteId)}`, ...(requestOptions === undefined ? [] : [requestOptions]));
102
+ await this.delete(`/v1/signals/notes/${encodeURIComponent(noteId)}`, ...(0, request_options_1.optionalArg)(requestOptions));
103
103
  }
104
104
  /**
105
105
  * The project's individual Signals alerts, not episodes: works whether or not the project's
@@ -107,10 +107,10 @@ async function deleteSignalsNote(noteId, requestOptions) {
107
107
  */
108
108
  function listSignalsRawAlerts(query = {}, requestOptions) {
109
109
  const serialized = serializeSignalsAlertsQuery(query, RAW_ALERT_QUERY_KEYS);
110
- return this.get(`/v1/signals/raw-alerts${serialized ? `?${serialized}` : ""}`, { ...{ cache: "reload" }, ...requestOptions });
110
+ return this.get(`/v1/signals/raw-alerts${serialized ? `?${serialized}` : ""}`, { cache: "reload", ...requestOptions });
111
111
  }
112
112
  function getSignalsRawAlert(alertId, requestOptions) {
113
- return this.get(`/v1/signals/raw-alerts/${segment(alertId)}`, { ...{ cache: "reload" }, ...requestOptions });
113
+ return this.get(`/v1/signals/raw-alerts/${encodeURIComponent(alertId)}`, { cache: "reload", ...requestOptions });
114
114
  }
115
115
  /**
116
116
  * Acknowledges one alert: it resolves, and `acknowledgedAt` and `acknowledgedActor` record when
@@ -118,14 +118,14 @@ function getSignalsRawAlert(alertId, requestOptions) {
118
118
  * `signals_alerts:update` and update access to the resident.
119
119
  */
120
120
  function acknowledgeSignalsRawAlert(alertId, requestOptions) {
121
- return this.post(`/v1/signals/raw-alerts/${segment(alertId)}/ack`, undefined, undefined, requestOptions);
121
+ return this.post(`/v1/signals/raw-alerts/${encodeURIComponent(alertId)}/ack`, undefined, undefined, requestOptions);
122
122
  }
123
123
  function getSignalsSettings(requestOptions) {
124
- return this.get("/v1/signals/settings", ...(requestOptions === undefined ? [] : [requestOptions]));
124
+ return this.get("/v1/signals/settings", ...(0, request_options_1.optionalArg)(requestOptions));
125
125
  }
126
126
  function updateSignalsSettings(patch, reason, requestOptions) {
127
127
  return this.patch("/v1/signals/settings", {
128
128
  ...patch,
129
129
  ...(reason !== undefined ? { reason } : {}),
130
- }, ...(requestOptions === undefined ? [] : [requestOptions]));
130
+ }, ...(0, request_options_1.optionalArg)(requestOptions));
131
131
  }
@@ -0,0 +1,4 @@
1
+ import type { MedplumRequestOptions } from "@medplum/core";
2
+ import { OvokClient } from "../ovok-client";
3
+ /** A `cache: "reload"` GET that shares one in-flight request between identical live reads. */
4
+ export declare const liveGet: <T>(client: OvokClient, path: string, requestOptions?: MedplumRequestOptions) => Promise<T>;
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.liveGet = void 0;
4
+ const ovok_error_utils_1 = require("../errors/ovok-error-utils");
5
+ const inFlightLiveReads = new Map();
6
+ const dedupeLiveRead = (client, path, load, options) => {
7
+ var _a, _b, _c, _d, _e, _f, _g;
8
+ const signal = (_a = options === null || options === void 0 ? void 0 : options.signal) !== null && _a !== void 0 ? _a : undefined;
9
+ const canShare = Object.keys(options !== null && options !== void 0 ? options : {}).every((key) => key === "signal" || key === "cache");
10
+ if (!canShare) {
11
+ return load(signal);
12
+ }
13
+ if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
14
+ return Promise.reject((_b = signal.reason) !== null && _b !== void 0 ? _b : abortError());
15
+ }
16
+ const login = client.getActiveLogin();
17
+ const key = [
18
+ client.getBaseUrl(),
19
+ (_d = (_c = login === null || login === void 0 ? void 0 : login.profile) === null || _c === void 0 ? void 0 : _c.reference) !== null && _d !== void 0 ? _d : "",
20
+ (_f = (_e = login === null || login === void 0 ? void 0 : login.project) === null || _e === void 0 ? void 0 : _e.reference) !== null && _f !== void 0 ? _f : "",
21
+ (_g = options === null || options === void 0 ? void 0 : options.cache) !== null && _g !== void 0 ? _g : "reload",
22
+ path,
23
+ ].join("\0");
24
+ let inFlight = inFlightLiveReads.get(key);
25
+ if (!inFlight) {
26
+ const controller = new AbortController();
27
+ const sharedRead = {
28
+ controller,
29
+ promise: Promise.resolve(),
30
+ subscribers: 0,
31
+ settled: false,
32
+ };
33
+ let request;
34
+ try {
35
+ request = load(signal ? controller.signal : undefined);
36
+ }
37
+ catch (error) {
38
+ request = Promise.reject(error);
39
+ }
40
+ sharedRead.promise = request.finally(() => {
41
+ if (inFlightLiveReads.get(key) === sharedRead) {
42
+ inFlightLiveReads.delete(key);
43
+ }
44
+ sharedRead.settled = true;
45
+ });
46
+ inFlight = sharedRead;
47
+ inFlightLiveReads.set(key, sharedRead);
48
+ void sharedRead.promise.catch(() => undefined);
49
+ }
50
+ const shared = inFlight;
51
+ return new Promise((resolve, reject) => {
52
+ let active = true;
53
+ shared.subscribers += 1;
54
+ const release = () => {
55
+ if (!active) {
56
+ return false;
57
+ }
58
+ active = false;
59
+ signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", onAbort);
60
+ shared.subscribers -= 1;
61
+ if (!shared.settled && shared.subscribers === 0) {
62
+ shared.controller.abort();
63
+ }
64
+ return true;
65
+ };
66
+ const onAbort = () => {
67
+ var _a;
68
+ if (release()) {
69
+ reject((_a = signal === null || signal === void 0 ? void 0 : signal.reason) !== null && _a !== void 0 ? _a : abortError());
70
+ }
71
+ };
72
+ signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", onAbort, { once: true });
73
+ shared.promise.then((value) => {
74
+ if (release()) {
75
+ resolve(value);
76
+ }
77
+ }, (error) => {
78
+ if (release()) {
79
+ reject(error);
80
+ }
81
+ });
82
+ });
83
+ };
84
+ const abortError = () => (0, ovok_error_utils_1.namedError)("AbortError", "The request was aborted.");
85
+ /** A `cache: "reload"` GET that shares one in-flight request between identical live reads. */
86
+ const liveGet = (client, path, requestOptions) => dedupeLiveRead(client, path, (signal) => client.get(path, { cache: "reload", ...requestOptions, ...(signal ? { signal } : {}) }), requestOptions);
87
+ exports.liveGet = liveGet;
@@ -30,14 +30,17 @@ export declare function getRecentSlimNotifications(this: OvokClient, count?: num
30
30
  export declare function listSlimAlarms(this: OvokClient, params?: SlimAlarmQuery, requestOptions?: MedplumRequestOptions): Promise<SlimAlarmsPage>;
31
31
  export declare function acknowledgeSlimAlarm(this: OvokClient, notificationId: string, requestOptions?: MedplumRequestOptions): Promise<SlimNotification>;
32
32
  export declare function getRecentSlimAlarms(this: OvokClient, count?: number, requestOptions?: MedplumRequestOptions): Promise<SlimRecentAlarms>;
33
+ /** Same as `getRecentSlimAlarms`. */
33
34
  export declare function getRecentAlarms(this: OvokClient, count?: number, requestOptions?: MedplumRequestOptions): Promise<SlimRecentAlarms>;
34
35
  export declare function getRecentSlimOutOfBed(this: OvokClient, count?: number, requestOptions?: MedplumRequestOptions): Promise<SlimRecentOutOfBed>;
36
+ /** Same as `getRecentSlimOutOfBed`. */
35
37
  export declare function getRecentOutOfBed(this: OvokClient, count?: number, requestOptions?: MedplumRequestOptions): Promise<SlimRecentOutOfBed>;
36
38
  export declare function listSlimOutOfBedNotifications(this: OvokClient, params?: Omit<SlimNotificationsQuery, "type">, requestOptions?: MedplumRequestOptions): Promise<SlimNotificationsResponse>;
37
39
  export declare function listSlimMedicalNotifications(this: OvokClient, params?: SlimMedicalNotificationsQuery, requestOptions?: MedplumRequestOptions): Promise<SlimMedicalNotificationsPage>;
38
40
  export declare function getRecentSlimMedicalNotifications(this: OvokClient, count?: number, requestOptions?: MedplumRequestOptions): Promise<SlimRecentNotificationsResponse>;
39
41
  export declare function getSlimMedicalNotification(this: OvokClient, episodeId: string, requestOptions?: MedplumRequestOptions): Promise<SlimMedicalNotificationDetail>;
40
42
  export declare function acknowledgeSlimMedicalNotification(this: OvokClient, episodeId: string, requestOptions?: MedplumRequestOptions): Promise<SlimMedicalNotificationRow>;
43
+ /** Same as `acknowledgeSlimAlarm`. */
41
44
  export declare function acknowledgeSlimNotification(this: OvokClient, notificationId: string, requestOptions?: MedplumRequestOptions): Promise<SlimNotification>;
42
45
  export declare function getSlimThreshold(this: OvokClient, requestOptions?: MedplumRequestOptions): Promise<SlimThreshold>;
43
46
  export declare function updateSlimThreshold(this: OvokClient, body: {