@fastybird/smart-panel-backend 1.1.0-alpha.64 → 1.1.0-alpha.65
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.d.ts +3 -1
- package/dist/app.module.js +5 -1
- package/dist/app.module.js.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/common/database/sqlite-data-source.d.ts +37 -0
- package/dist/common/database/sqlite-data-source.js +2131 -0
- package/dist/common/database/sqlite-data-source.js.map +1 -0
- package/dist/dataSource.d.ts +3 -1
- package/dist/dataSource.js +3 -3
- package/dist/dataSource.js.map +1 -1
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js +1 -0
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js.map +1 -1
- package/dist/migrations/1000000000027-AddVirtualProducerBindings.d.ts +7 -0
- package/dist/migrations/1000000000027-AddVirtualProducerBindings.js +87 -0
- package/dist/migrations/1000000000027-AddVirtualProducerBindings.js.map +1 -0
- package/dist/migrations/1000000000028-AddShellySampleSources.d.ts +6 -0
- package/dist/migrations/1000000000028-AddShellySampleSources.js +29 -0
- package/dist/migrations/1000000000028-AddShellySampleSources.js.map +1 -0
- package/dist/migrations/1000000000029-AddVirtualNumericTransforms.d.ts +6 -0
- package/dist/migrations/1000000000029-AddVirtualNumericTransforms.js +31 -0
- package/dist/migrations/1000000000029-AddVirtualNumericTransforms.js.map +1 -0
- package/dist/migrations/1000000000030-AddZigbeeSampleSources.d.ts +6 -0
- package/dist/migrations/1000000000030-AddZigbeeSampleSources.js +33 -0
- package/dist/migrations/1000000000030-AddZigbeeSampleSources.js.map +1 -0
- package/dist/migrations/1000000000031-AddVirtualThermostatClaims.d.ts +6 -0
- package/dist/migrations/1000000000031-AddVirtualThermostatClaims.js +62 -0
- package/dist/migrations/1000000000031-AddVirtualThermostatClaims.js.map +1 -0
- package/dist/migrations/1000000000032-AddVirtualThermostatRuntime.d.ts +6 -0
- package/dist/migrations/1000000000032-AddVirtualThermostatRuntime.js +39 -0
- package/dist/migrations/1000000000032-AddVirtualThermostatRuntime.js.map +1 -0
- package/dist/migrations/1000000000033-AddThermostatInstallationProfiles.d.ts +6 -0
- package/dist/migrations/1000000000033-AddThermostatInstallationProfiles.js +28 -0
- package/dist/migrations/1000000000033-AddThermostatInstallationProfiles.js.map +1 -0
- package/dist/migrations/1000000000034-AddVirtualThermostatRecoveries.d.ts +6 -0
- package/dist/migrations/1000000000034-AddVirtualThermostatRecoveries.js +26 -0
- package/dist/migrations/1000000000034-AddVirtualThermostatRecoveries.js.map +1 -0
- package/dist/migrations/1000000000035-IndexVirtualThermostatCommands.d.ts +6 -0
- package/dist/migrations/1000000000035-IndexVirtualThermostatCommands.js +35 -0
- package/dist/migrations/1000000000035-IndexVirtualThermostatCommands.js.map +1 -0
- package/dist/migrations/1000000000036-AddVirtualAggregatePolicies.d.ts +6 -0
- package/dist/migrations/1000000000036-AddVirtualAggregatePolicies.js +18 -0
- package/dist/migrations/1000000000036-AddVirtualAggregatePolicies.js.map +1 -0
- package/dist/migrations/1000000000037-AddVirtualAggregateProfiles.d.ts +6 -0
- package/dist/migrations/1000000000037-AddVirtualAggregateProfiles.js +16 -0
- package/dist/migrations/1000000000037-AddVirtualAggregateProfiles.js.map +1 -0
- package/dist/migrations/1000000000038-AddShellyCoverOrdering.d.ts +6 -0
- package/dist/migrations/1000000000038-AddShellyCoverOrdering.js +19 -0
- package/dist/migrations/1000000000038-AddShellyCoverOrdering.js.map +1 -0
- package/dist/migrations/1000000000039-AddVirtualThermostatComfort.d.ts +6 -0
- package/dist/migrations/1000000000039-AddVirtualThermostatComfort.js +16 -0
- package/dist/migrations/1000000000039-AddVirtualThermostatComfort.js.map +1 -0
- package/dist/migrations/1000000000040-AddThermostatBranchGroups.d.ts +6 -0
- package/dist/migrations/1000000000040-AddThermostatBranchGroups.js +32 -0
- package/dist/migrations/1000000000040-AddThermostatBranchGroups.js.map +1 -0
- package/dist/migrations/1000000000041-AddThermostatMemberProtection.d.ts +6 -0
- package/dist/migrations/1000000000041-AddThermostatMemberProtection.js +39 -0
- package/dist/migrations/1000000000041-AddThermostatMemberProtection.js.map +1 -0
- package/dist/migrations/1000000000042-AddShellyCoverRecoveries.d.ts +6 -0
- package/dist/migrations/1000000000042-AddShellyCoverRecoveries.js +19 -0
- package/dist/migrations/1000000000042-AddShellyCoverRecoveries.js.map +1 -0
- package/dist/migrations/1000000000044-AddVirtualDewPoint.d.ts +6 -0
- package/dist/migrations/1000000000044-AddVirtualDewPoint.js +36 -0
- package/dist/migrations/1000000000044-AddVirtualDewPoint.js.map +1 -0
- package/dist/migrations/1000000000045-AddThermostatCoolingDependencies.d.ts +6 -0
- package/dist/migrations/1000000000045-AddThermostatCoolingDependencies.js +32 -0
- package/dist/migrations/1000000000045-AddThermostatCoolingDependencies.js.map +1 -0
- package/dist/migrations/1000000000046-AddSpaceActivityModes.d.ts +7 -0
- package/dist/migrations/1000000000046-AddSpaceActivityModes.js +54 -0
- package/dist/migrations/1000000000046-AddSpaceActivityModes.js.map +1 -0
- package/dist/migrations/1000000000047-AddClimateAutomationOwnership.d.ts +6 -0
- package/dist/migrations/1000000000047-AddClimateAutomationOwnership.js +60 -0
- package/dist/migrations/1000000000047-AddClimateAutomationOwnership.js.map +1 -0
- package/dist/migrations/1000000000048-AddThermostatCreationCatalogBirths.d.ts +6 -0
- package/dist/migrations/1000000000048-AddThermostatCreationCatalogBirths.js +208 -0
- package/dist/migrations/1000000000048-AddThermostatCreationCatalogBirths.js.map +1 -0
- package/dist/migrations/1000000000049-FenceClimateAutomationLifecycle.d.ts +6 -0
- package/dist/migrations/1000000000049-FenceClimateAutomationLifecycle.js +40 -0
- package/dist/migrations/1000000000049-FenceClimateAutomationLifecycle.js.map +1 -0
- package/dist/migrations/1000000000050-AddSpaceModeSchedules.d.ts +6 -0
- package/dist/migrations/1000000000050-AddSpaceModeSchedules.js +36 -0
- package/dist/migrations/1000000000050-AddSpaceModeSchedules.js.map +1 -0
- package/dist/migrations/1000000000051-AddSpaceOccupancy.d.ts +6 -0
- package/dist/migrations/1000000000051-AddSpaceOccupancy.js +34 -0
- package/dist/migrations/1000000000051-AddSpaceOccupancy.js.map +1 -0
- package/dist/migrations/1000000000052-AddNativeThermostats.d.ts +6 -0
- package/dist/migrations/1000000000052-AddNativeThermostats.js +39 -0
- package/dist/migrations/1000000000052-AddNativeThermostats.js.map +1 -0
- package/dist/migrations/1000000000053-AddThermostatOverrideClocks.d.ts +6 -0
- package/dist/migrations/1000000000053-AddThermostatOverrideClocks.js +35 -0
- package/dist/migrations/1000000000053-AddThermostatOverrideClocks.js.map +1 -0
- package/dist/modules/buddy/buddy.utils.d.ts +1 -1
- package/dist/modules/buddy/buddy.utils.js +10 -11
- package/dist/modules/buddy/buddy.utils.js.map +1 -1
- package/dist/modules/buddy/services/buddy-context.service.js +2 -1
- package/dist/modules/buddy/services/buddy-context.service.js.map +1 -1
- package/dist/modules/buddy/services/home-context-tool-provider.service.d.ts +1 -1
- package/dist/modules/devices/contracts/climate-automation.contract.d.ts +111 -0
- package/dist/modules/devices/contracts/climate-automation.contract.js +3 -0
- package/dist/modules/devices/contracts/climate-automation.contract.js.map +1 -0
- package/dist/modules/devices/controllers/channels.properties.controller.d.ts +1 -1
- package/dist/modules/devices/controllers/channels.properties.controller.js +11 -4
- package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.d.ts +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js +11 -4
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/property-command.controller.d.ts +9 -0
- package/dist/modules/devices/controllers/property-command.controller.js +88 -0
- package/dist/modules/devices/controllers/property-command.controller.js.map +1 -0
- package/dist/modules/devices/devices.constants.d.ts +4 -0
- package/dist/modules/devices/devices.constants.js +4 -0
- package/dist/modules/devices/devices.constants.js.map +1 -1
- package/dist/modules/devices/devices.module.js +22 -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 +39 -0
- package/dist/modules/devices/devices.openapi.js.map +1 -1
- package/dist/modules/devices/dto/property-command.dto.js +20 -6
- package/dist/modules/devices/dto/property-command.dto.js.map +1 -1
- package/dist/modules/devices/dto/update-device.dto.d.ts +1 -1
- package/dist/modules/devices/dto/update-device.dto.js +4 -3
- package/dist/modules/devices/dto/update-device.dto.js.map +1 -1
- package/dist/modules/devices/entities/climate-automation.entity.d.ts +56 -0
- package/dist/modules/devices/entities/climate-automation.entity.js +231 -0
- package/dist/modules/devices/entities/climate-automation.entity.js.map +1 -0
- package/dist/modules/devices/entities/devices.entity.d.ts +4 -0
- package/dist/modules/devices/entities/devices.entity.js +27 -3
- package/dist/modules/devices/entities/devices.entity.js.map +1 -1
- package/dist/modules/devices/interceptors/property-command-entry.interceptor.d.ts +10 -0
- package/dist/modules/devices/interceptors/property-command-entry.interceptor.js +50 -0
- package/dist/modules/devices/interceptors/property-command-entry.interceptor.js.map +1 -0
- package/dist/modules/devices/models/composite-command.model.d.ts +16 -0
- package/dist/modules/devices/models/composite-command.model.js +99 -0
- package/dist/modules/devices/models/composite-command.model.js.map +1 -0
- package/dist/modules/devices/models/property-command-response.model.d.ts +18 -0
- package/dist/modules/devices/models/property-command-response.model.js +90 -0
- package/dist/modules/devices/models/property-command-response.model.js.map +1 -0
- package/dist/modules/devices/models/property-read-policy.model.d.ts +4 -0
- package/dist/modules/devices/models/property-read-policy.model.js +57 -0
- package/dist/modules/devices/models/property-read-policy.model.js.map +1 -0
- package/dist/modules/devices/models/property-sample.model.d.ts +50 -0
- package/dist/modules/devices/models/property-sample.model.js +3 -0
- package/dist/modules/devices/models/property-sample.model.js.map +1 -0
- package/dist/modules/devices/models/property-value-state.model.d.ts +11 -0
- package/dist/modules/devices/models/property-value-state.model.js +55 -1
- package/dist/modules/devices/models/property-value-state.model.js.map +1 -1
- package/dist/modules/devices/platforms/device.platform.d.ts +43 -0
- package/dist/modules/devices/platforms/native-climate.contract.d.ts +50 -0
- package/dist/modules/devices/platforms/native-climate.contract.js +3 -0
- package/dist/modules/devices/platforms/native-climate.contract.js.map +1 -0
- package/dist/modules/devices/services/channels-type-mapper.service.d.ts +3 -0
- package/dist/modules/devices/services/channels-type-mapper.service.js +21 -1
- package/dist/modules/devices/services/channels-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/channels.properties-type-mapper.service.d.ts +7 -2
- package/dist/modules/devices/services/channels.properties-type-mapper.service.js +21 -1
- package/dist/modules/devices/services/channels.properties-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/channels.properties.service.d.ts +11 -2
- package/dist/modules/devices/services/channels.properties.service.js +219 -64
- package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
- package/dist/modules/devices/services/channels.service.d.ts +12 -5
- package/dist/modules/devices/services/channels.service.js +148 -55
- package/dist/modules/devices/services/channels.service.js.map +1 -1
- package/dist/modules/devices/services/climate-automation-ledger-lifecycle.d.ts +47 -0
- package/dist/modules/devices/services/climate-automation-ledger-lifecycle.js +242 -0
- package/dist/modules/devices/services/climate-automation-ledger-lifecycle.js.map +1 -0
- package/dist/modules/devices/services/climate-automation-ledger.service.d.ts +68 -0
- package/dist/modules/devices/services/climate-automation-ledger.service.js +1061 -0
- package/dist/modules/devices/services/climate-automation-ledger.service.js.map +1 -0
- package/dist/modules/devices/services/climate-automation-ledger.utils.d.ts +8 -0
- package/dist/modules/devices/services/climate-automation-ledger.utils.js +54 -0
- package/dist/modules/devices/services/climate-automation-ledger.utils.js.map +1 -0
- package/dist/modules/devices/services/climate-automation.registry.service.d.ts +15 -0
- package/dist/modules/devices/services/climate-automation.registry.service.js +71 -0
- package/dist/modules/devices/services/climate-automation.registry.service.js.map +1 -0
- package/dist/modules/devices/services/composite-property-command.registry.service.d.ts +48 -0
- package/dist/modules/devices/services/composite-property-command.registry.service.js +65 -0
- package/dist/modules/devices/services/composite-property-command.registry.service.js.map +1 -0
- package/dist/modules/devices/services/controller-publication-context.d.ts +27 -0
- package/dist/modules/devices/services/controller-publication-context.js +148 -0
- package/dist/modules/devices/services/controller-publication-context.js.map +1 -0
- package/dist/modules/devices/services/cover-action-proof.d.ts +7 -0
- package/dist/modules/devices/services/cover-action-proof.js +142 -0
- package/dist/modules/devices/services/cover-action-proof.js.map +1 -0
- package/dist/modules/devices/services/creation-capture.d.ts +19 -0
- package/dist/modules/devices/services/creation-capture.js +85 -0
- package/dist/modules/devices/services/creation-capture.js.map +1 -0
- package/dist/modules/devices/services/device-command-graph.service.js +1 -1
- package/dist/modules/devices/services/device-command-graph.service.js.map +1 -1
- package/dist/modules/devices/services/device-connection-state.service.d.ts +1 -0
- package/dist/modules/devices/services/device-connection-state.service.js +64 -18
- package/dist/modules/devices/services/device-connection-state.service.js.map +1 -1
- package/dist/modules/devices/services/device-connectivity.service.js +96 -51
- package/dist/modules/devices/services/device-connectivity.service.js.map +1 -1
- package/dist/modules/devices/services/device-contribution.registry.service.d.ts +50 -0
- package/dist/modules/devices/services/device-contribution.registry.service.js +45 -0
- package/dist/modules/devices/services/device-contribution.registry.service.js.map +1 -0
- package/dist/modules/devices/services/device-creation-context.d.ts +57 -0
- package/dist/modules/devices/services/device-creation-context.js +315 -0
- package/dist/modules/devices/services/device-creation-context.js.map +1 -0
- package/dist/modules/devices/services/device-structure-lock.service.d.ts +5 -0
- package/dist/modules/devices/services/device-structure-lock.service.js +64 -12
- package/dist/modules/devices/services/device-structure-lock.service.js.map +1 -1
- package/dist/modules/devices/services/device-validation.service.d.ts +0 -1
- package/dist/modules/devices/services/device-validation.service.js +3 -14
- package/dist/modules/devices/services/device-validation.service.js.map +1 -1
- package/dist/modules/devices/services/device-zones.service.d.ts +3 -1
- package/dist/modules/devices/services/device-zones.service.js +30 -6
- package/dist/modules/devices/services/device-zones.service.js.map +1 -1
- package/dist/modules/devices/services/devices-type-mapper.service.d.ts +3 -0
- package/dist/modules/devices/services/devices-type-mapper.service.js +21 -1
- package/dist/modules/devices/services/devices-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.d.ts +8 -2
- package/dist/modules/devices/services/devices.service.js +194 -49
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/devices/services/platform.registry.service.d.ts +11 -1
- package/dist/modules/devices/services/platform.registry.service.js +42 -5
- package/dist/modules/devices/services/platform.registry.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-admission.registry.service.d.ts +28 -0
- package/dist/modules/devices/services/property-command-admission.registry.service.js +70 -0
- package/dist/modules/devices/services/property-command-admission.registry.service.js.map +1 -0
- package/dist/modules/devices/services/property-command-dispatch.service.d.ts +28 -2
- package/dist/modules/devices/services/property-command-dispatch.service.js +704 -10
- package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-entry-snapshot.d.ts +25 -0
- package/dist/modules/devices/services/property-command-entry-snapshot.js +87 -0
- package/dist/modules/devices/services/property-command-entry-snapshot.js.map +1 -0
- package/dist/modules/devices/services/property-command-window.service.d.ts +22 -0
- package/dist/modules/devices/services/property-command-window.service.js +81 -0
- package/dist/modules/devices/services/property-command-window.service.js.map +1 -1
- package/dist/modules/devices/services/property-command.service.d.ts +24 -3
- package/dist/modules/devices/services/property-command.service.js +180 -18
- package/dist/modules/devices/services/property-command.service.js.map +1 -1
- package/dist/modules/devices/services/property-metadata.service.js +1 -1
- package/dist/modules/devices/services/property-metadata.service.js.map +1 -1
- package/dist/modules/devices/services/property-producer.registry.service.d.ts +98 -0
- package/dist/modules/devices/services/property-producer.registry.service.js +636 -0
- package/dist/modules/devices/services/property-producer.registry.service.js.map +1 -0
- package/dist/modules/devices/services/property-value-source.registry.service.d.ts +18 -0
- package/dist/modules/devices/services/property-value-source.registry.service.js +291 -2
- package/dist/modules/devices/services/property-value-source.registry.service.js.map +1 -1
- package/dist/modules/devices/services/property-value.service.d.ts +40 -3
- package/dist/modules/devices/services/property-value.service.js +744 -193
- package/dist/modules/devices/services/property-value.service.js.map +1 -1
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.d.ts +5 -0
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.js +25 -0
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.js.map +1 -1
- package/dist/modules/devices/utils/property-metadata.utils.d.ts +1 -0
- package/dist/modules/devices/utils/property-metadata.utils.js +10 -0
- package/dist/modules/devices/utils/property-metadata.utils.js.map +1 -1
- package/dist/modules/devices/utils/property-permissions.utils.d.ts +2 -0
- package/dist/modules/devices/utils/property-permissions.utils.js +10 -0
- package/dist/modules/devices/utils/property-permissions.utils.js.map +1 -0
- package/dist/modules/extensions/services/discovered-backend.module.d.ts +6 -0
- package/dist/modules/extensions/services/discovered-backend.module.js +32 -0
- package/dist/modules/extensions/services/discovered-backend.module.js.map +1 -0
- package/dist/modules/extensions/services/extensions-discovery.js +15 -0
- package/dist/modules/extensions/services/extensions-discovery.js.map +1 -1
- package/dist/modules/extensions/services/extensions.service.d.ts +4 -0
- package/dist/modules/extensions/services/extensions.service.js +13 -0
- package/dist/modules/extensions/services/extensions.service.js.map +1 -1
- package/dist/modules/extensions/services/managed-extension-service.interface.d.ts +1 -0
- package/dist/modules/extensions/services/managed-service-manager.service.d.ts +15 -0
- package/dist/modules/extensions/services/managed-service-manager.service.js +242 -72
- package/dist/modules/extensions/services/managed-service-manager.service.js.map +1 -1
- package/dist/modules/home-context/schemas/home-search-input.schemas.d.ts +1 -1
- package/dist/modules/intents/models/intent.model.d.ts +2 -0
- package/dist/modules/intents/models/intent.model.js +14 -0
- package/dist/modules/intents/models/intent.model.js.map +1 -1
- package/dist/modules/intents/services/intents.service.d.ts +2 -1
- package/dist/modules/intents/services/intents.service.js +18 -2
- package/dist/modules/intents/services/intents.service.js.map +1 -1
- package/dist/modules/scenes/listeners/websocket-exchange.listener.js +4 -0
- package/dist/modules/scenes/listeners/websocket-exchange.listener.js.map +1 -1
- package/dist/modules/scenes/models/scenes.model.d.ts +2 -0
- package/dist/modules/scenes/models/scenes.model.js +10 -0
- package/dist/modules/scenes/models/scenes.model.js.map +1 -1
- package/dist/modules/scenes/services/scene-executor.service.d.ts +6 -1
- package/dist/modules/scenes/services/scene-executor.service.js +33 -22
- package/dist/modules/scenes/services/scene-executor.service.js.map +1 -1
- package/dist/modules/security/providers/alarm-security.provider.d.ts +3 -1
- package/dist/modules/security/providers/alarm-security.provider.js +83 -8
- package/dist/modules/security/providers/alarm-security.provider.js.map +1 -1
- package/dist/modules/spaces/services/space-lifecycle-registry.service.d.ts +19 -0
- package/dist/modules/spaces/services/space-lifecycle-registry.service.js +121 -0
- package/dist/modules/spaces/services/space-lifecycle-registry.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces.service.d.ts +5 -1
- package/dist/modules/spaces/services/spaces.service.js +34 -6
- package/dist/modules/spaces/services/spaces.service.js.map +1 -1
- package/dist/modules/spaces/spaces.constants.d.ts +3 -1
- package/dist/modules/spaces/spaces.constants.js +2 -0
- package/dist/modules/spaces/spaces.constants.js.map +1 -1
- package/dist/modules/spaces/spaces.module.js +13 -1
- package/dist/modules/spaces/spaces.module.js.map +1 -1
- package/dist/modules/storage/services/storage.service.d.ts +8 -0
- package/dist/modules/storage/services/storage.service.js +225 -0
- package/dist/modules/storage/services/storage.service.js.map +1 -1
- package/dist/modules/swagger/decorators/api-documentation.decorator.d.ts +1 -0
- package/dist/modules/swagger/decorators/api-documentation.decorator.js +9 -1
- package/dist/modules/swagger/decorators/api-documentation.decorator.js.map +1 -1
- package/dist/modules/swagger/services/swagger-document.service.d.ts +1 -0
- package/dist/modules/swagger/services/swagger-document.service.js +71 -1
- package/dist/modules/swagger/services/swagger-document.service.js.map +1 -1
- package/dist/modules/system/services/backup.service.js +3 -5
- package/dist/modules/system/services/backup.service.js.map +1 -1
- package/dist/modules/system/utils/timezone.utils.d.ts +2 -0
- package/dist/modules/system/utils/timezone.utils.js +9 -0
- package/dist/modules/system/utils/timezone.utils.js.map +1 -0
- package/dist/modules/websocket/gateway/websocket.gateway.js +1 -0
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +2 -0
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/update-channel-property.dto.d.ts +3 -3
- package/dist/plugins/devices-home-assistant/dto/update-channel-property.dto.js +3 -3
- package/dist/plugins/devices-home-assistant/dto/update-channel-property.dto.js.map +1 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.d.ts +11 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js +82 -2
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant-native-climate.service.d.ts +22 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-native-climate.service.js +409 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-native-climate.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +14 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +93 -3
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-homekit/devices-homekit.plugin.js +28 -2
- package/dist/plugins/devices-homekit/devices-homekit.plugin.js.map +1 -1
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.d.ts +26 -3
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +183 -5
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.d.ts +2 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.js +38 -10
- package/dist/plugins/devices-homekit/mappers/base.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/battery.mapper.js +4 -3
- package/dist/plugins/devices-homekit/mappers/battery.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/button.mapper.js +21 -2
- package/dist/plugins/devices-homekit/mappers/button.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/characteristic-get.d.ts +3 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-get.js +10 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-get.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.d.ts +1 -1
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js +2 -1
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/fan.mapper.d.ts +12 -0
- package/dist/plugins/devices-homekit/mappers/fan.mapper.js +126 -0
- package/dist/plugins/devices-homekit/mappers/fan.mapper.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +8 -0
- package/dist/plugins/devices-homekit/mappers/outlet.mapper.js +4 -0
- package/dist/plugins/devices-homekit/mappers/outlet.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/property-read.d.ts +7 -0
- package/dist/plugins/devices-homekit/mappers/property-read.js +64 -0
- package/dist/plugins/devices-homekit/mappers/property-read.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/semantic-conversion.d.ts +2 -0
- package/dist/plugins/devices-homekit/mappers/semantic-conversion.js +15 -0
- package/dist/plugins/devices-homekit/mappers/semantic-conversion.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/sensor.mapper.d.ts +3 -0
- package/dist/plugins/devices-homekit/mappers/sensor.mapper.js +63 -11
- package/dist/plugins/devices-homekit/mappers/sensor.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/service-fault.d.ts +4 -0
- package/dist/plugins/devices-homekit/mappers/service-fault.js +33 -0
- package/dist/plugins/devices-homekit/mappers/service-fault.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.d.ts +4 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +128 -19
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/thermostat.mapper.js +5 -3
- package/dist/plugins/devices-homekit/mappers/thermostat.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/unavailable-characteristic.d.ts +3 -0
- package/dist/plugins/devices-homekit/mappers/unavailable-characteristic.js +18 -0
- package/dist/plugins/devices-homekit/mappers/unavailable-characteristic.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/window-covering.mapper.js +19 -3
- package/dist/plugins/devices-homekit/mappers/window-covering.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.d.ts +4 -0
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.js +58 -29
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.d.ts +2 -0
- package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.js +3 -0
- package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.d.ts +30 -2
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js +126 -2
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-mapping-maintenance.d.ts +8 -0
- package/dist/plugins/devices-homekit/services/homekit-mapping-maintenance.js +17 -0
- package/dist/plugins/devices-homekit/services/homekit-mapping-maintenance.js.map +1 -0
- package/dist/plugins/devices-homekit/services/homekit-property-state.service.d.ts +19 -0
- package/dist/plugins/devices-homekit/services/homekit-property-state.service.js +69 -0
- package/dist/plugins/devices-homekit/services/homekit-property-state.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-action.contract.d.ts +13 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-action.contract.js +60 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-action.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-recovery.contract.d.ts +13 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-recovery.contract.js +3 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-recovery.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script-source.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script-source.js +5 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script-source.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script.contract.d.ts +21 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script.contract.js +47 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/member-guard-script-source.d.ts +2 -0
- package/dist/plugins/devices-shelly-ng/contracts/member-guard-script-source.js +27 -0
- package/dist/plugins/devices-shelly-ng/contracts/member-guard-script-source.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/native-temperature.contract.d.ts +36 -0
- package/dist/plugins/devices-shelly-ng/contracts/native-temperature.contract.js +200 -0
- package/dist/plugins/devices-shelly-ng/contracts/native-temperature.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/protective-switch.contract.d.ts +44 -0
- package/dist/plugins/devices-shelly-ng/contracts/protective-switch.contract.js +29 -0
- package/dist/plugins/devices-shelly-ng/contracts/protective-switch.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/controllers/shelly-cover-recovery.controller.d.ts +11 -0
- package/dist/plugins/devices-shelly-ng/controllers/shelly-cover-recovery.controller.js +98 -0
- package/dist/plugins/devices-shelly-ng/controllers/shelly-cover-recovery.controller.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +51 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +688 -2
- 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 +46 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +315 -4
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.d.ts +3 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js +8 -0
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +16 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/dto/cover-recovery.dto.d.ts +11 -0
- package/dist/plugins/devices-shelly-ng/dto/cover-recovery.dto.js +77 -0
- package/dist/plugins/devices-shelly-ng/dto/cover-recovery.dto.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-ordering.entity.d.ts +5 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-ordering.entity.js +32 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-ordering.entity.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-recovery.entity.d.ts +17 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-recovery.entity.js +80 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-recovery.entity.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-sample-source.entity.d.ts +16 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-sample-source.entity.js +70 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-sample-source.entity.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/mappings/definitions/covers.yaml +30 -24
- package/dist/plugins/devices-shelly-ng/models/cover-recovery.model.d.ts +21 -0
- package/dist/plugins/devices-shelly-ng/models/cover-recovery.model.js +114 -0
- package/dist/plugins/devices-shelly-ng/models/cover-recovery.model.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/platforms/shelly-ng.device.platform.d.ts +27 -1
- package/dist/plugins/devices-shelly-ng/platforms/shelly-ng.device.platform.js +146 -0
- package/dist/plugins/devices-shelly-ng/platforms/shelly-ng.device.platform.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/authenticated-shelly-script-http.d.ts +16 -0
- package/dist/plugins/devices-shelly-ng/services/authenticated-shelly-script-http.js +154 -0
- package/dist/plugins/devices-shelly-ng/services/authenticated-shelly-script-http.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.d.ts +4 -1
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +113 -4
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-http.d.ts +2 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-http.js +78 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-http.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-rpc.d.ts +9 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-rpc.js +56 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-rpc.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-artifact.d.ts +45 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-artifact.js +278 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-artifact.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-lease.contract.d.ts +49 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-lease.contract.js +32 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-lease.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-qualification.d.ts +53 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-qualification.js +91 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-qualification.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-session.d.ts +35 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-session.js +244 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-session.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-ordering.service.d.ts +9 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-ordering.service.js +50 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-ordering.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery-lane.service.d.ts +29 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery-lane.service.js +166 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery-lane.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery.service.d.ts +21 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery.service.js +207 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-session.d.ts +25 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-session.js +132 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-session.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-telemetry.d.ts +9 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-telemetry.js +63 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-telemetry.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-guard-rpc-session.d.ts +33 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-guard-rpc-session.js +191 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-guard-rpc-session.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +32 -4
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-sample-sources.service.d.ts +34 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-sample-sources.service.js +194 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-sample-sources.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +5 -2
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.d.ts +4 -0
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +3 -0
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
- package/dist/plugins/devices-virtual/contracts/thermostat-actuation.contract.d.ts +114 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-actuation.contract.js +12 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-actuation.contract.js.map +1 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-command.contract.d.ts +4 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-command.contract.js +3 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-command.contract.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/native-thermostat.controller.d.ts +15 -0
- package/dist/plugins/devices-virtual/controllers/native-thermostat.controller.js +178 -0
- package/dist/plugins/devices-virtual/controllers/native-thermostat.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-authoring-context.controller.d.ts +11 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-authoring-context.controller.js +92 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-authoring-context.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-installation.controller.d.ts +16 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-installation.controller.js +179 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-installation.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-dew-point-config.controller.d.ts +11 -0
- package/dist/plugins/devices-virtual/controllers/virtual-dew-point-config.controller.js +100 -0
- package/dist/plugins/devices-virtual/controllers/virtual-dew-point-config.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-measurement-authoring.controller.d.ts +19 -0
- package/dist/plugins/devices-virtual/controllers/virtual-measurement-authoring.controller.js +168 -0
- package/dist/plugins/devices-virtual/controllers/virtual-measurement-authoring.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-producer-config.controller.d.ts +28 -0
- package/dist/plugins/devices-virtual/controllers/virtual-producer-config.controller.js +278 -0
- package/dist/plugins/devices-virtual/controllers/virtual-producer-config.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-authoring.controller.d.ts +12 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-authoring.controller.js +111 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-authoring.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-comfort.controller.d.ts +14 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-comfort.controller.js +160 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-comfort.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-config.controller.d.ts +18 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-config.controller.js +196 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-config.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-transform-config.controller.d.ts +14 -0
- package/dist/plugins/devices-virtual/controllers/virtual-transform-config.controller.js +128 -0
- package/dist/plugins/devices-virtual/controllers/virtual-transform-config.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/devices-virtual.constants.d.ts +1 -0
- package/dist/plugins/devices-virtual/devices-virtual.constants.js +2 -1
- package/dist/plugins/devices-virtual/devices-virtual.constants.js.map +1 -1
- package/dist/plugins/devices-virtual/devices-virtual.openapi.d.ts +24 -2
- package/dist/plugins/devices-virtual/devices-virtual.openapi.js +95 -0
- package/dist/plugins/devices-virtual/devices-virtual.openapi.js.map +1 -1
- package/dist/plugins/devices-virtual/devices-virtual.plugin.d.ts +7 -1
- package/dist/plugins/devices-virtual/devices-virtual.plugin.js +167 -10
- package/dist/plugins/devices-virtual/devices-virtual.plugin.js.map +1 -1
- package/dist/plugins/devices-virtual/dto/create-device.dto.d.ts +2 -0
- package/dist/plugins/devices-virtual/dto/create-device.dto.js +20 -0
- package/dist/plugins/devices-virtual/dto/create-device.dto.js.map +1 -1
- package/dist/plugins/devices-virtual/dto/dew-point-config.dto.d.ts +14 -0
- package/dist/plugins/devices-virtual/dto/dew-point-config.dto.js +119 -0
- package/dist/plugins/devices-virtual/dto/dew-point-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/group-catalog.dto.d.ts +8 -0
- package/dist/plugins/devices-virtual/dto/group-catalog.dto.js +62 -0
- package/dist/plugins/devices-virtual/dto/group-catalog.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/light-group-draft.dto.d.ts +19 -0
- package/dist/plugins/devices-virtual/dto/light-group-draft.dto.js +108 -0
- package/dist/plugins/devices-virtual/dto/light-group-draft.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/measurement-authoring.dto.d.ts +25 -0
- package/dist/plugins/devices-virtual/dto/measurement-authoring.dto.js +157 -0
- package/dist/plugins/devices-virtual/dto/measurement-authoring.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/native-thermostat.dto.d.ts +21 -0
- package/dist/plugins/devices-virtual/dto/native-thermostat.dto.js +122 -0
- package/dist/plugins/devices-virtual/dto/native-thermostat.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/producer-config.dto.d.ts +35 -0
- package/dist/plugins/devices-virtual/dto/producer-config.dto.js +290 -0
- package/dist/plugins/devices-virtual/dto/producer-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/thermostat-authoring.dto.d.ts +6 -0
- package/dist/plugins/devices-virtual/dto/thermostat-authoring.dto.js +46 -0
- package/dist/plugins/devices-virtual/dto/thermostat-authoring.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/thermostat-comfort.dto.d.ts +39 -0
- package/dist/plugins/devices-virtual/dto/thermostat-comfort.dto.js +244 -0
- package/dist/plugins/devices-virtual/dto/thermostat-comfort.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/thermostat-config.dto.d.ts +94 -0
- package/dist/plugins/devices-virtual/dto/thermostat-config.dto.js +718 -0
- package/dist/plugins/devices-virtual/dto/thermostat-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/thermostat-installation.dto.d.ts +71 -0
- package/dist/plugins/devices-virtual/dto/thermostat-installation.dto.js +410 -0
- package/dist/plugins/devices-virtual/dto/thermostat-installation.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/transform-config.dto.d.ts +71 -0
- package/dist/plugins/devices-virtual/dto/transform-config.dto.js +430 -0
- package/dist/plugins/devices-virtual/dto/transform-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.d.ts +2 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.js +20 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.js.map +1 -1
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.d.ts +13 -1
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.js +56 -6
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.js.map +1 -1
- package/dist/plugins/devices-virtual/entities/native-thermostat.entity.d.ts +23 -0
- package/dist/plugins/devices-virtual/entities/native-thermostat.entity.js +103 -0
- package/dist/plugins/devices-virtual/entities/native-thermostat.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/thermostat-cooling-dependency.entity.d.ts +19 -0
- package/dist/plugins/devices-virtual/entities/thermostat-cooling-dependency.entity.js +87 -0
- package/dist/plugins/devices-virtual/entities/thermostat-cooling-dependency.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/thermostat-installation.entity.d.ts +36 -0
- package/dist/plugins/devices-virtual/entities/thermostat-installation.entity.js +125 -0
- package/dist/plugins/devices-virtual/entities/thermostat-installation.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/thermostat-member-protection.entity.d.ts +15 -0
- package/dist/plugins/devices-virtual/entities/thermostat-member-protection.entity.js +70 -0
- package/dist/plugins/devices-virtual/entities/thermostat-member-protection.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/thermostat-override-clock.entity.d.ts +7 -0
- package/dist/plugins/devices-virtual/entities/thermostat-override-clock.entity.js +39 -0
- package/dist/plugins/devices-virtual/entities/thermostat-override-clock.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-dew-point.entity.d.ts +28 -0
- package/dist/plugins/devices-virtual/entities/virtual-dew-point.entity.js +104 -0
- package/dist/plugins/devices-virtual/entities/virtual-dew-point.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-producer.entity.d.ts +89 -0
- package/dist/plugins/devices-virtual/entities/virtual-producer.entity.js +281 -0
- package/dist/plugins/devices-virtual/entities/virtual-producer.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat-runtime.entity.d.ts +45 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat-runtime.entity.js +184 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat-runtime.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat.entity.d.ts +86 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat.entity.js +337 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-transform.entity.d.ts +23 -0
- package/dist/plugins/devices-virtual/entities/virtual-transform.entity.js +101 -0
- package/dist/plugins/devices-virtual/entities/virtual-transform.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.d.ts +5 -0
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.js +65 -22
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.d.ts +8 -1
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.js +123 -32
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.d.ts +3 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js +41 -3
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-status.listener.js +28 -15
- package/dist/plugins/devices-virtual/listeners/virtual-status.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/models/dew-point-response.model.d.ts +38 -0
- package/dist/plugins/devices-virtual/models/dew-point-response.model.js +193 -0
- package/dist/plugins/devices-virtual/models/dew-point-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/group-catalog.model.d.ts +26 -0
- package/dist/plugins/devices-virtual/models/group-catalog.model.js +117 -0
- package/dist/plugins/devices-virtual/models/group-catalog.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/light-group-draft.model.d.ts +28 -0
- package/dist/plugins/devices-virtual/models/light-group-draft.model.js +122 -0
- package/dist/plugins/devices-virtual/models/light-group-draft.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/measurement-authoring-response.model.d.ts +26 -0
- package/dist/plugins/devices-virtual/models/measurement-authoring-response.model.js +125 -0
- package/dist/plugins/devices-virtual/models/measurement-authoring-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/native-thermostat-response.model.d.ts +84 -0
- package/dist/plugins/devices-virtual/models/native-thermostat-response.model.js +406 -0
- package/dist/plugins/devices-virtual/models/native-thermostat-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/numeric-operator.model.d.ts +23 -0
- package/dist/plugins/devices-virtual/models/numeric-operator.model.js +120 -0
- package/dist/plugins/devices-virtual/models/numeric-operator.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/producer-response.model.d.ts +138 -0
- package/dist/plugins/devices-virtual/models/producer-response.model.js +764 -0
- package/dist/plugins/devices-virtual/models/producer-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-context.model.d.ts +22 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-context.model.js +134 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-context.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-response.model.d.ts +18 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-response.model.js +87 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-comfort-response.model.d.ts +60 -0
- package/dist/plugins/devices-virtual/models/thermostat-comfort-response.model.js +341 -0
- package/dist/plugins/devices-virtual/models/thermostat-comfort-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-installation-response.model.d.ts +84 -0
- package/dist/plugins/devices-virtual/models/thermostat-installation-response.model.js +440 -0
- package/dist/plugins/devices-virtual/models/thermostat-installation-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-response.model.d.ts +218 -0
- package/dist/plugins/devices-virtual/models/thermostat-response.model.js +1157 -0
- package/dist/plugins/devices-virtual/models/thermostat-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/transform-response.model.d.ts +73 -0
- package/dist/plugins/devices-virtual/models/transform-response.model.js +386 -0
- package/dist/plugins/devices-virtual/models/transform-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.d.ts +5 -1
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js +22 -3
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js.map +1 -1
- package/dist/plugins/devices-virtual/services/native-thermostat.service.d.ts +72 -0
- package/dist/plugins/devices-virtual/services/native-thermostat.service.js +932 -0
- package/dist/plugins/devices-virtual/services/native-thermostat.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-authoring-context.service.d.ts +14 -0
- package/dist/plugins/devices-virtual/services/thermostat-authoring-context.service.js +147 -0
- package/dist/plugins/devices-virtual/services/thermostat-authoring-context.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-comfort-selection.d.ts +199 -0
- package/dist/plugins/devices-virtual/services/thermostat-comfort-selection.js +1064 -0
- package/dist/plugins/devices-virtual/services/thermostat-comfort-selection.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-controller-mutation.d.ts +75 -0
- package/dist/plugins/devices-virtual/services/thermostat-controller-mutation.js +445 -0
- package/dist/plugins/devices-virtual/services/thermostat-controller-mutation.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-cooling-dependency.service.d.ts +53 -0
- package/dist/plugins/devices-virtual/services/thermostat-cooling-dependency.service.js +267 -0
- package/dist/plugins/devices-virtual/services/thermostat-cooling-dependency.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-catalog.d.ts +56 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-catalog.js +438 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-catalog.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-response.d.ts +37 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-response.js +430 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-response.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-artifact.d.ts +13 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-artifact.js +263 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-artifact.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-bindings.service.d.ts +10 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-bindings.service.js +238 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-bindings.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-loader.service.d.ts +41 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-loader.service.js +350 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-loader.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.service.d.ts +40 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.service.js +263 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.types.d.ts +72 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.types.js +13 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.types.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-member-protection.service.d.ts +45 -0
- package/dist/plugins/devices-virtual/services/thermostat-member-protection.service.js +235 -0
- package/dist/plugins/devices-virtual/services/thermostat-member-protection.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-override-clock.sql.d.ts +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-override-clock.sql.js +16 -0
- package/dist/plugins/devices-virtual/services/thermostat-override-clock.sql.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-protection-source.utils.d.ts +27 -0
- package/dist/plugins/devices-virtual/services/thermostat-protection-source.utils.js +132 -0
- package/dist/plugins/devices-virtual/services/thermostat-protection-source.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-remote-cooling-adapter.d.ts +88 -0
- package/dist/plugins/devices-virtual/services/thermostat-remote-cooling-adapter.js +200 -0
- package/dist/plugins/devices-virtual/services/thermostat-remote-cooling-adapter.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-evaluator.d.ts +35 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-evaluator.js +200 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-evaluator.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-policy.utils.d.ts +5 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-policy.utils.js +18 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-policy.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-runtime.service.d.ts +48 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-runtime.service.js +425 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-runtime.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-cooling-policy.utils.d.ts +13 -0
- package/dist/plugins/devices-virtual/services/virtual-cooling-policy.utils.js +38 -0
- package/dist/plugins/devices-virtual/services/virtual-cooling-policy.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-contract.utils.d.ts +7 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-contract.utils.js +41 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-readiness.utils.d.ts +16 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-readiness.utils.js +42 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-readiness.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-dependency-graph.service.d.ts +118 -0
- package/dist/plugins/devices-virtual/services/virtual-dependency-graph.service.js +667 -0
- package/dist/plugins/devices-virtual/services/virtual-dependency-graph.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-devices.service.d.ts +8 -4
- package/dist/plugins/devices-virtual/services/virtual-devices.service.js +105 -22
- package/dist/plugins/devices-virtual/services/virtual-devices.service.js.map +1 -1
- package/dist/plugins/devices-virtual/services/virtual-dew-point-config.service.d.ts +28 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-config.service.js +193 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-config.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-contract.utils.d.ts +5 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-contract.utils.js +69 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-runtime.service.d.ts +65 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-runtime.service.js +524 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-runtime.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point.utils.d.ts +9 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point.utils.js +25 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-group-catalog.service.d.ts +10 -0
- package/dist/plugins/devices-virtual/services/virtual-group-catalog.service.js +117 -0
- package/dist/plugins/devices-virtual/services/virtual-group-catalog.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-group-contract.utils.d.ts +4 -0
- package/dist/plugins/devices-virtual/services/virtual-group-contract.utils.js +35 -0
- package/dist/plugins/devices-virtual/services/virtual-group-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-group-field.utils.d.ts +10 -0
- package/dist/plugins/devices-virtual/services/virtual-group-field.utils.js +35 -0
- package/dist/plugins/devices-virtual/services/virtual-group-field.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-group-profile.d.ts +19 -0
- package/dist/plugins/devices-virtual/services/virtual-group-profile.js +137 -0
- package/dist/plugins/devices-virtual/services/virtual-group-profile.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-authoring.service.d.ts +43 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-authoring.service.js +217 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-authoring.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-command.service.d.ts +28 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-command.service.js +262 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-command.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-contribution.service.d.ts +19 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-contribution.service.js +91 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-contribution.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-state.service.d.ts +37 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-state.service.js +346 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-state.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group.utils.d.ts +46 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group.utils.js +204 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-authoring.service.d.ts +37 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-authoring.service.js +270 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-authoring.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-contribution.service.d.ts +21 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-contribution.service.js +166 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-contribution.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-metadata.utils.d.ts +3 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-metadata.utils.js +25 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-metadata.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator-host.service.d.ts +24 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator-host.service.js +145 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator-host.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator.registry.d.ts +18 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator.registry.js +86 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator.registry.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-profile.utils.d.ts +29 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-profile.utils.js +136 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-profile.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-transform.utils.d.ts +59 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-transform.utils.js +165 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-transform.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-config.service.d.ts +64 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-config.service.js +694 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-config.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-state.service.d.ts +60 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-state.service.js +484 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-state.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.d.ts +11 -2
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.js +166 -13
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.js.map +1 -1
- package/dist/plugins/devices-virtual/services/virtual-source-eligibility.utils.d.ts +3 -0
- package/dist/plugins/devices-virtual/services/virtual-source-eligibility.utils.js +10 -0
- package/dist/plugins/devices-virtual/services/virtual-source-eligibility.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-authoring.service.d.ts +27 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-authoring.service.js +385 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-authoring.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-automation.service.d.ts +90 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-automation.service.js +1189 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-automation.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-branch.utils.d.ts +5 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-branch.utils.js +29 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-branch.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-claims.service.d.ts +80 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-claims.service.js +489 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-claims.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.service.d.ts +80 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.service.js +580 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.utils.d.ts +58 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.utils.js +106 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-config.service.d.ts +909 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-config.service.js +1171 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-config.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-contract.utils.d.ts +5 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-contract.utils.js +51 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-inputs.service.d.ts +46 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-inputs.service.js +166 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-inputs.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-ownership.sql.d.ts +4 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-ownership.sql.js +59 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-ownership.sql.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-policy.utils.d.ts +45 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-policy.utils.js +149 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-policy.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime-ownership.d.ts +56 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime-ownership.js +680 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime-ownership.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime.service.d.ts +133 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime.service.js +1617 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-transport.service.d.ts +39 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-transport.service.js +561 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-transport.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-config.service.d.ts +41 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-config.service.js +209 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-config.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-contract.utils.d.ts +8 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-contract.utils.js +103 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-preview.utils.d.ts +3 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-preview.utils.js +18 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-preview.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-resolver.d.ts +15 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-resolver.js +102 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-resolver.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-runtime.service.d.ts +54 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-runtime.service.js +470 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-runtime.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-typed-group.utils.d.ts +6 -0
- package/dist/plugins/devices-virtual/services/virtual-typed-group.utils.js +100 -0
- package/dist/plugins/devices-virtual/services/virtual-typed-group.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.d.ts +7 -0
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.js +36 -2
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.js.map +1 -1
- package/dist/plugins/devices-virtual/services/virtual-window-contact.utils.d.ts +17 -0
- package/dist/plugins/devices-virtual/services/virtual-window-contact.utils.js +52 -0
- package/dist/plugins/devices-virtual/services/virtual-window-contact.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-window-trend.utils.d.ts +44 -0
- package/dist/plugins/devices-virtual/services/virtual-window-trend.utils.js +171 -0
- package/dist/plugins/devices-virtual/services/virtual-window-trend.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-thermostat-ownership.subscriber.d.ts +30 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-thermostat-ownership.subscriber.js +195 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-thermostat-ownership.subscriber.js.map +1 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-transform-metadata.subscriber.d.ts +9 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-transform-metadata.subscriber.js +58 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-transform-metadata.subscriber.js.map +1 -0
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.d.ts +1 -1
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.js +6 -1
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.js.map +1 -1
- package/dist/plugins/devices-wled/interfaces/wled.interface.d.ts +7 -0
- package/dist/plugins/devices-wled/interfaces/wled.interface.js.map +1 -1
- package/dist/plugins/devices-wled/platforms/wled.device.platform.d.ts +4 -2
- package/dist/plugins/devices-wled/platforms/wled.device.platform.js +56 -9
- package/dist/plugins/devices-wled/platforms/wled.device.platform.js.map +1 -1
- package/dist/plugins/devices-wled/services/device-mapper.service.d.ts +3 -2
- package/dist/plugins/devices-wled/services/device-mapper.service.js +48 -1
- package/dist/plugins/devices-wled/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.d.ts +6 -1
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.js +101 -13
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled.service.js +5 -2
- package/dist/plugins/devices-wled/services/wled.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/contracts/sample-source.contract.d.ts +38 -0
- package/dist/plugins/devices-zigbee2mqtt/contracts/sample-source.contract.js +95 -0
- package/dist/plugins/devices-zigbee2mqtt/contracts/sample-source.contract.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js +11 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/entities/zigbee-sample-source.entity.d.ts +18 -0
- package/dist/plugins/devices-zigbee2mqtt/entities/zigbee-sample-source.entity.js +79 -0
- package/dist/plugins/devices-zigbee2mqtt/entities/zigbee-sample-source.entity.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/interfaces/zigbee2mqtt.interface.d.ts +11 -0
- package/dist/plugins/devices-zigbee2mqtt/platforms/zigbee2mqtt.device.platform.d.ts +11 -2
- package/dist/plugins/devices-zigbee2mqtt/platforms/zigbee2mqtt.device.platform.js +100 -11
- package/dist/plugins/devices-zigbee2mqtt/platforms/zigbee2mqtt.device.platform.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +31 -13
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js +166 -5
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js +44 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.d.ts +20 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js +156 -34
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.d.ts +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +14 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/native-climate-adapter.service.d.ts +15 -0
- package/dist/plugins/devices-zigbee2mqtt/services/native-climate-adapter.service.js +249 -0
- package/dist/plugins/devices-zigbee2mqtt/services/native-climate-adapter.service.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/websocket-sample-evidence.d.ts +2 -0
- package/dist/plugins/devices-zigbee2mqtt/services/websocket-sample-evidence.js +15 -0
- package/dist/plugins/devices-zigbee2mqtt/services/websocket-sample-evidence.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.d.ts +7 -1
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js +45 -2
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee-sample-sources.service.d.ts +49 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee-sample-sources.service.js +264 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee-sample-sources.service.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +2 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/plugins/scenes-local/platforms/local-scene.platform.d.ts +6 -3
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js +101 -15
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js.map +1 -1
- package/dist/plugins/spaces-home-control/activity/activity-actor.d.ts +2 -0
- package/dist/plugins/spaces-home-control/activity/activity-actor.js +14 -0
- package/dist/plugins/spaces-home-control/activity/activity-actor.js.map +1 -0
- package/dist/plugins/spaces-home-control/activity/activity-result.utils.d.ts +6 -0
- package/dist/plugins/spaces-home-control/activity/activity-result.utils.js +26 -0
- package/dist/plugins/spaces-home-control/activity/activity-result.utils.js.map +1 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.constants.d.ts +32 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.constants.js +40 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.constants.js.map +1 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.defaults.d.ts +3 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.defaults.js +25 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.defaults.js.map +1 -0
- package/dist/plugins/spaces-home-control/activity/validate-activity-configuration.d.ts +2 -0
- package/dist/plugins/spaces-home-control/activity/validate-activity-configuration.js +37 -0
- package/dist/plugins/spaces-home-control/activity/validate-activity-configuration.js.map +1 -0
- package/dist/plugins/spaces-home-control/controllers/space-mode-schedules.controller.d.ts +12 -0
- package/dist/plugins/spaces-home-control/controllers/space-mode-schedules.controller.js +97 -0
- package/dist/plugins/spaces-home-control/controllers/space-mode-schedules.controller.js.map +1 -0
- package/dist/plugins/spaces-home-control/controllers/space-modes.controller.d.ts +19 -0
- package/dist/plugins/spaces-home-control/controllers/space-modes.controller.js +220 -0
- package/dist/plugins/spaces-home-control/controllers/space-modes.controller.js.map +1 -0
- package/dist/plugins/spaces-home-control/controllers/space-occupancy.controller.d.ts +18 -0
- package/dist/plugins/spaces-home-control/controllers/space-occupancy.controller.js +147 -0
- package/dist/plugins/spaces-home-control/controllers/space-occupancy.controller.js.map +1 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js +4 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js.map +1 -1
- package/dist/plugins/spaces-home-control/dto/activity-mode.dto.d.ts +22 -0
- package/dist/plugins/spaces-home-control/dto/activity-mode.dto.js +119 -0
- package/dist/plugins/spaces-home-control/dto/activity-mode.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/space-mode-schedule.dto.d.ts +18 -0
- package/dist/plugins/spaces-home-control/dto/space-mode-schedule.dto.js +127 -0
- package/dist/plugins/spaces-home-control/dto/space-mode-schedule.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/space-occupancy.dto.d.ts +13 -0
- package/dist/plugins/spaces-home-control/dto/space-occupancy.dto.js +99 -0
- package/dist/plugins/spaces-home-control/dto/space-occupancy.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-config.entity.d.ts +12 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-config.entity.js +72 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-config.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-state.entity.d.ts +14 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-state.entity.js +105 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-state.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-mode-schedule.entity.d.ts +19 -0
- package/dist/plugins/spaces-home-control/entities/space-mode-schedule.entity.js +110 -0
- package/dist/plugins/spaces-home-control/entities/space-mode-schedule.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-occupancy.entity.d.ts +23 -0
- package/dist/plugins/spaces-home-control/entities/space-occupancy.entity.js +135 -0
- package/dist/plugins/spaces-home-control/entities/space-occupancy.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.d.ts +2 -0
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js +23 -0
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/websocket-exchange.listener.js +3 -0
- package/dist/plugins/spaces-home-control/listeners/websocket-exchange.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/models/activity-configuration.model.d.ts +27 -0
- package/dist/plugins/spaces-home-control/models/activity-configuration.model.js +182 -0
- package/dist/plugins/spaces-home-control/models/activity-configuration.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/activity-response.model.d.ts +16 -0
- package/dist/plugins/spaces-home-control/models/activity-response.model.js +79 -0
- package/dist/plugins/spaces-home-control/models/activity-response.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/activity-result.model.d.ts +6 -0
- package/dist/plugins/spaces-home-control/models/activity-result.model.js +37 -0
- package/dist/plugins/spaces-home-control/models/activity-result.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/climate-contribution.model.d.ts +11 -0
- package/dist/plugins/spaces-home-control/models/climate-contribution.model.js +66 -0
- package/dist/plugins/spaces-home-control/models/climate-contribution.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule-response.model.d.ts +9 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule-response.model.js +45 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule-response.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule.model.d.ts +34 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule.model.js +170 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/space-occupancy.model.d.ts +26 -0
- package/dist/plugins/spaces-home-control/models/space-occupancy.model.js +121 -0
- package/dist/plugins/spaces-home-control/models/space-occupancy.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.d.ts +13 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js +81 -2
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js.map +1 -1
- package/dist/plugins/spaces-home-control/occupancy/occupancy-admission.d.ts +7 -0
- package/dist/plugins/spaces-home-control/occupancy/occupancy-admission.js +57 -0
- package/dist/plugins/spaces-home-control/occupancy/occupancy-admission.js.map +1 -0
- package/dist/plugins/spaces-home-control/occupancy/space-occupancy.types.d.ts +31 -0
- package/dist/plugins/spaces-home-control/occupancy/space-occupancy.types.js +30 -0
- package/dist/plugins/spaces-home-control/occupancy/space-occupancy.types.js.map +1 -0
- package/dist/plugins/spaces-home-control/schedule/schedule-time.d.ts +9 -0
- package/dist/plugins/spaces-home-control/schedule/schedule-time.js +79 -0
- package/dist/plugins/spaces-home-control/schedule/schedule-time.js.map +1 -0
- package/dist/plugins/spaces-home-control/schedule/space-mode-schedule.types.d.ts +28 -0
- package/dist/plugins/spaces-home-control/schedule/space-mode-schedule.types.js +7 -0
- package/dist/plugins/spaces-home-control/schedule/space-mode-schedule.types.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/activity-test-support.d.ts +16 -0
- package/dist/plugins/spaces-home-control/services/activity-test-support.js +34 -0
- package/dist/plugins/spaces-home-control/services/activity-test-support.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/climate-contribution-planner.service.d.ts +15 -0
- package/dist/plugins/spaces-home-control/services/climate-contribution-planner.service.js +97 -0
- package/dist/plugins/spaces-home-control/services/climate-contribution-planner.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/climate-intent.service.d.ts +15 -2
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js +155 -15
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/cover-group-intent.port.d.ts +31 -0
- package/dist/plugins/spaces-home-control/services/cover-group-intent.port.js +189 -0
- package/dist/plugins/spaces-home-control/services/cover-group-intent.port.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/covers-intent.service.d.ts +8 -3
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js +139 -65
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/lighting-contribution-planner.service.d.ts +16 -0
- package/dist/plugins/spaces-home-control/services/lighting-contribution-planner.service.js +66 -0
- package/dist/plugins/spaces-home-control/services/lighting-contribution-planner.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.d.ts +13 -3
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js +93 -13
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-activity-config.service.d.ts +25 -0
- package/dist/plugins/spaces-home-control/services/space-activity-config.service.js +144 -0
- package/dist/plugins/spaces-home-control/services/space-activity-config.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-activity-domains.service.d.ts +21 -0
- package/dist/plugins/spaces-home-control/services/space-activity-domains.service.js +139 -0
- package/dist/plugins/spaces-home-control/services/space-activity-domains.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.port.d.ts +17 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.port.js +5 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.port.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.service.d.ts +63 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.service.js +722 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.d.ts +8 -3
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js +25 -19
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.d.ts +16 -2
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.js +102 -18
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-intent-base.service.d.ts +2 -0
- package/dist/plugins/spaces-home-control/services/space-intent-base.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.d.ts +4 -1
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js +94 -24
- 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 +8 -2
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js +79 -13
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-mode-schedule-config.service.d.ts +24 -0
- package/dist/plugins/spaces-home-control/services/space-mode-schedule-config.service.js +132 -0
- package/dist/plugins/spaces-home-control/services/space-mode-schedule-config.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-mode-scheduler.service.d.ts +39 -0
- package/dist/plugins/spaces-home-control/services/space-mode-scheduler.service.js +289 -0
- package/dist/plugins/spaces-home-control/services/space-mode-scheduler.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-mode.service.d.ts +34 -0
- package/dist/plugins/spaces-home-control/services/space-mode.service.js +296 -0
- package/dist/plugins/spaces-home-control/services/space-mode.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-config.service.d.ts +26 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-config.service.js +134 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-config.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-inputs.service.d.ts +21 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-inputs.service.js +84 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-inputs.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy.service.d.ts +48 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy.service.js +285 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-state-read.service.d.ts +5 -1
- package/dist/plugins/spaces-home-control/services/space-state-read.service.js +33 -7
- package/dist/plugins/spaces-home-control/services/space-state-read.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js +52 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js.map +1 -1
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.d.ts +5 -1
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +57 -2
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -1
- package/dist/spec/channels.d.ts +27 -4
- package/dist/spec/channels.js +37 -6
- package/dist/spec/channels.js.map +1 -1
- package/dist/spec/devices.d.ts +20 -0
- package/dist/spec/devices.js +20 -0
- package/dist/spec/devices.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -8,13 +8,21 @@ 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.PropertyValueService = void 0;
|
|
13
16
|
const common_1 = require("@nestjs/common");
|
|
17
|
+
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
14
18
|
const extension_logger_service_1 = require("../../../common/logger/extension-logger.service");
|
|
15
19
|
const storage_service_1 = require("../../storage/services/storage.service");
|
|
16
20
|
const devices_constants_1 = require("../devices.constants");
|
|
17
21
|
const property_value_state_model_1 = require("../models/property-value-state.model");
|
|
22
|
+
const property_command_value_utils_1 = require("../utils/property-command-value.utils");
|
|
23
|
+
const property_metadata_utils_1 = require("../utils/property-metadata.utils");
|
|
24
|
+
const controller_publication_context_1 = require("./controller-publication-context");
|
|
25
|
+
const property_producer_registry_service_1 = require("./property-producer.registry.service");
|
|
18
26
|
const property_value_lock_service_1 = require("./property-value-lock.service");
|
|
19
27
|
const property_value_source_registry_service_1 = require("./property-value-source.registry.service");
|
|
20
28
|
const TREND_POINTS_COUNT = 5;
|
|
@@ -22,31 +30,382 @@ const BOUNDED_READ_MAX_PROPERTIES = 500;
|
|
|
22
30
|
const BOUNDED_READ_SOURCE_CHUNK_SIZE = 50;
|
|
23
31
|
const BOUNDED_READ_DEFAULT_DEADLINE_MS = 750;
|
|
24
32
|
let PropertyValueService = class PropertyValueService {
|
|
25
|
-
constructor(storageService, valueSourceRegistry, valueLock) {
|
|
33
|
+
constructor(storageService, valueSourceRegistry, valueLock, producers, events) {
|
|
26
34
|
this.storageService = storageService;
|
|
27
35
|
this.valueSourceRegistry = valueSourceRegistry;
|
|
28
36
|
this.valueLock = valueLock;
|
|
37
|
+
this.producers = producers;
|
|
38
|
+
this.events = events;
|
|
29
39
|
this.logger = (0, extension_logger_service_1.createExtensionLogger)(devices_constants_1.DEVICES_MODULE_NAME, 'PropertyValueService');
|
|
30
40
|
this.valuesMap = new Map();
|
|
31
41
|
this.recentValuesMap = new Map();
|
|
32
42
|
this.cacheVersions = new Map();
|
|
33
43
|
this.valueTails = new Map();
|
|
44
|
+
this.sampleGeneration = 0;
|
|
45
|
+
this.liveEpochs = new Set();
|
|
46
|
+
this.samples = new Map();
|
|
47
|
+
this.liveWatermarks = new Map();
|
|
48
|
+
this.producers?.setEvidenceValidator((sources) => this.incorporatedEvidenceCurrent(sources));
|
|
34
49
|
}
|
|
35
50
|
async write(property, value, valueTimestamp) {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
.
|
|
51
|
+
const publication = controller_publication_context_1.ControllerPublicationContext.current();
|
|
52
|
+
if (publication) {
|
|
53
|
+
const input = (0, controller_publication_context_1.ownControllerEffectValue)(property);
|
|
54
|
+
const timestamp = valueTimestamp ? new Date(valueTimestamp) : undefined;
|
|
55
|
+
const capture = this.valueSourceRegistry.captureReadSource(input);
|
|
56
|
+
try {
|
|
57
|
+
const key = this.valueSourceRegistry.readSourceKey(capture);
|
|
58
|
+
const eligible = () => publication.isEligible() && this.valueSourceRegistry.isReadSourceCurrent(capture);
|
|
59
|
+
return (await controller_publication_context_1.ControllerPublicationContext.effect('property.value', () => {
|
|
60
|
+
const fields = this.storageFields(input.dataType, value);
|
|
61
|
+
const pointTimestamp = timestamp ?? new Date();
|
|
62
|
+
const point = fields
|
|
63
|
+
? {
|
|
64
|
+
measurement: 'property_value',
|
|
65
|
+
tags: { propertyId: key },
|
|
66
|
+
fields,
|
|
67
|
+
timestamp: pointTimestamp,
|
|
68
|
+
}
|
|
69
|
+
: undefined;
|
|
70
|
+
const history = {
|
|
71
|
+
timestamp: pointTimestamp,
|
|
72
|
+
point,
|
|
73
|
+
storage: this.storageService.captureControllerWrite(point ? [point] : []),
|
|
74
|
+
};
|
|
75
|
+
return this.withValueLock(key, () => this.writeInternal(input, key, value, false, undefined, timestamp, false, false, eligible, history));
|
|
76
|
+
})).changed;
|
|
77
|
+
}
|
|
78
|
+
finally {
|
|
79
|
+
this.valueSourceRegistry.closeReadSource(capture);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const key = this.resolveBestEffort(property, 'write');
|
|
83
|
+
if (key === null)
|
|
84
|
+
return false;
|
|
85
|
+
return (await this.withValueLock(key, () => this.writeInternal(property, key, value, false, undefined, valueTimestamp))).changed;
|
|
39
86
|
}
|
|
40
87
|
async writeWithState(property, value, valueTimestamp) {
|
|
41
|
-
const key = this.
|
|
42
|
-
|
|
88
|
+
const key = this.resolveBestEffort(property, 'write');
|
|
89
|
+
if (key === null)
|
|
90
|
+
return { changed: false, state: null };
|
|
91
|
+
return this.withValueLock(key, () => this.writeInternal(property, key, value, false, undefined, valueTimestamp));
|
|
43
92
|
}
|
|
44
93
|
async writeLiveWithState(property, value, valueTimestamp) {
|
|
45
94
|
if (this.valueLock.isEnabled()) {
|
|
46
95
|
return this.writeWithState(property, value, valueTimestamp);
|
|
47
96
|
}
|
|
97
|
+
const key = this.resolveBestEffort(property, 'write');
|
|
98
|
+
if (key === null)
|
|
99
|
+
return { changed: false, state: null };
|
|
100
|
+
return this.withValueLock(key, () => this.writeInternal(property, key, value, false, undefined, valueTimestamp, true), false);
|
|
101
|
+
}
|
|
102
|
+
async writeSampleWithState(property, value, evidence) {
|
|
103
|
+
const key = this.resolveBestEffort(property, 'sample');
|
|
104
|
+
if (key === null || key !== property.id || this.producers?.owns(key))
|
|
105
|
+
return { changed: false, state: null };
|
|
106
|
+
return this.withValueLock(key, async () => {
|
|
107
|
+
if (this.producers?.owns(key) || evidence.isCurrent?.() === false || evidence.sourceIsCurrent?.() === false)
|
|
108
|
+
return { changed: false, state: null };
|
|
109
|
+
const sampledAt = evidence.sampledAt.getTime();
|
|
110
|
+
const receivedAt = evidence.receivedAt.getTime();
|
|
111
|
+
const watermark = this.liveWatermarks.get(key);
|
|
112
|
+
const live = evidence.provenance === 'live';
|
|
113
|
+
if (!live && this.liveEpochs.has(key))
|
|
114
|
+
return { changed: false, state: null };
|
|
115
|
+
if (watermark && (sampledAt < watermark.sampledAt || (sampledAt === watermark.sampledAt && watermark.invalid)))
|
|
116
|
+
return { changed: false, state: null };
|
|
117
|
+
const validClock = Number.isFinite(sampledAt) &&
|
|
118
|
+
Number.isFinite(receivedAt) &&
|
|
119
|
+
sampledAt <= receivedAt &&
|
|
120
|
+
receivedAt <= Date.now();
|
|
121
|
+
const validSemantic = evidence.semanticOrigin !== 'native_cover_tilt_percentage' ||
|
|
122
|
+
(property.category === devices_constants_1.PropertyCategory.TILT &&
|
|
123
|
+
property.identifier === 'slat_pos' &&
|
|
124
|
+
property.dataType === devices_constants_1.DataTypeType.UCHAR &&
|
|
125
|
+
(0, property_metadata_utils_1.resolvePropertyUnit)(property) === '%');
|
|
126
|
+
if (!validClock || !validSemantic || !this.isSampleValueValid(property, value)) {
|
|
127
|
+
if (live) {
|
|
128
|
+
this.liveEpochs.add(key);
|
|
129
|
+
if (validClock)
|
|
130
|
+
this.liveWatermarks.set(key, { sampledAt, invalid: true });
|
|
131
|
+
this.samples.delete(key);
|
|
132
|
+
this.events?.emit(devices_constants_1.EventType.CHANNEL_PROPERTY_SAMPLE_INVALIDATED, Object.freeze({ propertyId: key, evidence: this.cloneEvidence(evidence) }));
|
|
133
|
+
}
|
|
134
|
+
return { changed: false, state: null };
|
|
135
|
+
}
|
|
136
|
+
const result = await this.writeInternal(property, key, value, false, undefined, evidence.sampledAt, !this.valueLock.isEnabled());
|
|
137
|
+
if (evidence.isCurrent?.() === false || evidence.sourceIsCurrent?.() === false)
|
|
138
|
+
return { changed: false, state: null };
|
|
139
|
+
if (result.state !== null) {
|
|
140
|
+
const sample = Object.freeze({
|
|
141
|
+
propertyId: key,
|
|
142
|
+
value: result.state.value,
|
|
143
|
+
sampledAt: new Date(sampledAt),
|
|
144
|
+
receivedAt: new Date(receivedAt),
|
|
145
|
+
provenance: evidence.provenance,
|
|
146
|
+
...(evidence.semanticOrigin ? { semanticOrigin: evidence.semanticOrigin } : {}),
|
|
147
|
+
...(evidence.nativeCoverTagPresent !== undefined
|
|
148
|
+
? { nativeCoverTagPresent: evidence.nativeCoverTagPresent }
|
|
149
|
+
: {}),
|
|
150
|
+
...(evidence.commandObservation ? { commandObservation: evidence.commandObservation } : {}),
|
|
151
|
+
...(live ? { acceptanceGeneration: ++this.sampleGeneration } : {}),
|
|
152
|
+
quality: 'good',
|
|
153
|
+
reasons: Object.freeze([]),
|
|
154
|
+
});
|
|
155
|
+
if (live) {
|
|
156
|
+
this.liveEpochs.add(key);
|
|
157
|
+
this.liveWatermarks.set(key, { sampledAt, invalid: false });
|
|
158
|
+
this.samples.set(key, {
|
|
159
|
+
...sample,
|
|
160
|
+
provenance: 'live',
|
|
161
|
+
isCurrent: evidence.sourceIsCurrent ?? evidence.isCurrent,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
const snapshot = Object.assign(Object.create(Object.getPrototypeOf(property)), property);
|
|
165
|
+
snapshot.value = (0, property_value_state_model_1.clonePropertyValueState)(result.state);
|
|
166
|
+
this.events?.emit(devices_constants_1.EventType.CHANNEL_PROPERTY_SAMPLE_ACCEPTED, Object.freeze({ propertyId: key, property: snapshot, sample: this.cloneSample(sample, false) }));
|
|
167
|
+
}
|
|
168
|
+
return result;
|
|
169
|
+
}, this.valueLock.isEnabled());
|
|
170
|
+
}
|
|
171
|
+
currentSampleGeneration() {
|
|
172
|
+
return this.sampleGeneration;
|
|
173
|
+
}
|
|
174
|
+
readSampleFreshness(property, maxAgeMs, now = new Date()) {
|
|
175
|
+
const key = this.resolveBestEffort(property, 'sample freshness');
|
|
176
|
+
const unavailable = this.valueSourceRegistry.unavailableReason(property);
|
|
177
|
+
const produced = key === null ? null : this.producers?.readDiagnosticState(key)?.producer;
|
|
178
|
+
const physical = key === null ? null : this.samples.get(key);
|
|
179
|
+
const incorporated = key === null ? null : this.producers?.readIncorporatedSamples(key);
|
|
180
|
+
const current = !unavailable &&
|
|
181
|
+
(produced ? !incorporated || this.incorporatedEvidenceCurrent(incorporated) : physical?.isCurrent?.() !== false);
|
|
182
|
+
const timestamp = produced?.sampledAt ?? physical?.sampledAt.toISOString() ?? null;
|
|
183
|
+
const sampled = timestamp === null ? NaN : Date.parse(timestamp);
|
|
184
|
+
const clockValid = Number.isFinite(now.getTime()) &&
|
|
185
|
+
sampled <= now.getTime() &&
|
|
186
|
+
(produced
|
|
187
|
+
? Date.parse(produced.evaluatedAt) <= now.getTime()
|
|
188
|
+
: (physical?.receivedAt.getTime() ?? Infinity) <= now.getTime());
|
|
189
|
+
const evidence = Number.isFinite(maxAgeMs) &&
|
|
190
|
+
maxAgeMs >= 0 &&
|
|
191
|
+
current &&
|
|
192
|
+
clockValid &&
|
|
193
|
+
(!produced || produced.quality !== 'unavailable');
|
|
194
|
+
const age = evidence ? now.getTime() - sampled : null;
|
|
195
|
+
const expiry = evidence
|
|
196
|
+
? Math.min(sampled + maxAgeMs, produced?.expiresAt ? Date.parse(produced.expiresAt) : Infinity)
|
|
197
|
+
: null;
|
|
198
|
+
const reasons = unavailable ? [unavailable] : [...(produced?.reasons ?? [])];
|
|
199
|
+
const stale = (age !== null &&
|
|
200
|
+
(age > maxAgeMs ||
|
|
201
|
+
(produced?.expiresAt !== null &&
|
|
202
|
+
produced?.expiresAt !== undefined &&
|
|
203
|
+
Date.parse(produced.expiresAt) <= now.getTime()))) ||
|
|
204
|
+
reasons.some((reason) => ['expired', 'stale'].includes(reason));
|
|
205
|
+
return {
|
|
206
|
+
status: stale ? 'stale' : evidence ? 'fresh' : 'unavailable',
|
|
207
|
+
quality: evidence ? (produced?.quality ?? physical?.quality ?? 'unavailable') : 'unavailable',
|
|
208
|
+
sampled_at: evidence ? timestamp : null,
|
|
209
|
+
age_seconds: age === null ? null : age / 1000,
|
|
210
|
+
expires_at: expiry !== null && Number.isFinite(new Date(expiry).getTime()) ? new Date(expiry).toISOString() : null,
|
|
211
|
+
reasons,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
captureSampleSourceGuard(property) {
|
|
215
|
+
const key = this.resolveBestEffort(property, 'sample source lease');
|
|
216
|
+
const sample = key === null ? null : this.samples.get(key);
|
|
217
|
+
const guard = sample?.isCurrent;
|
|
218
|
+
return () => !!sample && guard?.() !== false;
|
|
219
|
+
}
|
|
220
|
+
readQualifiedSample(property, maxAgeMs, now = new Date()) {
|
|
221
|
+
return this.qualifySample(property, maxAgeMs, now, false);
|
|
222
|
+
}
|
|
223
|
+
readQualifiedSampleSnapshot(property, maxAgeMs, now) {
|
|
224
|
+
return this.qualifySample(property, maxAgeMs, now, true);
|
|
225
|
+
}
|
|
226
|
+
qualifySample(property, maxAgeMs, now, detached) {
|
|
227
|
+
if (!Number.isFinite(maxAgeMs) ||
|
|
228
|
+
maxAgeMs < 0 ||
|
|
229
|
+
!Number.isFinite(now.getTime()) ||
|
|
230
|
+
this.valueSourceRegistry.unavailableReason(property) !== null)
|
|
231
|
+
return null;
|
|
232
|
+
const key = this.resolveBestEffort(property, 'qualified sample');
|
|
233
|
+
if (key === null)
|
|
234
|
+
return null;
|
|
235
|
+
const produced = detached ? this.producers?.readDiagnosticState(key) : this.producers?.read(key);
|
|
236
|
+
if (produced) {
|
|
237
|
+
if (produced.value === null ||
|
|
238
|
+
produced.producer.quality === 'unavailable' ||
|
|
239
|
+
produced.producer.sampledAt === null)
|
|
240
|
+
return null;
|
|
241
|
+
const incorporated = this.producers.readIncorporatedSamples(key);
|
|
242
|
+
if (incorporated && !this.incorporatedEvidenceCurrent(incorporated))
|
|
243
|
+
return null;
|
|
244
|
+
const sampledAt = new Date(produced.producer.sampledAt);
|
|
245
|
+
if (!Number.isFinite(sampledAt.getTime()) ||
|
|
246
|
+
!Number.isFinite(Date.parse(produced.producer.evaluatedAt)) ||
|
|
247
|
+
Date.parse(produced.producer.evaluatedAt) < sampledAt.getTime() ||
|
|
248
|
+
sampledAt.getTime() > now.getTime() ||
|
|
249
|
+
Date.parse(produced.producer.evaluatedAt) > now.getTime() ||
|
|
250
|
+
now.getTime() - sampledAt.getTime() > maxAgeMs ||
|
|
251
|
+
(produced.producer.expiresAt !== null && Date.parse(produced.producer.expiresAt) <= now.getTime()))
|
|
252
|
+
return null;
|
|
253
|
+
return Object.freeze({
|
|
254
|
+
propertyId: key,
|
|
255
|
+
value: produced.value,
|
|
256
|
+
sampledAt,
|
|
257
|
+
receivedAt: new Date(produced.producer.evaluatedAt),
|
|
258
|
+
provenance: 'live',
|
|
259
|
+
quality: produced.producer.quality,
|
|
260
|
+
reasons: Object.freeze([...produced.producer.reasons]),
|
|
261
|
+
revision: produced.producer.revision,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
const sample = this.samples.get(key);
|
|
265
|
+
if (!sample ||
|
|
266
|
+
sample.isCurrent?.() === false ||
|
|
267
|
+
sample.sampledAt.getTime() > now.getTime() ||
|
|
268
|
+
sample.receivedAt.getTime() > now.getTime() ||
|
|
269
|
+
now.getTime() - sample.sampledAt.getTime() > maxAgeMs)
|
|
270
|
+
return null;
|
|
271
|
+
return this.cloneSample(sample);
|
|
272
|
+
}
|
|
273
|
+
captureIncorporatedSample(property) {
|
|
274
|
+
const key = this.resolveBestEffort(property, 'incorporated evidence');
|
|
275
|
+
if (!key || this.valueSourceRegistry.unavailableReason(property) !== null)
|
|
276
|
+
return null;
|
|
277
|
+
if (this.producers?.owns(key))
|
|
278
|
+
return this.producers.captureEvidence(key);
|
|
279
|
+
const sample = this.samples.get(key);
|
|
280
|
+
if (!sample || sample.quality !== 'good' || sample.isCurrent?.() === false)
|
|
281
|
+
return null;
|
|
282
|
+
return Object.freeze({ propertyId: key, acceptanceGeneration: sample.acceptanceGeneration });
|
|
283
|
+
}
|
|
284
|
+
incorporatedEvidenceCurrent(sources) {
|
|
285
|
+
const visited = new Set();
|
|
286
|
+
const visit = (items, depth) => {
|
|
287
|
+
const evidence = items;
|
|
288
|
+
if (!Array.isArray(items) || !items.length || items.length > 32 || depth > 16)
|
|
289
|
+
return false;
|
|
290
|
+
for (const item of evidence) {
|
|
291
|
+
if (!item || visited.has(item.propertyId) || visited.size >= 256)
|
|
292
|
+
return false;
|
|
293
|
+
visited.add(item.propertyId);
|
|
294
|
+
if (item.producer) {
|
|
295
|
+
if (!this.producers?.isPublicationCurrent(item) || !visit(item.sources, depth + 1))
|
|
296
|
+
return false;
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
const sample = this.samples.get(item.propertyId);
|
|
300
|
+
if (item.sources ||
|
|
301
|
+
!Number.isSafeInteger(item.acceptanceGeneration) ||
|
|
302
|
+
!sample ||
|
|
303
|
+
sample.acceptanceGeneration !== item.acceptanceGeneration ||
|
|
304
|
+
sample.isCurrent?.() === false ||
|
|
305
|
+
sample.quality !== 'good' ||
|
|
306
|
+
sample.receivedAt.getTime() > Date.now() ||
|
|
307
|
+
sample.sampledAt.getTime() > Date.now())
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return true;
|
|
312
|
+
};
|
|
313
|
+
return visit(sources, 0);
|
|
314
|
+
}
|
|
315
|
+
async publishDerived(property, lease, value, publication, evaluation) {
|
|
316
|
+
if ((publication.sourceSample && publication.sourceSamples) ||
|
|
317
|
+
(publication.sourceSamples && !this.incorporatedEvidenceCurrent(publication.sourceSamples)) ||
|
|
318
|
+
(publication.sourceSample && !this.incorporatedEvidenceCurrent([publication.sourceSample])))
|
|
319
|
+
return { changed: false, state: null };
|
|
320
|
+
publication = Object.freeze({
|
|
321
|
+
...publication,
|
|
322
|
+
reasons: Object.freeze([...publication.reasons]),
|
|
323
|
+
sampledAt: new Date(publication.sampledAt),
|
|
324
|
+
evaluatedAt: new Date(publication.evaluatedAt),
|
|
325
|
+
expiresAt: new Date(publication.expiresAt),
|
|
326
|
+
sourceSample: publication.sourceSample
|
|
327
|
+
? this.freezeIncorporatedEvidence([publication.sourceSample])[0]
|
|
328
|
+
: undefined,
|
|
329
|
+
sourceSamples: publication.sourceSamples ? this.freezeIncorporatedEvidence(publication.sourceSamples) : undefined,
|
|
330
|
+
});
|
|
48
331
|
const key = this.valueSourceRegistry.resolve(property);
|
|
49
|
-
|
|
332
|
+
const epoch = evaluation?.epoch ?? this.producers?.version(lease) ?? null;
|
|
333
|
+
if (key !== property.id ||
|
|
334
|
+
this.valueSourceRegistry.unavailableReason(property) !== null ||
|
|
335
|
+
lease.propertyId !== key ||
|
|
336
|
+
!this.producers?.canCommit(lease, publication, epoch, evaluation?.generation))
|
|
337
|
+
return { changed: false, state: null };
|
|
338
|
+
return this.withValueLock(key, async () => {
|
|
339
|
+
if (this.valueSourceRegistry.unavailableReason(property) !== null ||
|
|
340
|
+
!this.producers.canCommit(lease, publication, epoch, evaluation?.generation))
|
|
341
|
+
return { changed: false, state: null };
|
|
342
|
+
if (!this.isSampleValueValid(property, value)) {
|
|
343
|
+
this.producers.invalidate(lease, ['invalid_value'], publication.evaluatedAt);
|
|
344
|
+
return { changed: false, state: this.producers.read(key) };
|
|
345
|
+
}
|
|
346
|
+
const result = await this.writeInternal(property, key, value, false, undefined, publication.sampledAt, false, true);
|
|
347
|
+
if (!result.state || !this.producers.commit(lease, result.state, publication, epoch, evaluation?.generation))
|
|
348
|
+
return { changed: false, state: this.producers.read(key) };
|
|
349
|
+
return { changed: result.changed, state: this.producers.read(key) };
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
freezeIncorporatedEvidence(sources, depth = 0) {
|
|
353
|
+
const evidence = sources;
|
|
354
|
+
if (!Array.isArray(sources) || !sources.length || sources.length > 32 || depth > 16)
|
|
355
|
+
return Object.freeze([]);
|
|
356
|
+
return Object.freeze(evidence.map((source) => Object.freeze({
|
|
357
|
+
...source,
|
|
358
|
+
producer: source.producer ? Object.freeze({ ...source.producer }) : undefined,
|
|
359
|
+
sources: source.sources ? this.freezeIncorporatedEvidence(source.sources, depth + 1) : undefined,
|
|
360
|
+
})));
|
|
361
|
+
}
|
|
362
|
+
invalidateDerived(property, lease, reasons, evaluatedAt = new Date()) {
|
|
363
|
+
return (lease.propertyId === property.id &&
|
|
364
|
+
this.valueSourceRegistry.resolve(property) === property.id &&
|
|
365
|
+
(this.producers?.invalidate(lease, reasons, evaluatedAt) ?? false));
|
|
366
|
+
}
|
|
367
|
+
cloneEvidence(evidence) {
|
|
368
|
+
return Object.freeze({
|
|
369
|
+
sampledAt: new Date(evidence.sampledAt),
|
|
370
|
+
receivedAt: new Date(evidence.receivedAt),
|
|
371
|
+
provenance: evidence.provenance,
|
|
372
|
+
...(evidence.semanticOrigin ? { semanticOrigin: evidence.semanticOrigin } : {}),
|
|
373
|
+
...(evidence.observedAt ? { observedAt: new Date(evidence.observedAt) } : {}),
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
cloneSample(sample, includeCommandProof = true) {
|
|
377
|
+
const { commandObservation, ...ordinary } = sample;
|
|
378
|
+
return Object.freeze({
|
|
379
|
+
...ordinary,
|
|
380
|
+
...(includeCommandProof && commandObservation ? { commandObservation } : {}),
|
|
381
|
+
sampledAt: new Date(sample.sampledAt),
|
|
382
|
+
receivedAt: new Date(sample.receivedAt),
|
|
383
|
+
reasons: Object.freeze([...sample.reasons]),
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
isSampleValueValid(property, value) {
|
|
387
|
+
return (0, property_command_value_utils_1.validatePropertyCommandValue)({ ...property, invalid: property.invalid ?? null, step: null }, value).valid;
|
|
388
|
+
}
|
|
389
|
+
overlay(property, state) {
|
|
390
|
+
const key = this.resolveBestEffort(property, 'producer overlay');
|
|
391
|
+
const produced = key === null ? null : this.producers?.read(key);
|
|
392
|
+
const reason = this.valueSourceRegistry.unavailableReason(property);
|
|
393
|
+
return this.overlaySource(produced, reason, state);
|
|
394
|
+
}
|
|
395
|
+
overlaySource(produced, reason, state) {
|
|
396
|
+
if (reason) {
|
|
397
|
+
const blocked = new property_value_state_model_1.PropertyValueState();
|
|
398
|
+
blocked.producer = Object.assign(new property_value_state_model_1.PropertyProducerState(), {
|
|
399
|
+
quality: 'unavailable',
|
|
400
|
+
reasons: [reason],
|
|
401
|
+
sampledAt: null,
|
|
402
|
+
evaluatedAt: new Date().toISOString(),
|
|
403
|
+
expiresAt: null,
|
|
404
|
+
revision: produced?.producer?.revision ?? 0,
|
|
405
|
+
});
|
|
406
|
+
return blocked;
|
|
407
|
+
}
|
|
408
|
+
return produced ?? state;
|
|
50
409
|
}
|
|
51
410
|
flushHistory() {
|
|
52
411
|
return this.storageService.flushQueuedWrites();
|
|
@@ -56,7 +415,7 @@ let PropertyValueService = class PropertyValueService {
|
|
|
56
415
|
}
|
|
57
416
|
async writeStrictWithState(property, value, storageBinding, valueTimestamp) {
|
|
58
417
|
const key = this.valueSourceRegistry.resolve(property);
|
|
59
|
-
return this.withValueLock(key, () => this.writeInternal(property, value, true, storageBinding, valueTimestamp));
|
|
418
|
+
return this.withValueLock(key, () => this.writeInternal(property, key, value, true, storageBinding, valueTimestamp));
|
|
60
419
|
}
|
|
61
420
|
async writeStrictIfPersistedDifferent(property, value, expectedPersistedState, beforeWrite, valueTimestamp) {
|
|
62
421
|
const key = this.valueSourceRegistry.resolve(property);
|
|
@@ -73,11 +432,31 @@ let PropertyValueService = class PropertyValueService {
|
|
|
73
432
|
throw new Error('Persisted property value read did not bind a storage backend');
|
|
74
433
|
}
|
|
75
434
|
await valueLease.assertOwned();
|
|
76
|
-
return this.writeInternal(property, value, true, latest.storageBinding, valueTimestamp);
|
|
435
|
+
return this.writeInternal(property, key, value, true, latest.storageBinding, valueTimestamp);
|
|
77
436
|
});
|
|
78
437
|
}
|
|
79
|
-
|
|
80
|
-
|
|
438
|
+
storageFields(dataType, value) {
|
|
439
|
+
switch (dataType) {
|
|
440
|
+
case devices_constants_1.DataTypeType.ENUM:
|
|
441
|
+
case devices_constants_1.DataTypeType.STRING:
|
|
442
|
+
return { stringValue: String(value) };
|
|
443
|
+
case devices_constants_1.DataTypeType.BOOL:
|
|
444
|
+
return { stringValue: String(value ? 'true' : 'false') };
|
|
445
|
+
case devices_constants_1.DataTypeType.CHAR:
|
|
446
|
+
case devices_constants_1.DataTypeType.UCHAR:
|
|
447
|
+
case devices_constants_1.DataTypeType.SHORT:
|
|
448
|
+
case devices_constants_1.DataTypeType.USHORT:
|
|
449
|
+
case devices_constants_1.DataTypeType.INT:
|
|
450
|
+
case devices_constants_1.DataTypeType.UINT:
|
|
451
|
+
case devices_constants_1.DataTypeType.FLOAT:
|
|
452
|
+
return { numberValue: Number(value) };
|
|
453
|
+
default:
|
|
454
|
+
return undefined;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
async writeInternal(property, key, value, strict, storageBinding, valueTimestamp, deferHistory = false, producerWrite = false, ownedCurrent, ownedHistory) {
|
|
458
|
+
if (!producerWrite && this.producers?.owns(key))
|
|
459
|
+
return { changed: false, state: null };
|
|
81
460
|
if (key !== property.id) {
|
|
82
461
|
this.logger.debug(`Skipping write for projected property id=${property.id}: its value belongs to source property id=${key}`);
|
|
83
462
|
return { changed: false, state: null };
|
|
@@ -91,6 +470,8 @@ let PropertyValueService = class PropertyValueService {
|
|
|
91
470
|
}
|
|
92
471
|
const cached = this.valuesMap.get(key);
|
|
93
472
|
if (!strict && cached && cached.value === value) {
|
|
473
|
+
if (ownedCurrent && !ownedCurrent())
|
|
474
|
+
return { changed: false, state: (0, property_value_state_model_1.clonePropertyValueState)(cached) };
|
|
94
475
|
cached.lastUpdated = (valueTimestamp ?? new Date()).toISOString();
|
|
95
476
|
this.bumpCacheVersion(key);
|
|
96
477
|
return { changed: false, state: cached };
|
|
@@ -100,31 +481,14 @@ let PropertyValueService = class PropertyValueService {
|
|
|
100
481
|
this.logger.warn(`Invalid value for property id=${property.id}: ${validationError}. Value=${JSON.stringify(value)}`);
|
|
101
482
|
return { changed: false, state: null };
|
|
102
483
|
}
|
|
103
|
-
const formattedValue =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
formattedValue.stringValue = String(value);
|
|
108
|
-
break;
|
|
109
|
-
case devices_constants_1.DataTypeType.BOOL:
|
|
110
|
-
formattedValue.stringValue = String(value ? 'true' : 'false');
|
|
111
|
-
break;
|
|
112
|
-
case devices_constants_1.DataTypeType.CHAR:
|
|
113
|
-
case devices_constants_1.DataTypeType.UCHAR:
|
|
114
|
-
case devices_constants_1.DataTypeType.SHORT:
|
|
115
|
-
case devices_constants_1.DataTypeType.USHORT:
|
|
116
|
-
case devices_constants_1.DataTypeType.INT:
|
|
117
|
-
case devices_constants_1.DataTypeType.UINT:
|
|
118
|
-
case devices_constants_1.DataTypeType.FLOAT:
|
|
119
|
-
formattedValue.numberValue = Number(value);
|
|
120
|
-
break;
|
|
121
|
-
default:
|
|
122
|
-
this.logger.error(`Unsupported data type dataType=${property.dataType} id=${property.id}`);
|
|
123
|
-
return { changed: false, state: null };
|
|
484
|
+
const formattedValue = ownedHistory ? ownedHistory.point?.fields : this.storageFields(property.dataType, value);
|
|
485
|
+
if (!formattedValue) {
|
|
486
|
+
this.logger.error(`Unsupported data type dataType=${property.dataType} id=${property.id}`);
|
|
487
|
+
return { changed: false, state: null };
|
|
124
488
|
}
|
|
125
|
-
const timestamp = valueTimestamp ?? new Date();
|
|
489
|
+
const timestamp = ownedHistory?.timestamp ?? valueTimestamp ?? new Date();
|
|
126
490
|
const now = timestamp.toISOString();
|
|
127
|
-
const point = {
|
|
491
|
+
const point = ownedHistory?.point ?? {
|
|
128
492
|
measurement: 'property_value',
|
|
129
493
|
tags: { propertyId: key },
|
|
130
494
|
fields: formattedValue,
|
|
@@ -133,12 +497,13 @@ let PropertyValueService = class PropertyValueService {
|
|
|
133
497
|
const cacheVersionAtWriteStart = this.cacheVersion(key);
|
|
134
498
|
if (strict) {
|
|
135
499
|
await this.storageService.writePointsStrict([point], storageBinding);
|
|
136
|
-
if (this.cacheVersion(key) !== cacheVersionAtWriteStart) {
|
|
500
|
+
if (this.cacheVersion(key) !== cacheVersionAtWriteStart || (ownedCurrent && !ownedCurrent())) {
|
|
137
501
|
return { changed: true, state: new property_value_state_model_1.PropertyValueState(value, now) };
|
|
138
502
|
}
|
|
139
503
|
}
|
|
140
|
-
if (
|
|
141
|
-
(typeof value === '
|
|
504
|
+
if ((!ownedCurrent || ownedCurrent()) &&
|
|
505
|
+
(typeof value === 'number' ||
|
|
506
|
+
(typeof value === 'string' && !isNaN(Number(value)) && this.isNumericDataType(property.dataType)))) {
|
|
142
507
|
const numValue = Number(value);
|
|
143
508
|
const recent = this.recentValuesMap.get(key) ?? [];
|
|
144
509
|
recent.push(numValue);
|
|
@@ -149,108 +514,191 @@ let PropertyValueService = class PropertyValueService {
|
|
|
149
514
|
}
|
|
150
515
|
const trend = this.computeTrend(property, key);
|
|
151
516
|
const state = new property_value_state_model_1.PropertyValueState(value, now, trend);
|
|
152
|
-
|
|
517
|
+
if (!ownedCurrent || ownedCurrent())
|
|
518
|
+
this.setCachedState(key, state);
|
|
153
519
|
if (strict) {
|
|
154
520
|
return { changed: true, state };
|
|
155
521
|
}
|
|
156
|
-
if (!this.storageService.isConnected()) {
|
|
522
|
+
if (!(ownedHistory ? ownedHistory.storage.connection() : this.storageService.isConnected())) {
|
|
157
523
|
return { changed: true, state };
|
|
158
524
|
}
|
|
159
525
|
try {
|
|
160
526
|
if (deferHistory) {
|
|
161
527
|
await this.storageService.enqueueWritePoint(point);
|
|
162
528
|
}
|
|
529
|
+
else if (ownedHistory) {
|
|
530
|
+
await ownedHistory.storage.write();
|
|
531
|
+
}
|
|
163
532
|
else {
|
|
164
533
|
await this.storageService.writePoints([point]);
|
|
165
534
|
}
|
|
166
535
|
this.logger.debug(`Value ${deferHistory ? 'queued' : 'saved'} id=${property.id} dataType=${property.dataType}`);
|
|
167
536
|
}
|
|
168
537
|
catch (error) {
|
|
538
|
+
if (ownedHistory) {
|
|
539
|
+
try {
|
|
540
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
541
|
+
this.logger.error(`Failed to write original property history id=${property.id} error=${message}`);
|
|
542
|
+
}
|
|
543
|
+
catch {
|
|
544
|
+
}
|
|
545
|
+
return { changed: true, state };
|
|
546
|
+
}
|
|
169
547
|
const err = error;
|
|
170
548
|
this.logger.error(`Failed to write value to storage id=${property.id} dataType=${property.dataType} error=${err.message}`, err.stack);
|
|
171
549
|
}
|
|
172
550
|
return { changed: true, state };
|
|
173
551
|
}
|
|
174
552
|
async readLatest(property) {
|
|
175
|
-
return (await this.
|
|
553
|
+
return (await this.readSingleProperty(property, false)).state;
|
|
176
554
|
}
|
|
177
555
|
async readLatestStrict(property) {
|
|
178
|
-
return (await this.
|
|
556
|
+
return (await this.readSingleProperty(property, true)).state;
|
|
179
557
|
}
|
|
180
558
|
async readLatestPersisted(property) {
|
|
181
559
|
return (await this.readLatestPersistedSnapshot(property)).state;
|
|
182
560
|
}
|
|
183
561
|
async readLatestPersistedSnapshot(property) {
|
|
184
|
-
await this.
|
|
185
|
-
const result = await this.readLatestInternal(property, true, true, true);
|
|
562
|
+
const result = await this.readSingleProperty(property, true, true);
|
|
186
563
|
if (!result.storageBinding) {
|
|
187
564
|
throw new Error('Persisted property value read did not bind a storage backend');
|
|
188
565
|
}
|
|
189
566
|
return { state: result.state, storageBinding: result.storageBinding };
|
|
190
567
|
}
|
|
191
|
-
async
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
568
|
+
async readSingleProperty(property, strict, persisted = false) {
|
|
569
|
+
let capture;
|
|
570
|
+
try {
|
|
571
|
+
capture = this.valueSourceRegistry.captureReadSource(property);
|
|
572
|
+
}
|
|
573
|
+
catch (error) {
|
|
574
|
+
if (strict)
|
|
575
|
+
throw error;
|
|
576
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
577
|
+
this.logger.error(`Failed to capture property value source error=${err.message}`, err.stack);
|
|
578
|
+
return { state: null };
|
|
579
|
+
}
|
|
580
|
+
try {
|
|
581
|
+
const input = this.valueSourceRegistry.readSourceInput(capture);
|
|
582
|
+
const key = this.valueSourceRegistry.readSourceKey(capture);
|
|
583
|
+
const reason = this.valueSourceRegistry.readSourceUnavailableReason(capture);
|
|
584
|
+
const overlay = (state) => {
|
|
585
|
+
this.assertReadSourceCurrent(capture);
|
|
586
|
+
return this.overlaySource(this.producers?.read(key), reason, state);
|
|
587
|
+
};
|
|
588
|
+
if (!persisted) {
|
|
589
|
+
const produced = overlay(null);
|
|
590
|
+
if (produced)
|
|
591
|
+
return { state: produced };
|
|
201
592
|
}
|
|
202
|
-
|
|
203
|
-
|
|
593
|
+
try {
|
|
594
|
+
if (persisted) {
|
|
595
|
+
await this.flushHistory();
|
|
596
|
+
this.assertReadSourceCurrent(capture);
|
|
597
|
+
}
|
|
598
|
+
const result = await this.readLatestInternal(input, strict, persisted, persisted, capture);
|
|
599
|
+
return { ...result, state: overlay(result.state) };
|
|
600
|
+
}
|
|
601
|
+
catch (error) {
|
|
602
|
+
try {
|
|
603
|
+
if (!persisted && this.valueSourceRegistry.isReadSourceCurrent(capture)) {
|
|
604
|
+
const produced = overlay(null);
|
|
605
|
+
if (produced)
|
|
606
|
+
return { state: produced };
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
catch {
|
|
610
|
+
}
|
|
611
|
+
throw error;
|
|
204
612
|
}
|
|
205
613
|
}
|
|
206
|
-
|
|
207
|
-
|
|
614
|
+
catch (error) {
|
|
615
|
+
if (strict)
|
|
616
|
+
throw error;
|
|
617
|
+
return { state: null };
|
|
208
618
|
}
|
|
209
|
-
|
|
210
|
-
|
|
619
|
+
finally {
|
|
620
|
+
this.valueSourceRegistry.closeReadSource(capture);
|
|
211
621
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
ORDER BY time DESC
|
|
221
|
-
LIMIT ${TREND_POINTS_COUNT}
|
|
222
|
-
`;
|
|
622
|
+
}
|
|
623
|
+
assertReadSourceCurrent(capture) {
|
|
624
|
+
if (!this.valueSourceRegistry.isReadSourceCurrent(capture)) {
|
|
625
|
+
throw new Error('Property value source changed during read');
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
async readLatestManyStrict(properties) {
|
|
629
|
+
const captures = [];
|
|
223
630
|
try {
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
631
|
+
const entries = properties.map((property) => {
|
|
632
|
+
const capture = this.valueSourceRegistry.captureReadSource(property);
|
|
633
|
+
captures.push(capture);
|
|
634
|
+
return {
|
|
635
|
+
capture,
|
|
636
|
+
input: this.valueSourceRegistry.readSourceInput(capture),
|
|
637
|
+
key: this.valueSourceRegistry.readSourceKey(capture),
|
|
638
|
+
reason: this.valueSourceRegistry.readSourceUnavailableReason(capture),
|
|
639
|
+
};
|
|
640
|
+
});
|
|
641
|
+
const overlay = (entry, state) => {
|
|
642
|
+
this.assertReadSourceCurrent(entry.capture);
|
|
643
|
+
return this.overlaySource(this.producers?.read(entry.key), entry.reason, state);
|
|
644
|
+
};
|
|
645
|
+
const cachedStates = new Map();
|
|
646
|
+
const missingByKey = new Map();
|
|
647
|
+
const versions = new Map();
|
|
648
|
+
for (const entry of entries) {
|
|
649
|
+
const state = overlay(entry, null) ?? this.valuesMap.get(entry.key);
|
|
650
|
+
if (state) {
|
|
651
|
+
cachedStates.set(entry.capture, state);
|
|
652
|
+
}
|
|
653
|
+
else if (!missingByKey.has(entry.key)) {
|
|
654
|
+
missingByKey.set(entry.key, entry);
|
|
655
|
+
versions.set(entry.key, this.cacheVersion(entry.key));
|
|
656
|
+
}
|
|
228
657
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
if (this.
|
|
232
|
-
|
|
233
|
-
.map((row) => row.numberValue)
|
|
234
|
-
.filter((value) => value !== undefined)
|
|
235
|
-
.reverse());
|
|
658
|
+
const rowsByKey = new Map();
|
|
659
|
+
if (missingByKey.size > 0) {
|
|
660
|
+
if (!this.storageService.isConnected()) {
|
|
661
|
+
throw new Error('Property value storage is unavailable');
|
|
236
662
|
}
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
663
|
+
const query = this.buildBoundedPropertyValueQuery([...missingByKey.keys()]);
|
|
664
|
+
const rows = await this.storageService.queryStrict(query);
|
|
665
|
+
for (const row of rows) {
|
|
666
|
+
rowsByKey.set(row.propertyId, [...(rowsByKey.get(row.propertyId) ?? []), row]);
|
|
240
667
|
}
|
|
241
668
|
}
|
|
242
|
-
for (const
|
|
243
|
-
|
|
244
|
-
|
|
669
|
+
for (const entry of entries)
|
|
670
|
+
this.assertReadSourceCurrent(entry.capture);
|
|
671
|
+
const admitted = new Set();
|
|
672
|
+
for (const [key, entry] of missingByKey) {
|
|
673
|
+
if (this.cacheVersion(key) !== versions.get(key))
|
|
674
|
+
continue;
|
|
675
|
+
const propertyRows = rowsByKey.get(key) ?? [];
|
|
676
|
+
admitted.add(key);
|
|
677
|
+
this.updateRecentValuesFromRows(entry.input, key, propertyRows);
|
|
678
|
+
if (propertyRows[0]) {
|
|
679
|
+
this.setCachedState(key, this.toState(entry.input, key, propertyRows[0]));
|
|
245
680
|
}
|
|
246
681
|
}
|
|
682
|
+
const states = new Map();
|
|
683
|
+
for (const entry of entries) {
|
|
684
|
+
const row = rowsByKey.get(entry.key)?.[0];
|
|
685
|
+
const state = cachedStates.get(entry.capture) ??
|
|
686
|
+
(row && admitted.has(entry.key)
|
|
687
|
+
? this.toState(entry.input, entry.key, row)
|
|
688
|
+
: (this.valuesMap.get(entry.key) ?? null));
|
|
689
|
+
states.set(entry.input.id, overlay(entry, state));
|
|
690
|
+
}
|
|
247
691
|
return states;
|
|
248
692
|
}
|
|
249
693
|
catch (error) {
|
|
250
|
-
const err = error;
|
|
694
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
251
695
|
this.logger.error(`Failed to batch read latest property values from storage error=${err.message}`, err.stack);
|
|
252
696
|
throw error;
|
|
253
697
|
}
|
|
698
|
+
finally {
|
|
699
|
+
for (const capture of captures)
|
|
700
|
+
this.valueSourceRegistry.closeReadSource(capture);
|
|
701
|
+
}
|
|
254
702
|
}
|
|
255
703
|
async readLatestManyBounded(properties, options = {}) {
|
|
256
704
|
if (properties.length > BOUNDED_READ_MAX_PROPERTIES) {
|
|
@@ -263,67 +711,129 @@ let PropertyValueService = class PropertyValueService {
|
|
|
263
711
|
}
|
|
264
712
|
const deadlineAt = Math.min(requestedDeadlineAt, startedAt + BOUNDED_READ_DEFAULT_DEADLINE_MS);
|
|
265
713
|
const items = new Array(properties.length);
|
|
266
|
-
const
|
|
714
|
+
const captures = [];
|
|
715
|
+
const entries = [];
|
|
267
716
|
const unresolvedBySource = new Map();
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
717
|
+
let sourceResolutionFailed = false;
|
|
718
|
+
try {
|
|
719
|
+
for (const [index, property] of properties.entries()) {
|
|
720
|
+
let id = '';
|
|
721
|
+
try {
|
|
722
|
+
id = Object.getOwnPropertyDescriptor(property, 'id')?.value;
|
|
723
|
+
const capture = this.valueSourceRegistry.captureReadSource(property);
|
|
724
|
+
captures.push(capture);
|
|
725
|
+
entries[index] = {
|
|
726
|
+
capture,
|
|
727
|
+
input: this.valueSourceRegistry.readSourceInput(capture),
|
|
728
|
+
key: this.valueSourceRegistry.readSourceKey(capture),
|
|
729
|
+
reason: this.valueSourceRegistry.readSourceUnavailableReason(capture),
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
catch (error) {
|
|
733
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
734
|
+
this.logger.error(`Failed to capture bounded property value source error=${err.message}`, err.stack);
|
|
735
|
+
sourceResolutionFailed = true;
|
|
736
|
+
items[index] = {
|
|
737
|
+
propertyId: typeof id === 'string' ? id : '',
|
|
738
|
+
sourcePropertyId: null,
|
|
739
|
+
status: 'unprocessed',
|
|
740
|
+
source: null,
|
|
741
|
+
state: null,
|
|
742
|
+
};
|
|
743
|
+
}
|
|
282
744
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
if (Date.now() >= deadlineAt) {
|
|
301
|
-
storageStatus = 'timed_out';
|
|
302
|
-
break;
|
|
745
|
+
for (const [index, entry] of entries.entries()) {
|
|
746
|
+
if (!entry || !this.valueSourceRegistry.isReadSourceCurrent(entry.capture))
|
|
747
|
+
continue;
|
|
748
|
+
const produced = this.overlaySource(this.producers?.read(entry.key), entry.reason, null);
|
|
749
|
+
if (!this.valueSourceRegistry.isReadSourceCurrent(entry.capture))
|
|
750
|
+
continue;
|
|
751
|
+
const state = produced ?? this.valuesMap.get(entry.key);
|
|
752
|
+
if (state) {
|
|
753
|
+
items[index] = this.toBoundedItem(entry.input.id, entry.key, state, 'cache');
|
|
754
|
+
entry.resultVersion = this.cacheVersion(entry.key);
|
|
755
|
+
continue;
|
|
756
|
+
}
|
|
757
|
+
const group = unresolvedBySource.get(entry.key);
|
|
758
|
+
if (group)
|
|
759
|
+
group.indexes.push(index);
|
|
760
|
+
else
|
|
761
|
+
unresolvedBySource.set(entry.key, { indexes: [index], version: this.cacheVersion(entry.key) });
|
|
303
762
|
}
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
763
|
+
const finish = (status) => {
|
|
764
|
+
this.refreshBoundedItemsFromCache(items, entries);
|
|
765
|
+
this.overlayBoundedItems(items, entries);
|
|
766
|
+
return this.buildBoundedResult(items, status);
|
|
767
|
+
};
|
|
768
|
+
if (unresolvedBySource.size === 0)
|
|
769
|
+
return finish(sourceResolutionFailed ? 'failed' : 'not_needed');
|
|
770
|
+
if (Date.now() >= deadlineAt)
|
|
771
|
+
return finish('timed_out');
|
|
772
|
+
if (!this.storageService.isConnected())
|
|
773
|
+
return finish('disconnected');
|
|
774
|
+
const sourceEntries = [...unresolvedBySource.entries()];
|
|
775
|
+
let storageStatus = sourceResolutionFailed ? 'failed' : 'available';
|
|
776
|
+
for (let offset = 0; offset < sourceEntries.length; offset += BOUNDED_READ_SOURCE_CHUNK_SIZE) {
|
|
777
|
+
if (Date.now() >= deadlineAt) {
|
|
309
778
|
storageStatus = 'timed_out';
|
|
310
779
|
break;
|
|
311
780
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
781
|
+
const chunk = sourceEntries.slice(offset, offset + BOUNDED_READ_SOURCE_CHUNK_SIZE);
|
|
782
|
+
const query = this.buildBoundedPropertyValueQuery(chunk.map(([key]) => key));
|
|
783
|
+
try {
|
|
784
|
+
const rows = await this.queryPropertyValuesBeforeDeadline(query, deadlineAt);
|
|
785
|
+
if (rows === null) {
|
|
786
|
+
storageStatus = 'timed_out';
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
this.applyBoundedStorageRows(items, entries, chunk, rows);
|
|
790
|
+
}
|
|
791
|
+
catch (error) {
|
|
792
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
793
|
+
this.logger.error(`Failed to bounded-batch read latest property values error=${err.message}`, err.stack);
|
|
794
|
+
storageStatus = 'failed';
|
|
795
|
+
break;
|
|
315
796
|
}
|
|
316
797
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
798
|
+
return finish(storageStatus);
|
|
799
|
+
}
|
|
800
|
+
finally {
|
|
801
|
+
for (const capture of captures)
|
|
802
|
+
this.valueSourceRegistry.closeReadSource(capture);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
overlayBoundedItems(items, entries) {
|
|
806
|
+
for (const [index, entry] of entries.entries()) {
|
|
807
|
+
if (!entry)
|
|
808
|
+
continue;
|
|
809
|
+
if (!this.valueSourceRegistry.isReadSourceCurrent(entry.capture)) {
|
|
810
|
+
items[index] = undefined;
|
|
322
811
|
}
|
|
812
|
+
else {
|
|
813
|
+
const produced = this.overlaySource(this.producers?.read(entry.key), entry.reason, null);
|
|
814
|
+
if (!this.valueSourceRegistry.isReadSourceCurrent(entry.capture))
|
|
815
|
+
items[index] = undefined;
|
|
816
|
+
else if (produced)
|
|
817
|
+
items[index] = this.toBoundedItem(entry.input.id, entry.key, produced, items[index]?.source ?? 'cache');
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
for (const [index, entry] of entries.entries()) {
|
|
821
|
+
if (entry && !this.valueSourceRegistry.isReadSourceCurrent(entry.capture))
|
|
822
|
+
items[index] = undefined;
|
|
823
|
+
}
|
|
824
|
+
for (const [index, entry] of entries.entries()) {
|
|
825
|
+
if (!entry)
|
|
826
|
+
continue;
|
|
827
|
+
if (!this.valueSourceRegistry.isReadSourceStructurallyCurrent(entry.capture))
|
|
828
|
+
items[index] = undefined;
|
|
829
|
+
items[index] ??= {
|
|
830
|
+
propertyId: entry.input.id,
|
|
831
|
+
sourcePropertyId: entry.key,
|
|
832
|
+
status: 'unprocessed',
|
|
833
|
+
source: null,
|
|
834
|
+
state: null,
|
|
835
|
+
};
|
|
323
836
|
}
|
|
324
|
-
this.refreshBoundedItemsFromCache(items, properties, sourcePropertyIds);
|
|
325
|
-
this.fillUnprocessedBoundedItems(items, properties, unresolvedBySource);
|
|
326
|
-
return this.buildBoundedResult(items, storageStatus);
|
|
327
837
|
}
|
|
328
838
|
buildBoundedPropertyValueQuery(sourcePropertyIds) {
|
|
329
839
|
const predicate = sourcePropertyIds
|
|
@@ -344,42 +854,59 @@ let PropertyValueService = class PropertyValueService {
|
|
|
344
854
|
return null;
|
|
345
855
|
}
|
|
346
856
|
const controller = new AbortController();
|
|
347
|
-
|
|
857
|
+
let timeout;
|
|
858
|
+
const expired = () => {
|
|
859
|
+
controller.abort(new Error('Property value storage query timed out'));
|
|
860
|
+
return null;
|
|
861
|
+
};
|
|
348
862
|
try {
|
|
349
|
-
|
|
863
|
+
const deadline = new Promise((resolve) => {
|
|
864
|
+
timeout = setTimeout(() => resolve(expired()), remainingMs);
|
|
865
|
+
});
|
|
866
|
+
const result = await Promise.race([
|
|
867
|
+
this.storageService.queryStrict(query, { signal: controller.signal }),
|
|
868
|
+
deadline,
|
|
869
|
+
]);
|
|
870
|
+
return Date.now() >= deadlineAt ? expired() : result;
|
|
350
871
|
}
|
|
351
872
|
catch (error) {
|
|
352
|
-
if (controller.signal.aborted)
|
|
353
|
-
return
|
|
354
|
-
}
|
|
873
|
+
if (Date.now() >= deadlineAt || controller.signal.aborted)
|
|
874
|
+
return expired();
|
|
355
875
|
throw error;
|
|
356
876
|
}
|
|
357
877
|
finally {
|
|
358
878
|
clearTimeout(timeout);
|
|
359
879
|
}
|
|
360
880
|
}
|
|
361
|
-
applyBoundedStorageRows(items,
|
|
881
|
+
applyBoundedStorageRows(items, entries, chunk, rows) {
|
|
362
882
|
const rowsBySource = new Map();
|
|
363
|
-
for (const row of rows)
|
|
883
|
+
for (const row of rows)
|
|
364
884
|
rowsBySource.set(row.propertyId, [...(rowsBySource.get(row.propertyId) ?? []), row]);
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
885
|
+
for (const [key, group] of chunk) {
|
|
886
|
+
const currentEntries = group.indexes.flatMap((index) => {
|
|
887
|
+
const entry = entries[index];
|
|
888
|
+
return entry && this.valueSourceRegistry.isReadSourceCurrent(entry.capture) ? [{ index, entry }] : [];
|
|
889
|
+
});
|
|
890
|
+
const representative = currentEntries.find(({ entry }) => this.valueSourceRegistry.isReadSourceCurrent(entry.capture))?.entry;
|
|
891
|
+
if (!representative)
|
|
892
|
+
continue;
|
|
893
|
+
const sourceRows = rowsBySource.get(key) ?? [];
|
|
368
894
|
const firstRow = sourceRows[0];
|
|
369
|
-
|
|
370
|
-
const
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
const source = useCache ? 'cache' : 'storage';
|
|
378
|
-
if (!useCache && storedState) {
|
|
379
|
-
this.setCachedState(sourcePropertyId, storedState);
|
|
895
|
+
const storedState = firstRow ? this.toState(representative.input, key, firstRow) : null;
|
|
896
|
+
const cached = this.valuesMap.get(key);
|
|
897
|
+
const changed = this.cacheVersion(key) !== group.version;
|
|
898
|
+
const useCache = changed || (cached !== undefined && this.isStateNewerOrEqual(cached, storedState));
|
|
899
|
+
if (!useCache) {
|
|
900
|
+
this.updateRecentValuesFromRows(representative.input, key, sourceRows);
|
|
901
|
+
if (firstRow)
|
|
902
|
+
this.setCachedState(key, this.toState(representative.input, key, firstRow));
|
|
380
903
|
}
|
|
381
|
-
for (const index of
|
|
382
|
-
|
|
904
|
+
for (const { index, entry } of currentEntries) {
|
|
905
|
+
if (changed && !cached)
|
|
906
|
+
continue;
|
|
907
|
+
const state = useCache ? (cached ?? null) : firstRow ? this.toState(entry.input, key, firstRow) : null;
|
|
908
|
+
items[index] = this.toBoundedItem(entry.input.id, key, state, useCache ? 'cache' : 'storage');
|
|
909
|
+
entry.resultVersion = this.cacheVersion(key);
|
|
383
910
|
}
|
|
384
911
|
}
|
|
385
912
|
}
|
|
@@ -407,6 +934,16 @@ let PropertyValueService = class PropertyValueService {
|
|
|
407
934
|
this.valuesMap.set(key, state);
|
|
408
935
|
this.bumpCacheVersion(key);
|
|
409
936
|
}
|
|
937
|
+
resolveBestEffort(property, operation) {
|
|
938
|
+
try {
|
|
939
|
+
return this.valueSourceRegistry.resolve(property);
|
|
940
|
+
}
|
|
941
|
+
catch (error) {
|
|
942
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
943
|
+
this.logger.error(`Failed to resolve property value source during ${operation} id=${property.id} error=${err.message}`, err.stack);
|
|
944
|
+
return null;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
410
947
|
samePersistedState(left, right) {
|
|
411
948
|
return left?.value === right?.value && left?.lastUpdated === right?.lastUpdated;
|
|
412
949
|
}
|
|
@@ -451,37 +988,21 @@ let PropertyValueService = class PropertyValueService {
|
|
|
451
988
|
state: state,
|
|
452
989
|
};
|
|
453
990
|
}
|
|
454
|
-
refreshBoundedItemsFromCache(items,
|
|
455
|
-
for (const [index,
|
|
456
|
-
|
|
457
|
-
const cached = this.valuesMap.get(sourcePropertyId);
|
|
458
|
-
if (!cached) {
|
|
991
|
+
refreshBoundedItemsFromCache(items, entries) {
|
|
992
|
+
for (const [index, entry] of entries.entries()) {
|
|
993
|
+
if (!entry || !this.valueSourceRegistry.isReadSourceCurrent(entry.capture))
|
|
459
994
|
continue;
|
|
460
|
-
|
|
995
|
+
const cached = this.valuesMap.get(entry.key);
|
|
461
996
|
const current = items[index];
|
|
462
|
-
if (
|
|
997
|
+
if (entry.resultVersion !== undefined && this.cacheVersion(entry.key) !== entry.resultVersion) {
|
|
998
|
+
items[index] = cached ? this.toBoundedItem(entry.input.id, entry.key, cached, 'cache') : undefined;
|
|
463
999
|
continue;
|
|
464
1000
|
}
|
|
465
|
-
if (current?.state
|
|
1001
|
+
if (!cached || current?.state === cached)
|
|
466
1002
|
continue;
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
fillUnprocessedBoundedItems(items, properties, groups) {
|
|
472
|
-
for (const [sourcePropertyId, group] of groups) {
|
|
473
|
-
for (const index of group.indexes) {
|
|
474
|
-
if (items[index] !== undefined) {
|
|
475
|
-
continue;
|
|
476
|
-
}
|
|
477
|
-
items[index] = {
|
|
478
|
-
propertyId: properties[index].id,
|
|
479
|
-
sourcePropertyId,
|
|
480
|
-
status: 'unprocessed',
|
|
481
|
-
source: null,
|
|
482
|
-
state: null,
|
|
483
|
-
};
|
|
484
|
-
}
|
|
1003
|
+
if (current?.state && this.isStateNewerOrEqual(current.state, cached))
|
|
1004
|
+
continue;
|
|
1005
|
+
items[index] = this.toBoundedItem(entry.input.id, entry.key, cached, 'cache');
|
|
485
1006
|
}
|
|
486
1007
|
}
|
|
487
1008
|
buildBoundedResult(items, storageStatus) {
|
|
@@ -515,8 +1036,22 @@ let PropertyValueService = class PropertyValueService {
|
|
|
515
1036
|
freshnessUnknownCount,
|
|
516
1037
|
};
|
|
517
1038
|
}
|
|
518
|
-
async readLatestInternal(property, strict, bypassCache = false, activeBackendOnly = false) {
|
|
519
|
-
const
|
|
1039
|
+
async readLatestInternal(property, strict, bypassCache = false, activeBackendOnly = false, capture) {
|
|
1040
|
+
const publication = controller_publication_context_1.ControllerPublicationContext.current();
|
|
1041
|
+
const health = publication ? this.storageService.captureControllerReadHealth() : null;
|
|
1042
|
+
let key;
|
|
1043
|
+
try {
|
|
1044
|
+
if (capture)
|
|
1045
|
+
this.assertReadSourceCurrent(capture);
|
|
1046
|
+
key = capture ? this.valueSourceRegistry.readSourceKey(capture) : this.valueSourceRegistry.resolve(property);
|
|
1047
|
+
}
|
|
1048
|
+
catch (error) {
|
|
1049
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
1050
|
+
this.logger.error(`Failed to resolve property value source id=${property.id} error=${err.message}`, err.stack);
|
|
1051
|
+
if (strict)
|
|
1052
|
+
throw error;
|
|
1053
|
+
return { state: null };
|
|
1054
|
+
}
|
|
520
1055
|
const cacheVersionAtQueryStart = this.cacheVersion(key);
|
|
521
1056
|
const cached = this.valuesMap.get(key);
|
|
522
1057
|
if (!bypassCache && cached) {
|
|
@@ -545,6 +1080,12 @@ let PropertyValueService = class PropertyValueService {
|
|
|
545
1080
|
: strict
|
|
546
1081
|
? await this.storageService.queryStrict(query)
|
|
547
1082
|
: await this.storageService.query(query);
|
|
1083
|
+
if (capture)
|
|
1084
|
+
this.assertReadSourceCurrent(capture);
|
|
1085
|
+
if (publication && (!publication.isEligible() || !health())) {
|
|
1086
|
+
const current = this.valuesMap.get(key);
|
|
1087
|
+
return { state: current ? (0, property_value_state_model_1.clonePropertyValueState)(current) : null, storageBinding: boundResult?.binding };
|
|
1088
|
+
}
|
|
548
1089
|
if (!result.length) {
|
|
549
1090
|
this.logger.debug(`No stored value found for id=${property.id}`);
|
|
550
1091
|
if (bypassCache && this.cacheVersion(key) === cacheVersionAtQueryStart) {
|
|
@@ -576,7 +1117,7 @@ let PropertyValueService = class PropertyValueService {
|
|
|
576
1117
|
return { state, storageBinding: boundResult?.binding };
|
|
577
1118
|
}
|
|
578
1119
|
catch (error) {
|
|
579
|
-
const err = error;
|
|
1120
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
580
1121
|
this.logger.error(`Failed to read latest value from storage id=${property.id} error=${err.message}`, err.stack);
|
|
581
1122
|
if (strict) {
|
|
582
1123
|
throw error;
|
|
@@ -619,13 +1160,19 @@ let PropertyValueService = class PropertyValueService {
|
|
|
619
1160
|
return value.replaceAll('\\', '\\\\').replaceAll("'", "\\'");
|
|
620
1161
|
}
|
|
621
1162
|
async delete(property) {
|
|
622
|
-
const key = this.
|
|
1163
|
+
const key = this.resolveBestEffort(property, 'delete');
|
|
1164
|
+
if (key === null)
|
|
1165
|
+
return;
|
|
623
1166
|
return this.withValueLock(key, () => this.deleteInternal(property, key));
|
|
624
1167
|
}
|
|
625
1168
|
async deleteInternal(property, key) {
|
|
626
1169
|
if (key !== property.id) {
|
|
627
1170
|
return;
|
|
628
1171
|
}
|
|
1172
|
+
this.liveEpochs.delete(property.id);
|
|
1173
|
+
this.samples.delete(property.id);
|
|
1174
|
+
this.liveWatermarks.delete(property.id);
|
|
1175
|
+
this.producers?.remove(property.id);
|
|
629
1176
|
this.valuesMap.delete(property.id);
|
|
630
1177
|
this.recentValuesMap.delete(property.id);
|
|
631
1178
|
this.bumpCacheVersion(property.id);
|
|
@@ -762,8 +1309,12 @@ let PropertyValueService = class PropertyValueService {
|
|
|
762
1309
|
exports.PropertyValueService = PropertyValueService;
|
|
763
1310
|
exports.PropertyValueService = PropertyValueService = __decorate([
|
|
764
1311
|
(0, common_1.Injectable)(),
|
|
1312
|
+
__param(3, (0, common_1.Optional)()),
|
|
1313
|
+
__param(4, (0, common_1.Optional)()),
|
|
765
1314
|
__metadata("design:paramtypes", [storage_service_1.StorageService,
|
|
766
1315
|
property_value_source_registry_service_1.PropertyValueSourceRegistryService,
|
|
767
|
-
property_value_lock_service_1.PropertyValueLockService
|
|
1316
|
+
property_value_lock_service_1.PropertyValueLockService,
|
|
1317
|
+
property_producer_registry_service_1.PropertyProducerRegistryService,
|
|
1318
|
+
event_emitter_1.EventEmitter2])
|
|
768
1319
|
], PropertyValueService);
|
|
769
1320
|
//# sourceMappingURL=property-value.service.js.map
|