Bluetooth types
Import public Bluetooth types from @ovok/native/bt-management unless noted otherwise. The accepted-device tuple is the source of compile-time narrowing for callbacks such as onResult and onDeviceFound.
Device and session types
| Type | Use |
|---|---|
AcceptedDevice | A built-in IntegratedDevices value or a branded CustomDeviceDefinition. |
IntegratedDevices | Enum of the integrated device identifiers. |
DeviceKey / DeviceKeyOf<T> | Device key union and key derived from an accepted-device tuple. |
DeviceData | Peripheral ID, name, local name, manufacturer data, optional manufacturer/model, serial, and supported measurement types. |
DeviceStatus | Compact status values: connected, disconnected, measuring, and low battery. |
BTProviderProps<T> | Provider options and callbacks for a particular accepted-device tuple. |
Event and result types
| Type | Use |
|---|---|
ResultCallback<T> | Device metadata, normalized reading, and stable enumerable result ID (the runtime property is non-writable). |
DeviceStatusChangeCallback | Device metadata, status, and optional measurement key. |
DeviceConnectionEvent | Pairing, bonding, battery, and history-download events. |
ErrorCallback / BluetoothError | Normalized error details and optional stable error code. |
DeviceResultPolicy / ResultPolicy | Result filtering defaults and per-measurement overrides. |
The runtime result.id is enumerable and non-writable, so it is retained by object spreads and JSON serialization. Its TypeScript field is typed as string; treat it as an identifier and do not reassign it. Use it as an explicit idempotency key for retried writes. The event and callback pages document when each payload is delivered.
Background and custom declaration types
BackgroundSyncOptions,BackgroundSyncResult, andBackgroundSyncStoragedescribe queued delivery, persistence, retries, restoration, notifications, and Android foreground service configuration. See Background sync.CustomDeviceSpecandCustomDeviceDefinitiondescribe the input declaration and its validated runtime result.CustomServiceSpec,CustomMonitorSpec,CustomFrameSpec,CustomCaseSpec,CustomFieldSpec, andCustomChecksumSpecdescribe GATT, framing, measurement fields, and checksums.CustomMeasurementSpecsupports multiple measurements in a frame;CustomLepuSpecdescribes the specialized Lepu/Viatom framing.DeviceConnectionEventKind,DeviceStatus, and the callback payload types define the app-facing event surface.
For an end-to-end setup, see Bluetooth, BTProvider, and custom devices.