@healthcloudai/hc-sdk 3.19.0 → 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 +28 -4
- package/dist/index.d.ts +28 -4
- 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/BookAppointmentRequest.md +1 -1
- package/docs/models/LogoutResponse.md +17 -0
- package/docs/models/RescheduleAppointmentRequest.md +1 -1
- package/docs/models/Slot.md +2 -1
- 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/appointments.book.md +1 -1
- package/docs/operations/appointments.createSlot.md +1 -0
- package/docs/operations/appointments.listSlots.md +2 -1
- package/docs/operations/appointments.reschedule.md +1 -1
- package/docs/operations/provider.logout.md +115 -0
- package/docs/operations/provider.resendVerificationCode.md +137 -0
- package/package.json +1 -1
package/docs/docs-manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"docsDataContentDigest": "sha256:
|
|
2
|
+
"docsDataContentDigest": "sha256:8a885adeb4993c883d40ab90cd4b3c96f57da4d28661ca356427847752e9508e",
|
|
3
3
|
"generatedFiles": [
|
|
4
4
|
"authentication.md",
|
|
5
5
|
"clients/AmsClient.md",
|
|
@@ -1264,6 +1264,7 @@
|
|
|
1264
1264
|
"models/LocationAddress.md",
|
|
1265
1265
|
"models/LocationHours.md",
|
|
1266
1266
|
"models/LocationStatus.md",
|
|
1267
|
+
"models/LogoutResponse.md",
|
|
1267
1268
|
"models/MaritalStatus.md",
|
|
1268
1269
|
"models/McpFieldagentRequest.md",
|
|
1269
1270
|
"models/McpFieldagentResponse.md",
|
|
@@ -2163,6 +2164,8 @@
|
|
|
2163
2164
|
"models/provider.RefreshTokenResponse.md",
|
|
2164
2165
|
"models/provider.RegisterRequest.md",
|
|
2165
2166
|
"models/provider.RegisterResponse.md",
|
|
2167
|
+
"models/provider.ResendVerificationCodeRequest.md",
|
|
2168
|
+
"models/provider.ResendVerificationCodeResponse.md",
|
|
2166
2169
|
"models/provider.ResetPasswordRequest.md",
|
|
2167
2170
|
"models/provider.ResetPasswordResponse.md",
|
|
2168
2171
|
"models/provider.ResponseAnswer.md",
|
|
@@ -3206,8 +3209,10 @@
|
|
|
3206
3209
|
"operations/provider.listEncounters.md",
|
|
3207
3210
|
"operations/provider.listPractitionerLocations.md",
|
|
3208
3211
|
"operations/provider.login.md",
|
|
3212
|
+
"operations/provider.logout.md",
|
|
3209
3213
|
"operations/provider.refreshToken.md",
|
|
3210
3214
|
"operations/provider.register.md",
|
|
3215
|
+
"operations/provider.resendVerificationCode.md",
|
|
3211
3216
|
"operations/provider.resetPassword.md",
|
|
3212
3217
|
"operations/provider.setPractitionerPortalRoles.md",
|
|
3213
3218
|
"operations/provider.updateEncounterClinicalNote.md",
|
|
@@ -3230,7 +3235,7 @@
|
|
|
3230
3235
|
"operations/vitals.recordVitals.md"
|
|
3231
3236
|
],
|
|
3232
3237
|
"language": "nodejs",
|
|
3233
|
-
"modelCount":
|
|
3234
|
-
"operationCount":
|
|
3238
|
+
"modelCount": 2128,
|
|
3239
|
+
"operationCount": 1050,
|
|
3235
3240
|
"schemaVersion": 1
|
|
3236
3241
|
}
|
package/docs/examples/index.md
CHANGED
|
@@ -1028,8 +1028,10 @@ Generated call examples use exact public surface signatures. Workflow examples r
|
|
|
1028
1028
|
- [List tenant encounters](../operations/provider.listEncounters.md)
|
|
1029
1029
|
- [List the practitioner's practice locations](../operations/provider.listPractitionerLocations.md)
|
|
1030
1030
|
- [Log in a practitioner](../operations/provider.login.md)
|
|
1031
|
+
- [Sign out the practitioner and revoke their tokens](../operations/provider.logout.md)
|
|
1031
1032
|
- [Refresh practitioner access tokens](../operations/provider.refreshToken.md)
|
|
1032
1033
|
- [Register a practitioner](../operations/provider.register.md)
|
|
1034
|
+
- [Resend the email verification OTP](../operations/provider.resendVerificationCode.md)
|
|
1033
1035
|
- [Start a password reset](../operations/provider.resetPassword.md)
|
|
1034
1036
|
- [Set a practitioner's provider-portal roles (platform admin only)](../operations/provider.setPractitionerPortalRoles.md)
|
|
1035
1037
|
- [Update encounter notes and assessment](../operations/provider.updateEncounterClinicalNote.md)
|
package/docs/index.md
CHANGED
|
@@ -1036,8 +1036,10 @@ This directory is generated from the shared structured docs data. Do not edit ge
|
|
|
1036
1036
|
- [List tenant encounters](operations/provider.listEncounters.md) (`provider.listEncounters`)
|
|
1037
1037
|
- [List the practitioner's practice locations](operations/provider.listPractitionerLocations.md) (`provider.listPractitionerLocations`)
|
|
1038
1038
|
- [Log in a practitioner](operations/provider.login.md) (`provider.login`)
|
|
1039
|
+
- [Sign out the practitioner and revoke their tokens](operations/provider.logout.md) (`provider.logout`)
|
|
1039
1040
|
- [Refresh practitioner access tokens](operations/provider.refreshToken.md) (`provider.refreshToken`)
|
|
1040
1041
|
- [Register a practitioner](operations/provider.register.md) (`provider.register`)
|
|
1042
|
+
- [Resend the email verification OTP](operations/provider.resendVerificationCode.md) (`provider.resendVerificationCode`)
|
|
1041
1043
|
- [Start a password reset](operations/provider.resetPassword.md) (`provider.resetPassword`)
|
|
1042
1044
|
- [Set a practitioner's provider-portal roles (platform admin only)](operations/provider.setPractitionerPortalRoles.md) (`provider.setPractitionerPortalRoles`)
|
|
1043
1045
|
- [Update encounter notes and assessment](operations/provider.updateEncounterClinicalNote.md) (`provider.updateEncounterClinicalNote`)
|
|
@@ -14,7 +14,7 @@ Type: `object`
|
|
|
14
14
|
| `idempotency_key` | `string|null` | No | | | | Yes | Caller-created UUID v4 for one confirmed booking attempt. Reuse it with identical data on retries. Terminal results are remembered for at least 24 hours; a changed intent needs a new key. Omitting this field preserves legacy behavior without a replay guarantee. |
|
|
15
15
|
| `note` | `string|null` | No | | | | Yes | Optional booking note; part of the idempotent intent. |
|
|
16
16
|
| `patient_id` | `string` | Yes | | | | No | FHIR Patient resource ID for whom the appointment is booked. |
|
|
17
|
-
| `slot_id` | `string` | Yes | | | | No | FHIR
|
|
17
|
+
| `slot_id` | `string` | Yes | | | | No | Required slot reference. On a FHIR-only tenant use the chosen listSlots result's fhir_id, or the resource ID returned by createSlot.slot_id. On a vendor-integrated tenant echo the chosen slot_id and supply the required vendor fields below. |
|
|
18
18
|
| `start` | `string|null` | No | | | | Yes | ISO 8601 start of the chosen slot, taken from the `start` of the chosen `appointments.listSlots` result. Required on an OpenLoop- or SteadyMD-integrated tenant, neither of which books by a pre-existing slot id; ignored on an Athena-integrated or FHIR-only tenant, which book by `athena_appointment_id`/`slot_id` respectively. |
|
|
19
19
|
| `steadymd_clinician_guid` | `string|null` | No | | | | Yes | SteadyMD clinician guid of the slot being booked, taken from the `steadymd_clinician_guid` of the chosen `appointments.listSlots` result. Required on a SteadyMD-integrated tenant, where SteadyMD's own availability has no per-slot id, only a clinician + timestamp. |
|
|
20
20
|
|
|
@@ -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.
|
|
@@ -17,7 +17,7 @@ Type: `object`
|
|
|
17
17
|
|---|---|---:|---|---|---|---:|---|
|
|
18
18
|
| `athena_appointment_id` | `string|null` | No | | | | Yes | Athena Health appointment id of the NEW open slot being moved to, taken from the `athena_appointment_id` of the chosen `appointments.listSlots` result. Required when rescheduling on an Athena-integrated tenant; ignored otherwise. |
|
|
19
19
|
| `reason` | `string|null` | No | | | | Yes | Optional free-text reason for the reschedule, recorded in logs and vendor notes where supported. |
|
|
20
|
-
| `slot_id` | `string` | Yes | | | | No |
|
|
20
|
+
| `slot_id` | `string` | Yes | | | | No | Required reference for the new free slot. On a FHIR-only tenant use the chosen listSlots result's fhir_id, or createSlot.slot_id. On a vendor-integrated tenant echo the chosen slot_id and supply the required vendor fields below, as for booking. |
|
|
21
21
|
| `start` | `string|null` | No | date-time | | | Yes | ISO 8601 start of the new slot, taken from the `start` of the chosen `appointments.listSlots` result. Required when rescheduling on an OpenLoop- or SteadyMD-integrated tenant; ignored otherwise. |
|
|
22
22
|
| `steadymd_clinician_guid` | `string|null` | No | | | | Yes | SteadyMD clinician guid of the new slot, taken from the `steadymd_clinician_guid` of the chosen `appointments.listSlots` result. Required when rescheduling on a SteadyMD-integrated tenant; ignored otherwise. |
|
|
23
23
|
|
package/docs/models/Slot.md
CHANGED
|
@@ -12,11 +12,12 @@ Type: `object`
|
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
13
|
| `athena_appointment_id` | `string|null` | No | | | | Yes | Athena Health appointment id backing this slot. Always present for slots sourced from Athena, where it — not `slot_id` — is what `appointments.book` must be given as `athena_appointment_id`. |
|
|
14
14
|
| `end` | `string` | Yes | date-time | | | No | Exclusive slot end in ISO 8601 date-time format. |
|
|
15
|
+
| `fhir_id` | `string|null` | No | | | | Yes | FHIR Slot resource ID returned by FHIR-only appointments.listSlots. Send this value as slot_id to appointments.book or appointments.reschedule. It is not populated on vendor calendars (null or omitted), and may be omitted by appointments.createSlot, which returns the resource ID in slot_id. |
|
|
15
16
|
| `location` | `string|null` | No | | | | Yes | Human-readable appointment location, when available. |
|
|
16
17
|
| `openloop_appointment_id` | `string|null` | No | | | | Yes | OpenLoop (Healthie) appointment id backing this slot. Always present for slots sourced from OpenLoop, where it — not `slot_id` — is what `appointments.book` must be given as `openloop_appointment_id`. |
|
|
17
18
|
| `provider_id` | `string` | Yes | | | | No | FHIR Practitioner resource ID assigned to the slot. |
|
|
18
19
|
| `provider_name` | `string|null` | No | | | | Yes | Provider display name, when available. |
|
|
19
|
-
| `slot_id` | `string` | Yes | | | | No | FHIR
|
|
20
|
+
| `slot_id` | `string` | Yes | | | | No | Slot identifier. appointments.createSlot returns the FHIR resource ID here. On a FHIR-only appointments.listSlots response this is an internal identifier; use fhir_id for booking or rescheduling instead. Vendor-integrated callers echo slot_id together with the required vendor fields. |
|
|
20
21
|
| `specialty_code` | `string|null` | No | | | | Yes | SNOMED CT specialty code, when supplied by the schedule. |
|
|
21
22
|
| `start` | `string` | Yes | date-time | | | No | Inclusive slot start in ISO 8601 date-time format. |
|
|
22
23
|
| `status` | [`SlotStatus`](./SlotStatus.md) | Yes | | | | No | Current availability state of the slot. |
|
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.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Operation ID: `appointments.book`
|
|
4
4
|
|
|
5
|
-
Book a patient into a free slot returned by `appointments.listSlots`. The operation creates the appointment and changes the selected slot from free to booked.
|
|
5
|
+
Book a patient into a free slot returned by `appointments.listSlots`. On a FHIR-only tenant send the selected slot's `fhir_id` as request `slot_id`; a resource ID returned by `appointments.createSlot` in `slot_id` is also accepted. Vendor-integrated callers echo the listed `slot_id` and required vendor metadata. The operation creates the appointment and changes the selected slot from free to booked.
|
|
6
6
|
|
|
7
7
|
## Public method
|
|
8
8
|
|
|
@@ -73,6 +73,7 @@ Request model: [`CreateSlotRequest`](../models/CreateSlotRequest.md)
|
|
|
73
73
|
{
|
|
74
74
|
"athena_appointment_id": "string",
|
|
75
75
|
"end": "2026-01-01T09:00:00Z",
|
|
76
|
+
"fhir_id": "string",
|
|
76
77
|
"location": "string",
|
|
77
78
|
"openloop_appointment_id": "string",
|
|
78
79
|
"provider_id": "string",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Operation ID: `appointments.listSlots`
|
|
4
4
|
|
|
5
|
-
Return bookable slots, optionally restricted to a provider, specialty, or inclusive date range.
|
|
5
|
+
Return bookable slots, optionally restricted to a provider, specialty, or inclusive date range. On a FHIR-only tenant, pass the chosen result's `fhir_id` as `slot_id` to `appointments.book` or `appointments.reschedule`; the listed `slot_id` is internal. Vendor-integrated callers echo the listed `slot_id` plus the required vendor fields. On Athena-integrated tenants, an upstream rate limit returns a sanitized 503; respect the optional Retry-After header (seconds). There is no fallback to a different calendar.
|
|
6
6
|
|
|
7
7
|
## Public method
|
|
8
8
|
|
|
@@ -65,6 +65,7 @@ None declared in canonical OpenAPI.
|
|
|
65
65
|
{
|
|
66
66
|
"athena_appointment_id": "string",
|
|
67
67
|
"end": "2026-01-01T09:00:00Z",
|
|
68
|
+
"fhir_id": "string",
|
|
68
69
|
"location": "string",
|
|
69
70
|
"openloop_appointment_id": "string",
|
|
70
71
|
"provider_id": "string",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Operation ID: `appointments.reschedule`
|
|
4
4
|
|
|
5
|
-
Move the identified appointment to another slot returned by `appointments.listSlots`. On a FHIR-only tenant the previous slot is released after the target slot is reserved. On a vendor-integrated tenant (Athena, OpenLoop, SteadyMD) the move is executed in the vendor — and fails there — with no FHIR fallback: pass the chosen new slot's per-vendor fields exactly as `appointments.book` does (`athena_appointment_id` on Athena; `start` on OpenLoop; `start` + `steadymd_clinician_guid` on SteadyMD).
|
|
5
|
+
Move the identified appointment to another slot returned by `appointments.listSlots`. On a FHIR-only tenant send the selected result's `fhir_id` as request `slot_id`. The previous slot is released after the target slot is reserved. On a vendor-integrated tenant (Athena, OpenLoop, SteadyMD) the move is executed in the vendor — and fails there — with no FHIR fallback: pass the chosen new slot's per-vendor fields exactly as `appointments.book` does (`athena_appointment_id` on Athena; `start` on OpenLoop; `start` + `steadymd_clinician_guid` on SteadyMD).
|
|
6
6
|
|
|
7
7
|
## Public method
|
|
8
8
|
|
|
@@ -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