@healthcloudai/hc-sdk 3.19.1 → 3.20.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 +12 -0
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +12 -0
- package/docs/clients/ProviderClient.md +2 -0
- package/docs/docs-manifest.json +8 -3
- package/docs/examples/index.md +2 -0
- package/docs/index.md +2 -0
- package/docs/models/LogoutResponse.md +17 -0
- package/docs/models/index.md +3 -0
- package/docs/models/provider.ResendVerificationCodeRequest.md +18 -0
- package/docs/models/provider.ResendVerificationCodeResponse.md +17 -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,17 @@
|
|
|
1
|
+
# ProviderLogoutResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `LogoutResponse`
|
|
4
|
+
|
|
5
|
+
Response for POST /auth/logout.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `message` | `string` | Yes | | | | No | Human-readable confirmation that the practitioner's tokens were revoked. |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
None declared in canonical OpenAPI.
|
package/docs/models/index.md
CHANGED
|
@@ -1266,6 +1266,7 @@
|
|
|
1266
1266
|
- [LocationAddress](LocationAddress.md)
|
|
1267
1267
|
- [LocationHours](LocationHours.md)
|
|
1268
1268
|
- [LocationStatus](LocationStatus.md)
|
|
1269
|
+
- [ProviderLogoutResponse](LogoutResponse.md)
|
|
1269
1270
|
- [MaritalStatus](MaritalStatus.md)
|
|
1270
1271
|
- [mcp.ConnectResponse](mcp.ConnectResponse.md)
|
|
1271
1272
|
- [McpJsonRpcRequest](McpFieldagentRequest.md)
|
|
@@ -1507,6 +1508,8 @@
|
|
|
1507
1508
|
- [ProviderRefreshTokenResponse](provider.RefreshTokenResponse.md)
|
|
1508
1509
|
- [ProviderRegisterRequest](provider.RegisterRequest.md)
|
|
1509
1510
|
- [ProviderRegisterResponse](provider.RegisterResponse.md)
|
|
1511
|
+
- [ProviderResendVerificationCodeRequest](provider.ResendVerificationCodeRequest.md)
|
|
1512
|
+
- [ProviderResendVerificationCodeResponse](provider.ResendVerificationCodeResponse.md)
|
|
1510
1513
|
- [ProviderResetPasswordRequest](provider.ResetPasswordRequest.md)
|
|
1511
1514
|
- [ProviderResetPasswordResponse](provider.ResetPasswordResponse.md)
|
|
1512
1515
|
- [ResponseAnswer](provider.ResponseAnswer.md)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ProviderResendVerificationCodeRequest
|
|
2
|
+
|
|
3
|
+
Model ID: `provider.ResendVerificationCodeRequest`
|
|
4
|
+
|
|
5
|
+
Request body for POST /auth/resend-verification-code.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `email` | `string` | No | email | | | No | Practitioner's registered email address. |
|
|
14
|
+
| `tenant_id` | `string` | No | | | | No | Tenant whose practitioner Cognito pool should issue the code. |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
None declared in canonical OpenAPI.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ProviderResendVerificationCodeResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `provider.ResendVerificationCodeResponse`
|
|
4
|
+
|
|
5
|
+
Result of resending an email-verification OTP.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `email_otp_sent` | `boolean` | Yes | | | | No | Whether the OTP email was dispatched. |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
None declared in canonical OpenAPI.
|
|
@@ -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