# Ovok

Canonical page: https://docs.ovok.com/flutter-sdk/reference/ovok_sdk/ovok

{/* Generated by scripts/generate_reference.dart; do not edit. */}

## Ovok [#ovok]

```dart
class Ovok
```

The Ovok API client: every namespace, such as [`auth`](#ovokauth), [`fhir`](#ovokfhir) or [`slim`](#ovokslim), hangs off it.

One client per tenant; no `clientSecret`, since anything shipped in an app can be extracted.

### Constructors [#constructors]

#### Ovok.new [#ovoknew]

```dart
Ovok({
  required String baseUrl,
  required String tenantCode,
  required OvokSecureStore secureStore,
  String fhirPath = 'fhir',
  String? clientId,
  Client? httpClient,
  Duration timeout = const Duration(seconds: 30),
  int maxNetworkRetries = 2,
  UnauthenticatedListener? onUnauthenticated,
})
```

Creates a client for `tenantCode` on the Ovok API at `baseUrl`.

`secureStore` keeps the signed-in session. `fhirPath` is the FHIR API's
path under `baseUrl`. `clientId` is the ClientApplication used for social
sign-in, password resets and token refresh. `httpClient` replaces the default `http.Client`. `timeout`
limits each request, and `maxNetworkRetries` is how many times a
repeatable request is retried. `onUnauthenticated` is called when a
refused refresh token signs the user out.

A bad option throws `OvokConfigException` here, not on the first request.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `baseUrl` | `String` | required named |  |
| `tenantCode` | `String` | required named |  |
| `secureStore` | `OvokSecureStore` | required named |  |
| `fhirPath` | `String` | named | `'fhir'` |
| `clientId` | `String?` | named |  |
| `httpClient` | `Client?` | named |  |
| `timeout` | `Duration` | named | `const Duration(seconds: 30)` |
| `maxNetworkRetries` | `int` | named | `2` |
| `onUnauthenticated` | `UnauthenticatedListener?` | named |  |

### Properties [#properties]

#### Ovok.auth [#ovokauth]

```dart
final AuthResource auth
```

Sign-in, registration, passwords and the account.

#### Ovok.fhir [#ovokfhir]

```dart
final FhirResource fhir
```

Generic FHIR R4 reads, searches and writes under `fhirPath`.

#### Ovok.realtime [#ovokrealtime]

```dart
final RealtimeResource realtime
```

Live notifications for FHIR resources matching a subscription.

#### Ovok.patient [#ovokpatient]

```dart
final PatientResource patient
```

FHIR reads for patient apps, plus a one-call dashboard.

#### Ovok.measurements [#ovokmeasurements]

```dart
final MeasurementsResource measurements
```

Builds and saves measurements as FHIR Observations, with an offline queue.

#### Ovok.questionnaires [#ovokquestionnaires]

```dart
final QuestionnairesResource questionnaires
```

FHIR questionnaires.

#### Ovok.questionnaireResponses [#ovokquestionnaireresponses]

```dart
final QuestionnaireResponsesResource questionnaireResponses
```

Answers to FHIR questionnaires.

#### Ovok.health [#ovokhealth]

```dart
final HealthResource health
```

The API's health check; sent without a token.

#### Ovok.consent [#ovokconsent]

```dart
final ConsentResource consent
```

The signed-in user's consents.

#### Ovok.slim [#ovokslim]

```dart
final SlimResource slim
```

The Slim care API for care-home operations.

#### Ovok.signals [#ovoksignals]

```dart
final SignalsResource signals
```

Signals monitoring for patients.

#### Ovok.projects [#ovokprojects]

```dart
final ProjectsResource projects
```

Projects, their members, settings and features.

#### Ovok.accounts [#ovokaccounts]

```dart
final AccountsResource accounts
```

Accounts the signed-in user belongs to.

#### Ovok.locales [#ovoklocales]

```dart
final LocalesResource locales
```

Languages the project offers.

#### Ovok.localizations [#ovoklocalizations]

```dart
final LocalizationsResource localizations
```

Translated strings, by language and key.

#### Ovok.email [#ovokemail]

```dart
final EmailResource email
```

The project's email setup.

#### Ovok.invites [#ovokinvites]

```dart
final InvitesResource invites
```

Invites between patients, practitioners and carers.

#### Ovok.sharing [#ovoksharing]

```dart
final SharingResource sharing
```

A patient's record sharing.

#### Ovok.cms [#ovokcms]

```dart
final CmsResource cms
```

Published CMS documents, legal pages and translations.

#### Ovok.content [#ovokcontent]

```dart
final ContentResource content
```

Project content items, by type, language and key.

#### Ovok.documents [#ovokdocuments]

```dart
final DocumentsResource documents
```

Uploaded documents and their download URLs.

#### Ovok.videoCalls [#ovokvideocalls]

```dart
final VideoCallsResource videoCalls
```

LiveKit video calls and their appointments.

#### Ovok.ai [#ovokai]

```dart
final AiResource ai
```

AI translation, FHIR search and chat.

#### Ovok.wearables [#ovokwearables]

```dart
final WearablesResource wearables
```

Wearable providers and the patient's connections to them.

#### Ovok.bots [#ovokbots]

```dart
final BotsResource bots
```

Project bots.

#### Ovok.storage [#ovokstorage]

```dart
final OvokSecureStore storage
```

The secure store shared by sessions, offline measurements, and device pairing.
