@ovok/native 1.2.0 → 1.4.0
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/auth/sign-in/components/social-logins/apple-login-button.js +9 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js +8 -2
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +22 -22
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/device-list-items.js +36 -0
- package/lib/commonjs/modules/bt-device/constants/device-list-items.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +36 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +45 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +198 -42
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +88 -0
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -0
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +77 -10
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +77 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-ble-manager.js +27 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-ble-manager.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +31 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +104 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +59 -6
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +6 -2
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +19 -8
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-builders.js +50 -0
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-builders.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +78 -127
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js +2 -0
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.frame-reader.js +60 -0
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +74 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +3 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +37 -4
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +4 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +35 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +3 -2
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +2 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/background-sync.js +6 -0
- package/lib/commonjs/modules/bt-management/types/background-sync.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +11 -2
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +3 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +3 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-units.js +22 -0
- package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js +9 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js +8 -2
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-list-items.js +36 -0
- package/lib/module/modules/bt-device/constants/device-list-items.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +33 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +41 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-devices.js +188 -32
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +83 -0
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -0
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +77 -10
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +7 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-ble-manager.js +22 -0
- package/lib/module/modules/bt-management/services/background-sync/background-ble-manager.js.map +1 -0
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +26 -0
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -0
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +100 -0
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -0
- package/lib/module/modules/bt-management/services/bt-manager.js +61 -7
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js +6 -2
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +19 -8
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-builders.js +40 -0
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-builders.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +59 -109
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js +2 -0
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.frame-reader.js +56 -0
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +69 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js +1 -1
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +3 -0
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +36 -4
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +2 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +4 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js +1 -1
- package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +1 -1
- package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +31 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +3 -2
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +2 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +1 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
- package/lib/module/modules/bt-management/types/background-sync.js +4 -0
- package/lib/module/modules/bt-management/types/background-sync.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +11 -2
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +3 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js +3 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-units.js +17 -0
- package/lib/module/modules/data-sync/utils/health-units.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-list-items.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +31 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +36 -22
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-ble-manager.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-ble-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +29 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +26 -3
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts +31 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +6 -5
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +6 -4
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +4 -4
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-list-items.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +31 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +36 -22
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-ble-manager.d.ts +13 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-ble-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +29 -0
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +26 -3
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +2 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts +31 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +6 -5
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +19 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +3 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +3 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +6 -4
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +4 -4
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +3 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -0
- package/package.json +5 -3
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable max-lines */
|
|
4
|
+
import { EcgDiagnosticFlag, MeasurementTypeKey } from "@ovok/core";
|
|
3
5
|
import { CaseType } from "../../../types/case-type.js";
|
|
4
6
|
import { createFrameValidator } from "../../../utils/create-frame-validator.js";
|
|
5
7
|
import { parseMeasurement } from "../../../utils/parse-measurement.js";
|
|
6
8
|
import { discardedReadingError, rejectCustomReading } from "../../../utils/reject-custom-reading.js";
|
|
7
9
|
import { BTManagedDevice } from "../bt-managed-device.js";
|
|
10
|
+
import { LepuCommandBuilder } from "../lepu/lepu.command-builder.js";
|
|
11
|
+
import { LepuFileTransfer } from "../lepu/lepu.file-transfer.js";
|
|
8
12
|
import { LepuFrameReader } from "../lepu/lepu.frame-reader.js";
|
|
13
|
+
import { decodeViatomEcgRecording } from "../viatom/viatom.ecg-files.js";
|
|
9
14
|
import { createLepuSequencer, recordLepuIdentity } from "./custom-lepu-sequencer.js";
|
|
10
15
|
/**
|
|
11
16
|
* Runs a device registered with defineCustomDevice.
|
|
@@ -45,11 +50,38 @@ export class CustomDevice extends BTManagedDevice {
|
|
|
45
50
|
return;
|
|
46
51
|
}
|
|
47
52
|
this.frameReader = new LepuFrameReader(lepu.startBytes);
|
|
48
|
-
this.createCommandSequencer = () =>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
this.createCommandSequencer = () => {
|
|
54
|
+
if (lepu.fileTransfer === "ecg") {
|
|
55
|
+
return new LepuFileTransfer({
|
|
56
|
+
write: {
|
|
57
|
+
serviceUuid: lepu.write.serviceUuid,
|
|
58
|
+
characteristicUuid: lepu.write.characteristicUuid
|
|
59
|
+
},
|
|
60
|
+
builder: new LepuCommandBuilder(lepu.startBytes[0] ?? "a5"),
|
|
61
|
+
onFile: this.reportViatomEcgFile,
|
|
62
|
+
onError: reason => this.onError?.(new Error(`Viatom ECG: ${reason}`))
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return createLepuSequencer(lepu, {
|
|
66
|
+
onIdentified: this.onIdentified,
|
|
67
|
+
onRefused: this.onIdentityRefused
|
|
68
|
+
});
|
|
69
|
+
};
|
|
52
70
|
}
|
|
71
|
+
reportViatomEcgFile = file => {
|
|
72
|
+
const decoded = decodeViatomEcgRecording(file.content);
|
|
73
|
+
if (decoded.samples.length === 0) {
|
|
74
|
+
this.onError?.(new Error(`Viatom ECG: file "${file.name}" had no samples.`));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
this.onResult?.({
|
|
78
|
+
measurementTypeKey: MeasurementTypeKey.ecg,
|
|
79
|
+
caseType: CaseType.RESULT,
|
|
80
|
+
diagnosticResult: EcgDiagnosticFlag.REGULAR,
|
|
81
|
+
diagramPoints: decoded.samples,
|
|
82
|
+
duration: decoded.duration
|
|
83
|
+
});
|
|
84
|
+
};
|
|
53
85
|
onIdentified = info => recordLepuIdentity(this.deviceData, info);
|
|
54
86
|
onIdentityRefused = reason => {
|
|
55
87
|
this.onError?.(new Error(`Custom device "${this.definition.id}" was not addressed: ${reason}.`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CaseType","createFrameValidator","parseMeasurement","discardedReadingError","rejectCustomReading","BTManagedDevice","LepuFrameReader","createLepuSequencer","recordLepuIdentity","CustomDevice","validators","Map","constructor","device","params","definition","mainServices","stuckDataTimeout","preferredMtu","undefined","declareLepuProtocol","frames","forEach","frame","uuid","set","lepu","frameReader","startBytes","createCommandSequencer","onIdentified","onRefused","onIdentityRefused","
|
|
1
|
+
{"version":3,"names":["EcgDiagnosticFlag","MeasurementTypeKey","CaseType","createFrameValidator","parseMeasurement","discardedReadingError","rejectCustomReading","BTManagedDevice","LepuCommandBuilder","LepuFileTransfer","LepuFrameReader","decodeViatomEcgRecording","createLepuSequencer","recordLepuIdentity","CustomDevice","validators","Map","constructor","device","params","definition","mainServices","stuckDataTimeout","preferredMtu","undefined","declareLepuProtocol","frames","forEach","frame","uuid","set","lepu","frameReader","startBytes","createCommandSequencer","fileTransfer","write","serviceUuid","characteristicUuid","builder","onFile","reportViatomEcgFile","onError","reason","Error","onIdentified","onRefused","onIdentityRefused","file","decoded","content","samples","length","name","onResult","measurementTypeKey","ecg","caseType","RESULT","diagnosticResult","REGULAR","diagramPoints","duration","info","deviceData","id","validatePackage","pkg","validate","get","String","toLowerCase","handleDependentResult","data","reportFrame","error","parsingCase","OTHER","handleSuccessResult","repeated","repeatedRecords","report","parsedData","records","Math","floor","from","recordBytes","record","measurements","discard","measurement","reportMeasurement","reading","fieldNames","rejection","map","fields","find","message"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/custom/custom.device.ts"],"mappings":";;AAAA;AACA,SAASA,iBAAiB,EAAEC,kBAAkB,QAAQ,YAAY;AAGlE,SAASC,QAAQ,QAAQ,6BAA0B;AAUnD,SAASC,oBAAoB,QAAQ,0CAAuC;AAC5E,SAASC,gBAAgB,QAAQ,qCAAkC;AACnE,SACEC,qBAAqB,EACrBC,mBAAmB,QACd,yCAAsC;AAC7C,SAASC,eAAe,QAAQ,yBAAsB;AACtD,SAASC,kBAAkB,QAAQ,iCAA8B;AAEjE,SAAmBC,gBAAgB,QAAQ,+BAA4B;AACvE,SAASC,eAAe,QAAQ,8BAA2B;AAC3D,SAASC,wBAAwB,QAAQ,+BAA4B;AAErE,SACEC,mBAAmB,EACnBC,kBAAkB,QACb,4BAAyB;AAKhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASP,eAAe,CAAiB;EAM/CQ,UAAU,GAAG,IAAIC,GAAG,CAAqC,CAAC;EAE3EC,WAAWA,CACTC,MAAc,EACdC,MAA0C,EAC1CC,UAAkC,EAClC;IACA,KAAK,CAACF,MAAM,EAAEC,MAAM,CAAC;IAErB,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,YAAY,GAAGD,UAAU,CAACC,YAAY;IAC3C,IAAI,CAACC,gBAAgB,GAAGF,UAAU,CAACE,gBAAgB;IAEnD,IAAIF,UAAU,CAACG,YAAY,KAAKC,SAAS,EAAE;MACzC,IAAI,CAACD,YAAY,GAAGH,UAAU,CAACG,YAAY;IAC7C;IAEA,IAAI,CAACE,mBAAmB,CAACL,UAAU,CAAC;IAEpCA,UAAU,CAACM,MAAM,CAACC,OAAO,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAK;MACzC,IAAI,CAACd,UAAU,CAACe,GAAG,CAACD,IAAI,EAAE1B,oBAAoB,CAACyB,KAAK,CAAC,CAAC;IACxD,CAAC,CAAC;EACJ;;EAEA;AACF;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AAC,CAAC;EAC/E;EAEQU,iBAAiBA,CACvBV,UAAwB,EACxBS,WAA6B,EACvB;IACN,MAAME,OAAO,GAAG;MACdpC,QAAQ,EAAEyB,UAAU,CAACzB,QAAQ;MAC7BF,kBAAkB,EAAEoC,WAAW,CAACpC;IAClC,CAAiB;IAEjBoC,WAAW,CAACG,UAAU,CAACnE,OAAO,CAAE0B,IAAI,IAAK;MACvCwC,OAAO,CAACxC,IAAI,CAAC,GAAG6B,UAAU,CAAC7B,IAAI,CAAC;IAClC,CAAC,CAAC;IAEF,MAAM0C,SAAS,GAAGJ,WAAW,CAACG,UAAU,CACrCE,GAAG,CAAE3C,IAAI,IACR/C,mBAAmB,CACjB,IAAI,CAACc,UAAU,CAAC6E,MAAM,EACtBN,WAAW,CAACpC,kBAAkB,EAC9BF,IAAI,EACJwC,OAAO,CAACxC,IAAI,CACd,CACF,CAAC,CACA6C,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAK3E,SAAS,CAAC;IAE3C,IAAIuE,SAAS,EAAE;MACb,IAAI,CAACL,OAAO,CAACK,SAAS,EAAEF,OAAO,CAAC;MAEhC;IACF;IAEA,IAAI,CAACvC,QAAQ,GAAGuC,OAAO,CAAC;EAC1B;AAEF","ignoreList":[]}
|
|
@@ -32,7 +32,7 @@ const TRANSFER_COMMANDS = [LepuCommand.GET_FILE_LIST, LepuCommand.READ_FILE_STAR
|
|
|
32
32
|
* and the reading is discarded, because half an ECG that looks like a whole one is worse
|
|
33
33
|
* than none.
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
class LepuFileTransfer {
|
|
36
36
|
files = [];
|
|
37
37
|
fileIndex = 0;
|
|
38
38
|
name = "";
|
|
@@ -147,4 +147,5 @@ export class LepuFileTransfer {
|
|
|
147
147
|
frame: this.params.builder.build(command, payload)
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
+
export { LepuFileTransfer };
|
|
150
151
|
//# sourceMappingURL=lepu.file-transfer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["le32FromHex","le32ToBytes","LepuCommand","lepuNameBytes","lepuNamesFrom","lepuCommandOf","lepuPayloadOf","describeLepuResponseType","isLepuSuccess","FILE_SIZE_OFFSET","MAX_FILE_BYTES","TRANSFER_COMMANDS","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END","LepuFileTransfer","files","fileIndex","name","totalBytes","content","isSessionOpen","isDone","constructor","params","initialCommands","commandFor","nextCommand","frame","command","includes","undefined","fail","openNextFile","openedFile","appendChunk","closedFile","payload","limit","maxFileBytes","closeFile","length","push","onProgress","receivedBytes","onFile","reason","onError","write","builder","build"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.file-transfer.ts"],"mappings":";;AAEA,SAASA,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,WAAW,QAAQ,kCAA+B;AAG3D,SAASC,WAAW,QAAQ,oBAAiB;AAC7C,SAASC,aAAa,EAAEC,aAAa,QAAQ,sBAAmB;AAChE,SAASC,aAAa,EAAEC,aAAa,QAAQ,iBAAc;AAC3D,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,yBAAsB;AAE9E,MAAMC,gBAAgB,GAAG,CAAC;;AAE1B;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,OAAO;AAE9B,MAAMC,iBAAoC,GAAG,CAC3CT,WAAW,CAACU,aAAa,EACzBV,WAAW,CAACW,eAAe,EAC3BX,WAAW,CAACY,cAAc,EAC1BZ,WAAW,CAACa,aAAa,CAC1B;AA+BD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"names":["le32FromHex","le32ToBytes","LepuCommand","lepuNameBytes","lepuNamesFrom","lepuCommandOf","lepuPayloadOf","describeLepuResponseType","isLepuSuccess","FILE_SIZE_OFFSET","MAX_FILE_BYTES","TRANSFER_COMMANDS","GET_FILE_LIST","READ_FILE_START","READ_FILE_DATA","READ_FILE_END","LepuFileTransfer","files","fileIndex","name","totalBytes","content","isSessionOpen","isDone","constructor","params","initialCommands","commandFor","nextCommand","frame","command","includes","undefined","fail","openNextFile","openedFile","appendChunk","closedFile","payload","limit","maxFileBytes","closeFile","length","push","onProgress","receivedBytes","onFile","reason","onError","write","builder","build"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.file-transfer.ts"],"mappings":";;AAEA,SAASA,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,WAAW,QAAQ,kCAA+B;AAG3D,SAASC,WAAW,QAAQ,oBAAiB;AAC7C,SAASC,aAAa,EAAEC,aAAa,QAAQ,sBAAmB;AAChE,SAASC,aAAa,EAAEC,aAAa,QAAQ,iBAAc;AAC3D,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,yBAAsB;AAE9E,MAAMC,gBAAgB,GAAG,CAAC;;AAE1B;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,OAAO;AAE9B,MAAMC,iBAAoC,GAAG,CAC3CT,WAAW,CAACU,aAAa,EACzBV,WAAW,CAACW,eAAe,EAC3BX,WAAW,CAACY,cAAc,EAC1BZ,WAAW,CAACa,aAAa,CAC1B;AA+BD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,CAA6B;EACzCC,KAAK,GAAa,EAAE;EACpBC,SAAS,GAAG,CAAC;EACbC,IAAI,GAAG,EAAE;EACTC,UAAU,GAAG,CAAC;EACdC,OAAO,GAAa,EAAE;EACtBC,aAAa,GAAG,KAAK;EACrBC,MAAM,GAAG,KAAK;EAEfC,WAAWA,CAAkBC,MAA8B,EAAE;IAAA,KAAhCA,MAA8B,GAA9BA,MAA8B;EAAG;EAE9DC,eAAe,GAAGA,CAAA,KAAgC,CACvD,IAAI,CAACC,UAAU,CAACzB,WAAW,CAACU,aAAa,CAAC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AAI,CAACV,aAAa,GAAG,KAAK;IAE1B,OAAO,IAAI,CAACmB,SAAS,CAAC,CAAC;EACzB,CAAC;EAEOd,UAAU,GAAGA,CACnBG,OAAe,EACfQ,OAA0B,GAAG,EAAE,MACZ;IACnB,GAAG,IAAI,CAACb,MAAM,CAACwB,KAAK;IACpBpB,KAAK,EAAE,IAAI,CAACJ,MAAM,CAACyB,OAAO,CAACC,KAAK,CAACrB,OAAO,EAAEQ,OAAO;EACnD,CAAC,CAAC;AACJ;AAEA,SAAStB,gBAAgB","ignoreList":[]}
|
|
@@ -108,7 +108,7 @@ const COMMAND_BYTE = 1;
|
|
|
108
108
|
const lepuDevice = params => {
|
|
109
109
|
const transport = lepuTransports[params.transport ?? "standard"];
|
|
110
110
|
return defineCustomDevice({
|
|
111
|
-
id: params.id,
|
|
111
|
+
id: params.id ?? "lepu-device",
|
|
112
112
|
nameMatch: params.nameMatch,
|
|
113
113
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? DEFAULT_STUCK_TIMEOUT_MS,
|
|
114
114
|
preferredMtu: transport.preferredMtu,
|
|
@@ -119,6 +119,9 @@ const lepuDevice = params => {
|
|
|
119
119
|
characteristicUuid: transport.writeUuid
|
|
120
120
|
},
|
|
121
121
|
expectedDeviceTypes: [...(params.expectedDeviceTypes ?? [])],
|
|
122
|
+
...(params.fileTransfer === undefined ? {} : {
|
|
123
|
+
fileTransfer: params.fileTransfer
|
|
124
|
+
}),
|
|
122
125
|
...(params.pollCommand === undefined ? {} : {
|
|
123
126
|
pollCommand: params.pollCommand
|
|
124
127
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defineCustomDevice","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","id","nameMatch","stuckDataTimeoutMs","lepu","startBytes","write","characteristicUuid","expectedDeviceTypes","
|
|
1
|
+
{"version":3,"names":["defineCustomDevice","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","id","nameMatch","stuckDataTimeoutMs","lepu","startBytes","write","characteristicUuid","expectedDeviceTypes","fileTransfer","undefined","pollCommand","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":";;AAEA,SAASA,kBAAkB,QAAQ,sCAAmC;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,sCAAsC;AAC/D,MAAMC,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,eAAe,GAAG,sCAAsC;;AAE9D;AACA,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,SAAS,GAAG,sCAAsC;AACxD,MAAMC,UAAU,GAAG,sCAAsC;;AAEzD;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,sCAAsC;AAC3D,MAAMC,UAAU,GAAG,sCAAsC;AACzD,MAAMC,W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MAAM,CAACE,EAAE,IAAI,aAAa;IAC9BC,SAAS,EAAEH,MAAM,CAACG,SAAS;IAC3BC,kBAAkB,EAAEJ,MAAM,CAACI,kBAAkB,IAAIlB,wBAAwB;IACzEO,YAAY,EAAEQ,SAAS,CAACR,YAAY;IACpCY,IAAI,EAAE;MACJC,UAAU,EAAE,CAACnB,UAAU,CAAC;MACxBoB,KAAK,EAAE;QACLjB,WAAW,EAAEW,SAAS,CAACX,WAAW;QAClCkB,kBAAkB,EAAEP,SAAS,CAACT;MAChC,CAAC;MACDiB,mBAAmB,EAAE,CAAC,IAAIT,MAAM,CAACS,mBAAmB,IAAI,EAAE,CAAC,CAAC;MAC5D,IAAIT,MAAM,CAACU,YAAY,KAAKC,SAAS,GACjC,CAAC,CAAC,GACF;QAAED,YAAY,EAAEV,MAAM,CAACU;MAAa,CAAC,CAAC;MAC1C,IAAIV,MAAM,CAACY,WAAW,KAAKD,SAAS,GAChC,CAAC,CAAC,GACF;QAAEC,WAAW,EAAEZ,MAAM,CAACY;MAAY,CAAC;IACzC,CAAC;IACDC,QAAQ,EAAE,CACR;MACEC,IAAI,EAAEb,SAAS,CAACX,WAAW;MAC3ByB,OAAO,EAAE,CACP;QACED,IAAI,EAAEb,SAAS,CAACV,UAAU;QAC1ByB,KAAK,EAAE;UAAEC,cAAc,EAAEjB,MAAM,CAACiB;QAAe,CAAC;QAChDC,iBAAiB,EAAElB,MAAM,CAACkB,iBAAiB,IAAI,CAACpB,YAAY,CAAC;QAC7DqB,KAAK,EAAEnB,MAAM,CAACmB;MAChB,CAAC;IAEL,CAAC;EAEL,CAAC,CAAC;AACJ,CAAC;AAED,SAASpB,UAAU,EAAEX,cAAc","ignoreList":[]}
|
package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js
CHANGED
|
@@ -13,8 +13,9 @@ const sigUuid = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
|
13
13
|
* flag combination puts it and with the frame length that shape guarantees.
|
|
14
14
|
*/
|
|
15
15
|
const declareProfile = (params, profile) => defineCustomDevice({
|
|
16
|
-
id: params.id
|
|
16
|
+
id: params.id ?? `standard-${profile.measurementTypeKey}`,
|
|
17
17
|
nameMatch: params.nameMatch,
|
|
18
|
+
matchByService: true,
|
|
18
19
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? SPOT_CHECK_TIMEOUT_MS,
|
|
19
20
|
services: [{
|
|
20
21
|
uuid: sigUuid(profile.service),
|
package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defineCustomDevice","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","declareProfile","params","profile","id","nameMatch","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","kind","
|
|
1
|
+
{"version":3,"names":["defineCustomDevice","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","declareProfile","params","profile","id","measurementTypeKey","nameMatch","matchByService","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","kind","fields","littleEndian","name","byteIndexes","unit","encoding","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.ts"],"mappings":";;AAIA,SAASA,kBAAkB,QAAQ,sCAAmC;;AAEtE;AACA,MAAMC,qBAAqB,GAAG,MAAM;AAyCpC,MAAMC,OAAO,GAAIC,QAAgB,IAC/B,OAAOA,QAAQ,8BAA8B;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CACrBC,MAA4B,EAC5BC,OAAoB,KAEpBN,kBAAkB,CAAC;EACjBO,EAAE,EAAEF,MAAM,CAACE,EAAE,IAAI,YAAYD,OAAO,CAACE,kBAAkB,EAAE;EACzDC,SAAS,EAAEJ,MAAM,C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
|
|
14
14
|
const visomatComfortSoftBtMonitor = params => standardBloodPressureDevice({
|
|
15
|
-
id: params.id,
|
|
15
|
+
id: params.id ?? "visomat-comfort-soft-bt",
|
|
16
16
|
nameMatch: params.nameMatch ?? VISOMAT_COMFORT_SOFT_BT_NAME_MATCH,
|
|
17
17
|
...(params.stuckDataTimeoutMs === undefined ? {} : {
|
|
18
18
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs
|
package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["standardBloodPressureDevice","VISOMAT_COMFORT_SOFT_BT_NAME_MATCH","visomatComfortSoftBtMonitor","params","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA,MAAMC,kCAAkC,GAAG,kCAAkC;AAc7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAC/BC,MAAkC,IAElCH,2BAA2B,CAAC;EAC1BI,EAAE,EAAED,MAAM,CAACC,EAAE;
|
|
1
|
+
{"version":3,"names":["standardBloodPressureDevice","VISOMAT_COMFORT_SOFT_BT_NAME_MATCH","visomatComfortSoftBtMonitor","params","id","nameMatch","stuckDataTimeoutMs","undefined"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA,MAAMC,kCAAkC,GAAG,kCAAkC;AAc7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAC/BC,MAAkC,IAElCH,2BAA2B,CAAC;EAC1BI,EAAE,EAAED,MAAM,CAACC,EAAE,IAAI,yBAAyB;EAC1CC,SAAS,EAAEF,MAAM,CAACE,SAAS,IAAIJ,kCAAkC;EACjE,IAAIE,MAAM,CAACG,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEH,MAAM,CAACG;EAAmB,CAAC;AACvD,CAAC,CAAC;AAEJ,SACEL,kCAAkC,EAClCC,2BAA2B","ignoreList":[]}
|
|
@@ -19,7 +19,7 @@ import { standardBloodPressureDevice } from "../standard-gatt/standard-gatt.devi
|
|
|
19
19
|
const BPU_26 = "BPU26";
|
|
20
20
|
const BPW_26 = "BPW26";
|
|
21
21
|
const verovalCompactMonitor = (advertisedName, params) => standardBloodPressureDevice({
|
|
22
|
-
id: params.id,
|
|
22
|
+
id: params.id ?? `veroval-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
23
23
|
nameMatch: params.nameMatch ?? new RegExp(`^${advertisedName}$`, "i"),
|
|
24
24
|
...(params.stuckDataTimeoutMs === undefined ? {} : {
|
|
25
25
|
stuckDataTimeoutMs: params.stuckDataTimeoutMs
|
package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["standardBloodPressureDevice","BPU_26","BPW_26","verovalCompactMonitor","advertisedName","params","id","nameMatch","RegExp","stuckDataTimeoutMs","undefined","bpu26Monitor","bpw26Monitor","VEROVAL_BP_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval.bp-monitors.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,MAAM,GAAG,OAAO;AACtB,MAAMC,MAAM,GAAG,OAAO;AActB,MAAMC,qBAAqB,GAAGA,CAC5BC,cAAsB,EACtBC,MAAuB,KAEvBL,2BAA2B,CAAC;EAC1BM,EAAE,EAAED,MAAM,CAACC,EAAE;
|
|
1
|
+
{"version":3,"names":["standardBloodPressureDevice","BPU_26","BPW_26","verovalCompactMonitor","advertisedName","params","id","toLowerCase","replace","nameMatch","RegExp","stuckDataTimeoutMs","undefined","bpu26Monitor","bpw26Monitor","VEROVAL_BP_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval.bp-monitors.ts"],"mappings":";;AACA,SAASA,2BAA2B,QAAQ,2CAAwC;;AAEpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,MAAM,GAAG,OAAO;AACtB,MAAMC,MAAM,GAAG,OAAO;AActB,MAAMC,qBAAqB,GAAGA,CAC5BC,cAAsB,EACtBC,MAAuB,KAEvBL,2BAA2B,CAAC;EAC1BM,EAAE,EAAED,MAAM,CAACC,EAAE,IAAI,WAAWF,cAAc,CAACG,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,EAAE;EACtFC,SAAS,EAAEJ,MAAM,CAACI,SAAS,IAAI,IAAIC,MAAM,CAAC,IAAIN,cAAc,GAAG,EAAE,GAAG,CAAC;EACrE,IAAIC,MAAM,CAACM,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEN,MAAM,CAACM;EAAmB,CAAC;AACvD,CAAC,CAAC;;AAEJ;AACA,MAAME,YAAY,GAAIR,MAAuB,IAC3CF,qBAAqB,CAACF,MAAM,EAAEI,MAAM,CAAC;;AAEvC;AACA,MAAMS,YAAY,GAAIT,MAAuB,IAC3CF,qBAAqB,CAACD,MAAM,EAAEG,MAAM,CAAC;;AAEvC;AACA,MAAMU,sBAAyC,GAAG,CAACd,MAAM,EAAEC,MAAM,CAAC;AAElE,SACEW,YAAY,EACZC,YAAY,EACZC,sBAAsB,EACtBZ,qBAAqB","ignoreList":[]}
|
|
@@ -79,7 +79,7 @@ const BP2_CASES = [measuring("0804", "Cuff inflating or deflating"), result("080
|
|
|
79
79
|
* cannot pick up a `BP2W`.
|
|
80
80
|
*/
|
|
81
81
|
const viatomBpMonitor = (advertisedName, params) => lepuDevice({
|
|
82
|
-
id: params.id,
|
|
82
|
+
id: params.id ?? `viatom-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
83
83
|
nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
|
|
84
84
|
pollCommand: RT_DATA,
|
|
85
85
|
minLengthBytes: MIN_LENGTH_BYTES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","READING","name","byteIndexes","byteOrder","encoding","unit","result","selector","description","kind","measurementTypeKey","bloodPressure","fields","measuring","BP2_CASES","viatomBpMonitor","advertisedName","params","id","nameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","map","each","expectedDeviceTypes","bp2aMonitor","bp2tMonitor","bp2wMonitor","BP3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAK/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAA0B,GAAG,CACjC;EACEC,IAAI,EAAE,UAAU;EAChBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,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name","byteIndexes","byteOrder","encoding","unit","result","selector","description","kind","measurementTypeKey","bloodPressure","fields","measuring","BP2_CASES","viatomBpMonitor","advertisedName","params","id","toLowerCase","replace","nameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","map","each","expectedDeviceTypes","bp2aMonitor","bp2tMonitor","bp2wMonitor","BP3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAK/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;;AAElC;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAA0B,GAAG,CACjC;EACEC,IAAI,EAAE,UAAU;EAChBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,EACD;EACEJ,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,EACD;EACEJ,IAAI,EAAE,WAAW;EACjBC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACrBC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBC,IAAI,EAAE;AACR,CAAC,CACF;AAED,MAAMC,MAAM,GAAGA,CAACC,QAAgB,EAAEC,WAAmB,MAAsB;EACzED,QAAQ;EACRE,IAAI,EAA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e,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AACA,MAAMa,WAAW,GAAIb,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AACA,MAAMc,WAAW,GAAId,MAAsB,IACzCF,eAAe,CAAC,MAAM,EAAEE,MAAM,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMe,eAAkC,GAAG,CACzC,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,CACP;AAED,SACEH,WAAW,EACXC,WAAW,EACXC,WAAW,EACXC,eAAe,EACfjB,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { hexToByte } from "../../../utils/hex-to-byte.js";
|
|
4
|
+
const VIATOM_ECG_SAMPLE_RATE_HZ = 125;
|
|
5
|
+
const VIATOM_ECG_MILLIVOLTS_PER_COUNT = 0.002467;
|
|
6
|
+
const readUInt32LittleEndian = (bytes, from) => hexToByte(bytes[from] ?? "0") | hexToByte(bytes[from + 1] ?? "0") << 8 | hexToByte(bytes[from + 2] ?? "0") << 16 | hexToByte(bytes[from + 3] ?? "0") << 24;
|
|
7
|
+
|
|
8
|
+
/** Decodes the official ER1/ER2 file container and its signed ECG samples. */
|
|
9
|
+
const decodeViatomEcgRecording = content => {
|
|
10
|
+
if (content.length <= 30) {
|
|
11
|
+
return {
|
|
12
|
+
samples: [],
|
|
13
|
+
duration: 0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const waveStart = 10;
|
|
17
|
+
const waveEnd = content.length - 20;
|
|
18
|
+
const samples = [];
|
|
19
|
+
for (let index = waveStart; index + 1 < waveEnd; index += 2) {
|
|
20
|
+
const raw = hexToByte(content[index] ?? "0") | hexToByte(content[index + 1] ?? "0") << 8;
|
|
21
|
+
const signed = raw & 0x8000 ? raw - 0x10000 : raw;
|
|
22
|
+
samples.push(signed * VIATOM_ECG_MILLIVOLTS_PER_COUNT);
|
|
23
|
+
}
|
|
24
|
+
const recordedSeconds = readUInt32LittleEndian(content, content.length - 20);
|
|
25
|
+
return {
|
|
26
|
+
samples,
|
|
27
|
+
duration: recordedSeconds || samples.length / VIATOM_ECG_SAMPLE_RATE_HZ
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export { decodeViatomEcgRecording, VIATOM_ECG_MILLIVOLTS_PER_COUNT, VIATOM_ECG_SAMPLE_RATE_HZ };
|
|
31
|
+
//# sourceMappingURL=viatom.ecg-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hexToByte","VIATOM_ECG_SAMPLE_RATE_HZ","VIATOM_ECG_MILLIVOLTS_PER_COUNT","readUInt32LittleEndian","bytes","from","decodeViatomEcgRecording","content","length","samples","duration","waveStart","waveEnd","index","raw","signed","push","recordedSeconds"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-files.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,yBAAyB,GAAG,GAAG;AACrC,MAAMC,+BAA+B,GAAG,QAAQ;AAEhD,MAAMC,sBAAsB,GAAGA,CAACC,KAAwB,EAAEC,IAAY,KACpEL,SAAS,CAACI,KAAK,CAACC,IAAI,CAAC,IAAI,GAAG,CAAC,GAC5BL,SAAS,CAACI,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAE,GACvCL,SAAS,CAACI,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,EAAG,GACxCL,SAAS,CAACI,KAAK,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,EAAG;;AAE3C;AACA,MAAMC,wBAAwB,GAC5BC,OAA0B,IACkB;EAC5C,IAAIA,OAAO,CAACC,MAAM,IAAI,EAAE,EAAE;IACxB,OAAO;MAAEC,OAAO,EAAE,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAC;EACrC;EAEA,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,OAAO,GAAGL,OAAO,CAACC,MAAM,GAAG,EAAE;EACnC,MAAMC,OAAiB,GAAG,EAAE;EAE5B,KAAK,IAAII,KAAK,GAAGF,SAAS,EAAEE,KAAK,GAAG,CAAC,GAAGD,OAAO,EAAEC,KAAK,IAAI,CAAC,EAAE;IAC3D,MAAMC,GAAG,GACPd,SAAS,CAACO,OAAO,CAACM,KAAK,CAAC,IAAI,GAAG,CAAC,GAC/Bb,SAAS,CAACO,OAAO,CAACM,KAAK,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAE;IAE7C,MAAME,MAAM,GAAGD,GAAG,GAAG,MAAM,GAAGA,GAAG,GAAG,OAAO,GAAGA,GAAG;IAEjDL,OAAO,CAACO,IAAI,CAACD,MAAM,GAAGb,+BAA+B,CAAC;EACxD;EAEA,MAAMe,eAAe,GAAGd,sBAAsB,CAACI,OAAO,EAAEA,OAAO,CAACC,MAAM,GAAG,EAAE,CAAC;EAE5E,OAAO;IACLC,OAAO;IACPC,QAAQ,EAAEO,eAAe,IAAIR,OAAO,CAACD,MAAM,GAAGP;EAChD,CAAC;AACH,CAAC;AAED,SACEK,wBAAwB,EACxBJ,+BAA+B,EAC/BD,yBAAyB","ignoreList":[]}
|
|
@@ -49,7 +49,7 @@ const ER_HEART_RATE_BYTES = [7, 8];
|
|
|
49
49
|
* reports a decoding failure on each poll. Reading those bits quietly needs a device class.
|
|
50
50
|
*/
|
|
51
51
|
const declareRecorder = (advertisedName, profile, params) => lepuDevice({
|
|
52
|
-
id: params.id,
|
|
52
|
+
id: params.id ?? `viatom-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
53
53
|
nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
|
|
54
54
|
transport: profile.transport,
|
|
55
55
|
pollCommand: profile.pollCommand,
|
|
@@ -70,7 +70,8 @@ const declareRecorder = (advertisedName, profile, params) => lepuDevice({
|
|
|
70
70
|
}],
|
|
71
71
|
...(params.expectedDeviceTypes ? {
|
|
72
72
|
expectedDeviceTypes: params.expectedDeviceTypes
|
|
73
|
-
} : {})
|
|
73
|
+
} : {}),
|
|
74
|
+
fileTransfer: "ecg"
|
|
74
75
|
});
|
|
75
76
|
|
|
76
77
|
/** The ER1, and the handheld recorders sold under other names on the same protocol. */
|
package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","ER3_RT_DATA","HEART_RATE_UNIT","ER_HEART_RATE_BYTES","declareRecorder","advertisedName","profile","params","id","nameMatch","transport","pollCommand","minLengthBytes","heartRateBytes","caseSelectorBytes","cases","selector","toString","padStart","kind","measurementTypeKey","heartRate","description","fields","name","byteIndexes","byteOrder","encoding","unit","expectedDeviceTypes","er1Recorder","er2Recorder","er3Recorder","ER1_MODEL_NAMES","ER2_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-recorders.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAG/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAA2B,4BAAyB;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA,MAAMC,WAAW,GAAG,IAAI;AAExB,MAAMC,eAAe,GAAG,KAAK;AAY7B;AACA,MAAMC,mBAAqC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AAoBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAGA,CACtBC,cAAsB,EACtBC,OAAmB,EACnBC,MAAuB,KAEvBR,UAAU,CAAC;EACTS,EAAE,EAAED,MAAM,CAACC,EAAE;
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","ER3_RT_DATA","HEART_RATE_UNIT","ER_HEART_RATE_BYTES","declareRecorder","advertisedName","profile","params","id","toLowerCase","replace","nameMatch","transport","pollCommand","minLengthBytes","heartRateBytes","caseSelectorBytes","cases","selector","toString","padStart","kind","measurementTypeKey","heartRate","description","fields","name","byteIndexes","byteOrder","encoding","unit","expectedDeviceTypes","fileTransfer","er1Recorder","er2Recorder","er3Recorder","ER1_MODEL_NAMES","ER2_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-recorders.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAG/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAA2B,4BAAyB;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA,MAAMC,WAAW,GAAG,IAAI;AAExB,MAAMC,eAAe,GAAG,KAAK;AAY7B;AACA,MAAMC,mBAAqC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AAoBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAGA,CACtBC,cAAsB,EACtBC,OAAmB,EACnBC,MAAuB,KAEvBR,UAAU,CAAC;EACTS,EAAE,EAAED,MAAM,CAACC,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E,MAAuB,KAEvBH,eAAe,CACbC,cAAc,EACd;EACEQ,WAAW,EAAEb,OAAO;EACpBe,cAAc,EAAEZ,mBAAmB;EACnCS,SAAS,EAAE;AACb,CAAC,EACDL,MACF,CAAC;;AAEH;AACA,MAAM4B,WAAW,GAAGA,CAClB9B,cAAsB,EACtBE,MAAuB,KAEvBH,eAAe,CACbC,cAAc,EACd;EACEQ,WAAW,EAAEZ,WAAW;EACxBc,cAAc,EAAEZ,mBAAmB;EACnCS,SAAS,EAAE;AACb,CAAC,EACDL,MACF,CAAC;;AAEH;AACA,MAAM6B,eAAkC,GAAG,CACzC,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,CACP;;AAED;AACA,MAAMC,eAAkC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;AAErF,SACEJ,WAAW,EACXG,eAAe,EACfF,WAAW,EACXG,eAAe,EACfF,WAAW","ignoreList":[]}
|
|
@@ -88,8 +88,9 @@ const LEPOD_MEASUREMENTS = [{
|
|
|
88
88
|
* byte, which a declaration cannot select on - reading them quietly needs a device class.
|
|
89
89
|
*/
|
|
90
90
|
const lepodMonitor = (advertisedName, params) => lepuDevice({
|
|
91
|
-
id: params.id,
|
|
91
|
+
id: params.id ?? `viatom-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
92
92
|
nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
|
|
93
|
+
fileTransfer: "ecg",
|
|
93
94
|
pollCommand: RT_DATA,
|
|
94
95
|
minLengthBytes: MIN_LENGTH_BYTES,
|
|
95
96
|
caseSelectorBytes: [1],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","MIN_LENGTH_BYTES","HEART_RATE","RESPIRATION_RATE","BLOOD_OXYGEN","PULSE_RATE","PERFUSION_INDEX","TEMPERATURE","PERFUSION_SCALE","TEMPERATURE_SCALE","littleEndian","name","byteIndexes","unit","byteOrder","encoding","LEPOD_MEASUREMENTS","measurementTypeKey","bloodOxygenPulseRate","fields","scale","decimals","respiratoryRate","temperature","lepodMonitor","advertisedName","params","id","nameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","selector","kind","heartRate","description","additionalMeasurements","map","each","expectedDeviceTypes","LEPOD_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.lepod.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAK/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA,MAAMC,gBAAgB,GAAG,EAAE;;AAE3B;AACA,MAAMC,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;AAC3B,MAAMC,gBAAgB,GAAG,EAAE;AAC3B,MAAMC,YAAY,GAAG,EAAE;AACvB,MAAMC,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;AAC3B,MAAMC,eAAe,GAAG,EAAE;AAC1B,MAAMC,WAAW,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,GAAG;AAC3B,MAAMC,iBAAiB,GAAG,IAAI;AAE9B,MAAMC,YAAY,GAAGA,CACnBC,IAAY,EACZC,WAAqB,EACrBC,IAAY,MACS;EACrBF,IAAI;EACJC,WAAW;EACXE,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBF;AACF,CAAC,CAAC;AAEF,MAAMG,kBAA2C,GAAG,CAClD;EACEC,kBAAkB,EAAEpB,kBAAkB,CAACqB,oBAAoB;EAC3DC,MAAM,EAAE,CACN;IACER,IAAI,EAAE,aAAa;IACnBC,WAAW,EAAE,CAACR,YAAY,CAAC;IAC3BW,QAAQ,EAAE,MAAM;IAChBF,IAAI,EAAE;EACR,CAAC,EACDH,YAAY,CAAC,WAAW,EAAEL,UAAU,EAAE,KAAK,CAAC,EAC5C;IACEM,IAAI,EAAE,gBAAgB;IACtBC,WAAW,EAAE,CAACN,eAAe,CAAC;IAC9BS,QAAQ,EAAE,MAAM;IAChBF,IAAI,EAAE,GAAG;IACTO,KAAK,EAAEZ,eAAe;IACtBa,QAAQ,EAAE;EACZ,CAAC;AAEL,CAAC,EACD;EACEJ,kBAAkB,EAAEpB,kBAAkB,CAACyB,eAAe;EACtDH,MAAM,EAAE,CACN;IACER,IAAI,EAAE,iBAAiB;IACvBC,WAAW,EAAE,CAACT,gBAAgB,CAAC;IAC/BY,QAAQ,EAAE,MAAM;IAChBF,IAAI,EAAE;EACR,CAAC;AAEL,CAAC,EACD;EACEI,kBAAkB,EAAEpB,kBAAkB,CAAC0B,WAAW;EAClDJ,MAAM,EAAE,CACN;IACER,IAAI,EAAE,UAAU;IAChBC,WAAW,EAAEL,WAAW;IACxBO,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,MAAM;IAChBF,IAAI,EAAE,KAAK;IACXO,KAAK,EAAEX,iBAAiB;IACxBY,QAAQ,EAAE;EACZ,CAAC;AAEL,CAAC,CACF;AAiBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,YAAY,GAAGA,CACnBC,cAAsB,EACtBC,MAAmB,KAEnB3B,UAAU,CAAC;EACT4B,EAAE,EAAED,MAAM,CAACC,EAAE;
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_DATA","MIN_LENGTH_BYTES","HEART_RATE","RESPIRATION_RATE","BLOOD_OXYGEN","PULSE_RATE","PERFUSION_INDEX","TEMPERATURE","PERFUSION_SCALE","TEMPERATURE_SCALE","littleEndian","name","byteIndexes","unit","byteOrder","encoding","LEPOD_MEASUREMENTS","measurementTypeKey","bloodOxygenPulseRate","fields","scale","decimals","respiratoryRate","temperature","lepodMonitor","advertisedName","params","id","toLowerCase","replace","nameMatch","fileTransfer","pollCommand","minLengthBytes","caseSelectorBytes","cases","selector","kind","heartRate","description","additionalMeasurements","map","each","expectedDeviceTypes","LEPOD_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.lepod.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAK/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA,MAAMC,gBAAgB,GAAG,EAAE;;AAE3B;AACA,MAAMC,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;AAC3B,MAAMC,gBAAgB,GAAG,EAAE;AAC3B,MAAMC,YAAY,GAAG,EAAE;AACvB,MAAMC,UAAU,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;AAC3B,MAAMC,eAAe,GAAG,EAAE;AAC1B,MAAMC,WAAW,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;;AAE5B;AACA,MAAMC,eAAe,GAAG,GAAG;AAC3B,MAAMC,iBAAiB,GAAG,IAAI;AAE9B,MAAMC,YAAY,GAAGA,CACnBC,IAAY,EACZC,WAAqB,EACrBC,IAAY,MACS;EACrBF,IAAI;EACJC,WAAW;EACXE,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,MAAM;EAChBF;AACF,CAAC,CAAC;AAEF,MAAMG,kBAA2C,GAAG,CAClD;EACEC,kBAAkB,EAAEpB,kBAAkB,CAACqB,oBAAoB;EAC3DC,MAAM,EAAE,CACN;IACER,IAAI,EAAE,aAAa;IACnBC,WAAW,EAAE,CAAC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B,EAAE,CAAC,CAAC,CAAC;EACtBC,KAAK,EAAE,CACL;IACEC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,QAAQ;IACdpB,kBAAkB,EAAEpB,kBAAkB,CAACyC,SAAS;IAChDC,WAAW,EAAE,8CAA8C;IAC3DpB,MAAM,EAAE,CAACT,YAAY,CAAC,WAAW,EAAER,UAAU,EAAE,KAAK,CAAC,CAAC;IACtDsC,sBAAsB,EAAExB,kBAAkB,CAACyB,GAAG,CAAEC,IAAI,KAAM;MACxD,GAAGA;IACL,CAAC,CAAC;EACJ,CAAC,CACF;EACD,IAAIhB,MAAM,CAACiB,mBAAmB,GAC1B;IAAEA,mBAAmB,EAAEjB,MAAM,CAACiB;EAAoB,CAAC,GACnD,CAAC,CAAC;AACR,CAAC,CAAC;;AAEJ;AACA,MAAMC,iBAAoC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC;AAElE,SAASA,iBAAiB,EAAEpB,YAAY","ignoreList":[]}
|
|
@@ -36,7 +36,7 @@ const SPOT_CHECK_TIMEOUT_MS = 60_000;
|
|
|
36
36
|
* reports a decoding failure on each poll. Reading those bits quietly needs a device class.
|
|
37
37
|
*/
|
|
38
38
|
const viatomOximeter = (advertisedName, params) => lepuDevice({
|
|
39
|
-
id: params.id,
|
|
39
|
+
id: params.id ?? `viatom-${advertisedName.toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
|
|
40
40
|
nameMatch: params.nameMatch ?? lepuNameMatch(advertisedName),
|
|
41
41
|
stuckDataTimeoutMs: SPOT_CHECK_TIMEOUT_MS,
|
|
42
42
|
pollCommand: RT_PARAM,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_PARAM","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","PAYLOAD","SPOT_CHECK_TIMEOUT_MS","viatomOximeter","advertisedName","params","id","nameMatch","stuckDataTimeoutMs","pollCommand","minLengthBytes","caseSelectorBytes","cases","selector","kind","measurementTypeKey","bloodOxygenPulseRate","description","fields","name","byteIndexes","encoding","unit","byteOrder","expectedDeviceTypes","VIATOM_OXIMETER_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.oximeters.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAG/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,QAAQ,GAAG,IAAI;;AAErB;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,CAAC;;AAE/B;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAAO,GAAG,CAAC;AAEjB,MAAMC,qBAAqB,GAAG,MAAM;AAoBpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CACrBC,cAAsB,EACtBC,MAA4B,KAE5BR,UAAU,CAAC;EACTS,EAAE,EAAED,MAAM,CAACC,EAAE;
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","lepuNameMatch","lepuDevice","RT_PARAM","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","PAYLOAD","SPOT_CHECK_TIMEOUT_MS","viatomOximeter","advertisedName","params","id","toLowerCase","replace","nameMatch","stuckDataTimeoutMs","pollCommand","minLengthBytes","caseSelectorBytes","cases","selector","kind","measurementTypeKey","bloodOxygenPulseRate","description","fields","name","byteIndexes","encoding","unit","byteOrder","expectedDeviceTypes","VIATOM_OXIMETER_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.oximeters.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAG/C,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;;AAEpD;AACA;AACA;AACA;AACA;AAC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AAM,CAACqB;EAAoB,CAAC,GACnD,CAAC,CAAC;AACR,CAAC,CAAC;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAwC,GAAG,CAC/C,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,CACT;AAED,SAASA,qBAAqB,EAAExB,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/background-sync.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-measurement-map.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-measurement-map.ts"],"mappings":";;AAYA,SAASA,iBAAiB,QAAQ,yBAAsB;;AA0BxD;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { MeasurementTypeKey } from "@ovok/core";
|
|
3
4
|
import { generateObservationEntry } from "../../utils/generate-observation-entry.js";
|
|
4
5
|
import { getLatestObservationDatesByCode } from "../../utils/get-latest-observation-dates-by-code.js";
|
|
5
6
|
import { getLatestValidStartDate } from "../../utils/get-latest-valid-start-date.js";
|
|
@@ -54,8 +55,16 @@ export class DataProcessor {
|
|
|
54
55
|
const newAnchors = results.map(result => result.anchor).flat().filter(Boolean);
|
|
55
56
|
this.storageManager.saveAnchors(newAnchors);
|
|
56
57
|
const allData = results.flatMap(result => result.data);
|
|
57
|
-
const
|
|
58
|
-
|
|
58
|
+
const dataGroups = this.provider === "apple-health" && measurementTypeKey === MeasurementTypeKey.bloodPressure ? Array.from(allData.reduce((groups, sample) => {
|
|
59
|
+
const value = sample;
|
|
60
|
+
const key = `${new Date(value.startDate ?? 0).getTime()}:${new Date(value.endDate ?? value.startDate ?? 0).getTime()}`;
|
|
61
|
+
const group = groups.get(key) ?? [];
|
|
62
|
+
group.push(sample);
|
|
63
|
+
groups.set(key, group);
|
|
64
|
+
return groups;
|
|
65
|
+
}, new Map()).values()) : allData.map(data => [data]);
|
|
66
|
+
const observationBodies = await Promise.all(dataGroups.map(group => this.getConverterFunction({
|
|
67
|
+
data: group,
|
|
59
68
|
client: this.client,
|
|
60
69
|
measurementTypeKey
|
|
61
70
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["generateObservationEntry","getLatestObservationDatesByCode","getLatestValidStartDate","DataProcessor","constructor","client","patientId","provider","chunkSize","storageManager","getTotalCountsFunction","getDataFromProviderFunction","getConverterFunction","extractCodes","dataToSync","Object","values","flatMap","data","typeIdentifiers","map","identifier","code","getLatestObservationDates","codes","getTotalRecordsCountForType","latestValidStartDate","totalCounts","Promise","all","typeIdentifier","anchor","getAnchor","startDate","toISOString","reduce","acc","count","getObservationBodiesForType","measurementTypeKey","results","newAnchors","result","flat","filter","Boolean","saveAnchors","allData","observationBodies","hasAnchor","length","generateObservationEntries","groupedObservationBodies","latestObservationDates"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/services/managers/data-processor.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["MeasurementTypeKey","generateObservationEntry","getLatestObservationDatesByCode","getLatestValidStartDate","DataProcessor","constructor","client","patientId","provider","chunkSize","storageManager","getTotalCountsFunction","getDataFromProviderFunction","getConverterFunction","extractCodes","dataToSync","Object","values","flatMap","data","typeIdentifiers","map","identifier","code","getLatestObservationDates","codes","getTotalRecordsCountForType","latestValidStartDate","totalCounts","Promise","all","typeIdentifier","anchor","getAnchor","startDate","toISOString","reduce","acc","count","getObservationBodiesForType","measurementTypeKey","results","newAnchors","result","flat","filter","Boolean","saveAnchors","allData","dataGroups","bloodPressure","Array","from","groups","sample","value","key","Date","getTime","endDate","group","get","push","set","Map","observationBodies","hasAnchor","length","generateObservationEntries","groupedObservationBodies","latestObservationDates"],"sourceRoot":"../../../../../../src","sources":["modules/data-sync/services/managers/data-processor.ts"],"mappings":";;AAEA,SAASA,kBAAkB,QAAqC,YAAY;AAW5E,SAASC,wBAAwB,QAAQ,2CAAwC;AACjF,SAASC,+BAA+B,QAAQ,qDAAkD;AAClG,SAASC,uBAAuB,QAAQ,4CAAyC;AAIjF,OAAO,MAAMC,aAAa,CAMxB;EACAC,WAAWA,CACDC,MAAkB,EAClBC,SAAiB,EACjBC,QAAwB,EACxBC,SAAiB,EACjBC,cAA8B,EAC9BC,sBAEY,EACZC,2BAEgE,EAChEC,oBAEmB,EAC3B;IAAA,KAdQP,MAAkB,GAAlBA,MAAkB;IAAA,KAClBC,SAAiB,GAAjBA,SAAiB;IAAA,KACjBC,QAAwB,GAAxBA,QAAwB;IAAA,KACxBC,SAAiB,GAAjBA,SAAiB;IAAA,KACjBC,cAA8B,GAA9BA,cAA8B;IAAA,KAC9BC,sBAEY,GAFZA,sBAEY;IAAA,KACZC,2BAEgE,GAFhEA,2BAEgE;IAAA,KAChEC,oBAEmB,GAFnBA,oBAEmB;EAC1B;EAEHC,YAAYA,CAACC,UAAuB,EAAqB;IACvD,OAAOC,MAAM,CAACC,MAAM,CAACF,UAAU,CAAC,CAACG,OAAO,CACrCC,IAA8C,IAC7CA,IAAI,EAAEC,eAAe,CAACC,GAAG,CAAEC,UAAU,IAAKA,UAAU,CAACC,IAAI,CAAC,IAAI,EAClE,CAAC;EACH;EAEA,MAAMC,yBAAyBA,CAACT,UAAuB,EAKrD;IACA,MAAMU,KAAK,GAAG,IAAI,CAACX,YAAY,CAACC,UAAU,CAAC;IAE3C,OAAOb,+BAA+B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EAAEyC,KAAK;MACXtD,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBkC;IACF,CAAC,CACH,CACF,CAAC;IAED,OAAO;MAAEyB,iBAAiB;MAAEC,SAAS,EAAExB,UAAU,CAACyB,MAAM,GAAG;IAAE,CAAC;EAChE;EAEAC,0BAA0BA,CAACH,iBAAkC,EAAE;IAC7D,OAAOhE,wBAAwB,CAAC;MAC9BoE,wBAAwB,EAAEJ,iBAAiB;MAC3CzD,QAAQ,EAAE,IAAI,CAACA;IACjB,CAAC,CAAC;EACJ;EAEAL,uBAAuBA,CACrBmE,sBAGE,EACFnD,IAA8C,EAC5B;IAClB,OAAOhB,uBAAuB,CAAC;MAC7BmE,sBAAsB;MACtBnD,IAAI,EAAEA;IACR,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import Healthkit from "@kingstinct/react-native-healthkit";
|
|
4
4
|
import { addSeconds } from "date-fns";
|
|
5
|
+
import { healthUnitFor } from "./health-units.js";
|
|
5
6
|
export const getSamplesFromHealth = async ({
|
|
6
7
|
startDate: _startDate,
|
|
7
8
|
typeIdentifier,
|
|
@@ -18,7 +19,8 @@ export const getSamplesFromHealth = async ({
|
|
|
18
19
|
from: startDate,
|
|
19
20
|
to: endDate,
|
|
20
21
|
limit: chunkSize,
|
|
21
|
-
anchor
|
|
22
|
+
anchor,
|
|
23
|
+
unit: healthUnitFor(typeIdentifier)
|
|
22
24
|
});
|
|
23
25
|
if (samples.length === 0 && deletedSamples.length === 0) {
|
|
24
26
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Healthkit","addSeconds","getSamplesFromHealth","startDate","_startDate","typeIdentifier","anchor","chunkSize","undefined","endDate","Date","samples","deletedSamples","newAnchor","queryQuantitySamplesWithAnchor","from","to","limit","length","data"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/get-samples-from-health.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAGT,oCAAoC;AAC3C,SAASC,UAAU,QAAQ,UAAU;AAIrC,OAAO,MAAMC,oBAAoB,GAAG,MAAAA,CAAO;EACzCC,SAAS,EAAEC,UAAU;EACrBC,cAAc;EACdC,MAAM;EACNC,SAAS,GAAG;AACsC,CAAC,KAAK;EACxD,MAAMJ,SAAS,GAAGC,UAAU,
|
|
1
|
+
{"version":3,"names":["Healthkit","addSeconds","healthUnitFor","getSamplesFromHealth","startDate","_startDate","typeIdentifier","anchor","chunkSize","undefined","endDate","Date","samples","deletedSamples","newAnchor","queryQuantitySamplesWithAnchor","from","to","limit","unit","length","data"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/get-samples-from-health.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAGT,oCAAoC;AAC3C,SAASC,UAAU,QAAQ,UAAU;AAIrC,SAASC,aAAa,QAAQ,mBAAgB;AAE9C,OAAO,MAAMC,oBAAoB,GAAG,MAAAA,CAAO;EACzCC,SAAS,EAAEC,UAAU;EACrBC,cAAc;EACdC,MAAM;EACNC,SAAS,GAAG;AACsC,CAAC,KAAK;EACxD,MAAMJ,SAAS,GAAGC,UAAU,GAAGJ,UAAU,CAACI,UAAU,EAAE,CAAC,CAAC,GAAGI,SAAS;EAEpE,MAAMC,OAAO,GAAG,IAAIC,IAAI,CAAC,CAAC;EAE1B,MAAM;IAAEC,OAAO;IAAEC,cAAc;IAAEC;EAAU,CAAC,GAC1C,MAAMd,SAAS,CAACe,8BAA8B,CAACT,cAAc,EAAE;IAC7DU,IAAI,EAAEZ,SAAS;IACfa,EAAE,EAAEP,OAAO;IACXQ,KAAK,EAAEV,SAAS;IAChBD,MAAM;IACNY,IAAI,EAAEjB,aAAa,CAACI,cAAc;EACpC,CAAC,CAAC;EAEJ,IAAIM,OAAO,CAACQ,MAAM,KAAK,CAAC,IAAIP,cAAc,CAACO,MAAM,KAAK,CAAC,EAAE;IACvD,OAAO;MACLC,IAAI,EAAE,EAAkD;MACxDd,MAAM,EAAEE;IACV,CAAC;EACH;EAEA,OAAO;IACLY,IAAI,EAAET,OAAuD;IAC7DL,MAAM,EAAEO,SAAS,GACb;MACER,cAAc;MACdC,MAAM,EAAEO;IACV,CAAC,GACDL;EACN,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import Healthkit from "@kingstinct/react-native-healthkit";
|
|
4
4
|
import { addSeconds } from "date-fns";
|
|
5
|
+
import { healthUnitFor } from "./health-units.js";
|
|
5
6
|
export const getTotalSamplesCount = async ({
|
|
6
7
|
typeIdentifier,
|
|
7
8
|
startDate: _startDate,
|
|
@@ -13,7 +14,8 @@ export const getTotalSamplesCount = async ({
|
|
|
13
14
|
const result = await Healthkit.queryQuantitySamplesWithAnchor(typeIdentifier, {
|
|
14
15
|
from: startDate,
|
|
15
16
|
to: endDate,
|
|
16
|
-
anchor
|
|
17
|
+
anchor,
|
|
18
|
+
unit: healthUnitFor(typeIdentifier)
|
|
17
19
|
});
|
|
18
20
|
if (!result || !result.samples) {
|
|
19
21
|
return 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Healthkit","addSeconds","getTotalSamplesCount","typeIdentifier","startDate","_startDate","anchor","undefined","endDate","Date","result","queryQuantitySamplesWithAnchor","from","to","samples","totalSamples","length"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/get-total-samples-count.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAET,oCAAoC;AAC3C,SAASC,UAAU,QAAQ,UAAU;
|
|
1
|
+
{"version":3,"names":["Healthkit","addSeconds","healthUnitFor","getTotalSamplesCount","typeIdentifier","startDate","_startDate","anchor","undefined","endDate","Date","result","queryQuantitySamplesWithAnchor","from","to","unit","samples","totalSamples","length"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/get-total-samples-count.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAET,oCAAoC;AAC3C,SAASC,UAAU,QAAQ,UAAU;AAErC,SAASC,aAAa,QAAQ,mBAAgB;AAQ9C,OAAO,MAAMC,oBAAoB,GAAG,MAAAA,CAAO;EACzCC,cAAc;EACdC,SAAS,EAAEC,UAAU;EACrBC;AACyB,CAAC,KAAsB;EAChD,MAAMF,SAAS,GAAGC,UAAU,GAAGL,UAAU,CAACK,UAAU,EAAE,CAAC,CAAC,GAAGE,SAAS;EAEpE,MAAMC,OAAO,GAAG,IAAIC,IAAI,CAAC,CAAC;EAE1B,IAAI;IACF,MAAMC,MAAM,GAAG,MAAMX,SAAS,CAACY,8BAA8B,CAC3DR,cAAc,EACd;MACES,IAAI,EAAER,SAAS;MACfS,EAAE,EAAEL,OAAO;MACXF,MAAM;MACNQ,IAAI,EAAEb,aAAa,CAACE,cAAc;IACpC,CACF,CAAC;IAED,IAAI,CAACO,MAAM,IAAI,CAACA,MAAM,CAACK,OAAO,EAAE;MAC9B,OAAO,CAAC;IACV;IAEA,MAAM;MAAEA,OAAO,EAAEC;IAAa,CAAC,GAAGN,MAAM;IAExC,OAAOM,YAAY,CAACC,MAAM;EAC5B,CAAC,CAAC,MAAM;IACN;IACA,OAAO,CAAC;EACV;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { HKQuantityTypeIdentifier } from "@kingstinct/react-native-healthkit";
|
|
4
|
+
const HEALTH_UNITS = {
|
|
5
|
+
[HKQuantityTypeIdentifier.bodyMass]: "kg",
|
|
6
|
+
[HKQuantityTypeIdentifier.bodyTemperature]: "degC",
|
|
7
|
+
[HKQuantityTypeIdentifier.basalBodyTemperature]: "degC",
|
|
8
|
+
[HKQuantityTypeIdentifier.bloodPressureSystolic]: "mmHg",
|
|
9
|
+
[HKQuantityTypeIdentifier.bloodPressureDiastolic]: "mmHg",
|
|
10
|
+
[HKQuantityTypeIdentifier.bloodGlucose]: "mg/dL",
|
|
11
|
+
[HKQuantityTypeIdentifier.oxygenSaturation]: "%",
|
|
12
|
+
[HKQuantityTypeIdentifier.heartRate]: "count/min",
|
|
13
|
+
[HKQuantityTypeIdentifier.restingHeartRate]: "count/min",
|
|
14
|
+
[HKQuantityTypeIdentifier.walkingHeartRateAverage]: "count/min"
|
|
15
|
+
};
|
|
16
|
+
export const healthUnitFor = typeIdentifier => HEALTH_UNITS[typeIdentifier];
|
|
17
|
+
//# sourceMappingURL=health-units.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HKQuantityTypeIdentifier","HEALTH_UNITS","bodyMass","bodyTemperature","basalBodyTemperature","bloodPressureSystolic","bloodPressureDiastolic","bloodGlucose","oxygenSaturation","heartRate","restingHeartRate","walkingHeartRateAverage","healthUnitFor","typeIdentifier"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/health-units.ts"],"mappings":";;AAAA,SACEA,wBAAwB,QAEnB,oCAAoC;AAE3C,MAAMC,YAA+D,GAAG;EACtE,CAACD,wBAAwB,CAACE,QAAQ,GAAG,IAAI;EACzC,CAACF,wBAAwB,CAACG,eAAe,GAAG,MAAM;EAClD,CAACH,wBAAwB,CAACI,oBAAoB,GAAG,MAAM;EACvD,CAACJ,wBAAwB,CAACK,qBAAqB,GAAG,MAAM;EACxD,CAACL,wBAAwB,CAACM,sBAAsB,GAAG,MAAM;EACzD,CAACN,wBAAwB,CAACO,YAAY,GAAG,OAAO;EAChD,CAACP,wBAAwB,CAACQ,gBAAgB,GAAG,GAAG;EAChD,CAACR,wBAAwB,CAACS,SAAS,GAAG,WAAW;EACjD,CAACT,wBAAwB,CAACU,gBAAgB,GAAG,WAAW;EACxD,CAACV,wBAAwB,CAACW,uBAAuB,GAAG;AACtD,CAAC;AAED,OAAO,MAAMC,aAAa,GACxBC,cAAiB,IAEjBZ,YAAY,CAACY,cAAc,CAAqC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple-login-button.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/apple-login-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,eAAO,MAAM,gBAAgB,GAAI,iFAS9B,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"apple-login-button.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/apple-login-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,eAAO,MAAM,gBAAgB,GAAI,iFAS9B,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,6BAkG1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-login-button.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/google-login-button.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,eAAO,MAAM,iBAAiB,GAAI,uHAW/B,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"google-login-button.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/google-login-button.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,eAAO,MAAM,iBAAiB,GAAI,uHAW/B,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,sBA0G3C,CAAC"}
|
package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IntegratedDevices } from "../../bt-management";
|
|
1
|
+
import { IntegratedDevices } from "../../bt-management/types/integrated-devices";
|
|
2
2
|
export declare const DEVICE_INSTRUCTION_PDFS: Record<IntegratedDevices, string>;
|
|
3
3
|
//# sourceMappingURL=device-instruction-pdfs.d.ts.map
|