@healthcloudai/hc-sdk 3.19.1 → 3.21.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.cjs +105 -0
- package/dist/index.d.cts +418 -101
- package/dist/index.d.ts +418 -101
- package/dist/index.js +105 -0
- package/docs/clients/PatientClient.md +2 -0
- package/docs/clients/ProviderClient.md +2 -0
- package/docs/docs-manifest.json +15 -3
- package/docs/examples/index.md +4 -0
- package/docs/index.md +4 -0
- package/docs/models/IntakeOperationError.md +18 -0
- package/docs/models/IntakeOperationResponse.md +22 -0
- package/docs/models/LogoutResponse.md +17 -0
- package/docs/models/ObservedIntakeResponse.md +17 -0
- package/docs/models/SubmitIntakeOperationRequest.md +19 -0
- package/docs/models/UnknownIntakeOperation.md +18 -0
- package/docs/models/index.md +8 -0
- package/docs/models/provider.ResendVerificationCodeRequest.md +18 -0
- package/docs/models/provider.ResendVerificationCodeResponse.md +17 -0
- package/docs/operations/patient.getPatientIntakeOperation.md +166 -0
- package/docs/operations/patient.submitPatientIntakeOperation.md +178 -0
- package/docs/operations/provider.logout.md +115 -0
- package/docs/operations/provider.resendVerificationCode.md +137 -0
- package/package.json +1 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Read the logged-in patient's keyed intake journal state
|
|
2
|
+
|
|
3
|
+
Operation ID: `patient.getPatientIntakeOperation`
|
|
4
|
+
|
|
5
|
+
Reads the original scope-bound journal entry without executing intake. Missing/pending state is not evidence of failure or permission to repeat a write.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`getPatientIntakeOperation`
|
|
10
|
+
|
|
11
|
+
Signature: `patient.getPatientIntakeOperation(idempotencyKey)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<IntakeOperationResponse>`
|
|
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/intake/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` | [`IntakeOperationResponse`](../models/IntakeOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
|
|
54
|
+
| `202` | [`IntakeOperationResponse`](../models/IntakeOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
|
|
55
|
+
|
|
56
|
+
## Success response examples
|
|
57
|
+
|
|
58
|
+
### 200
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
|
|
63
|
+
"patient_id": "patient-example-001",
|
|
64
|
+
"request_hash": "a7c3a0a2f1d949380f4312a44f9a4a02b0ab754a47fc57f10c92a6f8fb5cd544",
|
|
65
|
+
"response_body": {
|
|
66
|
+
"error_messages": [
|
|
67
|
+
"Synthetic outcome needs clinical reconciliation"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"response_code": 502,
|
|
71
|
+
"status": "recorded"
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Common errors
|
|
76
|
+
|
|
77
|
+
| Status | Shape | Content type | Description |
|
|
78
|
+
|---|---|---|---|
|
|
79
|
+
| `401` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Patient login required |
|
|
80
|
+
| `403` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Verified tenant required |
|
|
81
|
+
| `404` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Patient or operation not found; an in-flight operation may still commit |
|
|
82
|
+
| `409` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Key already bound to different raw terms |
|
|
83
|
+
| `422` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Invalid key or intake terms |
|
|
84
|
+
| `503` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Coordination or outcome unavailable; look up the original key, never fall back to an unkeyed write |
|
|
85
|
+
|
|
86
|
+
## Error examples
|
|
87
|
+
|
|
88
|
+
### 401
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"error": "string"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 403
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"error": "string"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 404
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"error": "string"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 409
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"error": "string"
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 422
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"error": "string"
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 503
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"error": "string"
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## NodeJS / TypeScript implementation
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
const idempotencyKey = "<IDEMPOTENCY_KEY>";
|
|
144
|
+
|
|
145
|
+
const result = await patient.getPatientIntakeOperation(idempotencyKey);
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## cURL
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
curl -X GET \
|
|
152
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
153
|
+
'https://dev-api-patient.health.cloud/patients/intake/operations/%3CIDEMPOTENCY_KEY%3E'
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Notes
|
|
157
|
+
|
|
158
|
+
None.
|
|
159
|
+
|
|
160
|
+
## Prepared Test Console scenario
|
|
161
|
+
|
|
162
|
+
No canonical scenario is currently associated.
|
|
163
|
+
|
|
164
|
+
## Real response
|
|
165
|
+
|
|
166
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Execute or replay one keyed agent intake operation
|
|
2
|
+
|
|
3
|
+
Operation ID: `patient.submitPatientIntakeOperation`
|
|
4
|
+
|
|
5
|
+
Derives tenant/patient from patient login and binds the key to exact raw section/summary. A committed first-dispatch marker precedes the shared intake pipeline. Existing pending/unknown keys return HTTP 202 without repeating writes; recorded responses replay under HTTP 200 with their original response_code/body. Recorded is not independent proof that every clinical effect succeeded. Requires a separately provisioned operation journal; fails closed without it.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`submitPatientIntakeOperation`
|
|
10
|
+
|
|
11
|
+
Signature: `patient.submitPatientIntakeOperation(request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<IntakeOperationResponse>`
|
|
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/intake/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` | [`SubmitIntakeOperationRequest`](../models/SubmitIntakeOperationRequest.md) | Yes | | | | No | |
|
|
42
|
+
|
|
43
|
+
Request model: [`SubmitIntakeOperationRequest`](../models/SubmitIntakeOperationRequest.md)
|
|
44
|
+
|
|
45
|
+
## Request example
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
|
|
50
|
+
"section": "allergies",
|
|
51
|
+
"summary": "Synthetic intake note."
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Success responses
|
|
56
|
+
|
|
57
|
+
| Status | Shape | Content type | Description |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| `200` | [`IntakeOperationResponse`](../models/IntakeOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
|
|
60
|
+
| `202` | [`IntakeOperationResponse`](../models/IntakeOperationResponse.md) | application/json | Scope/key-bound journal state; recorded HTTP response is not independent clinical success evidence |
|
|
61
|
+
|
|
62
|
+
## Success response examples
|
|
63
|
+
|
|
64
|
+
### 200
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
|
|
69
|
+
"patient_id": "patient-example-001",
|
|
70
|
+
"request_hash": "a7c3a0a2f1d949380f4312a44f9a4a02b0ab754a47fc57f10c92a6f8fb5cd544",
|
|
71
|
+
"response_body": {
|
|
72
|
+
"error_messages": [
|
|
73
|
+
"Synthetic outcome needs clinical reconciliation"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"response_code": 502,
|
|
77
|
+
"status": "recorded"
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Common errors
|
|
82
|
+
|
|
83
|
+
| Status | Shape | Content type | Description |
|
|
84
|
+
|---|---|---|---|
|
|
85
|
+
| `401` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Patient login required |
|
|
86
|
+
| `403` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Verified tenant required |
|
|
87
|
+
| `404` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Patient or operation not found; an in-flight operation may still commit |
|
|
88
|
+
| `409` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Key already bound to different raw terms |
|
|
89
|
+
| `422` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Invalid key or intake terms |
|
|
90
|
+
| `503` | [`IntakeOperationError`](../models/IntakeOperationError.md) | application/json | Coordination or outcome unavailable; look up the original key, never fall back to an unkeyed write |
|
|
91
|
+
|
|
92
|
+
## Error examples
|
|
93
|
+
|
|
94
|
+
### 401
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"error": "string"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 403
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"error": "string"
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 404
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"error": "string"
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 409
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"error": "string"
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 422
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"error": "string"
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 503
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"error": "string"
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## NodeJS / TypeScript implementation
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
const request = {
|
|
150
|
+
"idempotency_key": "940be5cc-c1fd-4b38-ae7d-13516f9ac098",
|
|
151
|
+
"section": "allergies",
|
|
152
|
+
"summary": "Synthetic intake note."
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const result = await patient.submitPatientIntakeOperation(request);
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## cURL
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
curl -X POST \
|
|
162
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
163
|
+
-H 'Content-Type: application/json' \
|
|
164
|
+
-d '{"idempotency_key":"940be5cc-c1fd-4b38-ae7d-13516f9ac098","section":"allergies","summary":"Synthetic intake note."}' \
|
|
165
|
+
'https://dev-api-patient.health.cloud/patients/intake/operations'
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Notes
|
|
169
|
+
|
|
170
|
+
None.
|
|
171
|
+
|
|
172
|
+
## Prepared Test Console scenario
|
|
173
|
+
|
|
174
|
+
No canonical scenario is currently associated.
|
|
175
|
+
|
|
176
|
+
## Real response
|
|
177
|
+
|
|
178
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Sign out the practitioner and revoke their tokens
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.logout`
|
|
4
|
+
|
|
5
|
+
Sign the practitioner out: Cognito revokes the Bearer access token and the refresh tokens of the same session, so a token copied from a browser is useless afterwards. A token that has already expired cannot be revoked and is rejected; callers should clear their own copy either way.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`logout`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.logout()`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ProviderLogoutResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`POST /auth/logout`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
None.
|
|
32
|
+
|
|
33
|
+
## Query parameters
|
|
34
|
+
|
|
35
|
+
None.
|
|
36
|
+
|
|
37
|
+
## Body parameters
|
|
38
|
+
|
|
39
|
+
None.
|
|
40
|
+
|
|
41
|
+
Request model: None.
|
|
42
|
+
|
|
43
|
+
## Request example
|
|
44
|
+
|
|
45
|
+
None declared in canonical OpenAPI.
|
|
46
|
+
|
|
47
|
+
## Success responses
|
|
48
|
+
|
|
49
|
+
| Status | Shape | Content type | Description |
|
|
50
|
+
|---|---|---|---|
|
|
51
|
+
| `200` | [`LogoutResponse`](../models/LogoutResponse.md) | application/json | Tokens revoked |
|
|
52
|
+
|
|
53
|
+
## Success response examples
|
|
54
|
+
|
|
55
|
+
### 200
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"message": "Signed out"
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Common errors
|
|
64
|
+
|
|
65
|
+
| Status | Shape | Content type | Description |
|
|
66
|
+
|---|---|---|---|
|
|
67
|
+
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | No valid practitioner access token, or Cognito no longer accepts it |
|
|
68
|
+
|
|
69
|
+
## Error examples
|
|
70
|
+
|
|
71
|
+
### 401 — The token has expired or was already revoked
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"error": "Invalid or expired access token"
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 401 — No Authorization header
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"error": "Authorization required"
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## NodeJS / TypeScript implementation
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
const result = await provider.logout();
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## cURL
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
curl -X POST \
|
|
101
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
102
|
+
'https://dev-api-provider.health.cloud/auth/logout'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Notes
|
|
106
|
+
|
|
107
|
+
None.
|
|
108
|
+
|
|
109
|
+
## Prepared Test Console scenario
|
|
110
|
+
|
|
111
|
+
No canonical scenario is currently associated.
|
|
112
|
+
|
|
113
|
+
## Real response
|
|
114
|
+
|
|
115
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Resend the email verification OTP
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.resendVerificationCode`
|
|
4
|
+
|
|
5
|
+
Send a new email-verification OTP to an existing unverified practitioner account. Requests are throttled per practitioner for 30 seconds; this never discloses an OTP in the response.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`resendEmailVerification`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.resendEmailVerification(request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ResendPractitionerVerificationCodeResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **PUBLIC**
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
None documented.
|
|
22
|
+
|
|
23
|
+
## HTTP
|
|
24
|
+
|
|
25
|
+
`POST /auth/resend-verification-code`
|
|
26
|
+
|
|
27
|
+
## Path parameters
|
|
28
|
+
|
|
29
|
+
None.
|
|
30
|
+
|
|
31
|
+
## Query parameters
|
|
32
|
+
|
|
33
|
+
None.
|
|
34
|
+
|
|
35
|
+
## Body parameters
|
|
36
|
+
|
|
37
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
38
|
+
|---|---|---:|---|---|---|---:|---|
|
|
39
|
+
| `body` | [`provider.ResendVerificationCodeRequest`](../models/provider.ResendVerificationCodeRequest.md) | No | | | | Yes | |
|
|
40
|
+
|
|
41
|
+
Request model: [`provider.ResendVerificationCodeRequest`](../models/provider.ResendVerificationCodeRequest.md)
|
|
42
|
+
|
|
43
|
+
## Request example
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"email": "provider.user@example.com",
|
|
48
|
+
"tenant_id": "tenant-example-001"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Success responses
|
|
53
|
+
|
|
54
|
+
| Status | Shape | Content type | Description |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| `200` | [`provider.ResendVerificationCodeResponse`](../models/provider.ResendVerificationCodeResponse.md) | application/json | Verification code resent |
|
|
57
|
+
|
|
58
|
+
## Success response examples
|
|
59
|
+
|
|
60
|
+
### 200
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"email_otp_sent": true
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Common errors
|
|
69
|
+
|
|
70
|
+
| Status | Shape | Content type | Description |
|
|
71
|
+
|---|---|---|---|
|
|
72
|
+
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | email or tenant_id is missing, or the account is already verified |
|
|
73
|
+
| `404` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | No practitioner account exists for this email in the tenant |
|
|
74
|
+
| `429` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Another OTP was requested for the practitioner within the cooldown |
|
|
75
|
+
|
|
76
|
+
## Error examples
|
|
77
|
+
|
|
78
|
+
### 400 — Account is already verified
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"error": "Email is already verified - no code to resend"
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 404 — No matching practitioner
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"error": "User with email 'provider.user@example.com' not found in tenant 'tenant-example-001'"
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 429 — Resend cooldown
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"error": "Please wait 30s before requesting a new code."
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## NodeJS / TypeScript implementation
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
106
|
+
import type { ResendPractitionerVerificationCodeRequest } from "@healthcloudai/hc-sdk";
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
const request = {
|
|
111
|
+
"email": "provider.user@example.com",
|
|
112
|
+
"tenant_id": "tenant-example-001"
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const result = await provider.resendEmailVerification(request);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## cURL
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
curl -X POST \
|
|
122
|
+
-H 'Content-Type: application/json' \
|
|
123
|
+
-d '{"email":"provider.user@example.com","tenant_id":"tenant-example-001"}' \
|
|
124
|
+
'https://dev-api-provider.health.cloud/auth/resend-verification-code'
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Notes
|
|
128
|
+
|
|
129
|
+
None.
|
|
130
|
+
|
|
131
|
+
## Prepared Test Console scenario
|
|
132
|
+
|
|
133
|
+
No canonical scenario is currently associated.
|
|
134
|
+
|
|
135
|
+
## Real response
|
|
136
|
+
|
|
137
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
package/package.json
CHANGED