@healthcloudai/hc-sdk 3.8.0 → 3.9.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 +7 -0
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +7 -0
- package/docs/clients/ProviderClient.md +1 -0
- package/docs/docs-manifest.json +6 -3
- package/docs/examples/index.md +1 -0
- package/docs/index.md +1 -0
- package/docs/models/index.md +2 -0
- package/docs/models/provider.LoginResponse.md +1 -0
- package/docs/models/provider.RefreshTokenRequest.md +18 -0
- package/docs/models/provider.RefreshTokenResponse.md +21 -0
- package/docs/operations/provider.login.md +7 -6
- package/docs/operations/provider.refreshToken.md +115 -0
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ Type: `object`
|
|
|
20
20
|
| `expires_in` | `integer` | Yes | | | | No | Access token lifetime in seconds from issuance. |
|
|
21
21
|
| `fhir_practitioner_id` | `string|null` | No | | | | Yes | FHIR Practitioner ID for this practitioner, used as {practitioner_id} on every other route. Null if it could not be resolved. |
|
|
22
22
|
| `id_token` | `string|null` | No | | | | Yes | Cognito ID token, carrying the tenant_id claim used by other HealthCloud services. |
|
|
23
|
+
| `refresh_token` | `string|null` | No | | | | Yes | Cognito refresh token; pass to POST /auth/refresh to renew the access token without re-entering credentials. |
|
|
23
24
|
| `telehealth_id` | `string|null` | No | | | | Yes | Telehealth service identifier for this practitioner, when the telehealth integration is enabled. Null if it could not be resolved. |
|
|
24
25
|
|
|
25
26
|
## Example
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ProviderRefreshTokenRequest
|
|
2
|
+
|
|
3
|
+
Model ID: `provider.RefreshTokenRequest`
|
|
4
|
+
|
|
5
|
+
Request body for POST /auth/refresh.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `refresh_token` | `string` | Yes | | | | No | Refresh token previously returned by provider.login. |
|
|
14
|
+
| `tenant_id` | `string` | Yes | | | | No | Tenant whose practitioner Cognito pool issued the refresh token. |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
None declared in canonical OpenAPI.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ProviderRefreshTokenResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `provider.RefreshTokenResponse`
|
|
4
|
+
|
|
5
|
+
Response for POST /auth/refresh.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `access_token` | `string` | Yes | | | | No | New Cognito access token. |
|
|
14
|
+
| `expires_in` | `integer` | Yes | | | | No | Access token lifetime in seconds. |
|
|
15
|
+
| `id_token` | `string|null` | No | | | | Yes | New Cognito ID token, when issued. |
|
|
16
|
+
| `refresh_token` | `string|null` | No | | | | Yes | Rotated refresh token, when Cognito returns one. |
|
|
17
|
+
| `token_type` | `string` | No | | | `"Bearer"` | No | OAuth token type returned by Cognito. |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
None declared in canonical OpenAPI.
|
|
@@ -62,12 +62,13 @@ Request model: [`provider.LoginRequest`](../models/provider.LoginRequest.md)
|
|
|
62
62
|
|
|
63
63
|
```json
|
|
64
64
|
{
|
|
65
|
-
"access_token": "
|
|
66
|
-
"cognito_sub": "
|
|
67
|
-
"expires_in":
|
|
68
|
-
"fhir_practitioner_id": "
|
|
69
|
-
"id_token": "
|
|
70
|
-
"
|
|
65
|
+
"access_token": "string",
|
|
66
|
+
"cognito_sub": "string",
|
|
67
|
+
"expires_in": 0,
|
|
68
|
+
"fhir_practitioner_id": "string",
|
|
69
|
+
"id_token": "string",
|
|
70
|
+
"refresh_token": "string",
|
|
71
|
+
"telehealth_id": "string"
|
|
71
72
|
}
|
|
72
73
|
```
|
|
73
74
|
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Refresh practitioner access tokens
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.refreshToken`
|
|
4
|
+
|
|
5
|
+
Refresh practitioner access tokens
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`refreshToken`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.refreshToken(request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ProviderRefreshTokenResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **UNSPECIFIED**
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
None documented.
|
|
22
|
+
|
|
23
|
+
## HTTP
|
|
24
|
+
|
|
25
|
+
`POST /auth/refresh`
|
|
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.RefreshTokenRequest`](../models/provider.RefreshTokenRequest.md) | No | | | | Yes | |
|
|
40
|
+
|
|
41
|
+
Request model: [`provider.RefreshTokenRequest`](../models/provider.RefreshTokenRequest.md)
|
|
42
|
+
|
|
43
|
+
## Request example
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"refresh_token": "string",
|
|
48
|
+
"tenant_id": "string"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Success responses
|
|
53
|
+
|
|
54
|
+
| Status | Shape | Content type | Description |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| `200` | [`provider.RefreshTokenResponse`](../models/provider.RefreshTokenResponse.md) | application/json | Refreshed practitioner tokens |
|
|
57
|
+
|
|
58
|
+
## Success response examples
|
|
59
|
+
|
|
60
|
+
### 200
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"access_token": "string",
|
|
65
|
+
"expires_in": 0,
|
|
66
|
+
"id_token": "string",
|
|
67
|
+
"refresh_token": "string",
|
|
68
|
+
"token_type": "Bearer"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Common errors
|
|
73
|
+
|
|
74
|
+
None declared in canonical OpenAPI.
|
|
75
|
+
|
|
76
|
+
## Error examples
|
|
77
|
+
|
|
78
|
+
None declared in canonical OpenAPI.
|
|
79
|
+
|
|
80
|
+
## NodeJS / TypeScript implementation
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
84
|
+
import type { ProviderRefreshTokenRequest } from "@healthcloudai/hc-sdk";
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
const request = {
|
|
89
|
+
"refresh_token": "string",
|
|
90
|
+
"tenant_id": "string"
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const result = await provider.refreshToken(request);
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## cURL
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
curl -X POST \
|
|
100
|
+
-H 'Content-Type: application/json' \
|
|
101
|
+
-d '{"refresh_token":"string","tenant_id":"string"}' \
|
|
102
|
+
'https://dev-api-provider.health.cloud/auth/refresh'
|
|
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.
|
package/package.json
CHANGED