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

NameTypeDefaultDescription
emailstrThe account's email address.
passwordstrThe account's password.
password_confirmstrThe password again; checked locally and never sent.
namestrThe given name.
surnamestrThe 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

NameTypeDefaultDescription
tenant_codestrThe 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

NameTypeDefaultDescription
continue_as_patient_tokenstr | NoneNoneOptional 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

NameTypeDefaultDescription
tenant_codestrThe 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]) -> bool

Tell whether a register response routed the email to a clinician invitation.

Parameters

NameTypeDefaultDescription
responseMapping[str, Any]The register route's JSON response.

Returns

  • bool: True when the next step is a clinician invitation.

Last updated on

On this page