@healthcloudai/hc-sdk 3.15.1 → 3.16.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
@@ -1161,6 +1161,36 @@ function CreateEncounterRequestToJSONTyped(value, ignoreDiscriminator = false) {
1161
1161
  };
1162
1162
  }
1163
1163
 
1164
+ // src/models/openapi-generated/patient/models/ApplyPatientFlagsRequest.ts
1165
+ function ApplyPatientFlagsRequestToJSON(json) {
1166
+ return ApplyPatientFlagsRequestToJSONTyped(json, false);
1167
+ }
1168
+ function ApplyPatientFlagsRequestToJSONTyped(value, ignoreDiscriminator = false) {
1169
+ if (value == null) {
1170
+ return value;
1171
+ }
1172
+ return {
1173
+ "flags": value["flags"],
1174
+ "idempotency_key": value["idempotency_key"]
1175
+ };
1176
+ }
1177
+
1178
+ // src/models/openapi-generated/patient/models/FlagOperationReceipt.ts
1179
+ function FlagOperationReceiptFromJSON(json) {
1180
+ return FlagOperationReceiptFromJSONTyped(json, false);
1181
+ }
1182
+ function FlagOperationReceiptFromJSONTyped(json, ignoreDiscriminator) {
1183
+ if (json == null) {
1184
+ return json;
1185
+ }
1186
+ return {
1187
+ "flags": json["flags"],
1188
+ "idempotency_key": json["idempotency_key"],
1189
+ "patient_id": json["patient_id"],
1190
+ "status": json["status"]
1191
+ };
1192
+ }
1193
+
1164
1194
  // src/models/openapi-generated/patient/models/ProcedureStatus.ts
1165
1195
  function ProcedureStatusToJSON(value) {
1166
1196
  return value;
@@ -2614,6 +2644,45 @@ var PatientClient = class extends BaseServiceClient {
2614
2644
  body: request
2615
2645
  });
2616
2646
  }
2647
+ flagOperationKey(key) {
2648
+ if (typeof key !== "string" || key.length !== 36 || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(key)) {
2649
+ throw new Error("A canonical UUID operation key is required");
2650
+ }
2651
+ return key;
2652
+ }
2653
+ flagOperationReceipt(value, key, approved) {
2654
+ const invalid = () => new Error("Invalid or mismatched flag operation receipt; reconcile the original key");
2655
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw invalid();
2656
+ const receipt = value;
2657
+ if (Object.keys(receipt).sort().join(",") !== "flags,idempotency_key,patient_id,status" || receipt.idempotency_key !== key || receipt.status !== "applied" || typeof receipt.patient_id !== "string" || receipt.patient_id.trim() !== receipt.patient_id || !/^[A-Za-z0-9.-]{1,64}$/.test(receipt.patient_id) || !receipt.flags || typeof receipt.flags !== "object" || Array.isArray(receipt.flags)) throw invalid();
2658
+ const flags = receipt.flags;
2659
+ if (!Object.keys(flags).length || Object.entries(flags).some(([name, item]) => !name || name.length > 256 || typeof item !== "boolean") || approved && (Object.keys(flags).length !== Object.keys(approved).length || Object.entries(approved).some(([name, item]) => flags[name] !== item))) throw invalid();
2660
+ return FlagOperationReceiptFromJSON(value);
2661
+ }
2662
+ /**
2663
+ * Commit the exact approved flag patch under a stable key. No automatic retries.
2664
+ * After a timeout or unknown outcome, look up the original key before proceeding.
2665
+ * The receipt contains the original patch, even if current flags have changed.
2666
+ */
2667
+ async applyPatientFlagsOperation(request) {
2668
+ const key = this.flagOperationKey(request.idempotency_key);
2669
+ const flags = { ...request.flags };
2670
+ const result = await this.send("POST", "/patients/flags/operations", {
2671
+ body: ApplyPatientFlagsRequestToJSON({ idempotency_key: key, flags })
2672
+ });
2673
+ return this.flagOperationReceipt(result, key, flags);
2674
+ }
2675
+ /**
2676
+ * Read only the authenticated patient's original keyed receipt.
2677
+ * A 404 remains an HTTP error; an in-flight write may still commit.
2678
+ */
2679
+ async getPatientFlagsOperation(idempotencyKey) {
2680
+ const key = this.flagOperationKey(idempotencyKey);
2681
+ const result = await this.send("GET", "/patients/flags/operations/{idempotency_key}", {
2682
+ pathParams: { idempotency_key: key }
2683
+ });
2684
+ return this.flagOperationReceipt(result, key);
2685
+ }
2617
2686
  /** GET /patients — self-service; returns the authenticated patient's own FHIR Patient record. */
