@fastybird/smart-panel-backend 1.1.0-alpha.5 → 1.1.0-alpha.51
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 +9 -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 +21 -4
- 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 +21 -4
- 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 +27 -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 +32 -3
- package/dist/modules/devices/services/channels.properties.service.js +360 -51
- 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 +52 -38
- 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/device-structure-lock.service.d.ts +10 -2
- package/dist/modules/devices/services/device-structure-lock.service.js +86 -7
- package/dist/modules/devices/services/device-structure-lock.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.d.ts +2 -0
- package/dist/modules/devices/services/devices.service.js +78 -64
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/devices/services/module-reset.service.d.ts +3 -1
- package/dist/modules/devices/services/module-reset.service.js +21 -16
- package/dist/modules/devices/services/module-reset.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 +47 -0
- package/dist/modules/devices/services/property-command-dispatch.service.js +231 -0
- package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -0
- package/dist/modules/devices/services/property-command-window.service.d.ts +71 -0
- package/dist/modules/devices/services/property-command-window.service.js +206 -0
- package/dist/modules/devices/services/property-command-window.service.js.map +1 -0
- package/dist/modules/devices/services/property-command.service.d.ts +26 -7
- package/dist/modules/devices/services/property-command.service.js +95 -28
- 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-state-coordinator.service.d.ts +4 -0
- package/dist/modules/devices/services/property-state-coordinator.service.js +35 -0
- package/dist/modules/devices/services/property-state-coordinator.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 +3 -0
- package/dist/modules/devices/services/property-value.service.js +29 -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 +3 -0
- package/dist/modules/system/services/privileged-worker.service.js +62 -27
- 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 +84 -5
- 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 +39 -4
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.js +30 -6
- 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 +17 -1
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.d.ts +7 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +96 -84
- 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 +36 -3
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +707 -42
- 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 +11 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +100 -10
- 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 +15 -2
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +140 -35
- 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 +14 -4
- 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 +19 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js +159 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.d.ts +13 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js +99 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.d.ts +9 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js +94 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.d.ts +9 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js +92 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.d.ts +7 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js +48 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.d.ts +44 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js +369 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.d.ts +24 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js +27 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.d.ts +8 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js +19 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.d.ts +4 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js +20 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.d.ts +21 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js +135 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/scripts/cloudflared-setup.sh +185 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.d.ts +100 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js +564 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.d.ts +22 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js +43 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.d.ts +38 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js +147 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.d.ts +15 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js +55 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.d.ts +8 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js +49 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js.map +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.d.ts +27 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js +139 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js.map +1 -0
- 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 +2 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.d.ts +8 -4
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js +58 -14
- 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 +54 -7
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js +528 -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 +10 -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/scenes-local/platforms/local-scene.platform.d.ts +3 -1
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js +12 -7
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js.map +1 -1
- 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/climate-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js +6 -3
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/covers-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js +6 -3
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js +7 -4
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.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-media-activity.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js +11 -5
- package/dist/plugins/spaces-home-control/services/space-media-activity.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/services/space-undo-history.service.d.ts +3 -1
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js +8 -5
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js.map +1 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailscale-setup.service.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-tailscale/services/tailscale-setup.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2BAA2C;AAC3C,4CAAoB;AACpB,+BAA4B;AAE5B,2CAA4C;AAC5C,2CAAoE;AACpE,yDAAsD;AAEtD,mDAA+D;AAC/D,qEAAiE;AACjE,oFAAgF;AAChF,
|
|
1
|
+
{"version":3,"file":"tailscale-setup.service.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-tailscale/services/tailscale-setup.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2BAA2C;AAC3C,4CAAoB;AACpB,+BAA4B;AAE5B,2CAA4C;AA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CAAC,kBAE/B,CAAC;QAEF,IAAI,OAAO,kBAAkB,CAAC,mBAAmB,KAAK,UAAU,EAAE,CAAC;YAClE,MAAM,kBAAkB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;YAE/D,OAAO;QACR,CAAC;QAED,MAAM,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;IACtD,CAAC;IAEO,SAAS,CAAC,GAAW;QAC5B,IAAI,CAAC,IAAA,eAAU,EAAC,GAAG,CAAC,EAAE,CAAC;YACtB,IAAA,cAAS,EAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAClD,CAAC;IACF,CAAC;CACD,CAAA;AAlNY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAUwB,mDAAuB;QACtB,sBAAiB;QAChB,4DAA2B;QACjC,6BAAa;QACV,kCAAe;QACjB,8BAAa;GAdlC,qBAAqB,CAkNjC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RemoteAccessProviderState } from '../../../modules/remote-access/platforms/remote-access-provider.platform';
|
|
2
|
+
import { UserRole } from '../../../modules/users/users.constants';
|
|
3
|
+
import { RemoteAccessTailscalePluginControlModel } from '../models/status.model';
|
|
4
|
+
import { TailscaleRequirement } from '../services/tailscale-node-managed.service';
|
|
5
|
+
export declare function buildTailscaleControlModel(control: Omit<RemoteAccessTailscalePluginControlModel, 'availableActions'>, state: RemoteAccessProviderState, requirements: TailscaleRequirement[], role: UserRole | undefined): RemoteAccessTailscalePluginControlModel;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildTailscaleControlModel = buildTailscaleControlModel;
|
|
4
|
+
const users_constants_1 = require("../../../modules/users/users.constants");
|
|
5
|
+
const status_model_1 = require("../models/status.model");
|
|
6
|
+
function buildTailscaleControlModel(control, state, requirements, role) {
|
|
7
|
+
const result = Object.assign(new status_model_1.RemoteAccessTailscalePluginControlModel(), control);
|
|
8
|
+
result.availableActions = [];
|
|
9
|
+
if (role !== users_constants_1.UserRole.ADMIN && role !== users_constants_1.UserRole.OWNER) {
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
12
|
+
const stopping = control.operation === 'disconnect' || control.operation === 'shutdown' || control.operation === 'reset';
|
|
13
|
+
if (!stopping && (control.serviceState !== 'stopped' || control.operation !== null)) {
|
|
14
|
+
result.availableActions.push('disconnect');
|
|
15
|
+
}
|
|
16
|
+
if (!control.enabled || control.operation !== null || control.serviceState === 'stopping') {
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
const ready = requirements.length > 0 && requirements.every((requirement) => requirement.satisfied);
|
|
20
|
+
if (!ready) {
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
if (control.authentication === 'authenticated') {
|
|
24
|
+
if (state !== 'connected' && state !== 'connecting' && state !== 'pending-approval') {
|
|
25
|
+
result.availableActions.push('connect');
|
|
26
|
+
}
|
|
27
|
+
if (role === users_constants_1.UserRole.OWNER) {
|
|
28
|
+
result.availableActions.push('logout', 'reset-preferences');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
result.availableActions.push('login');
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=tailscale-control.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailscale-control.utils.js","sourceRoot":"","sources":["../../../../src/plugins/remote-access-tailscale/utils/tailscale-control.utils.ts"],"names":[],"mappings":";;AAMA,gEA6CC;AAlDD,4EAAkE;AAClE,yDAAiF;AAIjF,SAAgB,0BAA0B,CACzC,OAA0E,EAC1E,KAAgC,EAChC,YAAoC,EACpC,IAA0B;IAE1B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,sDAA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AAQ,EAAE,mBAAmB,CAAC,CAAC;QAC7D,CAAC;IACF,CAAC;SAAM,CAAC;QACP,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { ChannelsPropertiesService } from '../../../modules/devices/services/cha
|
|
|
3
3
|
import { ChannelsService } from '../../../modules/devices/services/channels.service';
|
|
4
4
|
import { DevicesService } from '../../../modules/devices/services/devices.service';
|
|
5
5
|
import { PlatformRegistryService } from '../../../modules/devices/services/platform.registry.service';
|
|
6
|
+
import { PropertyCommandDispatchService } from '../../../modules/devices/services/property-command-dispatch.service';
|
|
6
7
|
import { SceneActionEntity, SceneEntity } from '../../../modules/scenes/entities/scenes.entity';
|
|
7
8
|
import { ActionExecutionResultModel } from '../../../modules/scenes/models/scenes.model';
|
|
8
9
|
import { IScenePlatform } from '../../../modules/scenes/services/scene-executor.service';
|
|
@@ -19,9 +20,10 @@ export declare class LocalScenePlatform implements IScenePlatform {
|
|
|
19
20
|
private readonly channelsService;
|
|
20
21
|
private readonly channelsPropertiesService;
|
|
21
22
|
private readonly platformRegistryService;
|
|
23
|
+
private readonly propertyCommandDispatchService;
|
|
22
24
|
private readonly spacesService;
|
|
23
25
|
private readonly logger;
|
|
24
|
-
constructor(devicesService: DevicesService, channelsService: ChannelsService, channelsPropertiesService: ChannelsPropertiesService, platformRegistryService: PlatformRegistryService, spacesService: SpacesService);
|
|
26
|
+
constructor(devicesService: DevicesService, channelsService: ChannelsService, channelsPropertiesService: ChannelsPropertiesService, platformRegistryService: PlatformRegistryService, propertyCommandDispatchService: PropertyCommandDispatchService, spacesService: SpacesService);
|
|
25
27
|
getType(): string;
|
|
26
28
|
getCommandTtlMs(actions: readonly SceneActionEntity[]): Promise<number>;
|
|
27
29
|
validateSpace(spaceId: string): Promise<void>;
|
|
@@ -17,6 +17,7 @@ const channels_properties_service_1 = require("../../../modules/devices/services
|
|
|
17
17
|
const channels_service_1 = require("../../../modules/devices/services/channels.service");
|
|
18
18
|
const devices_service_1 = require("../../../modules/devices/services/devices.service");
|
|
19
19
|
const platform_registry_service_1 = require("../../../modules/devices/services/platform.registry.service");
|
|
20
|
+
const property_command_dispatch_service_1 = require("../../../modules/devices/services/property-command-dispatch.service");
|
|
20
21
|
const intents_constants_1 = require("../../../modules/intents/intents.constants");
|
|
21
22
|
const scenes_exceptions_1 = require("../../../modules/scenes/scenes.exceptions");
|
|
22
23
|
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
@@ -26,11 +27,12 @@ function isLocalSceneAction(action) {
|
|
|
26
27
|
return action.type === scenes_local_constants_1.SCENES_LOCAL_TYPE && 'deviceId' in action && 'propertyId' in action && 'value' in action;
|
|
27
28
|
}
|
|
28
29
|
let LocalScenePlatform = class LocalScenePlatform {
|
|
29
|
-
constructor(devicesService, channelsService, channelsPropertiesService, platformRegistryService, spacesService) {
|
|
30
|
+
constructor(devicesService, channelsService, channelsPropertiesService, platformRegistryService, propertyCommandDispatchService, spacesService) {
|
|
30
31
|
this.devicesService = devicesService;
|
|
31
32
|
this.channelsService = channelsService;
|
|
32
33
|
this.channelsPropertiesService = channelsPropertiesService;
|
|
33
34
|
this.platformRegistryService = platformRegistryService;
|
|
35
|
+
this.propertyCommandDispatchService = propertyCommandDispatchService;
|
|
34
36
|
this.spacesService = spacesService;
|
|
35
37
|
this.logger = (0, logger_1.createExtensionLogger)(scenes_local_constants_1.SCENES_LOCAL_PLUGIN_NAME, 'LocalScenePlatform');
|
|
36
38
|
}
|
|
@@ -192,12 +194,14 @@ let LocalScenePlatform = class LocalScenePlatform {
|
|
|
192
194
|
});
|
|
193
195
|
continue;
|
|
194
196
|
}
|
|
195
|
-
const success = await
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
const { success } = await this.propertyCommandDispatchService.dispatchBatch([
|
|
198
|
+
{
|
|
199
|
+
device,
|
|
200
|
+
channel,
|
|
201
|
+
property,
|
|
202
|
+
value: action.value,
|
|
203
|
+
},
|
|
204
|
+
]);
|
|
201
205
|
results.push({
|
|
202
206
|
actionId: action.id,
|
|
203
207
|
success,
|
|
@@ -234,6 +238,7 @@ exports.LocalScenePlatform = LocalScenePlatform = __decorate([
|
|
|
234
238
|
channels_service_1.ChannelsService,
|
|
235
239
|
channels_properties_service_1.ChannelsPropertiesService,
|
|
236
240
|
platform_registry_service_1.PlatformRegistryService,
|
|
241
|
+
property_command_dispatch_service_1.PropertyCommandDispatchService,
|
|
237
242
|
spaces_service_1.SpacesService])
|
|
238
243
|
], LocalScenePlatform);
|
|
239
244
|
//# sourceMappingURL=local-scene.platform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-scene.platform.js","sourceRoot":"","sources":["../../../../src/plugins/scenes-local/platforms/local-scene.platform.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,mDAA+D;AAC/D,kFAA4E;AAE5E,+GAA0G;AAC1G,yFAAqF;AACrF,uFAAmF;AACnF,2GAAsG;AACtG,kFAA+E;AAG/E,iFAGmD;AAEnD,oFAAgF;AAChF,+EAAqE;AAErE,sEAAwF;AAaxF,SAAS,kBAAkB,CAAC,MAAyB;IACpD,OAAO,MAAM,CAAC,IAAI,KAAK,0CAAiB,IAAI,UAAU,IAAI,MAAM,IAAI,YAAY,IAAI,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC;AACjH,CAAC;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAG9B,YACkB,cAA8B,EAC9B,eAAgC,EAChC,yBAAoD,EACpD,uBAAgD,EAChD,aAA4B;
|
|
1
|
+
{"version":3,"file":"local-scene.platform.js","sourceRoot":"","sources":["../../../../src/plugins/scenes-local/platforms/local-scene.platform.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,mDAA+D;AAC/D,kFAA4E;A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+B,CAAC,MAAM,CAAC,KAAK,IAAI,0BAA0B,CAAC,CAAC;YACvF,CAAC;QACF,CAAC;IACF,CAAC;CACD,CAAA;AAvRY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAKsB,gCAAc;QACb,kCAAe;QACL,uDAAyB;QAC3B,mDAAuB;QAChB,kEAA8B;QAC/C,8BAAa;GATlC,kBAAkB,CAuR9B"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { ConnectionState } from '../../../modules/devices/devices.constants';
|
|
2
2
|
import { DeviceResponseModel } from '../../../modules/devices/models/devices-response.model';
|
|
3
|
+
import { ChannelInputOccurrencesService } from '../../../modules/devices/services/channel-input-occurrences.service';
|
|
3
4
|
import { ChannelsPropertiesService } from '../../../modules/devices/services/channels.properties.service';
|
|
5
|
+
import { ChannelsService } from '../../../modules/devices/services/channels.service';
|
|
4
6
|
import { DeviceConnectivityService } from '../../../modules/devices/services/device-connectivity.service';
|
|
5
7
|
import { DevicesService } from '../../../modules/devices/services/devices.service';
|
|
6
8
|
import { ReqGenerateDeviceDto } from '../dto/generate-device.dto';
|
|
9
|
+
import { ReqSimulateOccurrenceDto } from '../dto/simulate-occurrence.dto';
|
|
7
10
|
import { ReqSimulateValueDto } from '../dto/simulate-value.dto';
|
|
8
|
-
import { ConnectionStateResponseModel, DeviceCategoriesResponseModel, SimulatedValueResponseModel } from '../models/simulator-response.model';
|
|
11
|
+
import { ConnectionStateResponseModel, DeviceCategoriesResponseModel, SimulatedOccurrenceResponseModel, SimulatedValueResponseModel } from '../models/simulator-response.model';
|
|
9
12
|
import { DeviceGeneratorService } from '../services/device-generator.service';
|
|
10
13
|
export declare class SimulatorController {
|
|
11
14
|
private readonly devicesService;
|
|
15
|
+
private readonly channelsService;
|
|
12
16
|
private readonly channelsPropertiesService;
|
|
13
17
|
private readonly deviceConnectivityService;
|
|
14
18
|
private readonly deviceGeneratorService;
|
|
19
|
+
private readonly channelInputOccurrencesService;
|
|
15
20
|
private readonly logger;
|
|
16
|
-
constructor(devicesService: DevicesService, channelsPropertiesService: ChannelsPropertiesService, deviceConnectivityService: DeviceConnectivityService, deviceGeneratorService: DeviceGeneratorService);
|
|
21
|
+
constructor(devicesService: DevicesService, channelsService: ChannelsService, channelsPropertiesService: ChannelsPropertiesService, deviceConnectivityService: DeviceConnectivityService, deviceGeneratorService: DeviceGeneratorService, channelInputOccurrencesService: ChannelInputOccurrencesService);
|
|
17
22
|
getCategories(): DeviceCategoriesResponseModel;
|
|
18
23
|
generateDevice(body: ReqGenerateDeviceDto): Promise<DeviceResponseModel>;
|
|
19
24
|
simulateValue(deviceId: string, body: ReqSimulateValueDto): Promise<SimulatedValueResponseModel>;
|
|
@@ -22,6 +27,7 @@ export declare class SimulatorController {
|
|
|
22
27
|
state?: ConnectionState;
|
|
23
28
|
};
|
|
24
29
|
}): Promise<ConnectionStateResponseModel>;
|
|
30
|
+
simulateOccurrence(deviceId: string, body: ReqSimulateOccurrenceDto): Promise<SimulatedOccurrenceResponseModel>;
|
|
25
31
|
simulateAllValues(deviceId: string): Promise<DeviceResponseModel>;
|
|
26
32
|
private formatCategoryName;
|
|
27
33
|
}
|
|
@@ -20,22 +20,27 @@ const transform_utils_1 = require("../../../common/utils/transform.utils");
|
|
|
20
20
|
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
21
21
|
const devices_exceptions_1 = require("../../../modules/devices/devices.exceptions");
|
|
22
22
|
const devices_response_model_1 = require("../../../modules/devices/models/devices-response.model");
|
|
23
|
+
const channel_input_occurrences_service_1 = require("../../../modules/devices/services/channel-input-occurrences.service");
|
|
23
24
|
const channels_properties_service_1 = require("../../../modules/devices/services/channels.properties.service");
|
|
25
|
+
const channels_service_1 = require("../../../modules/devices/services/channels.service");
|
|
24
26
|
const device_connectivity_service_1 = require("../../../modules/devices/services/device-connectivity.service");
|
|
25
27
|
const devices_service_1 = require("../../../modules/devices/services/devices.service");
|
|
26
28
|
const schema_utils_1 = require("../../../modules/devices/utils/schema.utils");
|
|
27
29
|
const api_documentation_decorator_1 = require("../../../modules/swagger/decorators/api-documentation.decorator");
|
|
28
30
|
const generate_device_dto_1 = require("../dto/generate-device.dto");
|
|
31
|
+
const simulate_occurrence_dto_1 = require("../dto/simulate-occurrence.dto");
|
|
29
32
|
const simulate_value_dto_1 = require("../dto/simulate-value.dto");
|
|
30
33
|
const simulator_response_model_1 = require("../models/simulator-response.model");
|
|
31
34
|
const device_generator_service_1 = require("../services/device-generator.service");
|
|
32
35
|
const simulator_constants_1 = require("../simulator.constants");
|
|
33
36
|
let SimulatorController = class SimulatorController {
|
|
34
|
-
constructor(devicesService, channelsPropertiesService, deviceConnectivityService, deviceGeneratorService) {
|
|
37
|
+
constructor(devicesService, channelsService, channelsPropertiesService, deviceConnectivityService, deviceGeneratorService, channelInputOccurrencesService) {
|
|
35
38
|
this.devicesService = devicesService;
|
|
39
|
+
this.channelsService = channelsService;
|
|
36
40
|
this.channelsPropertiesService = channelsPropertiesService;
|
|
37
41
|
this.deviceConnectivityService = deviceConnectivityService;
|
|
38
42
|
this.deviceGeneratorService = deviceGeneratorService;
|
|
43
|
+
this.channelInputOccurrencesService = channelInputOccurrencesService;
|
|
39
44
|
this.logger = (0, extension_logger_service_1.createExtensionLogger)(simulator_constants_1.SIMULATOR_PLUGIN_NAME, 'SimulatorController');
|
|
40
45
|
}
|
|
41
46
|
getCategories() {
|
|
@@ -136,6 +141,70 @@ let SimulatorController = class SimulatorController {
|
|
|
136
141
|
};
|
|
137
142
|
return (0, transform_utils_1.toInstance)(simulator_response_model_1.ConnectionStateResponseModel, { data: result }, { excludeExtraneousValues: true });
|
|
138
143
|
}
|
|
144
|
+
async simulateOccurrence(deviceId, body) {
|
|
145
|
+
const dto = body.data;
|
|
146
|
+
this.logger.debug(`Simulating input occurrence for device=${deviceId}, channel=${dto.channel_id}, event=${dto.event}`);
|
|
147
|
+
const device = await this.devicesService.findOne(deviceId, simulator_constants_1.SIMULATOR_TYPE);
|
|
148
|
+
if (!device) {
|
|
149
|
+
throw new devices_exceptions_1.DevicesNotFoundException(`Simulator device ${deviceId} not found`);
|
|
150
|
+
}
|
|
151
|
+
const channel = await this.channelsService.findOne(dto.channel_id);
|
|
152
|
+
if (!channel) {
|
|
153
|
+
throw new devices_exceptions_1.DevicesNotFoundException(`Channel ${dto.channel_id} not found`);
|
|
154
|
+
}
|
|
155
|
+
const channelDeviceId = typeof channel.device === 'string' ? channel.device : channel.device?.id;
|
|
156
|
+
if (channelDeviceId !== deviceId) {
|
|
157
|
+
throw new devices_exceptions_1.DevicesNotFoundException(`Channel ${dto.channel_id} does not belong to device ${deviceId}`);
|
|
158
|
+
}
|
|
159
|
+
let propertyId = dto.property_id;
|
|
160
|
+
if (!propertyId) {
|
|
161
|
+
const channelProps = await this.channelsPropertiesService.findAll(channel.id);
|
|
162
|
+
const eventProp = channelProps.find((p) => p.category === devices_constants_1.PropertyCategory.EVENT || p.permissions.includes(devices_constants_1.PermissionType.EVENT_ONLY));
|
|
163
|
+
if (!eventProp) {
|
|
164
|
+
throw new common_1.BadRequestException(`No event property found on channel ${dto.channel_id}`);
|
|
165
|
+
}
|
|
166
|
+
propertyId = eventProp.id;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
const property = await this.channelsPropertiesService.findOne(propertyId);
|
|
170
|
+
if (!property) {
|
|
171
|
+
throw new devices_exceptions_1.DevicesNotFoundException(`Property ${propertyId} not found`);
|
|
172
|
+
}
|
|
173
|
+
const propChannelId = typeof property.channel === 'string' ? property.channel : property.channel?.id;
|
|
174
|
+
if (propChannelId !== dto.channel_id) {
|
|
175
|
+
throw new common_1.BadRequestException(`Property ${propertyId} does not belong to channel ${dto.channel_id}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
let payload;
|
|
179
|
+
try {
|
|
180
|
+
payload = await this.channelInputOccurrencesService.publishOccurrence({
|
|
181
|
+
deviceId,
|
|
182
|
+
channelId: dto.channel_id,
|
|
183
|
+
propertyId,
|
|
184
|
+
event: dto.event,
|
|
185
|
+
sourceTimestamp: dto.source_timestamp,
|
|
186
|
+
sourceOccurrenceId: dto.source_occurrence_id,
|
|
187
|
+
nativeEventType: dto.native_event_type,
|
|
188
|
+
data: dto.data,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
if (error instanceof devices_exceptions_1.DevicesValidationException) {
|
|
193
|
+
throw new common_1.UnprocessableEntityException(error.message);
|
|
194
|
+
}
|
|
195
|
+
throw error;
|
|
196
|
+
}
|
|
197
|
+
const result = {
|
|
198
|
+
occurrence_id: payload?.id ?? null,
|
|
199
|
+
channel_id: dto.channel_id,
|
|
200
|
+
property_id: propertyId,
|
|
201
|
+
event: dto.event,
|
|
202
|
+
timestamp: payload?.timestamp ?? new Date().toISOString(),
|
|
203
|
+
dropped: payload === null,
|
|
204
|
+
success: true,
|
|
205
|
+
};
|
|
206
|
+
return (0, transform_utils_1.toInstance)(simulator_response_model_1.SimulatedOccurrenceResponseModel, { data: result }, { excludeExtraneousValues: true });
|
|
207
|
+
}
|
|
139
208
|
async simulateAllValues(deviceId) {
|
|
140
209
|
this.logger.debug(`Simulating all values for device=${deviceId}`);
|
|
141
210
|
const device = await this.devicesService.findOne(deviceId, simulator_constants_1.SIMULATOR_TYPE);
|
|
@@ -145,6 +214,9 @@ let SimulatorController = class SimulatorController {
|
|
|
145
214
|
for (const channel of device.channels) {
|
|
146
215
|
const allProperties = (0, schema_utils_1.getAllProperties)(channel.category);
|
|
147
216
|
for (const property of channel.properties) {
|
|
217
|
+
if (property.permissions.includes(devices_constants_1.PermissionType.EVENT_ONLY)) {
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
148
220
|
const propMeta = allProperties.find((p) => p.category === property.category);
|
|
149
221
|
if (propMeta) {
|
|
150
222
|
const value = this.deviceGeneratorService.generateRandomValue(propMeta);
|
|
@@ -271,6 +343,32 @@ __decorate([
|
|
|
271
343
|
__metadata("design:paramtypes", [String, Object]),
|
|
272
344
|
__metadata("design:returntype", Promise)
|
|
273
345
|
], SimulatorController.prototype, "simulateConnectionState", null);
|
|
346
|
+
__decorate([
|
|
347
|
+
(0, swagger_1.ApiOperation)({
|
|
348
|
+
summary: 'Simulate a hardware input occurrence',
|
|
349
|
+
description: 'Emits a deterministic hardware input occurrence (e.g. button press, double press, long press, down, up) through the DevicesModule occurrence delivery pipeline.',
|
|
350
|
+
operationId: 'simulate-simulator-plugin-occurrence',
|
|
351
|
+
}),
|
|
352
|
+
(0, swagger_1.ApiParam)({
|
|
353
|
+
name: 'deviceId',
|
|
354
|
+
description: 'Device UUID',
|
|
355
|
+
type: 'string',
|
|
356
|
+
format: 'uuid',
|
|
357
|
+
}),
|
|
358
|
+
(0, swagger_1.ApiBody)({
|
|
359
|
+
type: simulate_occurrence_dto_1.ReqSimulateOccurrenceDto,
|
|
360
|
+
description: 'Input occurrence simulation parameters',
|
|
361
|
+
}),
|
|
362
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(simulator_response_model_1.SimulatedOccurrenceResponseModel, 'Occurrence simulation result'),
|
|
363
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Device, channel, or property not found'),
|
|
364
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid simulation parameters or device is not a simulator device'),
|
|
365
|
+
(0, common_1.Post)(':deviceId/simulate-occurrence'),
|
|
366
|
+
__param(0, (0, common_1.Param)('deviceId', common_1.ParseUUIDPipe)),
|
|
367
|
+
__param(1, (0, common_1.Body)()),
|
|
368
|
+
__metadata("design:type", Function),
|
|
369
|
+
__metadata("design:paramtypes", [String, simulate_occurrence_dto_1.ReqSimulateOccurrenceDto]),
|
|
370
|
+
__metadata("design:returntype", Promise)
|
|
371
|
+
], SimulatorController.prototype, "simulateOccurrence", null);
|
|
274
372
|
__decorate([
|
|
275
373
|
(0, swagger_1.ApiOperation)({
|
|
276
374
|
summary: 'Simulate random values for all properties',
|
|
@@ -296,8 +394,10 @@ exports.SimulatorController = SimulatorController = __decorate([
|
|
|
296
394
|
(0, swagger_1.ApiTags)(simulator_constants_1.SIMULATOR_PLUGIN_API_TAG_NAME),
|
|
297
395
|
(0, common_1.Controller)('simulator'),
|
|
298
396
|
__metadata("design:paramtypes", [devices_service_1.DevicesService,
|
|
397
|
+
channels_service_1.ChannelsService,
|
|
299
398
|
channels_properties_service_1.ChannelsPropertiesService,
|
|
300
399
|
device_connectivity_service_1.DeviceConnectivityService,
|
|
301
|
-
device_generator_service_1.DeviceGeneratorService
|
|
400
|
+
device_generator_service_1.DeviceGeneratorService,
|
|
401
|
+
channel_input_occurrences_service_1.ChannelInputOccurrencesService])
|
|
302
402
|
], SimulatorController);
|
|
303
403
|
//# sourceMappingURL=simulator.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulator.controller.js","sourceRoot":"","sources":["../../../../src/plugins/simulator/controllers/simulator.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwG;AACxG,6CAA2E;AAE3E,8FAAgH;AAChH,2EAAmE;AACnE,kFAA6F;AAC7F,oFAAuF;AAEvF,mGAA6F;AAC7F,+GAA0G;AAC1G,+GAA0G;AAC1G,uFAAmF;AACnF,8EAA+E;AAC/E,iHAMyE;AACzE,oEAAkE;AAClE,kEAAgE;AAEhE,iFAO4C;AAC5C,mFAA8E;AAC9E,gEAA8G;AAIvG,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAG/B,YACkB,cAA8B,EAC9B,yBAAoD,EACpD,yBAAoD,EACpD,sBAA8C;QAH9C,mBAAc,GAAd,cAAc,CAAgB;QAC9B,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,2BAAsB,GAAtB,sBAAsB,CAAwB;QAN/C,WAAM,GAA2B,IAAA,gDAAqB,EAAC,2CAAqB,EAAE,qBAAqB,CAAC,CAAC;IAOnH,CAAC;IAUJ,aAAa;QACZ,IAAI,CAA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"simulator.controller.js","sourceRoot":"","sources":["../../../../src/plugins/simulator/controllers/simulator.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CASwB;AACxB,6CAA2E;AAE3E,8FAAgH;AAChH,2EAAmE;AACnE,kFAKoD;AACpD,oFAAmH;AAGnH,mGAA6F;AAC7F,2HAAqH;AACrH,+GAA0G;AAC1G,yFAAqF;AACrF,+GAA0G;AAC1G,uFAAmF;AACnF,8EAA+E;AAC/E,iHAMyE;AACzE,oEAAkE;AAClE,4EAA0E;AAC1E,kEAAgE;AAEhE,iFAS4C;AAC5C,mFAA8E;AAC9E,gEAA8G;AAIvG,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAG/B,YACkB,cAA8B,EAC9B,eAAgC,EAChC,yBAAoD,EACpD,yBAAoD,EACpD,sBAA8C,EAC9C,8BAA8D;QAL9D,mBAAc,GAAd,cAAc,CAAgB;QAC9B,oBAAe,GAAf,eAAe,CAAiB;QAChC,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,mCAA8B,GAA9B,8BAA8B,CAAgC;QAR/D,WAAM,GAA2B,IAAA,gDAAqB,EAAC,2CAAqB,EAAE,qBAAqB,CAAC,CAAC;IASnH,CAAC;IAUJ,aAAa;QACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAE1D,MAAM,UAAU,GAA0B,EAAE,CAAC;QAE7C,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,kCAAc,CAAC,EAAE,CAAC;YACtD,UAAU,CAAC,IAAI,CAAC;gBACf,QAAQ;gBACR,IAAI,EAAE,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC;gBACvC,WAAW,EAAE,EAAE;aACf,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,4BAAU,EAAC,wDAA6B,EAAE,E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E,wCAAwC;KACrD,CAAC;IACD,IAAA,gDAAkB,EAAC,2DAAgC,EAAE,8BAA8B,CAAC;IACpF,IAAA,iDAAmB,EAAC,wCAAwC,CAAC;IAC7D,IAAA,mDAAqB,EAAC,mEAAmE,CAAC;IAC1F,IAAA,aAAI,EAAC,+BAA+B,CAAC;IAEpC,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,sBAAa,CAAC,CAAA;IAChC,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,kDAAwB;;6DA+EtC;AAkBK;IAhBL,IAAA,sBAAY,EAAC;QACb,OAAO,EAAE,2CAA2C;QACpD,WAAW,EACV,4HAA4H;QAC7H,WAAW,EAAE,sCAAsC;KACnD,CAAC;IACD,IAAA,kBAAQ,EAAC;QACT,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,MAAM;KACd,CAAC;IACD,IAAA,gDAAkB,EAAC,4CAAmB,EAAE,gCAAgC,CAAC;IACzE,IAAA,iDAAmB,EAAC,kBAAkB,CAAC;IACvC,IAAA,mDAAqB,EAAC,kCAAkC,CAAC;IACzD,IAAA,aAAI,EAAC,wBAAwB,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,sBAAa,CAAC,CAAA;;;;4DA2CxD;8BAxZW,mBAAmB;IAF/B,IAAA,iBAAO,EAAC,mDAA6B,CAAC;IACtC,IAAA,mBAAU,EAAC,WAAW,CAAC;qCAKW,gCAAc;QACb,kCAAe;QACL,uDAAyB;QACzB,uDAAyB;QAC5B,iDAAsB;QACd,kEAA8B;GATpE,mBAAmB,CAma/B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class SimulateOccurrenceDto {
|
|
2
|
+
channel_id: string;
|
|
3
|
+
property_id?: string;
|
|
4
|
+
event: string;
|
|
5
|
+
source_timestamp?: string;
|
|
6
|
+
source_occurrence_id?: string;
|
|
7
|
+
native_event_type?: string;
|
|
8
|
+
data?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ReqSimulateOccurrenceDto {
|
|
11
|
+
data: SimulateOccurrenceDto;
|
|
12
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ReqSimulateOccurrenceDto = exports.SimulateOccurrenceDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
+
let SimulateOccurrenceDto = class SimulateOccurrenceDto {
|
|
17
|
+
};
|
|
18
|
+
exports.SimulateOccurrenceDto = SimulateOccurrenceDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({
|
|
21
|
+
description: 'Channel ID where the input occurrence happened',
|
|
22
|
+
name: 'channel_id',
|
|
23
|
+
type: 'string',
|
|
24
|
+
format: 'uuid',
|
|
25
|
+
example: '123e4567-e89b-12d3-a456-426614174000',
|
|
26
|
+
}),
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)({ message: '[{"field":"channel_id","reason":"Channel ID is required."}]' }),
|
|
29
|
+
(0, class_validator_1.IsUUID)('4', { message: '[{"field":"channel_id","reason":"Channel ID must be a valid UUID."}]' }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], SimulateOccurrenceDto.prototype, "channel_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
34
|
+
description: 'Property ID for event occurrence (if omitted, auto-detected from channel event property)',
|
|
35
|
+
name: 'property_id',
|
|
36
|
+
type: 'string',
|
|
37
|
+
format: 'uuid',
|
|
38
|
+
example: '123e4567-e89b-12d3-a456-426614174001',
|
|
39
|
+
}),
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsUUID)('4', { message: '[{"field":"property_id","reason":"Property ID must be a valid UUID."}]' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], SimulateOccurrenceDto.prototype, "property_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({
|
|
47
|
+
description: 'Normalized input event interaction (e.g. press, double_press, long_press, triple_press, down, up)',
|
|
48
|
+
type: 'string',
|
|
49
|
+
example: 'press',
|
|
50
|
+
}),
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
(0, class_validator_1.IsNotEmpty)({ message: '[{"field":"event","reason":"Event is required."}]' }),
|
|
53
|
+
(0, class_validator_1.IsString)({ message: '[{"field":"event","reason":"Event must be a string."}]' }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], SimulateOccurrenceDto.prototype, "event", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
description: 'Optional ISO timestamp or epoch from device hardware clock',
|
|
59
|
+
name: 'source_timestamp',
|
|
60
|
+
type: 'string',
|
|
61
|
+
example: '2026-09-20T10:00:00.000Z',
|
|
62
|
+
}),
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsString)({ message: '[{"field":"source_timestamp","reason":"Source timestamp must be a string."}]' }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], SimulateOccurrenceDto.prototype, "source_timestamp", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
70
|
+
description: 'Optional native event_cnt, packet ID, or sequence number for transport deduplication',
|
|
71
|
+
name: 'source_occurrence_id',
|
|
72
|
+
type: 'string',
|
|
73
|
+
example: 'seq-42',
|
|
74
|
+
}),
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
(0, class_validator_1.IsString)({ message: '[{"field":"source_occurrence_id","reason":"Source occurrence ID must be a string."}]' }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], SimulateOccurrenceDto.prototype, "source_occurrence_id", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
82
|
+
description: 'Original provider event string (e.g. single_push, btn_down)',
|
|
83
|
+
name: 'native_event_type',
|
|
84
|
+
type: 'string',
|
|
85
|
+
example: 'single_push',
|
|
86
|
+
}),
|
|
87
|
+
(0, class_transformer_1.Expose)(),
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
(0, class_validator_1.IsString)({ message: '[{"field":"native_event_type","reason":"Native event type must be a string."}]' }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], SimulateOccurrenceDto.prototype, "native_event_type", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
94
|
+
description: 'Optional structured metadata or context',
|
|
95
|
+
type: 'object',
|
|
96
|
+
additionalProperties: true,
|
|
97
|
+
example: { duration_ms: 150 },
|
|
98
|
+
}),
|
|
99
|
+
(0, class_transformer_1.Expose)(),
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
(0, class_validator_1.IsObject)({ message: '[{"field":"data","reason":"Data must be an object."}]' }),
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
|
+
], SimulateOccurrenceDto.prototype, "data", void 0);
|
|
104
|
+
exports.SimulateOccurrenceDto = SimulateOccurrenceDto = __decorate([
|
|
105
|
+
(0, swagger_1.ApiSchema)({ name: 'SimulatorPluginSimulateOccurrence' })
|
|
106
|
+
], SimulateOccurrenceDto);
|
|
107
|
+
let ReqSimulateOccurrenceDto = class ReqSimulateOccurrenceDto {
|
|
108
|
+
};
|
|
109
|
+
exports.ReqSimulateOccurrenceDto = ReqSimulateOccurrenceDto;
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, swagger_1.ApiProperty)({ description: 'Simulation occurrence data', type: () => SimulateOccurrenceDto }),
|
|
112
|
+
(0, class_transformer_1.Expose)(),
|
|
113
|
+
(0, class_validator_1.IsDefined)({ message: '[{"field":"data","reason":"Simulation occurrence data is required."}]' }),
|
|
114
|
+
(0, class_validator_1.IsObject)({ message: '[{"field":"data","reason":"Simulation occurrence data must be an object."}]' }),
|
|
115
|
+
(0, class_validator_1.ValidateNested)(),
|
|
116
|
+
(0, class_transformer_1.Type)(() => SimulateOccurrenceDto),
|
|
117
|
+
__metadata("design:type", SimulateOccurrenceDto)
|
|
118
|
+
], ReqSimulateOccurrenceDto.prototype, "data", void 0);
|
|
119
|
+
exports.ReqSimulateOccurrenceDto = ReqSimulateOccurrenceDto = __decorate([
|
|
120
|
+
(0, swagger_1.ApiSchema)({ name: 'SimulatorPluginReqSimulateOccurrence' })
|
|
121
|
+
], ReqSimulateOccurrenceDto);
|
|
122
|
+
//# sourceMappingURL=simulate-occurrence.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulate-occurrence.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B,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;IAC7F,IAAA,0BAAM,GAAE;IACR,IAAA,2BAAS,EAAC,EAAE,OAAO,EAAE,uEAAuE,EAAE,CAAC;IAC/F,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,6EAA6E,EAAE,CAAC;IACpG,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC;8BAC5B,qBAAqB;sDAAC;mCAPhB,wBAAwB;IADpC,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,sCAAsC,EAAE,CAAC;GAC/C,wBAAwB,CAQpC"}
|
|
@@ -27,3 +27,15 @@ export declare class ConnectionStateResultModel {
|
|
|
27
27
|
export declare class ConnectionStateResponseModel extends BaseSuccessResponseModel<ConnectionStateResultModel> {
|
|
28
28
|
data: ConnectionStateResultModel;
|
|
29
29
|
}
|
|
30
|
+
export declare class SimulatedOccurrenceResultModel {
|
|
31
|
+
occurrence_id: string | null;
|
|
32
|
+
channel_id: string;
|
|
33
|
+
property_id: string;
|
|
34
|
+
event: string;
|
|
35
|
+
timestamp: string;
|
|
36
|
+
dropped: boolean;
|
|
37
|
+
success: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare class SimulatedOccurrenceResponseModel extends BaseSuccessResponseModel<SimulatedOccurrenceResultModel> {
|
|
40
|
+
data: SimulatedOccurrenceResultModel;
|
|
41
|
+
}
|