@ovok/native 1.17.0-dev.2213 → 1.17.0-dev.2219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/next/bluetooth/adapters/android-foreground-service.js +58 -5
- package/lib/commonjs/modules/next/bluetooth/adapters/android-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/adapters/ble-plx-central.js +45 -24
- package/lib/commonjs/modules/next/bluetooth/adapters/ble-plx-central.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/adapters/ecg-measurements.js +25 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ecg-measurements.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/live-supersession.js +62 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/live-supersession.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-outbox-watch.js +42 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-outbox-watch.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-reading-sink.js +97 -96
- package/lib/commonjs/modules/next/bluetooth/adapters/ovok-reading-sink.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/adapters/reading-source-id.js +33 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/reading-source-id.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/reading-values.js +38 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/reading-values.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/series-saving.js +101 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/series-saving.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-database.js +24 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-database.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-rows.js +65 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-rows.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-schema.js +53 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-schema.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-store.js +82 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-store.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/storage-paired-devices.js +1 -0
- package/lib/commonjs/modules/next/bluetooth/adapters/storage-paired-devices.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/adapters/web-bluetooth-central.js +9 -1
- package/lib/commonjs/modules/next/bluetooth/adapters/web-bluetooth-central.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/bluetooth.js +9 -3
- package/lib/commonjs/modules/next/bluetooth/core/bluetooth.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/device-deps.js +6 -0
- package/lib/commonjs/modules/next/bluetooth/core/device-deps.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/device-link.js +2 -1
- package/lib/commonjs/modules/next/bluetooth/core/device-link.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/device-snapshot.js +3 -1
- package/lib/commonjs/modules/next/bluetooth/core/device-snapshot.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/device.js +19 -6
- package/lib/commonjs/modules/next/bluetooth/core/device.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/live-ledger.js +54 -0
- package/lib/commonjs/modules/next/bluetooth/core/live-ledger.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/measuring-watch.js +45 -0
- package/lib/commonjs/modules/next/bluetooth/core/measuring-watch.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/outbox-watch.js +17 -0
- package/lib/commonjs/modules/next/bluetooth/core/outbox-watch.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/paired-device.js +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/paired-device.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/ports.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/reading-log.js +89 -7
- package/lib/commonjs/modules/next/bluetooth/core/reading-log.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/core/series-slots.js +94 -0
- package/lib/commonjs/modules/next/bluetooth/core/series-slots.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/stream-recorder.js +219 -0
- package/lib/commonjs/modules/next/bluetooth/core/stream-recorder.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/core/waveform-segments.js +110 -0
- package/lib/commonjs/modules/next/bluetooth/core/waveform-segments.js.map +1 -0
- package/lib/commonjs/modules/next/bluetooth/create-bluetooth.js +19 -11
- package/lib/commonjs/modules/next/bluetooth/create-bluetooth.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/index.js +9 -1
- package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/shared.js +14 -0
- package/lib/commonjs/modules/next/bluetooth/shared.js.map +1 -1
- package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth.js +2 -0
- package/lib/commonjs/modules/next/bluetooth/web/create-web-bluetooth.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/android-foreground-service.js +59 -6
- package/lib/module/modules/next/bluetooth/adapters/android-foreground-service.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/ble-plx-central.js +45 -24
- package/lib/module/modules/next/bluetooth/adapters/ble-plx-central.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/ecg-measurements.js +22 -0
- package/lib/module/modules/next/bluetooth/adapters/ecg-measurements.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/live-supersession.js +59 -0
- package/lib/module/modules/next/bluetooth/adapters/live-supersession.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/ovok-outbox-watch.js +38 -0
- package/lib/module/modules/next/bluetooth/adapters/ovok-outbox-watch.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/ovok-reading-sink.js +76 -75
- package/lib/module/modules/next/bluetooth/adapters/ovok-reading-sink.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/reading-source-id.js +27 -0
- package/lib/module/modules/next/bluetooth/adapters/reading-source-id.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/reading-values.js +33 -0
- package/lib/module/modules/next/bluetooth/adapters/reading-values.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/series-saving.js +94 -0
- package/lib/module/modules/next/bluetooth/adapters/series-saving.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-database.js +20 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-database.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-rows.js +59 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-rows.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-schema.js +49 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-schema.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-store.js +79 -0
- package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-store.js.map +1 -0
- package/lib/module/modules/next/bluetooth/adapters/storage-paired-devices.js +1 -0
- package/lib/module/modules/next/bluetooth/adapters/storage-paired-devices.js.map +1 -1
- package/lib/module/modules/next/bluetooth/adapters/web-bluetooth-central.js +9 -1
- package/lib/module/modules/next/bluetooth/adapters/web-bluetooth-central.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/bluetooth.js +9 -3
- package/lib/module/modules/next/bluetooth/core/bluetooth.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/device-deps.js +4 -0
- package/lib/module/modules/next/bluetooth/core/device-deps.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/device-link.js +2 -1
- package/lib/module/modules/next/bluetooth/core/device-link.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/device-snapshot.js +3 -1
- package/lib/module/modules/next/bluetooth/core/device-snapshot.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/device.js +19 -6
- package/lib/module/modules/next/bluetooth/core/device.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/live-ledger.js +50 -0
- package/lib/module/modules/next/bluetooth/core/live-ledger.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/measuring-watch.js +41 -0
- package/lib/module/modules/next/bluetooth/core/measuring-watch.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/outbox-watch.js +14 -0
- package/lib/module/modules/next/bluetooth/core/outbox-watch.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/paired-device.js +1 -0
- package/lib/module/modules/next/bluetooth/core/paired-device.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/ports.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/reading-log.js +89 -7
- package/lib/module/modules/next/bluetooth/core/reading-log.js.map +1 -1
- package/lib/module/modules/next/bluetooth/core/series-slots.js +90 -0
- package/lib/module/modules/next/bluetooth/core/series-slots.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/stream-recorder.js +215 -0
- package/lib/module/modules/next/bluetooth/core/stream-recorder.js.map +1 -0
- package/lib/module/modules/next/bluetooth/core/waveform-segments.js +106 -0
- package/lib/module/modules/next/bluetooth/core/waveform-segments.js.map +1 -0
- package/lib/module/modules/next/bluetooth/create-bluetooth.js +19 -11
- package/lib/module/modules/next/bluetooth/create-bluetooth.js.map +1 -1
- package/lib/module/modules/next/bluetooth/index.js +1 -0
- package/lib/module/modules/next/bluetooth/index.js.map +1 -1
- package/lib/module/modules/next/bluetooth/shared.js +2 -0
- package/lib/module/modules/next/bluetooth/shared.js.map +1 -1
- package/lib/module/modules/next/bluetooth/web/create-web-bluetooth.js +2 -0
- package/lib/module/modules/next/bluetooth/web/create-web-bluetooth.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts +17 -4
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ble-plx-central.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ecg-measurements.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ecg-measurements.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/live-supersession.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/live-supersession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-outbox-watch.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-outbox-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts +9 -3
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/reading-source-id.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/reading-source-id.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/reading-values.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/reading-values.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/series-saving.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/series-saving.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-database.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-database.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-rows.d.ts +29 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-rows.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts +38 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/storage-paired-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/bluetooth-options.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/bluetooth-options.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/bluetooth.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-deps.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-deps.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-snapshot.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-snapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device.d.ts +6 -13
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/live-ledger.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/live-ledger.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/measuring-watch.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/measuring-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/outbox-watch.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/outbox-watch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/paired-device.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/paired-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/ports.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/ports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/reading-log.d.ts +25 -6
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/reading-log.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/reading.d.ts +16 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/reading.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/series-slots.d.ts +35 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/series-slots.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/stream-recorder.d.ts +58 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/stream-recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/waveform-segments.d.ts +26 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/core/waveform-segments.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/next/bluetooth/create-bluetooth.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/create-bluetooth.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/shared.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts +17 -4
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ble-plx-central.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ecg-measurements.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ecg-measurements.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/live-supersession.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/live-supersession.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-outbox-watch.d.ts +8 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-outbox-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts +9 -3
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/reading-source-id.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/reading-source-id.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/reading-values.d.ts +9 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/reading-values.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/series-saving.d.ts +28 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/series-saving.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-database.d.ts +23 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-database.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-rows.d.ts +29 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-rows.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts +6 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts +38 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/storage-paired-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts +4 -0
- package/lib/typescript/module/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/bluetooth-options.d.ts +3 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/bluetooth-options.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/bluetooth.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/device-deps.d.ts +16 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/device-deps.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/device-snapshot.d.ts +5 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/device-snapshot.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/device.d.ts +6 -13
- package/lib/typescript/module/src/modules/next/bluetooth/core/device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/live-ledger.d.ts +13 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/live-ledger.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/measuring-watch.d.ts +17 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/measuring-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/outbox-watch.d.ts +27 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/outbox-watch.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/paired-device.d.ts +3 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/paired-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/ports.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/core/ports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/reading-log.d.ts +25 -6
- package/lib/typescript/module/src/modules/next/bluetooth/core/reading-log.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/reading.d.ts +16 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/reading.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/core/series-slots.d.ts +35 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/series-slots.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/stream-recorder.d.ts +58 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/stream-recorder.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/waveform-segments.d.ts +26 -0
- package/lib/typescript/module/src/modules/next/bluetooth/core/waveform-segments.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/next/bluetooth/create-bluetooth.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/create-bluetooth.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +4 -1
- package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/shared.d.ts +5 -1
- package/lib/typescript/module/src/modules/next/bluetooth/shared.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts +3 -2
- package/lib/typescript/module/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts.map +1 -1
- package/package.json +7 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../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AAK,UAAU,GAAG;IAEhB,qCAAqC;IACrC,EAAE,EAAE,IAAI,CAAC;IAET,4BAA4B;IAC5B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE9C,qDAAqD;IACrD,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAEnC,0EAA0E;IAC1E,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC,CAAC;AAEF,0CAA0C;AAC1C,KAAK,SAAS,GAAG;IAEf,sDAAsD;IACtD,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MeasurementType, MetricCode } from "./measurement-type";
|
|
2
|
+
import { Reading, ReadingSource } from "./reading";
|
|
3
|
+
/** The streamed numbers worth recording as a series, each with the measurement it belongs to. */
|
|
4
|
+
declare const RECORDED_METRICS: Partial<Record<MetricCode, MeasurementType>>;
|
|
5
|
+
/** What a series measures. */
|
|
6
|
+
type SeriesKind = {
|
|
7
|
+
metric: MetricCode;
|
|
8
|
+
type: MeasurementType;
|
|
9
|
+
unit: string;
|
|
10
|
+
};
|
|
11
|
+
/** One metric's streamed numbers, one value per second from the second the first one arrived. */
|
|
12
|
+
declare class SlotSeries {
|
|
13
|
+
private readonly kind;
|
|
14
|
+
private readonly start;
|
|
15
|
+
private readonly values;
|
|
16
|
+
private lastAt;
|
|
17
|
+
private changed;
|
|
18
|
+
constructor(kind: SeriesKind, firstAt: number);
|
|
19
|
+
/** Whether a value of `unit` taken at `at` still belongs to this series. */
|
|
20
|
+
takes(unit: string, at: number): boolean;
|
|
21
|
+
/** Puts a value in the second it was taken; of two values in one second the later stays. */
|
|
22
|
+
put(value: number, at: number): void;
|
|
23
|
+
/** Whether no value arrived for as long as a series waits before it closes. */
|
|
24
|
+
isQuiet(now: number): boolean;
|
|
25
|
+
/** Whether values arrived since the last `markSaved`. */
|
|
26
|
+
get unsaved(): boolean;
|
|
27
|
+
markSaved(): void;
|
|
28
|
+
/** The series as it is now, as a reading to save. */
|
|
29
|
+
reading(origin: ReadingSource): Reading;
|
|
30
|
+
private span;
|
|
31
|
+
private slotOf;
|
|
32
|
+
}
|
|
33
|
+
export { RECORDED_METRICS, SlotSeries };
|
|
34
|
+
export type { SeriesKind };
|
|
35
|
+
//# sourceMappingURL=series-slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"series-slots.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/core/series-slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAY,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAM7D,iGAAiG;AACjG,QAAA,MAAM,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,CAOlE,CAAC;AAEF,8BAA8B;AAC9B,KAAK,UAAU,GAAG;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E,iGAAiG;AACjG,cAAM,UAAU;IAMK,OAAO,CAAC,QAAQ,CAAC,IAAI;IALxC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;IAChD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAQ;gBAEa,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM;IAKrE,4EAA4E;IACrE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO;IAI/C,4FAA4F;IACrF,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAY3C,+EAA+E;IACxE,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIpC,yDAAyD;IACzD,IAAW,OAAO,IAAI,OAAO,CAE5B;IAEM,SAAS,IAAI,IAAI;IAIxB,qDAAqD;IAC9C,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IAc9C,OAAO,CAAC,IAAI;IASZ,OAAO,CAAC,MAAM;CAGf;AAED,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;AACxC,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DeviceDeps } from "./device-deps";
|
|
2
|
+
import { DeviceEvent, DeviceSnapshot } from "./device-snapshot";
|
|
3
|
+
import { Listeners } from "./listeners";
|
|
4
|
+
import { ReadingSink } from "./ports";
|
|
5
|
+
import { DecodedReading } from "./reading";
|
|
6
|
+
/** The device being recorded. */
|
|
7
|
+
type RecordedDevice = {
|
|
8
|
+
/** The address its readings are saved under. */
|
|
9
|
+
address: string;
|
|
10
|
+
/** Its snapshot now; the `record` setting says whether to record. */
|
|
11
|
+
snapshot: () => DeviceSnapshot;
|
|
12
|
+
};
|
|
13
|
+
type RecorderDeps = Pick<DeviceDeps, "model" | "protocol" | "now" | "logger">;
|
|
14
|
+
/**
|
|
15
|
+
* Records what one device streams live and saves it through the sink: numbers as series of one-second slots, waveforms
|
|
16
|
+
* as segments of five minutes at the waveform's own sample rate. It does the same for every device.
|
|
17
|
+
*/
|
|
18
|
+
declare class StreamRecorder {
|
|
19
|
+
private readonly device;
|
|
20
|
+
private readonly sink;
|
|
21
|
+
private readonly deps;
|
|
22
|
+
private readonly open;
|
|
23
|
+
private readonly segments;
|
|
24
|
+
private readonly ledger;
|
|
25
|
+
private readonly replacing;
|
|
26
|
+
private readonly unsupported;
|
|
27
|
+
private saving;
|
|
28
|
+
private timer;
|
|
29
|
+
private streaming;
|
|
30
|
+
private readonly origin;
|
|
31
|
+
constructor(device: RecordedDevice, sink: ReadingSink, deps: RecorderDeps);
|
|
32
|
+
/** Records from the device's events: live numbers and samples, and the end of the stream. */
|
|
33
|
+
follow(events: Listeners<DeviceEvent>): void;
|
|
34
|
+
/** Takes one device event: numbers and samples while recording is on, and the end of the stream. */
|
|
35
|
+
observe(event: DeviceEvent): void;
|
|
36
|
+
/** Marks the live recordings a stored record replaces, which the sink removes once it has saved the record. */
|
|
37
|
+
supersede(recordId: string, record: DecodedReading): DecodedReading;
|
|
38
|
+
/** The record was saved, so the recordings it replaced are gone for good. */
|
|
39
|
+
acknowledged(recordId: string): void;
|
|
40
|
+
/** Saves everything still open, and resolves once every save has finished. */
|
|
41
|
+
close(): Promise<void>;
|
|
42
|
+
private followStream;
|
|
43
|
+
private recordNumbers;
|
|
44
|
+
private seriesFor;
|
|
45
|
+
private recordWaveform;
|
|
46
|
+
private segmentFor;
|
|
47
|
+
/** The 60-second save: an open series that grew goes out again under its own name, so the outbox keeps one copy. */
|
|
48
|
+
private saveOpenSeries;
|
|
49
|
+
private finish;
|
|
50
|
+
private saveSettled;
|
|
51
|
+
/** Saves one at a time, in the order they were made. */
|
|
52
|
+
private enqueue;
|
|
53
|
+
private failed;
|
|
54
|
+
private stopTimer;
|
|
55
|
+
}
|
|
56
|
+
export { StreamRecorder };
|
|
57
|
+
export type { RecordedDevice, RecorderDeps };
|
|
58
|
+
//# sourceMappingURL=stream-recorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-recorder.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/core/stream-recorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C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Q,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,cAAc;IAY1E,6EAA6E;IACtE,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAK3C,8EAA8E;IACvE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAS7B,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,SAAS;IAmBjB,OAAO,CAAC,cAAc;IAmBtB,OAAO,CAAC,UAAU;IAUlB,oHAAoH;IACpH,OAAO,CAAC,cAAc;IAiBtB,OAAO,CAAC,MAAM;IASd,OAAO,CAAC,WAAW;IAQnB,wDAAwD;IACxD,OAAO,CAAC,OAAO;IAef,OAAO,CAAC,MAAM;IAYd,OAAO,CAAC,SAAS;CAIlB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Reading, ReadingSource, Waveform } from "./reading";
|
|
2
|
+
/** What stays the same while one channel of a waveform streams. */
|
|
3
|
+
type ChannelShape = Pick<Waveform, "metric" | "sampleRateHz" | "unit" | "scale"> & {
|
|
4
|
+
channel: string;
|
|
5
|
+
};
|
|
6
|
+
/** One channel's samples, collected until they fill five minutes, a gap opens, or the stream ends. */
|
|
7
|
+
declare class ChannelSegment {
|
|
8
|
+
private readonly shape;
|
|
9
|
+
private readonly origin;
|
|
10
|
+
private chunks;
|
|
11
|
+
private count;
|
|
12
|
+
private from;
|
|
13
|
+
constructor(shape: ChannelShape, origin: ReadingSource);
|
|
14
|
+
/** Adds samples whose first was taken at `at`; returns the segments they completed. */
|
|
15
|
+
add(samples: Int16Array, at: number): Reading[];
|
|
16
|
+
/** Hands over what is collected as one reading, none when it is empty. */
|
|
17
|
+
flush(): Reading[];
|
|
18
|
+
private append;
|
|
19
|
+
private readingOf;
|
|
20
|
+
private capacity;
|
|
21
|
+
private endsAt;
|
|
22
|
+
private durationOf;
|
|
23
|
+
}
|
|
24
|
+
export { ChannelSegment };
|
|
25
|
+
export type { ChannelShape };
|
|
26
|
+
//# sourceMappingURL=waveform-segments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waveform-segments.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/core/waveform-segments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAa7D,mEAAmE;AACnE,KAAK,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvG,sGAAsG;AACtG,cAAM,cAAc;IAKC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAgB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJhF,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,IAAI,CAAK;gBAEmB,KAAK,EAAE,YAAY,EAAmB,MAAM,EAAE,aAAa;IAE/F,uFAAuF;IAChF,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE;IAiBtD,0EAA0E;IACnE,KAAK,IAAI,OAAO,EAAE;IAqBzB,OAAO,CAAC,MAAM;IASd,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,UAAU;CAGnB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvokStorage } from "@ovok/core/next";
|
|
2
|
+
import { OvokSinkClient } from "./adapters/ovok-reading-sink";
|
|
2
3
|
import { Bluetooth, BluetoothOptions } from "./core/bluetooth";
|
|
3
4
|
/** What `createBluetooth` needs; every port can be swapped, for tests or a custom store or sink. */
|
|
4
5
|
type CreateBluetoothOptions = {
|
|
5
6
|
/** The Ovok client readings are saved through. */
|
|
6
|
-
ovok:
|
|
7
|
+
ovok: OvokSinkClient;
|
|
7
8
|
/** Where paired devices are kept between app starts. */
|
|
8
9
|
storage: OvokStorage;
|
|
9
10
|
} & Partial<BluetoothOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-bluetooth.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/create-bluetooth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-bluetooth.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/create-bluetooth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO9C,OAAO,EAAE,cAAc,EAAmB,MAAM,8BAA8B,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAG/D,oGAAoG;AACpG,KAAK,sBAAsB,GAAG;IAE5B,kDAAkD;IAClD,IAAI,EAAE,cAAc,CAAC;IAErB,wDAAwD;IACxD,OAAO,EAAE,WAAW,CAAC;CACtB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE9B,4HAA4H;AAC5H,QAAA,MAAM,eAAe,GAAI,iCAAiC,sBAAsB,KAAG,SAelF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -6,10 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export * from "./shared";
|
|
8
8
|
export { androidForegroundService } from "./adapters/android-foreground-service";
|
|
9
|
-
export type { ForegroundServiceText } from "./adapters/android-foreground-service";
|
|
9
|
+
export type { ForegroundServiceOptions, ForegroundServiceText } from "./adapters/android-foreground-service";
|
|
10
10
|
export { blePlxCentral } from "./adapters/ble-plx-central";
|
|
11
11
|
export { osBluetoothPermissions } from "./adapters/os-permissions";
|
|
12
12
|
export { reactNativeLifecycle } from "./adapters/react-native-lifecycle";
|
|
13
13
|
export { createBluetooth } from "./create-bluetooth";
|
|
14
14
|
export type { CreateBluetoothOptions } from "./create-bluetooth";
|
|
15
|
+
export { SqliteOutboxStore } from "./adapters/sqlite-outbox-store";
|
|
16
|
+
export type { SqliteBindValue, SqliteDatabase, SqliteTransaction } from "./adapters/sqlite-database";
|
|
17
|
+
export type { SqliteOutboxOptions } from "./adapters/sqlite-outbox-store";
|
|
15
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,YAAY,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,YAAY,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrG,YAAY,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { ovokOutboxWatch } from "./adapters/ovok-outbox-watch";
|
|
1
2
|
export { ovokReadingSink } from "./adapters/ovok-reading-sink";
|
|
2
3
|
export { storagePairedDevices } from "./adapters/storage-paired-devices";
|
|
3
4
|
export { Bluetooth } from "./core/bluetooth";
|
|
@@ -14,8 +15,10 @@ export type { Identification } from "./core/identify";
|
|
|
14
15
|
export type { MeasurementType, MetricCode } from "./core/measurement-type";
|
|
15
16
|
export type { Battery, DeviceIdentity, DeviceSettings, PairedDevice } from "./core/paired-device";
|
|
16
17
|
export type { AdapterState, AppLifecycle, AppVisibility, BleCentral, BluetoothPermission, BluetoothPermissions, GattLink, KeepAlive, Logger, PairedDeviceStore, ReadingSink, SaveOutcome, ScanFilter, ScanHandlers, } from "./core/ports";
|
|
18
|
+
export type { OutboxView, OutboxWatch, SaveReceipt } from "./core/outbox-watch";
|
|
17
19
|
export type { DeviceProtocol, DeviceSecret, HistoryRecord, ProtocolContext, RecordInfo } from "./core/protocol";
|
|
18
|
-
export type { DeviceFlag, LiveFrame, LiveValues, Quantity, Reading, ReadingSource, Series, Waveform } from "./core/reading";
|
|
20
|
+
export type { DeviceFlag, LiveFrame, LiveSpan, LiveValues, Quantity, Reading, ReadingSource, Series, Waveform } from "./core/reading";
|
|
21
|
+
export type { OvokSinkClient } from "./adapters/ovok-reading-sink";
|
|
19
22
|
export type { ReceivedReading, SaveState } from "./core/reading-log";
|
|
20
23
|
export { BUILT_IN_MODELS, BUILT_IN_PROTOCOLS } from "./families/built-in";
|
|
21
24
|
export { BluetoothProvider, useBluetooth } from "./react/context";
|
|
@@ -24,4 +27,5 @@ export { useBluetoothAdapter, useCatalog, usePairedDevices, useReadings } from "
|
|
|
24
27
|
export { useDevice, useLiveValues, useWaveform } from "./react/use-device";
|
|
25
28
|
export type { WaveformBuffer } from "./react/use-device";
|
|
26
29
|
export { useDiscovery } from "./react/use-discovery";
|
|
30
|
+
export { useOutbox } from "@ovok/core/next/react";
|
|
27
31
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/next/bluetooth/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACpI,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAA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AAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3E,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvokStorage } from "@ovok/core/next";
|
|
2
|
+
import { OvokSinkClient } from "../adapters/ovok-reading-sink";
|
|
2
3
|
import { Bluetooth, BluetoothOptions } from "../core/bluetooth";
|
|
3
4
|
/** What `createWebBluetooth` needs; every port can be swapped, for tests or a custom store or sink. */
|
|
4
5
|
type CreateWebBluetoothOptions = {
|
|
5
6
|
/** The Ovok client readings are saved through. */
|
|
6
|
-
ovok:
|
|
7
|
+
ovok: OvokSinkClient;
|
|
7
8
|
/** Where paired devices are kept between visits. */
|
|
8
9
|
storage: OvokStorage;
|
|
9
10
|
} & Partial<BluetoothOptions>;
|
package/lib/typescript/commonjs/src/modules/next/bluetooth/web/create-web-bluetooth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-web-bluetooth.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/create-web-bluetooth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-web-bluetooth.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/web/create-web-bluetooth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAmB,MAAM,+BAA+B,CAAC;AAGhF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIhE,uGAAuG;AACvG,KAAK,yBAAyB,GAAG;IAE/B,kDAAkD;IAClD,IAAI,EAAE,cAAc,CAAC;IAErB,oDAAoD;IACpD,OAAO,EAAE,WAAW,CAAC;CACtB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAY9B,yGAAyG;AACzG,QAAA,MAAM,kBAAkB,GAAI,iCAAiC,yBAAyB,KAAG,SAWrF,CAAC;AAEL,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/next/bluetooth/adapters/android-foreground-service.d.ts
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OutboxWatch } from "../core/outbox-watch";
|
|
2
|
+
import { KeepAlive, Logger } from "../core/ports";
|
|
2
3
|
/** The notification Android shows while the service runs. */
|
|
3
4
|
type ForegroundServiceText = {
|
|
4
5
|
/** The notification's title. */
|
|
5
6
|
notificationTitle?: string;
|
|
6
7
|
/** The notification's body. */
|
|
7
8
|
notificationBody?: string;
|
|
9
|
+
/** The body while readings wait to upload, given how many; "3 readings waiting to upload" by default. */
|
|
10
|
+
unsentBody?: (unsent: number) => string;
|
|
8
11
|
};
|
|
9
|
-
/**
|
|
10
|
-
|
|
12
|
+
/** What the service watches and reports besides its text. */
|
|
13
|
+
type ForegroundServiceOptions = {
|
|
14
|
+
/** The offline queue whose waiting readings the notification counts; with none, it never shows a count. */
|
|
15
|
+
outbox?: OutboxWatch;
|
|
16
|
+
/** Where structured events go; silent by default. */
|
|
17
|
+
logger?: Logger;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Android's connected-device foreground service, which keeps the process alive for background sync; nothing elsewhere.
|
|
21
|
+
* With an `outbox`, its notification says how many readings wait to upload.
|
|
22
|
+
*/
|
|
23
|
+
declare const androidForegroundService: (text?: ForegroundServiceText, { outbox, logger }?: ForegroundServiceOptions) => KeepAlive;
|
|
11
24
|
export { androidForegroundService };
|
|
12
|
-
export type { ForegroundServiceText };
|
|
25
|
+
export type { ForegroundServiceOptions, ForegroundServiceText };
|
|
13
26
|
//# sourceMappingURL=android-foreground-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-foreground-service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/android-foreground-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"android-foreground-service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/android-foreground-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,EAA6B,MAAM,eAAe,CAAC;AAE7E,6DAA6D;AAC7D,KAAK,qBAAqB,GAAG;IAE3B,gCAAgC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,yGAAyG;IACzG,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACzC,CAAC;AAEF,6DAA6D;AAC7D,KAAK,wBAAwB,GAAG;IAE9B,2GAA2G;IAC3G,MAAM,CAAC,EAAE,WAAW,CAAC;IAErB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA+DF;;;GAGG;AACH,QAAA,MAAM,wBAAwB,GAC5B,OAAM,qBAA0B,EAChC,qBAAmD,wBAA6B,KAC/E,SAA2G,CAAC;AAE/G,OAAO,EAAE,wBAAwB,EAAE,CAAC;AACpC,YAAY,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ble-plx-central.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ble-plx-central.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,UAAU,EAA8B,MAAM,sBAAsB,CAAC;AAMtG,OAAO,EAAgB,UAAU,EAAY,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ble-plx-central.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ble-plx-central.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,UAAU,EAA8B,MAAM,sBAAsB,CAAC;AAMtG,OAAO,EAAgB,UAAU,EAAY,MAAM,eAAe,CAAC;AA4FnE,sEAAsE;AACtE,QAAA,MAAM,aAAa,GAAI,SAAS,UAAU,KAAG,UAwB3C,CAAC;AAEH,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EcgMeasurement } from "@ovok/core/next";
|
|
2
|
+
import { Reading } from "../core/reading";
|
|
3
|
+
/** One ECG recording per channel, each in millivolts at the waveform's sample rate; the heart rate goes with the first. */
|
|
4
|
+
declare const ecgMeasurements: (reading: Reading) => EcgMeasurement[];
|
|
5
|
+
export { ecgMeasurements };
|
|
6
|
+
//# sourceMappingURL=ecg-measurements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecg-measurements.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ecg-measurements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAO1C,2HAA2H;AAC3H,QAAA,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,cAAc,EAWzD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Ovok } from "@ovok/core/next";
|
|
2
|
+
import { Reading } from "../core/reading";
|
|
3
|
+
/** What queues the deletions: the outbox, with the measurements API and the session that name what to delete. */
|
|
4
|
+
type SupersessionClient = Pick<Ovok, "measurements" | "outbox" | "session">;
|
|
5
|
+
/** Queues the deletion of the live recordings a stored record replaces, so the outbox holds them before it holds the record. */
|
|
6
|
+
declare const replaceLiveRecordings: (client: SupersessionClient, reading: Reading) => Promise<void>;
|
|
7
|
+
export { replaceLiveRecordings };
|
|
8
|
+
export type { SupersessionClient };
|
|
9
|
+
//# sourceMappingURL=live-supersession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-supersession.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/live-supersession.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,IAAI,EAA6B,MAAM,iBAAiB,CAAC;AAItG,OAAO,EAAY,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAKpD,iHAAiH;AACjH,KAAK,kBAAkB,GAAG,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC,CAAC;AA0B5E,gIAAgI;AAChI,QAAA,MAAM,qBAAqB,GAAU,QAAQ,kBAAkB,EAAE,SAAS,OAAO,KAAG,OAAO,CAAC,IAAI,CAM/F,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,YAAY,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { OutboxResource } from "@ovok/core/next";
|
|
2
|
+
import { OutboxWatch } from "../core/outbox-watch";
|
|
3
|
+
import { Logger } from "../core/ports";
|
|
4
|
+
type WatchedOutbox = Pick<OutboxResource, "subscribe" | "items" | "recentlySent">;
|
|
5
|
+
/** Watches the signed-in account's Ovok outbox, so the reading log and the notification follow what it sends. */
|
|
6
|
+
declare const ovokOutboxWatch: (outbox: WatchedOutbox, logger?: Logger) => OutboxWatch;
|
|
7
|
+
export { ovokOutboxWatch };
|
|
8
|
+
//# sourceMappingURL=ovok-outbox-watch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ovok-outbox-watch.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ovok-outbox-watch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,cAAc,EAA+B,MAAM,iBAAiB,CAAC;AAEtG,OAAO,EAAc,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAgB,MAAM,eAAe,CAAC;AAErD,KAAK,aAAa,GAAG,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,GAAG,cAAc,CAAC,CAAC;AAalF,iHAAiH;AACjH,QAAA,MAAM,eAAe,GAAI,QAAQ,aAAa,EAAE,SAAQ,MAAqB,KAAG,WAwB9E,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { Ovok } from "@ovok/core/next";
|
|
2
1
|
import { ReadingSink } from "../core/ports";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { SupersessionClient } from "./live-supersession";
|
|
3
|
+
/** What the sink saves with: the measurements API, the outbox that deletes, and the session that names the patient. */
|
|
4
|
+
type OvokSinkClient = SupersessionClient;
|
|
5
|
+
/**
|
|
6
|
+
* Saves readings for the signed-in account through the Ovok measurements API, queueing them offline. A reading with a
|
|
7
|
+
* series also saves it; a stored record then removes the live recordings it replaces, once it is saved.
|
|
8
|
+
*/
|
|
9
|
+
declare const ovokReadingSink: (client: OvokSinkClient) => ReadingSink;
|
|
5
10
|
export { ovokReadingSink };
|
|
11
|
+
export type { OvokSinkClient };
|
|
6
12
|
//# sourceMappingURL=ovok-reading-sink.d.ts.map
|
package/lib/typescript/module/src/modules/next/bluetooth/adapters/ovok-reading-sink.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ovok-reading-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ovok-reading-sink.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ovok-reading-sink.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/ovok-reading-sink.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAyB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAwIhF,uHAAuH;AACvH,KAAK,cAAc,GAAG,kBAAkB,CAAC;AAuCzC;;;GAGG;AACH,QAAA,MAAM,eAAe,GAAI,QAAQ,cAAc,KAAG,WAqBhD,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LiveSpan, Reading } from "../core/reading";
|
|
2
|
+
/** The name a live recording is saved under: the device, what it holds, and when it began. */
|
|
3
|
+
declare const liveSourceId: (address: string, { metric, channel, from }: LiveSpan) => string;
|
|
4
|
+
/** The stable name a reading is saved under, so saving it again writes the same data; `undefined` for a measurement the device does not store. */
|
|
5
|
+
declare const sourceIdOf: ({ live, source: { address, recordId } }: Reading) => string | undefined;
|
|
6
|
+
/** The name of the `index`th recording of a reading with several, such as the channels of an ECG; the first keeps the reading's own. */
|
|
7
|
+
declare const partSourceId: (sourceId: string | undefined, index: number) => string | undefined;
|
|
8
|
+
export { liveSourceId, partSourceId, sourceIdOf };
|
|
9
|
+
//# sourceMappingURL=reading-source-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reading-source-id.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/reading-source-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEpD,8FAA8F;AAC9F,QAAA,MAAM,YAAY,GAAI,SAAS,MAAM,EAAE,2BAA2B,QAAQ,KAAG,MAC6B,CAAC;AAE3G,kJAAkJ;AAClJ,QAAA,MAAM,UAAU,GAAI,yCAAyC,OAAO,KAAG,MAAM,GAAG,SAM/E,CAAC;AAEF,wIAAwI;AACxI,QAAA,MAAM,YAAY,GAAI,UAAU,MAAM,GAAG,SAAS,EAAE,OAAO,MAAM,KAAG,MAAM,GAAG,SACJ,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MetricCode } from "../core/measurement-type";
|
|
2
|
+
import { Reading } from "../core/reading";
|
|
3
|
+
/** A device's UCUM unit to the unit Ovok stores the value in: mg/dL, kg, °C, mmHg, L, L/s, % or per minute. */
|
|
4
|
+
declare const TO_OVOK_UNIT: Record<string, (value: number) => number>;
|
|
5
|
+
declare const valueOf: (reading: Reading, metric: MetricCode) => number | undefined;
|
|
6
|
+
/** The value in Ovok's unit; `undefined` when the reading lacks it or uses a unit Ovok has no conversion for. */
|
|
7
|
+
declare const ovokValueOf: (reading: Reading, metric: MetricCode) => number | undefined;
|
|
8
|
+
export { ovokValueOf, TO_OVOK_UNIT, valueOf };
|
|
9
|
+
//# sourceMappingURL=reading-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reading-values.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/reading-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAQ1C,+GAA+G;AAC/G,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAc3D,CAAC;AAEF,QAAA,MAAM,OAAO,GAAI,SAAS,OAAO,EAAE,QAAQ,UAAU,KAAG,MAAM,GAAG,SAA0C,CAAC;AAE5G,iHAAiH;AACjH,QAAA,MAAM,WAAW,GAAI,SAAS,OAAO,EAAE,QAAQ,UAAU,KAAG,MAAM,GAAG,SAIpE,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BuildObservationsParams, MeasurementTypeKey, Ovok, SaveObservationsResult, SeriesObservationParams } from "@ovok/core/next";
|
|
2
|
+
import { Reading, Series } from "../core/reading";
|
|
3
|
+
type MeasurementDevice = NonNullable<BuildObservationsParams["device"]>;
|
|
4
|
+
/** What saves and signs a series: the measurements API and the session. */
|
|
5
|
+
type SeriesClient = Pick<Ovok, "measurements" | "session">;
|
|
6
|
+
/** A reading that holds a series. */
|
|
7
|
+
type SeriesReading = Reading & {
|
|
8
|
+
series: Series;
|
|
9
|
+
};
|
|
10
|
+
/** Where Ovok keeps one metric's series: the measurement type and the property on it. */
|
|
11
|
+
type SeriesField = {
|
|
12
|
+
type: MeasurementTypeKey;
|
|
13
|
+
property: string;
|
|
14
|
+
};
|
|
15
|
+
declare const isSeriesReading: (reading: Reading) => reading is SeriesReading;
|
|
16
|
+
/** The field Ovok keeps a metric's series in; `undefined` for a metric it keeps none for. */
|
|
17
|
+
declare const seriesFieldOf: (metric: string) => SeriesField | undefined;
|
|
18
|
+
/** The id of the signed-in patient, which a series is saved for. */
|
|
19
|
+
declare const signedInPatientId: ({ session }: Pick<Ovok, "session">) => Promise<string>;
|
|
20
|
+
/** The observations that hold one metric's values, one per second or at the interval given. */
|
|
21
|
+
declare const seriesObservationsOf: (field: SeriesField, { start, intervalMs, values }: Pick<Series, "start" | "intervalMs" | "values">, rest: Pick<SeriesObservationParams, "patientId" | "sourceId"> & {
|
|
22
|
+
device?: MeasurementDevice;
|
|
23
|
+
}) => import("@medplum/fhirtypes").Observation[];
|
|
24
|
+
/** Saves a series, in Ovok's unit, under a stable id; saving a longer version of it writes over the earlier one. */
|
|
25
|
+
declare const saveSeries: (client: SeriesClient, reading: SeriesReading, device: MeasurementDevice) => Promise<SaveObservationsResult>;
|
|
26
|
+
export { isSeriesReading, saveSeries, seriesFieldOf, seriesObservationsOf, signedInPatientId };
|
|
27
|
+
export type { MeasurementDevice, SeriesClient };
|
|
28
|
+
//# sourceMappingURL=series-saving.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"series-saving.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/series-saving.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,IAAI,EAAE,sBAAsB,EAAsB,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAIzJ,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKlD,KAAK,iBAAiB,GAAG,WAAW,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC;AAExE,2EAA2E;AAC3E,KAAK,YAAY,GAAG,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,CAAC,CAAC;AAE3D,qCAAqC;AACrC,KAAK,aAAa,GAAG,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,yFAAyF;AACzF,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAYlE,QAAA,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,OAAO,IAAI,aAA6C,CAAC;AAErG,6FAA6F;AAC7F,QAAA,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,WAAW,GAAG,SAAgD,CAAC;AAEvG,oEAAoE;AACpE,QAAA,MAAM,iBAAiB,GAAU,aAAa,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,KAAG,OAAO,CAAC,MAAM,CAUnF,CAAC;AAEF,+FAA+F;AAC/F,QAAA,MAAM,oBAAoB,GACxB,OAAO,WAAW,EAClB,+BAA+B,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC,EAC9E,MAAM,IAAI,CAAC,uBAAuB,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAAE,+CAK5F,CAAC;AAEL,oHAAoH;AACpH,QAAA,MAAM,UAAU,GAAU,QAAQ,YAAY,EAAE,SAAS,aAAa,EAAE,QAAQ,iBAAiB,KAAG,OAAO,CAAC,sBAAsB,CAgBjI,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,CAAC;AAC/F,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** A value SQLite binds to a `?` placeholder. */
|
|
2
|
+
type SqliteBindValue = string | number | null;
|
|
3
|
+
/** The part of an `expo-sqlite` transaction the outbox store uses. */
|
|
4
|
+
interface SqliteTransaction {
|
|
5
|
+
/** Runs statements that take no parameters. */
|
|
6
|
+
execAsync(source: string): Promise<void>;
|
|
7
|
+
/** Runs one statement that writes. */
|
|
8
|
+
runAsync(source: string, params?: SqliteBindValue[]): Promise<unknown>;
|
|
9
|
+
/** Returns the first row a query finds, or `null`. */
|
|
10
|
+
getFirstAsync<Row>(source: string, params?: SqliteBindValue[]): Promise<Row | null>;
|
|
11
|
+
}
|
|
12
|
+
/** The part of an `expo-sqlite` database the outbox store uses. */
|
|
13
|
+
interface SqliteDatabase extends SqliteTransaction {
|
|
14
|
+
/** Returns every row a query finds. */
|
|
15
|
+
getAllAsync<Row>(source: string, params?: SqliteBindValue[]): Promise<Row[]>;
|
|
16
|
+
/** Runs `task` in one exclusive transaction: it commits when `task` resolves and rolls back when it throws. */
|
|
17
|
+
withExclusiveTransactionAsync(task: (transaction: SqliteTransaction) => Promise<void>): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
/** Opens the named database with `expo-sqlite`, which an app without the package never loads. */
|
|
20
|
+
declare const openExpoSqlite: (name: string) => Promise<SqliteDatabase>;
|
|
21
|
+
export { openExpoSqlite };
|
|
22
|
+
export type { SqliteBindValue, SqliteDatabase, SqliteTransaction };
|
|
23
|
+
//# sourceMappingURL=sqlite-database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-database.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-database.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAE9C,sEAAsE;AACtE,UAAU,iBAAiB;IAEzB,+CAA+C;IAC/C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE,sDAAsD;IACtD,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;CACrF;AAED,mEAAmE;AACnE,UAAU,cAAe,SAAQ,iBAAiB;IAEhD,uCAAuC;IACvC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAE7E,+GAA+G;IAC/G,6BAA6B,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvG;AAYD,iGAAiG;AACjG,QAAA,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,OAAO,CAAC,cAAc,CAA6C,CAAC;AAE3G,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { OutboxItem, OutboxItemSummary, OutboxKind, OutboxState } from "@ovok/core/next";
|
|
2
|
+
import { SqliteBindValue } from "./sqlite-database";
|
|
3
|
+
/** One row of `outbox_items`: a column per item field, the failure and the entries as JSON text. */
|
|
4
|
+
type OutboxRow = {
|
|
5
|
+
id: string;
|
|
6
|
+
owner_key: string;
|
|
7
|
+
kind: OutboxKind;
|
|
8
|
+
group_id: string | null;
|
|
9
|
+
seq: number | null;
|
|
10
|
+
state: OutboxState;
|
|
11
|
+
attempts: number;
|
|
12
|
+
next_attempt_at: number;
|
|
13
|
+
created_at: number;
|
|
14
|
+
recorded_at: number;
|
|
15
|
+
last_failure: string | null;
|
|
16
|
+
entries: string;
|
|
17
|
+
};
|
|
18
|
+
type SummaryRow = Omit<OutboxRow, "entries">;
|
|
19
|
+
declare const ITEM_COLUMN_LIST: string;
|
|
20
|
+
declare const ITEM_PLACEHOLDERS: string;
|
|
21
|
+
declare const SUMMARY_COLUMN_LIST: string;
|
|
22
|
+
/** The values of `item`, in the order of `ITEM_COLUMNS`. */
|
|
23
|
+
declare const bindValuesOf: (item: OutboxItem) => SqliteBindValue[];
|
|
24
|
+
/** A field that is `null` in the table is absent on the item. */
|
|
25
|
+
declare const summaryOf: (row: SummaryRow) => OutboxItemSummary;
|
|
26
|
+
declare const itemOf: (row: OutboxRow) => OutboxItem;
|
|
27
|
+
export { bindValuesOf, ITEM_COLUMN_LIST, ITEM_PLACEHOLDERS, itemOf, SUMMARY_COLUMN_LIST, summaryOf };
|
|
28
|
+
export type { OutboxRow, SummaryRow };
|
|
29
|
+
//# sourceMappingURL=sqlite-outbox-rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-outbox-rows.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-outbox-rows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE7G,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,oGAAoG;AACpG,KAAK,SAAS,GAAG;IACf,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAqB7C,QAAA,MAAM,gBAAgB,QAA0B,CAAC;AACjD,QAAA,MAAM,iBAAiB,QAAyC,CAAC;AACjE,QAAA,MAAM,mBAAmB,QAA6B,CAAC;AAiBvD,4DAA4D;AAC5D,QAAA,MAAM,YAAY,GAAI,MAAM,UAAU,KAAG,eAAe,EAIvD,CAAC;AAEF,iEAAiE;AACjE,QAAA,MAAM,SAAS,GAAI,KAAK,UAAU,KAAG,iBAYnC,CAAC;AAEH,QAAA,MAAM,MAAM,GAAI,KAAK,SAAS,KAAG,UAG/B,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAC;AACrG,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Logger } from "../core/ports";
|
|
2
|
+
import { SqliteDatabase } from "./sqlite-database";
|
|
3
|
+
/** Brings the database to the latest schema; every pending migration runs in one transaction, so a crash leaves none. */
|
|
4
|
+
declare const migrateOutboxSchema: (database: SqliteDatabase, logger?: Logger) => Promise<void>;
|
|
5
|
+
export { migrateOutboxSchema };
|
|
6
|
+
//# sourceMappingURL=sqlite-outbox-schema.d.ts.map
|
package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-schema.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-outbox-schema.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-outbox-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA8BnD,yHAAyH;AACzH,QAAA,MAAM,mBAAmB,GAAU,UAAU,cAAc,EAAE,SAAQ,MAAqB,KAAG,OAAO,CAAC,IAAI,CAkBxG,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { OutboxItem, OutboxItemSummary, OutboxState, OutboxStore } from "@ovok/core/next";
|
|
2
|
+
import { Logger } from "../core/ports";
|
|
3
|
+
import { SqliteDatabase } from "./sqlite-database";
|
|
4
|
+
/** How `SqliteOutboxStore` finds its database; every field has a default for a phone app. */
|
|
5
|
+
type SqliteOutboxOptions = {
|
|
6
|
+
/** The database file name; `ovok-outbox.db` by default. */
|
|
7
|
+
name?: string;
|
|
8
|
+
/** Opens the named database; `expo-sqlite`'s `openDatabaseAsync` by default, swapped in tests. */
|
|
9
|
+
open?: (name: string) => Promise<SqliteDatabase>;
|
|
10
|
+
/** Where structured events go; silent by default. */
|
|
11
|
+
logger?: Logger;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* An `OutboxStore` on `expo-sqlite`, for phones: one row per item in `outbox_items`, the entries as one JSON text
|
|
15
|
+
* column, so listing and counting never read them. `expo-sqlite` is an optional peer dependency, loaded on first use.
|
|
16
|
+
*/
|
|
17
|
+
declare class SqliteOutboxStore implements OutboxStore {
|
|
18
|
+
private readonly options;
|
|
19
|
+
private database;
|
|
20
|
+
constructor(options?: SqliteOutboxOptions);
|
|
21
|
+
/** Stores an item, replacing the one with the same id. */
|
|
22
|
+
put(item: OutboxItem): Promise<void>;
|
|
23
|
+
/** Returns an item, or `null` when there is none. */
|
|
24
|
+
get(id: string): Promise<OutboxItem | null>;
|
|
25
|
+
/** Deletes an item; an unknown id is not an error. */
|
|
26
|
+
remove(id: string): Promise<void>;
|
|
27
|
+
/** The owner's pending items that are due, newest recorded first, then by position in the recording. */
|
|
28
|
+
due(ownerKey: string, now: number, limit: number): Promise<OutboxItem[]>;
|
|
29
|
+
/** Every item of the owner in any state, newest recorded first, without its entries. */
|
|
30
|
+
summaries(ownerKey: string): Promise<OutboxItemSummary[]>;
|
|
31
|
+
/** How many of the owner's items are in `state`. */
|
|
32
|
+
count(ownerKey: string, state: OutboxState): Promise<number>;
|
|
33
|
+
private open;
|
|
34
|
+
private connect;
|
|
35
|
+
}
|
|
36
|
+
export { SqliteOutboxStore };
|
|
37
|
+
export type { SqliteOutboxOptions };
|
|
38
|
+
//# sourceMappingURL=sqlite-outbox-store.d.ts.map
|
package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-outbox-store.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-outbox-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB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AC;AAC7B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/next/bluetooth/adapters/storage-paired-devices.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-paired-devices.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/storage-paired-devices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"storage-paired-devices.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/storage-paired-devices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AA+BlD,mGAAmG;AACnG,QAAA,MAAM,oBAAoB,GAAI,SAAS,WAAW,EAAE,YAAiB,KAAG,iBAkBvE,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { BleCentral } from "../core/ports";
|
|
|
2
2
|
/** The slice of Web Bluetooth this adapter uses; the DOM typings are not part of this package's lib. */
|
|
3
3
|
type WebCharacteristic = {
|
|
4
4
|
value?: DataView;
|
|
5
|
+
properties: {
|
|
6
|
+
write: boolean;
|
|
7
|
+
writeWithoutResponse: boolean;
|
|
8
|
+
};
|
|
5
9
|
readValue(): Promise<DataView>;
|
|
6
10
|
writeValueWithResponse(value: Uint8Array): Promise<void>;
|
|
7
11
|
writeValueWithoutResponse(value: Uint8Array): Promise<void>;
|
package/lib/typescript/module/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-bluet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