# ovok.signals

Canonical page: https://docs.ovok.com/web-sdk/core/namespaces/signals

`ovok.signals` covers the parts of Signals that go through Ovok: turning it on for a patient, repairing residents whose limits did not reach it, and a gateway for the Signals API. Care-home apps and server clients call it. The old `/v1/signals/{patients,alerts,raw-alerts,notes,settings}` routes are gone; alert notes live under `ovok.slim.notifications.notes`.

## Enable Signals for a patient [#enable-signals-for-a-patient]

```ts
const result = await ovok.signals.enable(patientId);
```

- It is idempotent: retry after a 409 or 503.
- Readings saved through Ovok reach Signals without a second submit.

## Call the Signals API [#call-the-signals-api]

The gateway forwards a request to `v1/signals/api/{path}`. The server checks that the caller's role may use the route.

```ts
const patients = await ovok.signals.gateway.request({
  method: 'GET',
  path: ['patient'],
  query: { limit: 20 },
});
```

- Pass each path segment separately so the client encodes it. Empty segments, `.`, `..`, slashes and control characters throw `OvokValidationError`.
- `body` is sent as JSON. The result type is whatever you pass as the type argument, `unknown` by default.

## Repair undeliverable residents [#repair-undeliverable-residents]

Some residents' limits may not reach Signals. List them, then repair.

```ts
const { count, residents } = await ovok.signals.undeliverable.list();

const outcome = await ovok.signals.undeliverable.repair({ patientIds: residents.map((r) => r.patientId) });

console.log(outcome.repaired, outcome.stillUndeliverable);
```

- Without `patientIds`, `repair` repairs every resident `list` shows.
- The result counts attempted, repaired, still undeliverable, skipped and not reached.

## Reference [#reference]

- [signals API reference](/web-sdk/core/reference/core/signals): every method and type.
- [ovok.slim](/web-sdk/core/namespaces/slim) for thresholds and notifications.
- [Errors and retries](/web-sdk/core/errors-and-retries)
