@fastybird/smart-panel-backend 1.1.0-alpha.6 → 1.1.0-alpha.60
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/dist/app.module.js +2 -1
- package/dist/app.module.js.map +1 -1
- package/dist/common/utils/cancellable-exec.utils.d.ts +5 -0
- package/dist/common/utils/cancellable-exec.utils.js +34 -0
- package/dist/common/utils/cancellable-exec.utils.js.map +1 -0
- package/dist/common/utils/remote-access-observation.utils.d.ts +11 -0
- package/dist/common/utils/remote-access-observation.utils.js +89 -0
- package/dist/common/utils/remote-access-observation.utils.js.map +1 -0
- package/dist/dataSource.js +1 -0
- package/dist/dataSource.js.map +1 -1
- package/dist/migrations/1000000000026-AddHardwareInputCategories.d.ts +7 -0
- package/dist/migrations/1000000000026-AddHardwareInputCategories.js +364 -0
- package/dist/migrations/1000000000026-AddHardwareInputCategories.js.map +1 -0
- package/dist/modules/auth/auth.module.js +4 -0
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/guards/auth.guard.js +8 -21
- package/dist/modules/auth/guards/auth.guard.js.map +1 -1
- package/dist/modules/auth/services/token-metadata.service.d.ts +42 -0
- package/dist/modules/auth/services/token-metadata.service.js +202 -0
- package/dist/modules/auth/services/token-metadata.service.js.map +1 -0
- package/dist/modules/auth/services/token-usage.service.d.ts +22 -0
- package/dist/modules/auth/services/token-usage.service.js +93 -0
- package/dist/modules/auth/services/token-usage.service.js.map +1 -0
- package/dist/modules/auth/services/tokens.service.d.ts +10 -3
- package/dist/modules/auth/services/tokens.service.js +26 -10
- package/dist/modules/auth/services/tokens.service.js.map +1 -1
- package/dist/modules/devices/controllers/channels.controller.d.ts +5 -1
- package/dist/modules/devices/controllers/channels.controller.js +34 -2
- package/dist/modules/devices/controllers/channels.controller.js.map +1 -1
- package/dist/modules/devices/controllers/channels.properties.controller.js +5 -0
- package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.controller.d.ts +5 -1
- package/dist/modules/devices/controllers/devices.channels.controller.js +38 -2
- package/dist/modules/devices/controllers/devices.channels.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js +5 -0
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/devices.constants.d.ts +6 -0
- package/dist/modules/devices/devices.constants.js +6 -0
- package/dist/modules/devices/devices.constants.js.map +1 -1
- package/dist/modules/devices/devices.module.js +18 -0
- package/dist/modules/devices/devices.module.js.map +1 -1
- package/dist/modules/devices/devices.openapi.d.ts +3 -1
- package/dist/modules/devices/devices.openapi.js +7 -0
- package/dist/modules/devices/devices.openapi.js.map +1 -1
- package/dist/modules/devices/dto/channel-input-occurrence.dto.d.ts +10 -0
- package/dist/modules/devices/dto/channel-input-occurrence.dto.js +99 -0
- package/dist/modules/devices/dto/channel-input-occurrence.dto.js.map +1 -0
- package/dist/modules/devices/dto/property-command.dto.js +2 -8
- package/dist/modules/devices/dto/property-command.dto.js.map +1 -1
- package/dist/modules/devices/models/channel-input-capabilities.model.d.ts +20 -0
- package/dist/modules/devices/models/channel-input-capabilities.model.js +111 -0
- package/dist/modules/devices/models/channel-input-capabilities.model.js.map +1 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.d.ts +22 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.js +154 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.js.map +1 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.d.ts +17 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.js +88 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.js.map +1 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.d.ts +21 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.js +163 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.js.map +1 -0
- package/dist/modules/devices/services/channels.properties.service.d.ts +10 -1
- package/dist/modules/devices/services/channels.properties.service.js +108 -44
- package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
- package/dist/modules/devices/services/channels.service.d.ts +1 -0
- package/dist/modules/devices/services/channels.service.js +10 -0
- package/dist/modules/devices/services/channels.service.js.map +1 -1
- package/dist/modules/devices/services/command-latency-trace-collector.service.d.ts +101 -0
- package/dist/modules/devices/services/command-latency-trace-collector.service.js +451 -0
- package/dist/modules/devices/services/command-latency-trace-collector.service.js.map +1 -0
- package/dist/modules/devices/services/device-command-graph.service.d.ts +18 -0
- package/dist/modules/devices/services/device-command-graph.service.js +92 -0
- package/dist/modules/devices/services/device-command-graph.service.js.map +1 -0
- package/dist/modules/devices/services/devices.service.d.ts +2 -0
- package/dist/modules/devices/services/devices.service.js +41 -31
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/devices/services/platform.registry.service.d.ts +2 -2
- package/dist/modules/devices/services/platform.registry.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-dispatch.service.d.ts +7 -3
- package/dist/modules/devices/services/property-command-dispatch.service.js +38 -25
- package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-window.service.d.ts +2 -1
- package/dist/modules/devices/services/property-command-window.service.js +6 -0
- package/dist/modules/devices/services/property-command-window.service.js.map +1 -1
- package/dist/modules/devices/services/property-command.service.d.ts +9 -5
- package/dist/modules/devices/services/property-command.service.js +54 -21
- package/dist/modules/devices/services/property-command.service.js.map +1 -1
- package/dist/modules/devices/services/property-metadata.service.d.ts +38 -0
- package/dist/modules/devices/services/property-metadata.service.js +210 -0
- package/dist/modules/devices/services/property-metadata.service.js.map +1 -0
- package/dist/modules/devices/services/property-value-lock.service.d.ts +4 -1
- package/dist/modules/devices/services/property-value-lock.service.js +16 -2
- package/dist/modules/devices/services/property-value-lock.service.js.map +1 -1
- package/dist/modules/devices/services/property-value.service.d.ts +2 -0
- package/dist/modules/devices/services/property-value.service.js +25 -5
- package/dist/modules/devices/services/property-value.service.js.map +1 -1
- package/dist/modules/devices/utils/device-graph-query.utils.d.ts +3 -0
- package/dist/modules/devices/utils/device-graph-query.utils.js +23 -0
- package/dist/modules/devices/utils/device-graph-query.utils.js.map +1 -0
- package/dist/modules/devices/utils/schema.utils.js +1 -1
- package/dist/modules/devices/utils/schema.utils.js.map +1 -1
- package/dist/modules/devices/validators/channel-exists-constraint.validator.d.ts +1 -3
- package/dist/modules/devices/validators/channel-exists-constraint.validator.js +3 -14
- package/dist/modules/devices/validators/channel-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.d.ts +1 -3
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.js +3 -14
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/device-exists-constraint.validator.js +1 -2
- package/dist/modules/devices/validators/device-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/property-command-target-constraint.validator.d.ts +9 -0
- package/dist/modules/devices/validators/property-command-target-constraint.validator.js +58 -0
- package/dist/modules/devices/validators/property-command-target-constraint.validator.js.map +1 -0
- package/dist/modules/mdns/services/mdns.service.js +3 -1
- package/dist/modules/mdns/services/mdns.service.js.map +1 -1
- package/dist/modules/platform/platforms/abstract.platform.d.ts +2 -1
- package/dist/modules/platform/platforms/abstract.platform.js +2 -1
- package/dist/modules/platform/platforms/abstract.platform.js.map +1 -1
- package/dist/modules/platform/platforms/raspberry.platform.js +5 -10
- package/dist/modules/platform/platforms/raspberry.platform.js.map +1 -1
- package/dist/modules/platform/utils/linux-network-interface.utils.d.ts +3 -0
- package/dist/modules/platform/utils/linux-network-interface.utils.js +48 -0
- package/dist/modules/platform/utils/linux-network-interface.utils.js.map +1 -0
- package/dist/modules/remote-access/controllers/remote-access.controller.js +11 -6
- package/dist/modules/remote-access/controllers/remote-access.controller.js.map +1 -1
- package/dist/modules/remote-access/models/provider.model.d.ts +3 -0
- package/dist/modules/remote-access/models/provider.model.js +23 -0
- package/dist/modules/remote-access/models/provider.model.js.map +1 -1
- package/dist/modules/remote-access/models/status.model.d.ts +2 -0
- package/dist/modules/remote-access/models/status.model.js +18 -1
- package/dist/modules/remote-access/models/status.model.js.map +1 -1
- package/dist/modules/remote-access/models/urls.model.d.ts +2 -0
- package/dist/modules/remote-access/models/urls.model.js +17 -0
- package/dist/modules/remote-access/models/urls.model.js.map +1 -1
- package/dist/modules/remote-access/platforms/remote-access-provider.platform.d.ts +18 -1
- package/dist/modules/remote-access/remote-access.constants.d.ts +2 -1
- package/dist/modules/remote-access/remote-access.constants.js +2 -1
- package/dist/modules/remote-access/remote-access.constants.js.map +1 -1
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.d.ts +1 -0
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js +4 -1
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js.map +1 -1
- package/dist/modules/remote-access/services/remote-access-status.service.d.ts +40 -8
- package/dist/modules/remote-access/services/remote-access-status.service.js +314 -65
- package/dist/modules/remote-access/services/remote-access-status.service.js.map +1 -1
- package/dist/modules/remote-access/services/remote-access-url.service.d.ts +2 -2
- package/dist/modules/remote-access/services/remote-access-url.service.js +4 -2
- package/dist/modules/remote-access/services/remote-access-url.service.js.map +1 -1
- package/dist/modules/spaces/services/module-reset.service.d.ts +5 -1
- package/dist/modules/spaces/services/module-reset.service.js +10 -2
- package/dist/modules/spaces/services/module-reset.service.js.map +1 -1
- package/dist/modules/spaces/services/space-activity.service.d.ts +14 -0
- package/dist/modules/spaces/services/space-activity.service.js +56 -0
- package/dist/modules/spaces/services/space-activity.service.js.map +1 -0
- package/dist/modules/spaces/spaces.module.js +5 -0
- package/dist/modules/spaces/spaces.module.js.map +1 -1
- package/dist/modules/spaces/subscribers/space-activity.subscriber.d.ts +17 -0
- package/dist/modules/spaces/subscribers/space-activity.subscriber.js +89 -0
- package/dist/modules/spaces/subscribers/space-activity.subscriber.js.map +1 -0
- package/dist/modules/storage/services/storage-write-buffer.d.ts +17 -0
- package/dist/modules/storage/services/storage-write-buffer.js +67 -0
- package/dist/modules/storage/services/storage-write-buffer.js.map +1 -0
- package/dist/modules/storage/services/storage.service.d.ts +9 -2
- package/dist/modules/storage/services/storage.service.js +54 -1
- package/dist/modules/storage/services/storage.service.js.map +1 -1
- package/dist/modules/system/scripts/update-worker.sh +1168 -61
- package/dist/modules/system/services/privileged-worker.service.d.ts +10 -0
- package/dist/modules/system/services/privileged-worker.service.js +241 -32
- package/dist/modules/system/services/privileged-worker.service.js.map +1 -1
- package/dist/modules/system/services/system.service.d.ts +2 -0
- package/dist/modules/system/services/system.service.js +22 -1
- package/dist/modules/system/services/system.service.js.map +1 -1
- package/dist/modules/system/services/update-executor.service.d.ts +20 -2
- package/dist/modules/system/services/update-executor.service.js +272 -26
- package/dist/modules/system/services/update-executor.service.js.map +1 -1
- package/dist/modules/websocket/gateway/websocket.gateway.d.ts +4 -1
- package/dist/modules/websocket/gateway/websocket.gateway.js +29 -5
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.d.ts +143 -0
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.js +523 -0
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.js.map +1 -0
- package/dist/modules/websocket/services/ws-auth.service.js +12 -35
- package/dist/modules/websocket/services/ws-auth.service.js.map +1 -1
- package/dist/modules/websocket/websocket.module.js +9 -1
- package/dist/modules/websocket/websocket.module.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.openapi.d.ts +2 -2
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.d.ts +6 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +16 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.js +11 -0
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.js.map +1 -1
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.d.ts +19 -0
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.js +51 -0
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/mappings/definitions/entity-mappings.yaml +56 -7
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.js +11 -0
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.js +17 -0
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js +3 -1
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.d.ts +27 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.js +271 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +2 -2
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +33 -14
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js +24 -4
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.d.ts +4 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +82 -2
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/wizard.service.js +1 -0
- package/dist/plugins/devices-home-assistant/services/wizard.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.d.ts +2 -0
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.js +50 -0
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.js.map +1 -0
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.d.ts +4 -1
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +34 -4
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.js +3 -2
- package/dist/plugins/devices-homekit/mappers/base.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/button.mapper.d.ts +15 -0
- package/dist/plugins/devices-homekit/mappers/button.mapper.js +143 -0
- package/dist/plugins/devices-homekit/mappers/button.mapper.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.d.ts +2 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js +17 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +9 -1
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +13 -12
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.js +2 -0
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.d.ts +5 -1
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js +42 -0
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js.map +1 -1
- package/dist/plugins/devices-homekit/utils/ciao-receive-guard.d.ts +1 -0
- package/dist/plugins/devices-homekit/utils/ciao-receive-guard.js +36 -0
- package/dist/plugins/devices-homekit/utils/ciao-receive-guard.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/definitions/channels.yaml +50 -0
- package/dist/plugins/devices-homey/mappings/definitions/devices.yaml +18 -0
- package/dist/plugins/devices-homey/mappings/definitions/properties.yaml +55 -0
- package/dist/plugins/devices-homey/mappings/device-support.js +10 -0
- package/dist/plugins/devices-homey/mappings/device-support.js.map +1 -1
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.d.ts +1 -0
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.js +66 -8
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.js.map +1 -1
- package/dist/plugins/devices-homey/models/inventory.model.d.ts +2 -1
- package/dist/plugins/devices-homey/models/inventory.model.js +1 -0
- package/dist/plugins/devices-homey/models/inventory.model.js.map +1 -1
- package/dist/plugins/devices-homey/models/mapping-preview.model.d.ts +1 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.js +1 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.js.map +1 -1
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js +7 -0
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js.map +1 -1
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.d.ts +3 -1
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.js +37 -6
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.js.map +1 -1
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.d.ts +7 -3
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.js +63 -17
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +25 -3
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +607 -48
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +6 -0
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +51 -2
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js +3 -2
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +2 -0
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/mappings/definitions/inputs.yaml +80 -0
- package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js +7 -1
- package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/mappings/mapping.types.d.ts +6 -3
- package/dist/plugins/devices-shelly-ng/mappings/schema/mapping-schema.json +5 -0
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +153 -8
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.d.ts +51 -0
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js +549 -0
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +6 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +84 -14
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +13 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.d.ts +2 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.js +66 -4
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js +2 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +7 -0
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.d.ts +3 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js +20 -2
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.d.ts +16 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.js +107 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.d.ts +7 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js +98 -3
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js.map +1 -1
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.d.ts +17 -0
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.js +205 -0
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.js.map +1 -0
- package/dist/plugins/devices-third-party/devices-third-party.openapi.d.ts +1 -1
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js +2 -1
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js.map +1 -1
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.d.ts +5 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.js +50 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.js.map +1 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.d.ts +8 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.js +81 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.js.map +1 -0
- package/dist/plugins/devices-third-party/platforms/third-party-device.platform.js +19 -4
- package/dist/plugins/devices-third-party/platforms/third-party-device.platform.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.d.ts +2 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js +57 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.d.ts +3 -8
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js +6 -31
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js +3 -1
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.d.ts +3 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.js +41 -5
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/interfaces/zigbee2mqtt.interface.d.ts +7 -1
- package/dist/plugins/devices-zigbee2mqtt/mappings/config-driven.converter.js +16 -15
- package/dist/plugins/devices-zigbee2mqtt/mappings/config-driven.converter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/mappings/definitions/remotes.yaml +505 -74
- package/dist/plugins/devices-zigbee2mqtt/mappings/schema/mapping-schema.json +3 -3
- package/dist/plugins/devices-zigbee2mqtt/mappings/transformers/transformer.types.d.ts +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +8 -2
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js +6 -5
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js +18 -11
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.d.ts +9 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js +166 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +5 -2
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +44 -4
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js +2 -2
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js.map +1 -1
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js +2 -2
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js.map +1 -1
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js +2 -2
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.d.ts +6 -4
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js +28 -16
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.d.ts +4 -6
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js +18 -17
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.d.ts +2 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js +17 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.d.ts +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js +2 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/scripts/cloudflared-setup.sh +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.d.ts +21 -2
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js +132 -56
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.d.ts +13 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js +8 -2
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.d.ts +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js +12 -24
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.d.ts +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js +5 -2
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.d.ts +4 -3
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js +109 -49
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.d.ts +11 -6
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js +115 -25
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.d.ts +6 -5
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js +26 -16
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/models/status.model.d.ts +16 -0
- package/dist/plugins/remote-access-tailscale/models/status.model.js +100 -1
- package/dist/plugins/remote-access-tailscale/models/status.model.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.d.ts +3 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js +4 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.d.ts +17 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js +33 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.d.ts +2 -2
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js +1 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js +3 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/scripts/tailscale-setup.sh +37 -4
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.d.ts +9 -4
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js +63 -15
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.d.ts +8 -3
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js +175 -151
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.d.ts +55 -7
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js +551 -109
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.d.ts +33 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.js +167 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.d.ts +13 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.js +8 -2
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.d.ts +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js +7 -6
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.d.ts +1 -3
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js +11 -11
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.d.ts +5 -0
- package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.js +36 -0
- package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.js.map +1 -0
- package/dist/plugins/simulator/controllers/simulator.controller.d.ts +8 -2
- package/dist/plugins/simulator/controllers/simulator.controller.js +102 -2
- package/dist/plugins/simulator/controllers/simulator.controller.js.map +1 -1
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.d.ts +12 -0
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.js +122 -0
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.js.map +1 -0
- package/dist/plugins/simulator/models/simulator-response.model.d.ts +12 -0
- package/dist/plugins/simulator/models/simulator-response.model.js +84 -1
- package/dist/plugins/simulator/models/simulator-response.model.js.map +1 -1
- package/dist/plugins/simulator/scenarios/definitions/small-apartment.yaml +78 -0
- package/dist/plugins/simulator/services/scenario-executor.service.js +3 -1
- package/dist/plugins/simulator/services/scenario-executor.service.js.map +1 -1
- package/dist/plugins/simulator/services/simulation.service.js +10 -1
- package/dist/plugins/simulator/services/simulation.service.js.map +1 -1
- package/dist/plugins/simulator/simulator.openapi.d.ts +3 -2
- package/dist/plugins/simulator/simulator.openapi.js +5 -0
- package/dist/plugins/simulator/simulator.openapi.js.map +1 -1
- package/dist/plugins/simulator/simulators/device-simulator.interface.d.ts +2 -0
- package/dist/plugins/simulator/simulators/device-simulator.interface.js +83 -0
- package/dist/plugins/simulator/simulators/device-simulator.interface.js.map +1 -1
- package/dist/plugins/simulator/simulators/index.d.ts +1 -0
- package/dist/plugins/simulator/simulators/index.js +1 -0
- package/dist/plugins/simulator/simulators/index.js.map +1 -1
- package/dist/plugins/simulator/simulators/input-controller.simulator.d.ts +10 -0
- package/dist/plugins/simulator/simulators/input-controller.simulator.js +57 -0
- package/dist/plugins/simulator/simulators/input-controller.simulator.js.map +1 -0
- package/dist/plugins/simulator/simulators/lighting.simulator.js +1 -0
- package/dist/plugins/simulator/simulators/lighting.simulator.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.d.ts +6 -7
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js +19 -44
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.d.ts +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js +9 -22
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.d.ts +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js +9 -22
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.d.ts +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js +9 -22
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.d.ts +3 -5
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js +9 -12
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.d.ts +3 -5
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js +7 -10
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.d.ts +3 -5
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js +7 -10
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-state-read.service.d.ts +47 -0
- package/dist/plugins/spaces-home-control/services/space-state-read.service.js +262 -0
- package/dist/plugins/spaces-home-control/services/space-state-read.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +4 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -1
- package/dist/spec/channels.d.ts +51 -1
- package/dist/spec/channels.js +64 -1
- package/dist/spec/channels.js.map +1 -1
- package/dist/spec/devices.d.ts +155 -2
- package/dist/spec/devices.js +161 -2
- package/dist/spec/devices.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -47,6 +47,10 @@ let PropertyCommandWindowService = class PropertyCommandWindowService {
|
|
|
47
47
|
get(canonicalPropertyId) {
|
|
48
48
|
return this.toSnapshot(this.getCurrent(canonicalPropertyId, Date.now()));
|
|
49
49
|
}
|
|
50
|
+
peekGeneration(canonicalPropertyId) {
|
|
51
|
+
const current = this.windows.get(canonicalPropertyId);
|
|
52
|
+
return current !== undefined && current.expiresAt > Date.now() ? current.generation : undefined;
|
|
53
|
+
}
|
|
50
54
|
confirm(handle, receipt) {
|
|
51
55
|
const current = this.getCurrent(handle.canonicalPropertyId, Date.now());
|
|
52
56
|
if (current === undefined || current.generation !== handle.generation) {
|
|
@@ -133,7 +137,9 @@ let PropertyCommandWindowService = class PropertyCommandWindowService {
|
|
|
133
137
|
return true;
|
|
134
138
|
}
|
|
135
139
|
cancelRecovery(canonicalPropertyId) {
|
|
140
|
+
const recovery = this.recoveries.get(canonicalPropertyId);
|
|
136
141
|
this.recoveries.delete(canonicalPropertyId);
|
|
142
|
+
return recovery !== undefined && recovery.deadlineAt > Date.now();
|
|
137
143
|
}
|
|
138
144
|
cancel(canonicalPropertyId) {
|
|
139
145
|
this.windows.delete(canonicalPropertyId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-command-window.service.js","sourceRoot":"","sources":["../../../../src/modules/devices/services/property-command-window.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6CAAyC;AAEzC,2CAA4C;AAE5C,qFAA0E;AAG7D,QAAA,sCAAsC,GAAG,KAAK,CAAC;AA6ErD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAAlC;QACW,YAAO,GAAG,IAAI,GAAG,EAAwC,CAAC;QAC1D,eAAU,GAAG,IAAI,GAAG,EAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"property-command-window.service.js","sourceRoot":"","sources":["../../../../src/modules/devices/services/property-command-window.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6CAAyC;AAEzC,2CAA4C;AAE5C,qFAA0E;AAG7D,QAAA,sCAAsC,GAAG,KAAK,CAAC;AA6ErD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAAlC;QACW,YAAO,GAAG,IAAI,GAAG,EAAwC,CAAC;QAC1D,eAAU,GAAG,IAAI,GAAG,EAA0B,CAAC;IAyPjE,CAAC;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MAAM,CAAC,eAAe,CAAC;YAC/F,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,CAAC;YACrG,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC;SAC3F,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AA3PY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;GACA,4BAA4B,CA2PxC;AAED,MAAM,YAAY,GAAG,CAAC,MAAmC,EAA+B,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;AAExH,MAAM,aAAa,GAAG,CAAC,OAA+B,EAA0B,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAEjH,MAAM,kBAAkB,GAAG,CAAC,OAAoC,EAA+B,EAAE,CAChG,MAAM,CAAC,MAAM,CAAC;IACb,QAAQ,EAAE,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC5C,eAAe,EAAE,gBAAgB,CAAC,OAAO,CAAC,eAAe,CAAC;CAC1D,CAAC,CAAC;AAEJ,MAAM,gBAAgB,GAAG,CAAC,KAAyB,EAAsB,EAAE,CAC1E,MAAM,CAAC,MAAM,CAAC,IAAI,+CAAkB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -5,12 +5,14 @@ import { UpdateChannelPropertyDto } from '../dto/update-channel-property.dto';
|
|
|
5
5
|
import { ChannelEntity, ChannelPropertyEntity, DeviceEntity } from '../entities/devices.entity';
|
|
6
6
|
import { PropertyValueState } from '../models/property-value-state.model';
|
|
7
7
|
import { PropertyCommandValue } from '../utils/property-command-value.utils';
|
|
8
|
-
import { ChannelsPropertiesService } from './channels.properties.service';
|
|
9
8
|
import { ChannelsService } from './channels.service';
|
|
10
|
-
import {
|
|
9
|
+
import { CommandLatencyTraceCollectorService } from './command-latency-trace-collector.service';
|
|
10
|
+
import { DeviceCommandGraphService } from './device-command-graph.service';
|
|
11
11
|
import { PlatformRegistryService } from './platform.registry.service';
|
|
12
12
|
import { PropertyCommandDispatchService } from './property-command-dispatch.service';
|
|
13
13
|
import { PropertyCommandWindowHandle, PropertyCommandWindowService } from './property-command-window.service';
|
|
14
|
+
import { PropertyMetadataService } from './property-metadata.service';
|
|
15
|
+
import { PropertyValueService } from './property-value.service';
|
|
14
16
|
export interface PropertyCommandExecutionOptions {
|
|
15
17
|
requestId?: string;
|
|
16
18
|
context?: IntentContext;
|
|
@@ -39,15 +41,17 @@ export interface PropertyBatchCommandResult {
|
|
|
39
41
|
results: SinglePropertyCommandResult[];
|
|
40
42
|
}
|
|
41
43
|
export declare class PropertyCommandService {
|
|
42
|
-
private readonly
|
|
44
|
+
private readonly deviceGraphs;
|
|
43
45
|
private readonly channelsService;
|
|
44
|
-
private readonly
|
|
46
|
+
private readonly propertyMetadata;
|
|
47
|
+
private readonly propertyValues;
|
|
45
48
|
private readonly platformRegistryService;
|
|
46
49
|
private readonly intentsService;
|
|
47
50
|
private readonly propertyCommandDispatchService;
|
|
48
51
|
private readonly propertyCommandWindowService;
|
|
52
|
+
private readonly commandLatencyTraceCollector;
|
|
49
53
|
private readonly logger;
|
|
50
|
-
constructor(
|
|
54
|
+
constructor(deviceGraphs: DeviceCommandGraphService, channelsService: ChannelsService, propertyMetadata: PropertyMetadataService, propertyValues: PropertyValueService, platformRegistryService: PlatformRegistryService, intentsService: IntentsService, propertyCommandDispatchService: PropertyCommandDispatchService, propertyCommandWindowService: PropertyCommandWindowService, commandLatencyTraceCollector?: CommandLatencyTraceCollectorService);
|
|
51
55
|
handleInternal(user: ClientUserDto, payload?: object): Promise<{
|
|
52
56
|
success: boolean;
|
|
53
57
|
results: Array<{
|
|
@@ -8,6 +8,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.PropertyCommandService = void 0;
|
|
13
16
|
const class_validator_1 = require("class-validator");
|
|
@@ -22,21 +25,25 @@ const websocket_exceptions_1 = require("../../websocket/websocket.exceptions");
|
|
|
22
25
|
const devices_constants_1 = require("../devices.constants");
|
|
23
26
|
const property_command_dto_1 = require("../dto/property-command.dto");
|
|
24
27
|
const property_command_value_utils_1 = require("../utils/property-command-value.utils");
|
|
25
|
-
const channels_properties_service_1 = require("./channels.properties.service");
|
|
26
28
|
const channels_service_1 = require("./channels.service");
|
|
27
|
-
const
|
|
29
|
+
const command_latency_trace_collector_service_1 = require("./command-latency-trace-collector.service");
|
|
30
|
+
const device_command_graph_service_1 = require("./device-command-graph.service");
|
|
28
31
|
const platform_registry_service_1 = require("./platform.registry.service");
|
|
29
32
|
const property_command_dispatch_service_1 = require("./property-command-dispatch.service");
|
|
30
33
|
const property_command_window_service_1 = require("./property-command-window.service");
|
|
34
|
+
const property_metadata_service_1 = require("./property-metadata.service");
|
|
35
|
+
const property_value_service_1 = require("./property-value.service");
|
|
31
36
|
let PropertyCommandService = class PropertyCommandService {
|
|
32
|
-
constructor(
|
|
33
|
-
this.
|
|
37
|
+
constructor(deviceGraphs, channelsService, propertyMetadata, propertyValues, platformRegistryService, intentsService, propertyCommandDispatchService, propertyCommandWindowService, commandLatencyTraceCollector = new command_latency_trace_collector_service_1.CommandLatencyTraceCollectorService()) {
|
|
38
|
+
this.deviceGraphs = deviceGraphs;
|
|
34
39
|
this.channelsService = channelsService;
|
|
35
|
-
this.
|
|
40
|
+
this.propertyMetadata = propertyMetadata;
|
|
41
|
+
this.propertyValues = propertyValues;
|
|
36
42
|
this.platformRegistryService = platformRegistryService;
|
|
37
43
|
this.intentsService = intentsService;
|
|
38
44
|
this.propertyCommandDispatchService = propertyCommandDispatchService;
|
|
39
45
|
this.propertyCommandWindowService = propertyCommandWindowService;
|
|
46
|
+
this.commandLatencyTraceCollector = commandLatencyTraceCollector;
|
|
40
47
|
this.logger = (0, extension_logger_service_1.createExtensionLogger)(devices_constants_1.DEVICES_MODULE_NAME, 'PropertyCommandService');
|
|
41
48
|
}
|
|
42
49
|
async handleInternal(user, payload) {
|
|
@@ -73,7 +80,7 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
73
80
|
});
|
|
74
81
|
}
|
|
75
82
|
async executePropertyCommandById(propertyId, rawValue, options = {}) {
|
|
76
|
-
const property = await this.
|
|
83
|
+
const property = await this.propertyMetadata.findOne(propertyId);
|
|
77
84
|
if (!property) {
|
|
78
85
|
return { device: '', success: false, reason: 'Property not found' };
|
|
79
86
|
}
|
|
@@ -83,7 +90,7 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
83
90
|
return { device: '', success: false, property: property.id, reason: 'Channel not found' };
|
|
84
91
|
}
|
|
85
92
|
const channelDevice = channel.device;
|
|
86
|
-
const device = typeof channelDevice === 'string' ? await this.
|
|
93
|
+
const device = typeof channelDevice === 'string' ? await this.deviceGraphs.findOne(channelDevice) : channelDevice;
|
|
87
94
|
if (!device) {
|
|
88
95
|
return {
|
|
89
96
|
device: '',
|
|
@@ -140,7 +147,7 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
140
147
|
const resolved = [];
|
|
141
148
|
let targetDeviceId = null;
|
|
142
149
|
for (const cmd of commands) {
|
|
143
|
-
const property = await this.
|
|
150
|
+
const property = await this.propertyMetadata.findOne(cmd.propertyId);
|
|
144
151
|
if (!property) {
|
|
145
152
|
return {
|
|
146
153
|
success: false,
|
|
@@ -166,7 +173,7 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
166
173
|
};
|
|
167
174
|
}
|
|
168
175
|
const channelDevice = channel.device;
|
|
169
|
-
const device = typeof channelDevice === 'string' ? await this.
|
|
176
|
+
const device = typeof channelDevice === 'string' ? await this.deviceGraphs.findOne(channelDevice) : channelDevice;
|
|
170
177
|
if (!device) {
|
|
171
178
|
return {
|
|
172
179
|
success: false,
|
|
@@ -275,6 +282,11 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
275
282
|
ttlMs,
|
|
276
283
|
});
|
|
277
284
|
this.logger.log(`Created intent ${intent.id} for ${targets.length} target(s)${options.requestId ? ` requestId=${options.requestId}` : ''}`);
|
|
285
|
+
this.commandLatencyTraceCollector.observeCommand({
|
|
286
|
+
requestId: options.requestId,
|
|
287
|
+
intentId: intent.id,
|
|
288
|
+
properties: commands,
|
|
289
|
+
});
|
|
278
290
|
const results = [];
|
|
279
291
|
try {
|
|
280
292
|
for (const deviceId of Object.keys(groupedProperties)) {
|
|
@@ -319,9 +331,17 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
319
331
|
const executions = [];
|
|
320
332
|
for (const [deviceId, commands] of Object.entries(groupedProperties)) {
|
|
321
333
|
try {
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
|
|
334
|
+
const command = commands[0];
|
|
335
|
+
const property = command ? await this.propertyMetadata.findOne(command.property) : null;
|
|
336
|
+
const channel = property?.channel;
|
|
337
|
+
const device = channel && typeof channel !== 'string' ? channel.device : null;
|
|
338
|
+
if (channel &&
|
|
339
|
+
typeof channel !== 'string' &&
|
|
340
|
+
channel.id === command.channel &&
|
|
341
|
+
device &&
|
|
342
|
+
typeof device !== 'string' &&
|
|
343
|
+
device.id === deviceId) {
|
|
344
|
+
executions.push({ device: { id: device.id, type: device.type }, commandCount: commands.length });
|
|
325
345
|
}
|
|
326
346
|
}
|
|
327
347
|
catch {
|
|
@@ -331,7 +351,7 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
331
351
|
return this.platformRegistryService.getCommandTtlMs(executions, intents_constants_1.DEFAULT_TTL_DEVICE_COMMAND);
|
|
332
352
|
}
|
|
333
353
|
async processDeviceCommands(deviceId, commands, dispatchOptions) {
|
|
334
|
-
const device = await this.
|
|
354
|
+
const device = await this.deviceGraphs.findOne(deviceId);
|
|
335
355
|
if (!device) {
|
|
336
356
|
this.logger.warn(`Device not found id=${deviceId}`);
|
|
337
357
|
return { device: deviceId, success: false, reason: 'Device not found' };
|
|
@@ -347,13 +367,14 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
347
367
|
}
|
|
348
368
|
const propertyUpdates = [];
|
|
349
369
|
for (const command of commands) {
|
|
350
|
-
const channel =
|
|
370
|
+
const channel = device.channels.find((candidate) => candidate.id === command.channel);
|
|
351
371
|
if (!channel) {
|
|
352
372
|
this.logger.warn(`Channel not found id=${command.channel} for deviceId=${device.id}`);
|
|
353
373
|
return { device: deviceId, success: false, reason: 'Channel not found' };
|
|
354
374
|
}
|
|
355
|
-
const property = await this.
|
|
356
|
-
|
|
375
|
+
const property = await this.propertyMetadata.findOne(command.property);
|
|
376
|
+
const propertyChannelId = typeof property?.channel === 'string' ? property.channel : property?.channel.id;
|
|
377
|
+
if (!property || propertyChannelId !== channel.id) {
|
|
357
378
|
this.logger.warn(`Property not found id=${command.property} for channelId=${channel.id}`);
|
|
358
379
|
return { device: deviceId, success: false, reason: 'Property not found' };
|
|
359
380
|
}
|
|
@@ -366,6 +387,15 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
366
387
|
this.logger.warn(`Invalid value for property id=${property.id} dataType=${property.dataType} reason=${validation.reason}`);
|
|
367
388
|
return { device: deviceId, success: false, reason: validation.reason ?? 'Invalid property value' };
|
|
368
389
|
}
|
|
390
|
+
try {
|
|
391
|
+
property.value = await this.propertyValues.readLatest(property);
|
|
392
|
+
}
|
|
393
|
+
catch (error) {
|
|
394
|
+
this.logger.error(`Failed to load command property value id=${property.id}: ${error instanceof Error ? error.message : String(error)}`);
|
|
395
|
+
}
|
|
396
|
+
if (typeof property.channel !== 'string' && typeof property.channel.device !== 'string') {
|
|
397
|
+
property.channel.device.status = device.status;
|
|
398
|
+
}
|
|
369
399
|
this.logger.log(`Adding command for propertyId=${property.id} value=${validation.value}`);
|
|
370
400
|
propertyUpdates.push({ device, channel, property, value: validation.value });
|
|
371
401
|
}
|
|
@@ -391,7 +421,7 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
391
421
|
}
|
|
392
422
|
async prepareApiPropertyCommand(device, channel, property, value) {
|
|
393
423
|
try {
|
|
394
|
-
const resolvedDevice = typeof device === 'string' ? await this.
|
|
424
|
+
const resolvedDevice = typeof device === 'string' ? await this.deviceGraphs.findOne(device) : device;
|
|
395
425
|
if (resolvedDevice === null) {
|
|
396
426
|
return null;
|
|
397
427
|
}
|
|
@@ -410,7 +440,7 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
410
440
|
this.propertyCommandWindowService.fail(receipt.handle);
|
|
411
441
|
}
|
|
412
442
|
async usesAuthoritativePropertyReadback(device, property, update) {
|
|
413
|
-
const resolvedDevice = typeof device === 'string' ? await this.
|
|
443
|
+
const resolvedDevice = typeof device === 'string' ? await this.deviceGraphs.findOne(device) : device;
|
|
414
444
|
const effectiveProperty = update
|
|
415
445
|
? Object.setPrototypeOf({ ...property, ...update }, Reflect.getPrototypeOf(property))
|
|
416
446
|
: property;
|
|
@@ -421,12 +451,15 @@ let PropertyCommandService = class PropertyCommandService {
|
|
|
421
451
|
exports.PropertyCommandService = PropertyCommandService;
|
|
422
452
|
exports.PropertyCommandService = PropertyCommandService = __decorate([
|
|
423
453
|
(0, common_1.Injectable)(),
|
|
424
|
-
|
|
454
|
+
__param(8, (0, common_1.Optional)()),
|
|
455
|
+
__metadata("design:paramtypes", [device_command_graph_service_1.DeviceCommandGraphService,
|
|
425
456
|
channels_service_1.ChannelsService,
|
|
426
|
-
|
|
457
|
+
property_metadata_service_1.PropertyMetadataService,
|
|
458
|
+
property_value_service_1.PropertyValueService,
|
|
427
459
|
platform_registry_service_1.PlatformRegistryService,
|
|
428
460
|
intents_service_1.IntentsService,
|
|
429
461
|
property_command_dispatch_service_1.PropertyCommandDispatchService,
|
|
430
|
-
property_command_window_service_1.PropertyCommandWindowService
|
|
462
|
+
property_command_window_service_1.PropertyCommandWindowService,
|
|
463
|
+
command_latency_trace_collector_service_1.CommandLatencyTraceCollectorService])
|
|
431
464
|
], PropertyCommandService);
|
|
432
465
|
//# sourceMappingURL=property-command.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-command.service.js","sourceRoot":"","sources":["../../../../src/modules/devices/services/property-command.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAE3C,2CAA4C;AAE5C,8FAAwF;AACxF,2EAAmE;AACnE,8DAA2D;AAC3D,uEAA6G;AAE7G,4EAAwE;AACxE,iEAAuD;AAEvD,+EAAoF;AACpF,4DAA4F;AAC5F,sEAA0F;AAK1F,wFAA2G;AAE3G,+EAA0E;AAC1E,yDAAqD;AACrD,uDAAmD;AACnD,2EAAsE;AACtE,2FAAqF;AACrF,uFAA8G;AAoCvG,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAGlC,YACkB,cAA8B,EAC9B,eAAgC,EAChC,yBAAoD,EACpD,uBAAgD,EAChD,cAA8B,EAC9B,8BAA8D,EAC9D,4BAA0D;QAN1D,mBAAc,GAAd,cAAc,CAAgB;QAC9B,oBAAe,GAAf,eAAe,CAAiB;QAChC,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mCAA8B,GAA9B,8BAA8B,CAAgC;QAC9D,iCAA4B,GAA5B,4BAA4B,CAA8B;QAT3D,WAAM,GAAG,IAAA,gDAAq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CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACvG,MAAM,iBAAiB,GAAG,MAAM;YAC/B,CAAC,CAAE,MAAM,CAAC,cAAc,CAAC,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAA2B;YAChH,CAAC,CAAC,QAAQ,CAAC;QAEZ,OAAO,CACN,cAAc,KAAK,IAAI;YACvB,IAAI,CAAC,uBAAuB,CAAC,iCAAiC,CAAC,cAAc,EAAE,iBAAiB,CAAC,CACjG,CAAC;IACH,CAAC;CACD,CAAA;AAplBY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAKsB,gCAAc;QACb,kCAAe;QACL,uDAAyB;QAC3B,mDAAuB;QAChC,gCAAc;QACE,kEAA8B;QAChC,8DAA4B;GAVhE,sBAAsB,CAolBlC"}
|
|
1
|
+
{"version":3,"file":"property-command.service.js","sourceRoot":"","sources":["../../../../src/modules/devices/services/property-command.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qDAA2C;AAE3C,2CAAsD;AAEtD,8FAAwF;AACxF,2EAAmE;AACnE,8DAA2D;AAC3D,uEAA6G;AAE7G,4EAAwE;AACxE,iEAAuD;AAEvD,+EAAoF;AACpF,4DAA4F;AAC5F,sEAA0F;AAK1F,wFAA2G;AAE3G,yDAAqD;AACrD,uGAAgG;AAChG,iFAA2E;AAC3E,2EAAsE;AACtE,2FAAqF;AACrF,uFAA8G;AAC9G,2EAAsE;AACtE,qEAAgE;AAoCzD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAGlC,YACkB,YAAuC,EACvC,eAAgC,EAChC,gBAAyC,EACzC,cAAoC,EACpC,uBAAgD,EAChD,cAA8B,EAC9B,8BAA8D,EAC9D,4BAA0D,EAE3E,+BAAqF,IAAI,6EAAmC,EAAE;QAT7G,iBAAY,GAAZ,YAAY,CAA2B;QACvC,oBAAe,GAAf,eAAe,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veEvent, TransactionCommitEvent, TransactionRollbackEvent, UpdateEvent } from 'typeorm';
|
|
2
|
+
import { OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
|
3
|
+
import { ConfigService as NestConfigService } from '@nestjs/config';
|
|
4
|
+
import { ChannelPropertyEntity, DeviceEntity } from '../entities/devices.entity';
|
|
5
|
+
export declare class PropertyMetadataService implements EntitySubscriberInterface, OnModuleInit, OnModuleDestroy {
|
|
6
|
+
private readonly dataSource;
|
|
7
|
+
private readonly logger;
|
|
8
|
+
private readonly enabled;
|
|
9
|
+
private generation;
|
|
10
|
+
private readonly catalog;
|
|
11
|
+
private readonly loading;
|
|
12
|
+
private readonly deviceGraphs;
|
|
13
|
+
private readonly loadingGraphs;
|
|
14
|
+
private readonly dirtyTransactions;
|
|
15
|
+
constructor(dataSource: DataSource, configService?: NestConfigService);
|
|
16
|
+
onModuleInit(): Promise<void>;
|
|
17
|
+
onModuleDestroy(): void;
|
|
18
|
+
findOne(id: string): Promise<ChannelPropertyEntity | null>;
|
|
19
|
+
findDevice(id: string): Promise<DeviceEntity | null>;
|
|
20
|
+
beforeInsert(event: InsertEvent<unknown>): void;
|
|
21
|
+
afterInsert(event: InsertEvent<unknown>): void;
|
|
22
|
+
beforeUpdate(event: UpdateEvent<unknown>): void;
|
|
23
|
+
afterUpdate(event: UpdateEvent<unknown>): void;
|
|
24
|
+
beforeRemove(event: RemoveEvent<unknown>): void;
|
|
25
|
+
afterRemove(event: RemoveEvent<unknown>): void;
|
|
26
|
+
afterTransactionCommit(event: TransactionCommitEvent): void;
|
|
27
|
+
afterTransactionRollback(event: TransactionRollbackEvent): void;
|
|
28
|
+
private structuralMutation;
|
|
29
|
+
private transactionSettled;
|
|
30
|
+
getGeneration(): number;
|
|
31
|
+
invalidate(): void;
|
|
32
|
+
private findCached;
|
|
33
|
+
private loadCached;
|
|
34
|
+
private isEagerGraphDependency;
|
|
35
|
+
private copyGraph;
|
|
36
|
+
private query;
|
|
37
|
+
private copy;
|
|
38
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PropertyMetadataService = void 0;
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const config_1 = require("@nestjs/config");
|
|
19
|
+
const logger_1 = require("../../../common/logger");
|
|
20
|
+
const config_utils_1 = require("../../../common/utils/config.utils");
|
|
21
|
+
const space_entity_1 = require("../../spaces/entities/space.entity");
|
|
22
|
+
const devices_constants_1 = require("../devices.constants");
|
|
23
|
+
const device_zone_entity_1 = require("../entities/device-zone.entity");
|
|
24
|
+
const devices_entity_1 = require("../entities/devices.entity");
|
|
25
|
+
const device_graph_query_utils_1 = require("../utils/device-graph-query.utils");
|
|
26
|
+
const property_metadata_utils_1 = require("../utils/property-metadata.utils");
|
|
27
|
+
let PropertyMetadataService = class PropertyMetadataService {
|
|
28
|
+
constructor(dataSource, configService = new config_1.ConfigService()) {
|
|
29
|
+
this.dataSource = dataSource;
|
|
30
|
+
this.logger = (0, logger_1.createExtensionLogger)(devices_constants_1.DEVICES_MODULE_NAME, 'PropertyMetadataService');
|
|
31
|
+
this.generation = 0;
|
|
32
|
+
this.catalog = new Map();
|
|
33
|
+
this.loading = new Map();
|
|
34
|
+
this.deviceGraphs = new Map();
|
|
35
|
+
this.loadingGraphs = new Map();
|
|
36
|
+
this.dirtyTransactions = new WeakSet();
|
|
37
|
+
this.enabled = !(0, config_utils_1.getEnvValue)(configService, 'FB_PROPERTY_VALUE_LOCKS_ENABLED', false);
|
|
38
|
+
this.dataSource.subscribers.push(this);
|
|
39
|
+
}
|
|
40
|
+
async onModuleInit() {
|
|
41
|
+
if (!this.enabled)
|
|
42
|
+
return;
|
|
43
|
+
try {
|
|
44
|
+
const generation = this.generation;
|
|
45
|
+
const properties = await this.query().getMany();
|
|
46
|
+
if (generation === this.generation) {
|
|
47
|
+
for (const property of properties)
|
|
48
|
+
this.catalog.set(property.id, property);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
this.logger.warn(`Could not preload property metadata: ${error instanceof Error ? error.message : String(error)}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
onModuleDestroy() {
|
|
56
|
+
const index = this.dataSource.subscribers.indexOf(this);
|
|
57
|
+
if (index >= 0)
|
|
58
|
+
this.dataSource.subscribers.splice(index, 1);
|
|
59
|
+
this.invalidate();
|
|
60
|
+
}
|
|
61
|
+
async findOne(id) {
|
|
62
|
+
const property = this.enabled
|
|
63
|
+
? await this.findCached(id)
|
|
64
|
+
: await this.query().where('property.id = :id', { id }).getOne();
|
|
65
|
+
if (!property)
|
|
66
|
+
return null;
|
|
67
|
+
const result = this.copy(property);
|
|
68
|
+
result.permissions = [...property.permissions];
|
|
69
|
+
if (Array.isArray(property.format))
|
|
70
|
+
result.format = property.format.slice();
|
|
71
|
+
if (typeof property.channel !== 'string') {
|
|
72
|
+
result.channel = this.copy(property.channel);
|
|
73
|
+
if (typeof property.channel.device !== 'string')
|
|
74
|
+
result.channel.device = this.copy(property.channel.device);
|
|
75
|
+
}
|
|
76
|
+
result.unit = (0, property_metadata_utils_1.resolvePropertyUnit)(result);
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
async findDevice(id) {
|
|
80
|
+
const query = () => (0, device_graph_query_utils_1.buildDeviceGraphQuery)(this.dataSource.getRepository(devices_entity_1.DeviceEntity))
|
|
81
|
+
.callListeners(false)
|
|
82
|
+
.where('device.id = :id', { id })
|
|
83
|
+
.getOne();
|
|
84
|
+
const device = this.enabled
|
|
85
|
+
? await this.loadCached(id, this.deviceGraphs, this.loadingGraphs, query)
|
|
86
|
+
: await query();
|
|
87
|
+
return device ? this.copyGraph(device) : null;
|
|
88
|
+
}
|
|
89
|
+
beforeInsert(event) {
|
|
90
|
+
this.structuralMutation(event);
|
|
91
|
+
}
|
|
92
|
+
afterInsert(event) {
|
|
93
|
+
this.structuralMutation(event);
|
|
94
|
+
}
|
|
95
|
+
beforeUpdate(event) {
|
|
96
|
+
this.structuralMutation(event);
|
|
97
|
+
}
|
|
98
|
+
afterUpdate(event) {
|
|
99
|
+
this.structuralMutation(event);
|
|
100
|
+
}
|
|
101
|
+
beforeRemove(event) {
|
|
102
|
+
this.structuralMutation(event);
|
|
103
|
+
}
|
|
104
|
+
afterRemove(event) {
|
|
105
|
+
this.structuralMutation(event);
|
|
106
|
+
}
|
|
107
|
+
afterTransactionCommit(event) {
|
|
108
|
+
this.transactionSettled(event);
|
|
109
|
+
}
|
|
110
|
+
afterTransactionRollback(event) {
|
|
111
|
+
this.transactionSettled(event);
|
|
112
|
+
}
|
|
113
|
+
structuralMutation(event) {
|
|
114
|
+
if (!event.metadata.inheritanceTree.some((type) => [
|
|
115
|
+
devices_entity_1.ChannelPropertyEntity,
|
|
116
|
+
devices_entity_1.ChannelEntity,
|
|
117
|
+
devices_entity_1.DeviceEntity,
|
|
118
|
+
devices_entity_1.ChannelControlEntity,
|
|
119
|
+
devices_entity_1.DeviceControlEntity,
|
|
120
|
+
device_zone_entity_1.DeviceZoneEntity,
|
|
121
|
+
space_entity_1.SpaceEntity,
|
|
122
|
+
].includes(type)) &&
|
|
123
|
+
!this.isEagerGraphDependency(event.metadata))
|
|
124
|
+
return;
|
|
125
|
+
if (event.queryRunner.isTransactionActive)
|
|
126
|
+
this.dirtyTransactions.add(event.queryRunner);
|
|
127
|
+
this.invalidate();
|
|
128
|
+
}
|
|
129
|
+
transactionSettled(event) {
|
|
130
|
+
if (!this.dirtyTransactions.has(event.queryRunner))
|
|
131
|
+
return;
|
|
132
|
+
this.invalidate();
|
|
133
|
+
if (!event.queryRunner.isTransactionActive)
|
|
134
|
+
this.dirtyTransactions.delete(event.queryRunner);
|
|
135
|
+
}
|
|
136
|
+
getGeneration() {
|
|
137
|
+
return this.generation;
|
|
138
|
+
}
|
|
139
|
+
invalidate() {
|
|
140
|
+
this.generation += 1;
|
|
141
|
+
this.catalog.clear();
|
|
142
|
+
this.deviceGraphs.clear();
|
|
143
|
+
}
|
|
144
|
+
findCached(id) {
|
|
145
|
+
return this.loadCached(id, this.catalog, this.loading, () => this.query().where('property.id = :id', { id }).getOne());
|
|
146
|
+
}
|
|
147
|
+
async loadCached(id, catalog, pending, query) {
|
|
148
|
+
while (true) {
|
|
149
|
+
const cached = catalog.get(id);
|
|
150
|
+
if (cached)
|
|
151
|
+
return cached;
|
|
152
|
+
const generation = this.generation;
|
|
153
|
+
if (pending.get(id)?.generation !== generation) {
|
|
154
|
+
pending.set(id, { generation, promise: query() });
|
|
155
|
+
}
|
|
156
|
+
const loading = pending.get(id);
|
|
157
|
+
try {
|
|
158
|
+
const entity = await loading.promise;
|
|
159
|
+
if (generation === this.generation) {
|
|
160
|
+
if (entity)
|
|
161
|
+
catalog.set(id, entity);
|
|
162
|
+
return entity;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
finally {
|
|
166
|
+
if (pending.get(id) === loading)
|
|
167
|
+
pending.delete(id);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
isEagerGraphDependency(metadata) {
|
|
172
|
+
return (this.dataSource.entityMetadatas ?? []).some((entity) => entity.inheritanceTree.includes(devices_entity_1.DeviceEntity) &&
|
|
173
|
+
entity.relations.some((relation) => relation.isEager &&
|
|
174
|
+
relation.inverseEntityMetadata.inheritanceTree.some((type) => metadata.inheritanceTree.includes(type))));
|
|
175
|
+
}
|
|
176
|
+
copyGraph(value, seen = new Map()) {
|
|
177
|
+
if (value === null || typeof value !== 'object')
|
|
178
|
+
return value;
|
|
179
|
+
if (value instanceof Date)
|
|
180
|
+
return new Date(value.getTime());
|
|
181
|
+
if (seen.has(value))
|
|
182
|
+
return seen.get(value);
|
|
183
|
+
const prototype = Object.getPrototypeOf(value);
|
|
184
|
+
const result = (Array.isArray(value) ? [] : Object.create(prototype));
|
|
185
|
+
seen.set(value, result);
|
|
186
|
+
for (const [key, child] of Object.entries(value))
|
|
187
|
+
result[key] = this.copyGraph(child, seen);
|
|
188
|
+
return result;
|
|
189
|
+
}
|
|
190
|
+
query() {
|
|
191
|
+
return this.dataSource
|
|
192
|
+
.getRepository(devices_entity_1.ChannelPropertyEntity)
|
|
193
|
+
.createQueryBuilder('property')
|
|
194
|
+
.innerJoinAndSelect('property.channel', 'channel')
|
|
195
|
+
.innerJoinAndSelect('channel.device', 'device')
|
|
196
|
+
.callListeners(false);
|
|
197
|
+
}
|
|
198
|
+
copy(entity) {
|
|
199
|
+
const prototype = Object.getPrototypeOf(entity);
|
|
200
|
+
return Object.assign(Object.create(prototype), entity);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
exports.PropertyMetadataService = PropertyMetadataService;
|
|
204
|
+
exports.PropertyMetadataService = PropertyMetadataService = __decorate([
|
|
205
|
+
(0, common_1.Injectable)(),
|
|
206
|
+
__param(1, (0, common_1.Optional)()),
|
|
207
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
|
208
|
+
config_1.ConfigService])
|
|
209
|
+
], PropertyMetadataService);
|
|
210
|
+
//# sourceMappingURL=property-metadata.service.js.map
|