@healthcloudai/hc-sdk 3.29.0 → 3.30.0

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.
package/dist/index.js CHANGED
@@ -3317,8 +3317,21 @@ var PatientClient = class extends BaseServiceClient {
3317
3317
  pathParams: { dependent_id: dependentId }
3318
3318
  });
3319
3319
  }
3320
- listNotifications() {
3321
- return this.send("GET", "/patients/notifications", {});
3320
+ /**
3321
+ * The patient's notifications, newest first, with `total`, `unread_count` and `truncated` (GET /patients/notifications).
3322
+ * `limit` (1 to 200) returns only the newest that many; `unread_only` returns only the unread. Without arguments it returns
3323
+ * every notification (up to the API's safety bound; `truncated` says when that cut the list).
3324
+ */
3325
+ listNotifications(query) {
3326
+ return this.send("GET", "/patients/notifications", { query });
3327
+ }
3328
+ /**
3329
+ * Mark the patient's own notifications read (POST /patients/notifications/read): send either `notification_ids` (at most
3330
+ * 100) or `all_unread: true`, not both. Already-read ones are counted in `already_read`; ids that are not the patient's
3331
+ * come back in `not_found` and nothing is changed for them. Only the read flag changes.
3332
+ */
3333
+ markNotificationsRead(request) {
3334
+ return this.send("POST", "/patients/notifications/read", { body: request });
3322
3335
  }
3323
3336
  saveNotification(data, notificationId) {
3324
3337
  if (notificationId) {
@@ -85,6 +85,7 @@
85
85
  - [`listPracticeAppointments`](../operations/patient.listPracticeAppointments.md) — List the patient's telehealth appointments with their practice
86
86
  - [`listPracticeAppointmentSlots`](../operations/patient.listPracticeAppointmentSlots.md) — List the free telehealth slots of the patient's practice
87
87
  - [`listTestOrders`](../operations/patient.listTestOrders.md) — List diagnostic test orders
88
+ - [`markNotificationsRead`](../operations/patient.markNotificationsRead.md) — Mark notifications read
88
89
  - [`nearestLocations`](../operations/patient.nearestLocations.md) — Find nearby healthcare locations
89
90
  - [`getPhotoUploadUrl`](../operations/patient.photoUploadUrl.md) — Get a photo upload URL
90
91
  - [`placeTestOrder`](../operations/patient.placeTestOrder.md) — Place a diagnostic test order
@@ -1,5 +1,5 @@
1
1
  {
2
- "docsDataContentDigest": "sha256:e2f9f2a8f9070d00ae2223841fe044fd6f1a81fbb0722c3cee9fbc3f7942e24b",
2
+ "docsDataContentDigest": "sha256:387447f46757e572ebce40cdba2646e22c57e6d93d1ed0dc999774d281ab0473",
3
3
  "generatedFiles": [
4
4
  "authentication.md",
5
5
  "clients/AmsClient.md",
@@ -1303,6 +1303,8 @@
1303
1303
  "models/LocationStatus.md",
1304
1304
  "models/LogoutResponse.md",
1305
1305
  "models/MaritalStatus.md",
1306
+ "models/MarkNotificationsReadRequest.md",
1307
+ "models/MarkNotificationsReadResponse.md",
1306
1308
  "models/McpFieldagentRequest.md",
1307
1309
  "models/McpFieldagentResponse.md",
1308
1310
  "models/McpPatientRequest.md",
@@ -3232,6 +3234,7 @@
3232
3234
  "operations/patient.listPracticeAppointments.md",
3233
3235
  "operations/patient.listTestOrders.md",
3234
3236
  "operations/patient.login.md",
3237
+ "operations/patient.markNotificationsRead.md",
3235
3238
  "operations/patient.nearestLocations.md",
3236
3239
  "operations/patient.photoUploadUrl.md",
3237
3240
  "operations/patient.placeTestOrder.md",
@@ -3341,7 +3344,7 @@
3341
3344
  "operations/vitals.recordVitals.md"
3342
3345
  ],
3343
3346
  "language": "nodejs",
3344
- "modelCount": 2202,
3345
- "operationCount": 1082,
3347
+ "modelCount": 2204,
3348
+ "operationCount": 1083,
3346
3349
  "schemaVersion": 1
3347
3350
  }
@@ -977,6 +977,7 @@ Generated call examples use exact public surface signatures. Workflow examples r
977
977
  - [List the free telehealth slots of the patient's practice](../operations/patient.listPracticeAppointmentSlots.md)
978
978
  - [List diagnostic test orders](../operations/patient.listTestOrders.md)
979
979
  - [Log in a patient](../operations/patient.login.md)
980
+ - [Mark notifications read](../operations/patient.markNotificationsRead.md)
980
981
  - [Find nearby healthcare locations](../operations/patient.nearestLocations.md)
981
982
  - [Get a photo upload URL](../operations/patient.photoUploadUrl.md)
982
983
  - [Place a diagnostic test order](../operations/patient.placeTestOrder.md)
package/docs/index.md CHANGED
@@ -985,6 +985,7 @@ This directory is generated from the shared structured docs data. Do not edit ge
985
985
  - [List the free telehealth slots of the patient's practice](operations/patient.listPracticeAppointmentSlots.md) (`patient.listPracticeAppointmentSlots`)
986
986
  - [List diagnostic test orders](operations/patient.listTestOrders.md) (`patient.listTestOrders`)
987
987
  - [Log in a patient](operations/patient.login.md) (`patient.login`)
988
+ - [Mark notifications read](operations/patient.markNotificationsRead.md) (`patient.markNotificationsRead`)
988
989
  - [Find nearby healthcare locations](operations/patient.nearestLocations.md) (`patient.nearestLocations`)
989
990
  - [Get a photo upload URL](operations/patient.photoUploadUrl.md) (`patient.photoUploadUrl`)
990
991
  - [Place a diagnostic test order](operations/patient.placeTestOrder.md) (`patient.placeTestOrder`)
@@ -10,8 +10,11 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `notifications` | array of [`NotificationResponse`](./NotificationResponse.md) | Yes | | | | No | Notifications for the patient. |
13
+ | `notifications` | array of [`NotificationResponse`](./NotificationResponse.md) | Yes | | | | No | The patient's notifications, newest first (id breaks ties; notifications without a date last). |
14
14
  | `patient_id` | `string` | Yes | | | | No | FHIR Patient resource ID the notifications belong to. |
15
+ | `total` | `integer` | No | | | `0` | No | Notifications that match the request (`unread_only` applied), counted before `limit` cuts the list. |
16
+ | `truncated` | `boolean` | No | | | `false` | No | True when `limit` cut the list or the safety bound (1,000 notifications / 20 store pages) stopped the read, so `notifications` is not everything. |
17
+ | `unread_count` | `integer` | No | | | `0` | No | Unread notifications among ALL of the patient's notifications. |
15
18
 
16
19
  ## Example
17
20
 
@@ -0,0 +1,18 @@
1
+ # MarkNotificationsReadRequest
2
+
3
+ Model ID: `MarkNotificationsReadRequest`
4
+
5
+ Body of POST /patients/notifications/read: exactly one of `notification_ids` and `all_unread`.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `all_unread` | `boolean|null` | No | | | | Yes | True to mark every unread notification of the patient read. |
14
+ | `notification_ids` | `array|null` | No | | | | Yes | Ids of the patient's notifications to mark read (at most 100). |
15
+
16
+ ## Example
17
+
18
+ None declared in canonical OpenAPI.
@@ -0,0 +1,20 @@
1
+ # MarkNotificationsReadResponse
2
+
3
+ Model ID: `MarkNotificationsReadResponse`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `already_read` | `integer` | Yes | | | | No | Requested notifications that were already read (left unchanged). |
14
+ | `marked` | `integer` | Yes | | | | No | Notifications that were unread and are now read. |
15
+ | `not_found` | `array` | Yes | | | | No | Requested ids that are not one of the caller's notifications. Nothing was read or changed for them. |
16
+ | `unread_count` | `integer` | Yes | | | | No | Unread notifications the patient has left. |
17
+
18
+ ## Example
19
+
20
+ None declared in canonical OpenAPI.
@@ -1305,6 +1305,8 @@
1305
1305
  - [LocationStatus](LocationStatus.md)
1306
1306
  - [ProviderLogoutResponse](LogoutResponse.md)
1307
1307
  - [MaritalStatus](MaritalStatus.md)
1308
+ - [MarkNotificationsReadRequest](MarkNotificationsReadRequest.md)
1309
+ - [MarkNotificationsReadResponse](MarkNotificationsReadResponse.md)
1308
1310
  - [mcp.ConnectResponse](mcp.ConnectResponse.md)
1309
1311
  - [McpJsonRpcRequest](McpFieldagentRequest.md)
1310
1312
  - [McpJsonRpcResponse](McpFieldagentResponse.md)
@@ -8,7 +8,7 @@ Return all FHIR Communication notifications for the authenticated patient. Requi
8
8
 
9
9
  `listNotifications`
10
10
 
11
- Signature: `patient.listNotifications()`
11
+ Signature: `patient.listNotifications(query)`
12
12
 
13
13
  Return type: `Promise<JsonValue>`
14
14
 
@@ -32,7 +32,10 @@ None.
32
32
 
33
33
  ## Query parameters
34
34
 
35
- None.
35
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
36
+ |---|---|---:|---|---|---|---:|---|
37
+ | `limit` | `integer` | No | | | | No | |
38
+ | `unread_only` | `boolean` | No | | | | No | |
36
39
 
37
40
  ## Body parameters
38
41
 
@@ -58,16 +61,19 @@ None declared in canonical OpenAPI.
58
61
  {
59
62
  "notifications": [
60
63
  {
61
- "createdAt": "2026-08-10T23:36:51Z",
62
- "description": "Synthetic notification example",
63
- "icon": "info",
64
- "id": "notification-example-001",
64
+ "createdAt": "string",
65
+ "description": "string",
66
+ "icon": "string",
67
+ "id": "string",
65
68
  "read": false,
66
- "severity": "info",
67
- "title": "Test notification"
69
+ "severity": "string",
70
+ "title": "string"
68
71
  }
69
72
  ],
70
- "patient_id": "patient-example-001"
73
+ "patient_id": "string",
74
+ "total": 0,
75
+ "truncated": false,
76
+ "unread_count": 0
71
77
  }
72
78
  ```
73
79
 
@@ -103,7 +109,12 @@ import { HCSDK } from "@healthcloudai/hc-sdk";
103
109
  ```
104
110
 
105
111
  ```ts
106
- const result = await patient.listNotifications();
112
+ const query = {
113
+ "limit": 1,
114
+ "unread_only": true
115
+ };
116
+
117
+ const result = await patient.listNotifications(query);
107
118
  ```
108
119
 
109
120
  ## cURL
@@ -111,7 +122,7 @@ const result = await patient.listNotifications();
111
122
  ```bash
112
123
  curl -X GET \
113
124
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
114
- 'https://dev-api-patient.health.cloud/patients/notifications'
125
+ 'https://dev-api-patient.health.cloud/patients/notifications?limit=1&unread_only=true'
115
126
  ```
116
127
 
117
128
  ## Notes
@@ -0,0 +1,122 @@
1
+ # Mark notifications read
2
+
3
+ Operation ID: `patient.markNotificationsRead`
4
+
5
+ Marks the authenticated patient's own notifications read, either the given `notification_ids` (at most 100) or `all_unread`: send exactly one. Already-read notifications are counted in `already_read` and left unchanged; ids that are not the caller's notifications are listed in `not_found` and nothing is read or changed for them. Only the read flag changes.
6
+
7
+ ## Public method
8
+
9
+ `markNotificationsRead`
10
+
11
+ Signature: `patient.markNotificationsRead(request)`
12
+
13
+ Return type: `Promise<MarkNotificationsReadResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `POST /patients/notifications/read`
28
+
29
+ ## Path parameters
30
+
31
+ None.
32
+
33
+ ## Query parameters
34
+
35
+ None.
36
+
37
+ ## Body parameters
38
+
39
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
40
+ |---|---|---:|---|---|---|---:|---|
41
+ | `body` | [`MarkNotificationsReadRequest`](../models/MarkNotificationsReadRequest.md) | No | | | | No | |
42
+
43
+ Request model: [`MarkNotificationsReadRequest`](../models/MarkNotificationsReadRequest.md)
44
+
45
+ ## Request example
46
+
47
+ ```json
48
+ {
49
+ "all_unread": true,
50
+ "notification_ids": [
51
+ "string"
52
+ ]
53
+ }
54
+ ```
55
+
56
+ ## Success responses
57
+
58
+ | Status | Shape | Content type | Description |
59
+ |---|---|---|---|
60
+ | `200` | [`MarkNotificationsReadResponse`](../models/MarkNotificationsReadResponse.md) | application/json | What was marked |
61
+
62
+ ## Success response examples
63
+
64
+ ### 200
65
+
66
+ ```json
67
+ {
68
+ "already_read": 0,
69
+ "marked": 0,
70
+ "not_found": [
71
+ "string"
72
+ ],
73
+ "unread_count": 0
74
+ }
75
+ ```
76
+
77
+ ## Common errors
78
+
79
+ None declared in canonical OpenAPI.
80
+
81
+ ## Error examples
82
+
83
+ None declared in canonical OpenAPI.
84
+
85
+ ## NodeJS / TypeScript implementation
86
+
87
+ ```ts
88
+ import { HCSDK } from "@healthcloudai/hc-sdk";
89
+ ```
90
+
91
+ ```ts
92
+ const request = {
93
+ "all_unread": true,
94
+ "notification_ids": [
95
+ "string"
96
+ ]
97
+ };
98
+
99
+ const result = await patient.markNotificationsRead(request);
100
+ ```
101
+
102
+ ## cURL
103
+
104
+ ```bash
105
+ curl -X POST \
106
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
107
+ -H 'Content-Type: application/json' \
108
+ -d '{"all_unread":true,"notification_ids":["string"]}' \
109
+ 'https://dev-api-patient.health.cloud/patients/notifications/read'
110
+ ```
111
+
112
+ ## Notes
113
+
114
+ None.
115
+
116
+ ## Prepared Test Console scenario
117
+
118
+ No canonical scenario is currently associated.
119
+
120
+ ## Real response
121
+
122
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@healthcloudai/hc-sdk",
3
- "version": "3.29.0",
3
+ "version": "3.30.0",
4
4
  "description": "All-in-one HealthCloud SDK with typed platform APIs and secure connector clients.",
5
5
  "author": "Healthcheck Systems Inc",
6
6
  "license": "MIT",