2618
2687
  getProfile() {
2619
2688
  return this.send("GET", "/patients", {});
@@ -5,6 +5,7 @@
5
5
  - [`saveNotification`](../operations/patient.addNotification.md) — Add a notification
6
6
  - [`addToIntake`](../operations/patient.addPatientIntake.md) — Add one structured patient intake section
7
7
  - [`scanIdentityDocument`](../operations/patient.analyzeIdentityDocument.md) — OCR an identity document
8
+ - [`applyPatientFlagsOperation`](../operations/patient.applyPatientFlagsOperation.md) — Apply a keyed patient flag patch
8
9
  - [`assignImpiloDevice`](../operations/patient.assignImpiloDevice.md) — Assign Impilo device to patient
9
10
  - [`askAssistant`](../operations/patient.assistantChat.md) — Grounded assistant chat
10
11
  - [`classifyVoiceCommand`](../operations/patient.assistantClassify.md) — Classify a voice command into an action code
@@ -53,6 +54,7 @@
53
54
  - [`getAttributes`](../operations/patient.getPatientAttributes.md) — Get patient attributes
54
55
  - [`getDashboard`](../operations/patient.getPatientDashboard.md) — Get the patient dashboard summary
55
56
  - [`getFlags`](../operations/patient.getPatientFlags.md) — Get patient flags
57
+ - [`getPatientFlagsOperation`](../operations/patient.getPatientFlagsOperation.md) — Look up a keyed patient flag receipt
56
58
  - [`getPatientIntake`](../operations/patient.getPatientIntake.md) — Get own patient intake submission and delivery status
57
59
  - [`getPatientSidebar`](../operations/patient.getPatientSidebarPatientSidebar.md) — Get the patient sidebar summary
58
60
  - [`getPhoto`](../operations/patient.getPhoto.md) — Get a patient photo
@@ -1,5 +1,5 @@
1
1
  {
2
- "docsDataContentDigest": "sha256:57be1634e8f62479ff0bdf4d75acb90286e23c24965f14d7a9bf8c1ccba52d60",
2
+ "docsDataContentDigest": "sha256:9b77a775a449983610ebf7b953b087c34819f75c5d44c7281a16e149c6339606",
3
3
  "generatedFiles": [
4
4
  "authentication.md",
5
5
  "clients/AmsClient.md",
@@ -83,6 +83,7 @@
83
83
  "models/AppleAuthGenerateClientSecretRequest.md",
84
84
  "models/AppleAuthGenerateClientSecretResponse.md",
85
85
  "models/AppleIdTokenClaims.md",
86
+ "models/ApplyPatientFlagsRequest.md",
86
87
  "models/Appointment.md",
87
88
  "models/AppointmentStatus.md",
88
89
  "models/AssignImpiloDeviceRequest.md",
@@ -588,6 +589,8 @@
588
589
  "models/FedexTrackResult.md",
589
590
  "models/FedexTrackShipmentRequest.md",
590
591
  "models/FieldAgentProfileResponse.md",
592
+ "models/FlagOperationError.md",
593
+ "models/FlagOperationReceipt.md",
591
594
  "models/GS1LookupResponse.md",
592
595
  "models/GS1ParsedData.md",
593
596
  "models/Gender.md",
@@ -1799,6 +1802,7 @@
1799
1802
  "models/UberGetUndeliveredOrdersResponse.md",
1800
1803
  "models/UberUpdateDeliveryRequest.md",
1801
1804
  "models/UberWaypoint.md",
1805
+ "models/UnknownFlagOperation.md",
1802
1806
  "models/UpdateAddressRequest.md",
1803
1807
  "models/UpdateAddressResponse.md",
1804
1808
  "models/UpdateAgentRequest.md",
@@ -2995,6 +2999,7 @@
2995
2999
  "operations/patient.addNotification.md",
2996
3000
  "operations/patient.addPatientIntake.md",
2997
3001
  "operations/patient.analyzeIdentityDocument.md",
3002
+ "operations/patient.applyPatientFlagsOperation.md",
2998
3003
  "operations/patient.assignImpiloDevice.md",
2999
3004
  "operations/patient.assistantChat.md",
3000
3005
  "operations/patient.assistantClassify.md",
@@ -3044,6 +3049,7 @@
3044
3049
  "operations/patient.getPatientAttributes.md",
3045
3050
  "operations/patient.getPatientDashboard.md",
3046
3051
  "operations/patient.getPatientFlags.md",
3052
+ "operations/patient.getPatientFlagsOperation.md",
3047
3053
  "operations/patient.getPatientIntake.md",
3048
3054
  "operations/patient.getPatientSidebarPatientSidebar.md",
3049
3055
  "operations/patient.getPhoto.md",
@@ -3140,7 +3146,7 @@
3140
3146
  "operations/vitals.recordVitals.md"
3141
3147
  ],
3142
3148
  "language": "nodejs",
3143
- "modelCount": 2047,
3144
- "operationCount": 1036,
3149
+ "modelCount": 2051,
3150
+ "operationCount": 1038,
3145
3151
  "schemaVersion": 1
3146
3152
  }
@@ -895,6 +895,7 @@ Generated call examples use exact public surface signatures. Workflow examples r
895
895
  - [Add a notification](../operations/patient.addNotification.md)
896
896
  - [Add one structured patient intake section](../operations/patient.addPatientIntake.md)
897
897
  - [OCR an identity document](../operations/patient.analyzeIdentityDocument.md)
898
+ - [Apply a keyed patient flag patch](../operations/patient.applyPatientFlagsOperation.md)
898
899
  - [Assign Impilo device to patient](../operations/patient.assignImpiloDevice.md)
899
900
  - [Grounded assistant chat](../operations/patient.assistantChat.md)
900
901
  - [Classify a voice command into an action code](../operations/patient.assistantClassify.md)
@@ -944,6 +945,7 @@ Generated call examples use exact public surface signatures. Workflow examples r
944
945
  - [Get patient attributes](../operations/patient.getPatientAttributes.md)
945
946
  - [Get the patient dashboard summary](../operations/patient.getPatientDashboard.md)
946
947
  - [Get patient flags](../operations/patient.getPatientFlags.md)
948
+ - [Look up a keyed patient flag receipt](../operations/patient.getPatientFlagsOperation.md)
947
949
  - [Get own patient intake submission and delivery status](../operations/patient.getPatientIntake.md)
948
950
  - [Get the patient sidebar summary](../operations/patient.getPatientSidebarPatientSidebar.md)
949
951
  - [Get a patient photo](../operations/patient.getPhoto.md)
package/docs/index.md CHANGED
@@ -903,6 +903,7 @@ This directory is generated from the shared structured docs data. Do not edit ge
903
903
  - [Add a notification](operations/patient.addNotification.md) (`patient.addNotification`)
904
904
  - [Add one structured patient intake section](operations/patient.addPatientIntake.md) (`patient.addPatientIntake`)
905
905
  - [OCR an identity document](operations/patient.analyzeIdentityDocument.md) (`patient.analyzeIdentityDocument`)
906
+ - [Apply a keyed patient flag patch](operations/patient.applyPatientFlagsOperation.md) (`patient.applyPatientFlagsOperation`)
906
907
  - [Assign Impilo device to patient](operations/patient.assignImpiloDevice.md) (`patient.assignImpiloDevice`)
907
908
  - [Grounded assistant chat](operations/patient.assistantChat.md) (`patient.assistantChat`)
908
909
  - [Classify a voice command into an action code](operations/patient.assistantClassify.md) (`patient.assistantClassify`)
@@ -952,6 +953,7 @@ This directory is generated from the shared structured docs data. Do not edit ge
952
953
  - [Get patient attributes](operations/patient.getPatientAttributes.md) (`patient.getPatientAttributes`)
953
954
  - [Get the patient dashboard summary](operations/patient.getPatientDashboard.md) (`patient.getPatientDashboard`)
954
955
  - [Get patient flags](operations/patient.getPatientFlags.md) (`patient.getPatientFlags`)
956
+ - [Look up a keyed patient flag receipt](operations/patient.getPatientFlagsOperation.md) (`patient.getPatientFlagsOperation`)
955
957
  - [Get own patient intake submission and delivery status](operations/patient.getPatientIntake.md) (`patient.getPatientIntake`)
956
958
  - [Get the patient sidebar summary](operations/patient.getPatientSidebarPatientSidebar.md) (`patient.getPatientSidebarPatientSidebar`)
957
959
  - [Get a patient photo](operations/patient.getPhoto.md) (`patient.getPhoto`)
@@ -0,0 +1,18 @@
1
+ # ApplyPatientFlagsRequest
2
+
3
+ Model ID: `ApplyPatientFlagsRequest`
4
+
5
+ The exact approved patch; tenant and patient are resolved from login.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `flags` | `object` | Yes | | | | No | |
14
+ | `idempotency_key` | `string` | Yes | | | | No | |
15
+
16
+ ## Example
17
+
18
+ None declared in canonical OpenAPI.
@@ -0,0 +1,18 @@
1
+ # FlagOperationError
2
+
3
+ Model ID: `FlagOperationError`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `error` | `string` | Yes | | | | No | |
14
+ | `outcome` | [`UnknownFlagOperation`](./UnknownFlagOperation.md) | No | | | | Yes | |
15
+
16
+ ## Example
17
+
18
+ None declared in canonical OpenAPI.
@@ -0,0 +1,20 @@
1
+ # FlagOperationReceipt
2
+
3
+ Model ID: `FlagOperationReceipt`
4
+
5
+ Original committed patch, even when current flags have since changed.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `flags` | `object` | Yes | | | | No | |
14
+ | `idempotency_key` | `string` | Yes | | | | No | |
15
+ | `patient_id` | `string` | Yes | | | | No | |
16
+ | `status` | `string` | Yes | | | | No | |
17
+
18
+ ## Example
19
+
20
+ None declared in canonical OpenAPI.
@@ -0,0 +1,18 @@
1
+ # UnknownFlagOperation
2
+
3
+ Model ID: `UnknownFlagOperation`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `idempotency_key` | `string` | Yes | | | | No | |
14
+ | `status` | `string` | Yes | | | | No | |
15
+
16
+ ## Example
17
+
18
+ None declared in canonical OpenAPI.
@@ -33,6 +33,7 @@
33
33
  - [AppleAuthGenerateClientSecretRequest](AppleAuthGenerateClientSecretRequest.md)
34
34
  - [AppleAuthGenerateClientSecretResponse](AppleAuthGenerateClientSecretResponse.md)
35
35
  - [AppleIdTokenClaims](AppleIdTokenClaims.md)
36
+ - [ApplyPatientFlagsRequest](ApplyPatientFlagsRequest.md)
36
37
  - [Appointment](Appointment.md)
37
38
  - [ErrorResponse](appointments.ErrorResponse.md)
38
39
  - [AppointmentStatus](AppointmentStatus.md)
@@ -575,6 +576,8 @@
575
576
  - [FieldAgentVerifyEmailRequest](fieldagent.VerifyEmailRequest.md)
576
577
  - [FieldAgentVerifySmsRequest](fieldagent.VerifySmsRequest.md)
577
578
  - [FieldAgentProfileResponse](FieldAgentProfileResponse.md)
579
+ - [FlagOperationError](FlagOperationError.md)
580
+ - [FlagOperationReceipt](FlagOperationReceipt.md)
578
581
  - [Gender](Gender.md)
579
582
  - [GenderIdentity](GenderIdentity.md)
580
583
  - [GetAgentAgentResponse](GetAgentAgentResponse.md)
@@ -1871,6 +1874,7 @@
1871
1874
  - [UberGetUndeliveredOrdersResponse](UberGetUndeliveredOrdersResponse.md)
1872
1875
  - [UberUpdateDeliveryRequest](UberUpdateDeliveryRequest.md)
1873
1876
  - [UberWaypoint](UberWaypoint.md)
1877
+ - [UnknownFlagOperation](UnknownFlagOperation.md)
1874
1878
  - [UpdateAddressRequest](UpdateAddressRequest.md)
1875
1879
  - [UpdateAddressResponse](UpdateAddressResponse.md)
1876
1880
  - [UpdateAgentRequest](UpdateAgentRequest.md)
@@ -0,0 +1,152 @@
1
+ # Apply a keyed patient flag patch
2
+
3
+ Operation ID: `patient.applyPatientFlagsOperation`
4
+
5
+ Commits the exact approved boolean patch and its receipt atomically. Repeating a key returns the original patch without reapplying it. Tenant and patient come only from the verified patient login. On an unknown outcome, look up the original key before proceeding.
6
+
7
+ ## Public method
8
+
9
+ `applyPatientFlagsOperation`
10
+
11
+ Signature: `patient.applyPatientFlagsOperation(request)`
12
+
13
+ Return type: `Promise<FlagOperationReceipt>`
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/flags/operations`
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` | [`ApplyPatientFlagsRequest`](../models/ApplyPatientFlagsRequest.md) | Yes | | | | No | |
42
+
43
+ Request model: [`ApplyPatientFlagsRequest`](../models/ApplyPatientFlagsRequest.md)
44
+
45
+ ## Request example
46
+
47
+ None declared in canonical OpenAPI.
48
+
49
+ ## Success responses
50
+
51
+ | Status | Shape | Content type | Description |
52
+ |---|---|---|---|
53
+ | `200` | [`FlagOperationReceipt`](../models/FlagOperationReceipt.md) | application/json | Original committed flag patch, correlated to the operation key |
54
+
55
+ ## Success response examples
56
+
57
+ None declared in canonical OpenAPI.
58
+
59
+ ## Common errors
60
+
61
+ | Status | Shape | Content type | Description |
62
+ |---|---|---|---|
63
+ | `401` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Patient login required |
64
+ | `403` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Verified tenant required |
65
+ | `404` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Patient or receipt not found; a missing receipt does not prove failure |
66
+ | `409` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Key reused for different content, or transaction rejected by version contention |
67
+ | `422` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Invalid operation key or flag patch |
68
+ | `503` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Storage unavailable or outcome unknown; reconcile the original key |
69
+
70
+ ## Error examples
71
+
72
+ ### 401
73
+
74
+ ```json
75
+ {
76
+ "error": "string"
77
+ }
78
+ ```
79
+
80
+ ### 403
81
+
82
+ ```json
83
+ {
84
+ "error": "string"
85
+ }
86
+ ```
87
+
88
+ ### 404
89
+
90
+ ```json
91
+ {
92
+ "error": "string"
93
+ }
94
+ ```
95
+
96
+ ### 409
97
+
98
+ ```json
99
+ {
100
+ "error": "string"
101
+ }
102
+ ```
103
+
104
+ ### 422
105
+
106
+ ```json
107
+ {
108
+ "error": "string"
109
+ }
110
+ ```
111
+
112
+ ### 503
113
+
114
+ ```json
115
+ {
116
+ "error": "string"
117
+ }
118
+ ```
119
+
120
+ ## NodeJS / TypeScript implementation
121
+
122
+ ```ts
123
+ import { HCSDK } from "@healthcloudai/hc-sdk";
124
+ ```
125
+
126
+ ```ts
127
+ const request = "<REQUEST>";
128
+
129
+ const result = await patient.applyPatientFlagsOperation(request);
130
+ ```
131
+
132
+ ## cURL
133
+
134
+ ```bash
135
+ curl -X POST \
136
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
137
+ -H 'Content-Type: application/json' \
138
+ -d '<REQUEST_BODY_JSON>' \
139
+ 'https://dev-api-patient.health.cloud/patients/flags/operations'
140
+ ```
141
+
142
+ ## Notes
143
+
144
+ None.
145
+
146
+ ## Prepared Test Console scenario
147
+
148
+ No canonical scenario is currently associated.
149
+
150
+ ## Real response
151
+
152
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -0,0 +1,150 @@
1
+ # Look up a keyed patient flag receipt
2
+
3
+ Operation ID: `patient.getPatientFlagsOperation`
4
+
5
+ Reads only the original receipt for the logged-in patient, never current flags or a new write. A 404 does not prove that an in-flight write cannot still commit.
6
+
7
+ ## Public method
8
+
9
+ `getPatientFlagsOperation`
10
+
11
+ Signature: `patient.getPatientFlagsOperation(idempotencyKey)`
12
+
13
+ Return type: `Promise<FlagOperationReceipt>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `GET /patients/flags/operations/{idempotency_key}`
28
+
29
+ ## Path parameters
30
+
31
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
32
+ |---|---|---:|---|---|---|---:|---|
33
+ | `idempotency_key` | `string` | Yes | | | | No | |
34
+
35
+ ## Query parameters
36
+
37
+ None.
38
+
39
+ ## Body parameters
40
+
41
+ None.
42
+
43
+ Request model: None.
44
+
45
+ ## Request example
46
+
47
+ None declared in canonical OpenAPI.
48
+
49
+ ## Success responses
50
+
51
+ | Status | Shape | Content type | Description |
52
+ |---|---|---|---|
53
+ | `200` | [`FlagOperationReceipt`](../models/FlagOperationReceipt.md) | application/json | Original committed flag patch, correlated to the operation key |
54
+
55
+ ## Success response examples
56
+
57
+ None declared in canonical OpenAPI.
58
+
59
+ ## Common errors
60
+
61
+ | Status | Shape | Content type | Description |
62
+ |---|---|---|---|
63
+ | `401` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Patient login required |
64
+ | `403` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Verified tenant required |
65
+ | `404` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Patient or receipt not found; a missing receipt does not prove failure |
66
+ | `409` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Key reused for different content, or transaction rejected by version contention |
67
+ | `422` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Invalid operation key or flag patch |
68
+ | `503` | [`FlagOperationError`](../models/FlagOperationError.md) | application/json | Storage unavailable or outcome unknown; reconcile the original key |
69
+
70
+ ## Error examples
71
+
72
+ ### 401
73
+
74
+ ```json
75
+ {
76
+ "error": "string"
77
+ }
78
+ ```
79
+
80
+ ### 403
81
+
82
+ ```json
83
+ {
84
+ "error": "string"
85
+ }
86
+ ```
87
+
88
+ ### 404
89
+
90
+ ```json
91
+ {
92
+ "error": "string"
93
+ }
94
+ ```
95
+
96
+ ### 409
97
+
98
+ ```json
99
+ {
100
+ "error": "string"
101
+ }
102
+ ```
103
+
104
+ ### 422
105
+
106
+ ```json
107
+ {
108
+ "error": "string"
109
+ }
110
+ ```
111
+
112
+ ### 503
113
+
114
+ ```json
115
+ {
116
+ "error": "string"
117
+ }
118
+ ```
119
+
120
+ ## NodeJS / TypeScript implementation
121
+
122
+ ```ts
123
+ import { HCSDK } from "@healthcloudai/hc-sdk";
124
+ ```
125
+
126
+ ```ts
127
+ const idempotencyKey = "<IDEMPOTENCY_KEY>";
128
+
129
+ const result = await patient.getPatientFlagsOperation(idempotencyKey);
130
+ ```
131
+
132
+ ## cURL
133
+
134
+ ```bash
135
+ curl -X GET \
136
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
137
+ 'https://dev-api-patient.health.cloud/patients/flags/operations/%3CIDEMPOTENCY_KEY%3E'
138
+ ```
139
+
140
+ ## Notes
141
+
142
+ None.
143
+
144
+ ## Prepared Test Console scenario
145
+
146
+ No canonical scenario is currently associated.
147
+
148
+ ## Real response
149
+
150
+ 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.15.1",
3
+ "version": "3.16.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",