API referenceresources
ovok_sdk.resources.registration
Sign-up requests for `ovok.auth.register` and `ovok.auth.register_practitioner`.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.25+2ba84b0
Sign-up requests for ovok.auth.register and ovok.auth.register_practitioner.
Registration
Registration(email: str, password: str, password_confirm: str, name: str, surname: str)A practitioner sign-up; the tenant comes from the client's config, as it does for login.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
email | str | The account's email address. | |
password | str | The account's password. | |
password_confirm | str | The password again; checked locally and never sent. | |
name | str | The given name. | |
surname | str | The family name. |
body_for()
body_for(tenant_code: str) -> dict[str, Any]Build the request body for a tenant; the confirmation is checked here and never sent.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
tenant_code | str | The tenant the account is registered in. |
Returns
dict[str, Any]: The JSON body the register route takes.
Raises
OvokValidationError: The password and its confirmation differ.
PatientRegistration
PatientRegistration(
email: str,
password: str,
password_confirm: str,
name: str,
surname: str,
continue_as_patient_token: str | None = None,
)Bases: Registration
A patient sign-up.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
continue_as_patient_token | str | None | None | Optional token that turns an existing account into a patient. |
body_for()
body_for(tenant_code: str) -> dict[str, Any]Build the request body for a tenant, with the continuation token when set.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
tenant_code | str | The tenant the account is registered in. |
Returns
dict[str, Any]: The JSON body the register route takes.
Raises
OvokValidationError: The password and its confirmation differ.
ClinicianInvite
ClinicianInvite(status: Literal['clinician-invite'] = 'clinician-invite')The project routed the email to a clinician invitation, so no one is signed in.
is_clinician_invite()
is_clinician_invite(response: Mapping[str, Any]) -> boolTell whether a register response routed the email to a clinician invitation.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
response | Mapping[str, Any] | The register route's JSON response. |
Returns
bool: True when the next step is a clinician invitation.
Last updated on