@fastybird/smart-panel-backend 1.1.0-alpha.64 → 1.1.0-alpha.66
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
|
@@ -0,0 +1,1061 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ClimateAutomationLedgerService = exports.ClimateAutomationLedgerError = exports.ClimateAutomationDeletionCaptureChanged = exports.ClimateAutomationLedgerConflict = void 0;
|
|
16
|
+
const class_transformer_1 = require("class-transformer");
|
|
17
|
+
const node_async_hooks_1 = require("node:async_hooks");
|
|
18
|
+
const node_crypto_1 = require("node:crypto");
|
|
19
|
+
const typeorm_1 = require("typeorm");
|
|
20
|
+
const common_1 = require("@nestjs/common");
|
|
21
|
+
const typeorm_2 = require("@nestjs/typeorm");
|
|
22
|
+
const sqlite_data_source_1 = require("../../../common/database/sqlite-data-source");
|
|
23
|
+
const climate_automation_entity_1 = require("../entities/climate-automation.entity");
|
|
24
|
+
const climate_automation_ledger_lifecycle_1 = require("./climate-automation-ledger-lifecycle");
|
|
25
|
+
const climate_automation_ledger_utils_1 = require("./climate-automation-ledger.utils");
|
|
26
|
+
const climate_automation_registry_service_1 = require("./climate-automation.registry.service");
|
|
27
|
+
const creation_capture_1 = require("./creation-capture");
|
|
28
|
+
const device_structure_lock_service_1 = require("./device-structure-lock.service");
|
|
29
|
+
var climate_automation_ledger_utils_2 = require("./climate-automation-ledger.utils");
|
|
30
|
+
Object.defineProperty(exports, "ClimateAutomationLedgerConflict", { enumerable: true, get: function () { return climate_automation_ledger_utils_2.ClimateAutomationLedgerConflict; } });
|
|
31
|
+
const originalLeaseRead = device_structure_lock_service_1.DeviceStructureLockService.prototype.hasCurrentStructuralLease;
|
|
32
|
+
const originalOwnerCapture = device_structure_lock_service_1.DeviceStructureLockService.prototype.captureExclusiveOwner;
|
|
33
|
+
let PrivateLedgerSnapshot = class PrivateLedgerSnapshot {
|
|
34
|
+
toJSON() {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
PrivateLedgerSnapshot = __decorate([
|
|
39
|
+
(0, class_transformer_1.Exclude)()
|
|
40
|
+
], PrivateLedgerSnapshot);
|
|
41
|
+
function privateSnapshot(fields) {
|
|
42
|
+
return Object.freeze(Object.assign(new PrivateLedgerSnapshot(), fields));
|
|
43
|
+
}
|
|
44
|
+
class ClimateAutomationDeletionCaptureChanged extends climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict {
|
|
45
|
+
constructor() {
|
|
46
|
+
super('stale');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.ClimateAutomationDeletionCaptureChanged = ClimateAutomationDeletionCaptureChanged;
|
|
50
|
+
class ClimateAutomationLedgerError extends Error {
|
|
51
|
+
constructor(outcome, cause) {
|
|
52
|
+
super('Private climate ledger transaction failed', { cause });
|
|
53
|
+
this.outcome = outcome;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.ClimateAutomationLedgerError = ClimateAutomationLedgerError;
|
|
57
|
+
let ClimateAutomationLedgerService = class ClimateAutomationLedgerService {
|
|
58
|
+
constructor(database, structure, registry) {
|
|
59
|
+
this.database = database;
|
|
60
|
+
this.structure = structure;
|
|
61
|
+
this.registry = registry;
|
|
62
|
+
this.context = new node_async_hooks_1.AsyncLocalStorage();
|
|
63
|
+
this.scopes = new WeakMap();
|
|
64
|
+
this.records = new WeakMap();
|
|
65
|
+
}
|
|
66
|
+
async inAdmittedManager(manager, receipt, work) {
|
|
67
|
+
const ambient = this.context.getStore();
|
|
68
|
+
if (ambient)
|
|
69
|
+
throw this.refuse(ambient.operation);
|
|
70
|
+
if (!(this.database instanceof sqlite_data_source_1.SqliteDataSource) ||
|
|
71
|
+
manager.connection !== this.database ||
|
|
72
|
+
!manager.queryRunner ||
|
|
73
|
+
receipt.outcome !== 'pending' ||
|
|
74
|
+
!(0, sqlite_data_source_1.hasCurrentSqliteConnectionLease)(this.database))
|
|
75
|
+
throw new Error('Borrowed climate ledger requires the original pending native owner');
|
|
76
|
+
const ownerCurrent = Reflect.apply(originalOwnerCapture, this.structure, []);
|
|
77
|
+
const operation = {
|
|
78
|
+
borrowed: true,
|
|
79
|
+
phase: 'OPEN',
|
|
80
|
+
scope: Object.freeze({}),
|
|
81
|
+
manager,
|
|
82
|
+
runner: manager.queryRunner,
|
|
83
|
+
receipt,
|
|
84
|
+
tail: Promise.resolve(),
|
|
85
|
+
children: new Set(),
|
|
86
|
+
guards: [{ current: ownerCurrent }],
|
|
87
|
+
latest: new Map(),
|
|
88
|
+
issued: new Set(),
|
|
89
|
+
};
|
|
90
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => operation.phase === 'READY' &&
|
|
91
|
+
operation.manager === manager &&
|
|
92
|
+
manager.queryRunner === operation.runner &&
|
|
93
|
+
!operation.failure &&
|
|
94
|
+
operation.children.size === 0 &&
|
|
95
|
+
(0, sqlite_data_source_1.hasCurrentSqliteConnectionLease)(this.database) &&
|
|
96
|
+
operation.guards.every((pin) => pin.current()));
|
|
97
|
+
this.scopes.set(operation.scope, operation);
|
|
98
|
+
return this.context.run({ operation, internal: false }, async () => {
|
|
99
|
+
try {
|
|
100
|
+
let result;
|
|
101
|
+
try {
|
|
102
|
+
result = await work(operation.scope);
|
|
103
|
+
}
|
|
104
|
+
catch (cause) {
|
|
105
|
+
this.fail(operation, cause);
|
|
106
|
+
}
|
|
107
|
+
await this.drainAndValidate(operation, manager);
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
catch (cause) {
|
|
111
|
+
operation.phase = 'SETTLED';
|
|
112
|
+
throw cause;
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
this.scopes.delete(operation.scope);
|
|
116
|
+
for (const snapshot of operation.issued)
|
|
117
|
+
this.records.delete(snapshot);
|
|
118
|
+
operation.issued.clear();
|
|
119
|
+
operation.latest.clear();
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
currentScope(manager) {
|
|
124
|
+
const operation = this.context.getStore()?.operation;
|
|
125
|
+
if (!operation)
|
|
126
|
+
throw new Error('No climate ledger owner');
|
|
127
|
+
this.admit(manager, operation.scope);
|
|
128
|
+
return operation.scope;
|
|
129
|
+
}
|
|
130
|
+
async sealAdmittedManager(manager) {
|
|
131
|
+
const operation = this.context.getStore()?.operation;
|
|
132
|
+
if (!operation?.borrowed)
|
|
133
|
+
throw new Error('Original borrowed climate owner required');
|
|
134
|
+
this.admit(manager, operation.scope);
|
|
135
|
+
await this.drainAndValidate(operation, manager);
|
|
136
|
+
}
|
|
137
|
+
async drainAndValidate(operation, manager) {
|
|
138
|
+
if (operation.phase === 'READY') {
|
|
139
|
+
this.healthy(operation);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
operation.phase = 'DRAINING';
|
|
143
|
+
await Promise.all(operation.children);
|
|
144
|
+
await operation.tail;
|
|
145
|
+
this.healthy(operation);
|
|
146
|
+
operation.phase = 'VALIDATING';
|
|
147
|
+
await this.context.run({ operation, internal: true }, async () => {
|
|
148
|
+
for (const record of operation.latest.values())
|
|
149
|
+
await record.validate?.();
|
|
150
|
+
for (const record of operation.latest.values())
|
|
151
|
+
await this.validateRow(manager, record);
|
|
152
|
+
});
|
|
153
|
+
this.healthy(operation);
|
|
154
|
+
operation.phase = 'READY';
|
|
155
|
+
}
|
|
156
|
+
async runReserved(work) {
|
|
157
|
+
const ambient = this.context.getStore();
|
|
158
|
+
if (ambient)
|
|
159
|
+
throw new ClimateAutomationLedgerError('not_started', this.refuse(ambient.operation));
|
|
160
|
+
if (!(this.database instanceof sqlite_data_source_1.SqliteDataSource) || (0, sqlite_data_source_1.hasCurrentSqliteConnectionLease)(this.database))
|
|
161
|
+
throw new ClimateAutomationLedgerError('not_started', new Error('Independent coordinated SQLite lease required'));
|
|
162
|
+
return this.structure
|
|
163
|
+
.runExclusiveReleased(async () => {
|
|
164
|
+
const operation = {
|
|
165
|
+
phase: 'OPENING',
|
|
166
|
+
scope: Object.freeze({}),
|
|
167
|
+
tail: Promise.resolve(),
|
|
168
|
+
children: new Set(),
|
|
169
|
+
guards: [],
|
|
170
|
+
latest: new Map(),
|
|
171
|
+
issued: new Set(),
|
|
172
|
+
};
|
|
173
|
+
this.scopes.set(operation.scope, operation);
|
|
174
|
+
return this.context.run({ operation, internal: false }, async () => {
|
|
175
|
+
try {
|
|
176
|
+
await this.database.transaction(async (manager) => {
|
|
177
|
+
operation.manager = manager;
|
|
178
|
+
operation.runner = manager.queryRunner;
|
|
179
|
+
operation.receipt = (0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => operation.phase === 'READY' &&
|
|
180
|
+
operation.manager === manager &&
|
|
181
|
+
manager.queryRunner === operation.runner &&
|
|
182
|
+
(0, sqlite_data_source_1.hasCurrentSqliteConnectionLease)(this.database) &&
|
|
183
|
+
!operation.failure &&
|
|
184
|
+
originalLeaseRead.call(this.structure) &&
|
|
185
|
+
operation.children.size === 0 &&
|
|
186
|
+
operation.guards.every((pin) => pin.current()));
|
|
187
|
+
await manager.query(`UPDATE "${climate_automation_entity_1.CLIMATE_SOURCE_TABLE}" SET "revision"="revision" WHERE 0`);
|
|
188
|
+
operation.phase = 'OPEN';
|
|
189
|
+
try {
|
|
190
|
+
await work(manager, operation.scope);
|
|
191
|
+
}
|
|
192
|
+
catch (cause) {
|
|
193
|
+
this.fail(operation, cause);
|
|
194
|
+
}
|
|
195
|
+
await this.drainAndValidate(operation, manager);
|
|
196
|
+
});
|
|
197
|
+
if (operation.receipt?.outcome !== 'committed')
|
|
198
|
+
throw new Error('Missing native ledger COMMIT receipt');
|
|
199
|
+
return Object.freeze({ outcome: 'committed' });
|
|
200
|
+
}
|
|
201
|
+
catch (cause) {
|
|
202
|
+
const outcome = operation.receipt?.outcome;
|
|
203
|
+
throw new ClimateAutomationLedgerError(outcome && outcome !== 'pending' ? outcome : 'not_started', operation.failure ? operation.failure.cause : cause);
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
operation.phase = 'SETTLED';
|
|
207
|
+
this.scopes.delete(operation.scope);
|
|
208
|
+
for (const snapshot of operation.issued)
|
|
209
|
+
this.records.delete(snapshot);
|
|
210
|
+
operation.issued.clear();
|
|
211
|
+
operation.latest.clear();
|
|
212
|
+
operation.guards.length = 0;
|
|
213
|
+
operation.manager = undefined;
|
|
214
|
+
operation.runner = undefined;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
})
|
|
218
|
+
.catch((cause) => {
|
|
219
|
+
if (cause instanceof ClimateAutomationLedgerError)
|
|
220
|
+
throw cause;
|
|
221
|
+
throw new ClimateAutomationLedgerError('not_started', cause);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
inReservedManager(manager, scope, work) {
|
|
225
|
+
const operation = this.admit(manager, scope);
|
|
226
|
+
const task = Promise.resolve().then(work);
|
|
227
|
+
const settled = task.then(() => {
|
|
228
|
+
operation.children.delete(settled);
|
|
229
|
+
}, (cause) => {
|
|
230
|
+
this.fail(operation, cause);
|
|
231
|
+
operation.children.delete(settled);
|
|
232
|
+
});
|
|
233
|
+
operation.children.add(settled);
|
|
234
|
+
return task;
|
|
235
|
+
}
|
|
236
|
+
readSource(manager, scope, producerKey, subjectId) {
|
|
237
|
+
const operation = this.admit(manager, scope);
|
|
238
|
+
this.requireKey(operation, producerKey);
|
|
239
|
+
this.requireKey(operation, subjectId);
|
|
240
|
+
return this.enqueue(operation, async () => this.sourceSnapshot(operation, producerKey, subjectId, await this.source(manager, producerKey, subjectId)));
|
|
241
|
+
}
|
|
242
|
+
readSlot(manager, scope, controllerId, withController = true, providerKey) {
|
|
243
|
+
const operation = this.admit(manager, scope);
|
|
244
|
+
this.requireKey(operation, controllerId);
|
|
245
|
+
return this.enqueue(operation, async () => {
|
|
246
|
+
const row = await manager.findOneBy(climate_automation_entity_1.ClimateAutomationSlotEntity, { controllerId });
|
|
247
|
+
const facts = row ? Object.freeze({ ...row }) : null;
|
|
248
|
+
let controller = null;
|
|
249
|
+
let validate;
|
|
250
|
+
if (withController && (facts || providerKey)) {
|
|
251
|
+
if (facts && providerKey && facts.providerKey !== providerKey)
|
|
252
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
253
|
+
const capture = this.registry.captureProvider(facts?.providerKey ?? providerKey);
|
|
254
|
+
const pin = this.pin(capture, 'readControllerInManager');
|
|
255
|
+
operation.guards.push(pin);
|
|
256
|
+
const read = async () => {
|
|
257
|
+
this.requirePin(pin);
|
|
258
|
+
const value = await Reflect.apply(pin.method, pin.receiver, [manager, controllerId]);
|
|
259
|
+
this.requirePin(pin);
|
|
260
|
+
return this.controllerFacts(value);
|
|
261
|
+
};
|
|
262
|
+
controller = await read();
|
|
263
|
+
if (!controller)
|
|
264
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('unavailable');
|
|
265
|
+
const expected = (0, climate_automation_ledger_utils_1.canonical)(controller);
|
|
266
|
+
validate = async () => {
|
|
267
|
+
if ((0, climate_automation_ledger_utils_1.canonical)(await read()) !== expected)
|
|
268
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
const snapshot = privateSnapshot({ facts, controller });
|
|
272
|
+
this.issue(operation, snapshot, {
|
|
273
|
+
kind: 'slot',
|
|
274
|
+
operation,
|
|
275
|
+
controllerId,
|
|
276
|
+
providerKey: facts?.providerKey ?? providerKey,
|
|
277
|
+
snapshot,
|
|
278
|
+
validate,
|
|
279
|
+
});
|
|
280
|
+
return snapshot;
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
stageSource(manager, scope, request) {
|
|
284
|
+
const operation = this.admit(manager, scope);
|
|
285
|
+
try {
|
|
286
|
+
const { producerKey, pin, subjectId, expected, bytes } = this.context.run({ operation, internal: true }, () => {
|
|
287
|
+
const producerKey = request.producerKey;
|
|
288
|
+
const pin = this.pin(this.registry.captureProducer(producerKey), 'validateInManager');
|
|
289
|
+
operation.guards.push(pin);
|
|
290
|
+
const { subjectId, expected, evidence } = request;
|
|
291
|
+
if (typeof producerKey !== 'string' || typeof subjectId !== 'string' || !subjectId)
|
|
292
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
293
|
+
const bytes = (0, climate_automation_ledger_utils_1.canonical)(evidence);
|
|
294
|
+
this.healthy(operation);
|
|
295
|
+
return { producerKey, pin, subjectId, expected, bytes };
|
|
296
|
+
});
|
|
297
|
+
return this.enqueue(operation, async () => {
|
|
298
|
+
const record = this.records.get(expected);
|
|
299
|
+
if (!record ||
|
|
300
|
+
record.operation !== operation ||
|
|
301
|
+
record.kind !== 'source' ||
|
|
302
|
+
record.producerKey !== producerKey ||
|
|
303
|
+
record.subjectId !== subjectId)
|
|
304
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
305
|
+
await this.validateRow(manager, record);
|
|
306
|
+
const previous = record.snapshot.facts;
|
|
307
|
+
if (previous && !['REVOKED', 'DELETED', 'FINALIZED_INACTIVE'].includes(previous.state))
|
|
308
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
309
|
+
if (previous &&
|
|
310
|
+
(await manager
|
|
311
|
+
.createQueryBuilder(climate_automation_entity_1.ClimateAutomationSlotEntity, 'slot')
|
|
312
|
+
.where('slot.generationId = :generation', { generation: previous.generationId })
|
|
313
|
+
.andWhere('slot.state IN (:...states)', { states: ['PROVISIONAL', 'LIVE'] })
|
|
314
|
+
.getCount()))
|
|
315
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
316
|
+
const next = Object.freeze({
|
|
317
|
+
generationId: (0, node_crypto_1.randomUUID)(),
|
|
318
|
+
ownerId: previous && previous.state !== 'DELETED' ? previous.ownerId : (0, node_crypto_1.randomUUID)(),
|
|
319
|
+
producerKey,
|
|
320
|
+
subjectId,
|
|
321
|
+
generationIndex: previous && previous.state !== 'DELETED' ? (0, climate_automation_ledger_utils_1.increment)(previous.generationIndex) : 1,
|
|
322
|
+
revision: 1,
|
|
323
|
+
isCurrent: true,
|
|
324
|
+
state: 'PENDING',
|
|
325
|
+
evidence: bytes,
|
|
326
|
+
evidenceDigest: (0, node_crypto_1.createHash)('sha256').update(bytes).digest('hex'),
|
|
327
|
+
});
|
|
328
|
+
const validate = async () => {
|
|
329
|
+
this.requirePin(pin);
|
|
330
|
+
const actual = await Reflect.apply(pin.method, pin.receiver, [manager, next, 'prepare']);
|
|
331
|
+
this.requirePin(pin);
|
|
332
|
+
if (actual === null || (0, climate_automation_ledger_utils_1.canonical)(actual) !== bytes)
|
|
333
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
334
|
+
};
|
|
335
|
+
await validate();
|
|
336
|
+
await this.validateRow(manager, record);
|
|
337
|
+
if (previous) {
|
|
338
|
+
const query = manager
|
|
339
|
+
.createQueryBuilder()
|
|
340
|
+
.update(climate_automation_entity_1.ClimateAutomationSourceEntity)
|
|
341
|
+
.set({ revision: (0, climate_automation_ledger_utils_1.increment)(previous.revision), isCurrent: false });
|
|
342
|
+
for (const column of Object.keys(previous))
|
|
343
|
+
query.andWhere(`"${column}" IS :expected_${column}`, { [`expected_${column}`]: previous[column] });
|
|
344
|
+
query.andWhere(`NOT EXISTS (SELECT 1 FROM "${climate_automation_entity_1.CLIMATE_SLOT_TABLE}" slot WHERE slot."generationId" = :generation AND slot."state" IN ('PROVISIONAL','LIVE'))`, { generation: previous.generationId });
|
|
345
|
+
if ((await query.execute()).affected !== 1)
|
|
346
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
347
|
+
}
|
|
348
|
+
await manager.insert(climate_automation_entity_1.ClimateAutomationSourceEntity, next);
|
|
349
|
+
return this.sourceSnapshot(operation, producerKey, subjectId, next, validate);
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
catch (cause) {
|
|
353
|
+
this.fail(operation, cause);
|
|
354
|
+
throw cause;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
async captureControllerDeletion(id) {
|
|
358
|
+
if ((0, sqlite_data_source_1.hasCurrentSqliteConnectionLease)(this.database))
|
|
359
|
+
throw new Error('Controller deletion requires entry before native ownership');
|
|
360
|
+
const providers = this.registry.captureProviders();
|
|
361
|
+
const row = await this.database.manager.findOneBy(climate_automation_entity_1.ClimateAutomationSlotEntity, { controllerId: id });
|
|
362
|
+
if (!row) {
|
|
363
|
+
let finished = false;
|
|
364
|
+
const execute = async (manager, scope, remove) => {
|
|
365
|
+
if (finished)
|
|
366
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
367
|
+
const slot = await this.readSlot(manager, scope, id, false);
|
|
368
|
+
if (slot.facts)
|
|
369
|
+
throw new ClimateAutomationDeletionCaptureChanged();
|
|
370
|
+
await this.inReservedManager(manager, scope, remove);
|
|
371
|
+
};
|
|
372
|
+
return Object.freeze(Object.assign(execute, {
|
|
373
|
+
finish: () => {
|
|
374
|
+
finished = true;
|
|
375
|
+
return Promise.resolve();
|
|
376
|
+
},
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
379
|
+
const expected = Object.freeze({ ...row });
|
|
380
|
+
const capture = providers.get(expected.providerKey) ?? null;
|
|
381
|
+
const predecessor = this.pin(capture, 'beginControllerDeletion');
|
|
382
|
+
const deletion = this.pin(capture, 'readDeletedControllerInManager');
|
|
383
|
+
const absence = this.pin(capture, 'validateDeletedControllerInManager');
|
|
384
|
+
const controller = this.pin(capture, 'readControllerInManager');
|
|
385
|
+
const configuration = this.pin(capture, 'readDeletionConfigurationInManager');
|
|
386
|
+
const retirement = ['LIVE', 'PROVISIONAL'].includes(expected.state)
|
|
387
|
+
? this.pin(capture, 'retireControllerInManager')
|
|
388
|
+
: null;
|
|
389
|
+
const completion = await Reflect.apply(predecessor.method, predecessor.receiver, [expected]);
|
|
390
|
+
const captured = completion ? (0, creation_capture_1.captureCreation)(completion, ['finish']) : undefined;
|
|
391
|
+
let finished = false;
|
|
392
|
+
const finish = async (outcome = 'unknown') => {
|
|
393
|
+
if (finished)
|
|
394
|
+
return;
|
|
395
|
+
finished = true;
|
|
396
|
+
if (captured && completion)
|
|
397
|
+
await (0, creation_capture_1.invokeCreation)(captured.values.finish, completion, outcome);
|
|
398
|
+
};
|
|
399
|
+
try {
|
|
400
|
+
this.requirePin(predecessor);
|
|
401
|
+
}
|
|
402
|
+
catch (cause) {
|
|
403
|
+
try {
|
|
404
|
+
await finish('unknown');
|
|
405
|
+
}
|
|
406
|
+
catch {
|
|
407
|
+
}
|
|
408
|
+
throw cause;
|
|
409
|
+
}
|
|
410
|
+
const execute = async (manager, scope, remove) => {
|
|
411
|
+
if (finished)
|
|
412
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
413
|
+
const operation = this.admit(manager, scope);
|
|
414
|
+
operation.guards.push(predecessor, absence, controller, configuration, deletion);
|
|
415
|
+
if (retirement)
|
|
416
|
+
operation.guards.push(retirement);
|
|
417
|
+
const slot = await this.readSlot(manager, scope, id, false);
|
|
418
|
+
if ((0, climate_automation_ledger_utils_1.canonical)(slot.facts) !== (0, climate_automation_ledger_utils_1.canonical)(expected))
|
|
419
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
420
|
+
this.requirePin(controller);
|
|
421
|
+
const original = this.controllerFacts(await Reflect.apply(controller.method, controller.receiver, [manager, id]));
|
|
422
|
+
if (!original)
|
|
423
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('unavailable');
|
|
424
|
+
const devices = await manager.query('SELECT * FROM "devices_module_devices" WHERE "id" = ?', [id]);
|
|
425
|
+
if (devices.length !== 1)
|
|
426
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
427
|
+
const deviceEvidence = (0, climate_automation_ledger_utils_1.canonical)({ ...devices[0] });
|
|
428
|
+
if (retirement) {
|
|
429
|
+
this.requirePin(retirement);
|
|
430
|
+
await Reflect.apply(retirement.method, retirement.receiver, [manager, expected]);
|
|
431
|
+
this.requirePin(retirement);
|
|
432
|
+
}
|
|
433
|
+
const fenced = await this.fenceManual(manager, scope, slot, true);
|
|
434
|
+
const before = this.controllerFacts(await Reflect.apply(controller.method, controller.receiver, [manager, id]));
|
|
435
|
+
this.requirePin(controller);
|
|
436
|
+
if (!before)
|
|
437
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
438
|
+
const configurationEvidence = (0, climate_automation_ledger_utils_1.canonical)(await Reflect.apply(configuration.method, configuration.receiver, [manager, id]));
|
|
439
|
+
this.requirePin(configuration);
|
|
440
|
+
const tombstone = {
|
|
441
|
+
deletionId: (0, node_crypto_1.randomUUID)(),
|
|
442
|
+
controllerId: id,
|
|
443
|
+
controllerIncarnation: fenced.facts.controllerIncarnation,
|
|
444
|
+
providerKey: fenced.facts.providerKey,
|
|
445
|
+
slotRevision: fenced.facts.slotRevision,
|
|
446
|
+
manualCounter: fenced.facts.manualCounter,
|
|
447
|
+
slotEvidence: (0, climate_automation_ledger_utils_1.canonical)(fenced.facts),
|
|
448
|
+
controllerEvidence: (0, climate_automation_ledger_utils_1.canonical)(before),
|
|
449
|
+
deviceEvidence,
|
|
450
|
+
configurationEvidence,
|
|
451
|
+
nativeDeviceEvidence: null,
|
|
452
|
+
nativeConfigurationEvidence: null,
|
|
453
|
+
consumedByIncarnation: null,
|
|
454
|
+
consumedSlotRevision: null,
|
|
455
|
+
};
|
|
456
|
+
await manager.insert(climate_automation_entity_1.ClimateAutomationDeletionEntity, tombstone);
|
|
457
|
+
await this.inReservedManager(manager, scope, remove);
|
|
458
|
+
await this.enqueue(operation, async () => {
|
|
459
|
+
this.requirePin(deletion);
|
|
460
|
+
const retained = (0, climate_automation_ledger_utils_1.ownedJson)(await Reflect.apply(deletion.method, deletion.receiver, [manager, id, before]));
|
|
461
|
+
this.requirePin(deletion);
|
|
462
|
+
const deleted = async () => {
|
|
463
|
+
this.requirePin(absence);
|
|
464
|
+
await Reflect.apply(absence.method, absence.receiver, [manager, id, retained]);
|
|
465
|
+
this.requirePin(absence);
|
|
466
|
+
};
|
|
467
|
+
await deleted();
|
|
468
|
+
const record = this.records.get(fenced);
|
|
469
|
+
await this.validateRow(manager, record);
|
|
470
|
+
const proof = await manager.findOneByOrFail(climate_automation_entity_1.ClimateAutomationDeletionEntity, {
|
|
471
|
+
deletionId: tombstone.deletionId,
|
|
472
|
+
});
|
|
473
|
+
if (!proof.nativeDeviceEvidence ||
|
|
474
|
+
!proof.nativeConfigurationEvidence ||
|
|
475
|
+
(0, climate_automation_ledger_utils_1.canonical)(JSON.parse(proof.nativeDeviceEvidence)) !== deviceEvidence ||
|
|
476
|
+
(0, climate_automation_ledger_utils_1.canonical)(JSON.parse(proof.nativeConfigurationEvidence)) !== configurationEvidence)
|
|
477
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
478
|
+
const captured = {
|
|
479
|
+
...tombstone,
|
|
480
|
+
nativeDeviceEvidence: proof.nativeDeviceEvidence,
|
|
481
|
+
nativeConfigurationEvidence: proof.nativeConfigurationEvidence,
|
|
482
|
+
};
|
|
483
|
+
if ((0, climate_automation_ledger_utils_1.canonical)({ ...proof }) !== (0, climate_automation_ledger_utils_1.canonical)(captured))
|
|
484
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
485
|
+
const intended = { ...captured, controllerEvidence: (0, climate_automation_ledger_utils_1.canonical)({ original, atDeletion: before, retained }) };
|
|
486
|
+
const finish = manager
|
|
487
|
+
.createQueryBuilder()
|
|
488
|
+
.update(climate_automation_entity_1.ClimateAutomationDeletionEntity)
|
|
489
|
+
.set({ controllerEvidence: intended.controllerEvidence });
|
|
490
|
+
for (const [column, value] of Object.entries(captured))
|
|
491
|
+
finish.andWhere(`"${column}" IS :old_${column}`, { [`old_${column}`]: value });
|
|
492
|
+
if ((await finish.execute()).affected !== 1)
|
|
493
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
494
|
+
const validate = async () => {
|
|
495
|
+
await deleted();
|
|
496
|
+
const actual = await manager.findOneBy(climate_automation_entity_1.ClimateAutomationDeletionEntity, { deletionId: tombstone.deletionId });
|
|
497
|
+
if (!actual || (0, climate_automation_ledger_utils_1.canonical)({ ...actual }) !== (0, climate_automation_ledger_utils_1.canonical)(intended))
|
|
498
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
499
|
+
};
|
|
500
|
+
await validate();
|
|
501
|
+
this.issue(operation, fenced, { ...record, validate }, true);
|
|
502
|
+
});
|
|
503
|
+
};
|
|
504
|
+
return Object.freeze(Object.assign(execute, { finish, hasControllerSlot: true }));
|
|
505
|
+
}
|
|
506
|
+
async captureControllerRecreation(manager, scope, id) {
|
|
507
|
+
const operation = this.admit(manager, scope);
|
|
508
|
+
const previous = await this.readSlot(manager, scope, id, false);
|
|
509
|
+
if (!previous.facts)
|
|
510
|
+
return null;
|
|
511
|
+
const provider = this.registry.captureProvider(previous.facts.providerKey);
|
|
512
|
+
const prepare = this.pin(provider, 'prepareControllerRecreationInManager');
|
|
513
|
+
const archivePin = this.pin(provider, 'captureControllerRecreationArchiveInManager');
|
|
514
|
+
const validation = this.pin(provider, 'validateControllerRecreationInManager');
|
|
515
|
+
operation.guards.push(prepare, archivePin, validation);
|
|
516
|
+
this.requirePin(prepare);
|
|
517
|
+
const found = await manager.findOneBy(climate_automation_entity_1.ClimateAutomationDeletionEntity, {
|
|
518
|
+
controllerId: id,
|
|
519
|
+
controllerIncarnation: previous.facts.controllerIncarnation,
|
|
520
|
+
consumedByIncarnation: (0, typeorm_1.IsNull)(),
|
|
521
|
+
});
|
|
522
|
+
if (!found ||
|
|
523
|
+
!found.nativeDeviceEvidence ||
|
|
524
|
+
!found.nativeConfigurationEvidence ||
|
|
525
|
+
(0, climate_automation_ledger_utils_1.canonical)(JSON.parse(found.nativeDeviceEvidence)) !== found.deviceEvidence ||
|
|
526
|
+
(0, climate_automation_ledger_utils_1.canonical)(JSON.parse(found.nativeConfigurationEvidence)) !== found.configurationEvidence ||
|
|
527
|
+
found.slotEvidence !== (0, climate_automation_ledger_utils_1.canonical)(previous.facts) ||
|
|
528
|
+
found.providerKey !== previous.facts.providerKey ||
|
|
529
|
+
found.slotRevision !== previous.facts.slotRevision ||
|
|
530
|
+
found.manualCounter !== previous.facts.manualCounter)
|
|
531
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
532
|
+
const originalTombstone = Object.freeze({ ...found });
|
|
533
|
+
const evidence = JSON.parse(originalTombstone.controllerEvidence);
|
|
534
|
+
this.requirePin(archivePin);
|
|
535
|
+
const archive = (0, climate_automation_ledger_utils_1.ownedJson)(await Reflect.apply(archivePin.method, archivePin.receiver, [manager, id, (0, climate_automation_ledger_utils_1.ownedJson)(evidence.retained)]));
|
|
536
|
+
this.requirePin(archivePin);
|
|
537
|
+
const tombstone = Object.freeze({
|
|
538
|
+
...originalTombstone,
|
|
539
|
+
controllerEvidence: (0, climate_automation_ledger_utils_1.canonical)({
|
|
540
|
+
...evidence,
|
|
541
|
+
priorControllerEvidence: originalTombstone.controllerEvidence,
|
|
542
|
+
recreationArchive: archive,
|
|
543
|
+
}),
|
|
544
|
+
});
|
|
545
|
+
const archiveWrite = manager
|
|
546
|
+
.createQueryBuilder()
|
|
547
|
+
.update(climate_automation_entity_1.ClimateAutomationDeletionEntity)
|
|
548
|
+
.set({ controllerEvidence: tombstone.controllerEvidence });
|
|
549
|
+
for (const [column, value] of Object.entries(originalTombstone))
|
|
550
|
+
archiveWrite.andWhere(`"${column}" IS :old_${column}`, { [`old_${column}`]: value });
|
|
551
|
+
if ((await archiveWrite.execute()).affected !== 1)
|
|
552
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
553
|
+
const preparation = (0, climate_automation_ledger_utils_1.ownedJson)(await Reflect.apply(prepare.method, prepare.receiver, [manager, id, (0, climate_automation_ledger_utils_1.ownedJson)(evidence.retained), archive]));
|
|
554
|
+
this.requirePin(prepare);
|
|
555
|
+
const validatePreparation = async () => {
|
|
556
|
+
this.requirePin(validation);
|
|
557
|
+
await Reflect.apply(validation.method, validation.receiver, [manager, id, preparation]);
|
|
558
|
+
this.requirePin(validation);
|
|
559
|
+
};
|
|
560
|
+
let consumed = false;
|
|
561
|
+
const consume = async (current) => {
|
|
562
|
+
if (consumed ||
|
|
563
|
+
this.admit(manager, scope) !== operation ||
|
|
564
|
+
(0, climate_automation_ledger_utils_1.canonical)(current.facts) !== (0, climate_automation_ledger_utils_1.canonical)(previous.facts))
|
|
565
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
566
|
+
consumed = true;
|
|
567
|
+
const record = this.records.get(current);
|
|
568
|
+
if (!record || record.operation !== operation || record.kind !== 'slot' || !current.controller)
|
|
569
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
570
|
+
const devices = await manager.query('SELECT * FROM "devices_module_devices" WHERE "id" = ?', [id]);
|
|
571
|
+
const priorDevice = JSON.parse(tombstone.deviceEvidence);
|
|
572
|
+
if (devices.length !== 1 ||
|
|
573
|
+
!Number.isSafeInteger(devices[0].catalogBirth) ||
|
|
574
|
+
devices[0].catalogBirth < 1 ||
|
|
575
|
+
devices[0].catalogBirth === priorDevice.catalogBirth)
|
|
576
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
577
|
+
const deviceEvidence = (0, climate_automation_ledger_utils_1.canonical)({ ...devices[0] });
|
|
578
|
+
const next = await this.lifecycleCommand(manager, scope, (lifecycle) => lifecycle.initializeSlot({
|
|
579
|
+
expected: current,
|
|
580
|
+
releaseManualHold: true,
|
|
581
|
+
explicitOptIn: true,
|
|
582
|
+
freshIncarnation: true,
|
|
583
|
+
}));
|
|
584
|
+
await this.enqueue(operation, async () => {
|
|
585
|
+
const intended = {
|
|
586
|
+
...tombstone,
|
|
587
|
+
consumedByIncarnation: next.facts.controllerIncarnation,
|
|
588
|
+
consumedSlotRevision: next.facts.slotRevision,
|
|
589
|
+
};
|
|
590
|
+
const query = manager.createQueryBuilder().update(climate_automation_entity_1.ClimateAutomationDeletionEntity).set({
|
|
591
|
+
consumedByIncarnation: intended.consumedByIncarnation,
|
|
592
|
+
consumedSlotRevision: intended.consumedSlotRevision,
|
|
593
|
+
});
|
|
594
|
+
for (const [column, value] of Object.entries(tombstone))
|
|
595
|
+
query.andWhere(`"${column}" IS :old_${column}`, { [`old_${column}`]: value });
|
|
596
|
+
if ((await query.execute()).affected !== 1)
|
|
597
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
598
|
+
const nextRecord = this.records.get(next);
|
|
599
|
+
const validate = async () => {
|
|
600
|
+
await nextRecord.validate?.();
|
|
601
|
+
await validatePreparation();
|
|
602
|
+
const actual = await manager.findOneBy(climate_automation_entity_1.ClimateAutomationDeletionEntity, { deletionId: tombstone.deletionId });
|
|
603
|
+
const owner = await manager.query('SELECT * FROM "devices_module_devices" WHERE "id" = ?', [id]);
|
|
604
|
+
if (!actual ||
|
|
605
|
+
(0, climate_automation_ledger_utils_1.canonical)({ ...actual }) !== (0, climate_automation_ledger_utils_1.canonical)(intended) ||
|
|
606
|
+
owner.length !== 1 ||
|
|
607
|
+
(0, climate_automation_ledger_utils_1.canonical)({ ...owner[0] }) !== deviceEvidence)
|
|
608
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
609
|
+
};
|
|
610
|
+
await validate();
|
|
611
|
+
this.issue(operation, next, { ...nextRecord, validate }, true);
|
|
612
|
+
});
|
|
613
|
+
return next;
|
|
614
|
+
};
|
|
615
|
+
return Object.freeze({ preparation, consume });
|
|
616
|
+
}
|
|
617
|
+
initializeSlot(manager, scope, request) {
|
|
618
|
+
return this.lifecycleCommand(manager, scope, (lifecycle) => {
|
|
619
|
+
const { expected, releaseManualHold, explicitOptIn } = request;
|
|
620
|
+
return lifecycle.initializeSlot({ expected, releaseManualHold, explicitOptIn });
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
stageSlot(manager, scope, request) {
|
|
624
|
+
return this.lifecycleCommand(manager, scope, (lifecycle) => lifecycle.stageSlot(request));
|
|
625
|
+
}
|
|
626
|
+
retireSlot(manager, scope, expectedSlot, expectedSource) {
|
|
627
|
+
return this.lifecycleCommand(manager, scope, (lifecycle) => lifecycle.retireSlot(expectedSlot, expectedSource));
|
|
628
|
+
}
|
|
629
|
+
fenceManual(manager, scope, expected, manualHold, takeover = true) {
|
|
630
|
+
return this.lifecycleCommand(manager, scope, (lifecycle) => lifecycle.fenceManual(expected, manualHold, takeover));
|
|
631
|
+
}
|
|
632
|
+
installBundle(manager, scope, expectedSource, expectedSlots) {
|
|
633
|
+
const operation = this.admit(manager, scope);
|
|
634
|
+
try {
|
|
635
|
+
const { sourceRecord, source, producer, candidates } = this.context.run({ operation, internal: true }, () => {
|
|
636
|
+
const sourceRecord = this.records.get(expectedSource);
|
|
637
|
+
if (sourceRecord?.operation !== operation || sourceRecord.kind !== 'source')
|
|
638
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
639
|
+
const source = sourceRecord.snapshot.facts;
|
|
640
|
+
if (sourceRecord?.operation !== operation ||
|
|
641
|
+
sourceRecord.kind !== 'source' ||
|
|
642
|
+
!source?.isCurrent ||
|
|
643
|
+
source.state !== 'PENDING' ||
|
|
644
|
+
!expectedSlots.length)
|
|
645
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
646
|
+
const producer = this.pin(this.registry.captureProducer(source.producerKey), 'validateInManager');
|
|
647
|
+
operation.guards.push(producer);
|
|
648
|
+
const candidates = expectedSlots.map((snapshot) => {
|
|
649
|
+
const record = this.records.get(snapshot);
|
|
650
|
+
if (record?.operation !== operation || record.kind !== 'slot')
|
|
651
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
652
|
+
const facts = record.snapshot.facts;
|
|
653
|
+
if (record?.operation !== operation ||
|
|
654
|
+
record.kind !== 'slot' ||
|
|
655
|
+
!record.validate ||
|
|
656
|
+
!facts ||
|
|
657
|
+
facts.state !== 'PROVISIONAL' ||
|
|
658
|
+
facts.manualHold ||
|
|
659
|
+
facts.ownerId !== source.ownerId ||
|
|
660
|
+
facts.generationId !== source.generationId)
|
|
661
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
662
|
+
const registration = this.registry.captureProvider(facts.providerKey);
|
|
663
|
+
const install = this.pin(registration, 'installControllerInManager');
|
|
664
|
+
const read = this.pin(registration, 'readControllerInManager');
|
|
665
|
+
operation.guards.push(install, read);
|
|
666
|
+
return { snapshot, record, facts, install, read };
|
|
667
|
+
});
|
|
668
|
+
if (new Set(candidates.map(({ facts }) => facts.controllerId)).size !== candidates.length ||
|
|
669
|
+
new Set(candidates.map(({ facts }) => facts.bundleId)).size !== 1)
|
|
670
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
671
|
+
candidates.sort((a, b) => a.facts.controllerId.localeCompare(b.facts.controllerId));
|
|
672
|
+
this.healthy(operation);
|
|
673
|
+
return { sourceRecord, source, producer, candidates };
|
|
674
|
+
});
|
|
675
|
+
return this.enqueue(operation, async () => {
|
|
676
|
+
await this.validateRow(manager, sourceRecord);
|
|
677
|
+
for (const candidate of candidates) {
|
|
678
|
+
await candidate.record.validate();
|
|
679
|
+
await this.validateRow(manager, candidate.record);
|
|
680
|
+
}
|
|
681
|
+
const active = await manager.findBy(climate_automation_entity_1.ClimateAutomationSlotEntity, { generationId: source.generationId });
|
|
682
|
+
if (active.length !== candidates.length ||
|
|
683
|
+
active.some((row) => !candidates.some(({ facts }) => (0, climate_automation_ledger_utils_1.canonical)(facts) === (0, climate_automation_ledger_utils_1.canonical)({ ...row }))))
|
|
684
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
685
|
+
const installed = [];
|
|
686
|
+
for (const { record, facts, install, read } of candidates) {
|
|
687
|
+
this.requirePin(install);
|
|
688
|
+
const result = this.controllerFacts(await Reflect.apply(install.method, install.receiver, [manager, facts]));
|
|
689
|
+
this.requirePin(install);
|
|
690
|
+
this.requirePin(read);
|
|
691
|
+
const post = this.controllerFacts(await Reflect.apply(read.method, read.receiver, [manager, facts.controllerId]));
|
|
692
|
+
if (!result || (0, climate_automation_ledger_utils_1.canonical)(result) !== (0, climate_automation_ledger_utils_1.canonical)(post))
|
|
693
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
694
|
+
await this.validateRow(manager, record);
|
|
695
|
+
const next = Object.freeze({
|
|
696
|
+
...facts,
|
|
697
|
+
state: 'LIVE',
|
|
698
|
+
slotRevision: (0, climate_automation_ledger_utils_1.increment)(facts.slotRevision),
|
|
699
|
+
installEvidence: (0, climate_automation_ledger_utils_1.canonical)(result),
|
|
700
|
+
});
|
|
701
|
+
const query = manager.createQueryBuilder().update(climate_automation_entity_1.ClimateAutomationSlotEntity).set(next);
|
|
702
|
+
for (const key of Object.keys(facts))
|
|
703
|
+
query.andWhere(`"${key}" IS :old_${key}`, { [`old_${key}`]: facts[key] });
|
|
704
|
+
if ((await query.execute()).affected !== 1)
|
|
705
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
706
|
+
const snapshot = privateSnapshot({ facts: next, controller: result });
|
|
707
|
+
this.issue(operation, snapshot, {
|
|
708
|
+
kind: 'slot',
|
|
709
|
+
operation,
|
|
710
|
+
controllerId: next.controllerId,
|
|
711
|
+
providerKey: next.providerKey,
|
|
712
|
+
snapshot,
|
|
713
|
+
validate: async () => {
|
|
714
|
+
this.requirePin(read);
|
|
715
|
+
const actual = await Reflect.apply(read.method, read.receiver, [manager, facts.controllerId]);
|
|
716
|
+
this.requirePin(read);
|
|
717
|
+
if ((0, climate_automation_ledger_utils_1.canonical)(this.controllerFacts(actual)) !== (0, climate_automation_ledger_utils_1.canonical)(result))
|
|
718
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
719
|
+
},
|
|
720
|
+
}, true);
|
|
721
|
+
installed.push(snapshot);
|
|
722
|
+
}
|
|
723
|
+
await this.validateRow(manager, sourceRecord);
|
|
724
|
+
const nextSource = Object.freeze({
|
|
725
|
+
...source,
|
|
726
|
+
state: 'FINALIZED_LIVE',
|
|
727
|
+
revision: (0, climate_automation_ledger_utils_1.increment)(source.revision),
|
|
728
|
+
});
|
|
729
|
+
const query = manager.createQueryBuilder().update(climate_automation_entity_1.ClimateAutomationSourceEntity).set(nextSource);
|
|
730
|
+
for (const key of Object.keys(source))
|
|
731
|
+
query.andWhere(`"${key}" IS :old_${key}`, { [`old_${key}`]: source[key] });
|
|
732
|
+
if ((await query.execute()).affected !== 1)
|
|
733
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
734
|
+
this.sourceSnapshot(operation, source.producerKey, source.subjectId, nextSource, async () => {
|
|
735
|
+
this.requirePin(producer);
|
|
736
|
+
const evidence = await Reflect.apply(producer.method, producer.receiver, [manager, nextSource, 'prepare']);
|
|
737
|
+
this.requirePin(producer);
|
|
738
|
+
if (evidence === null || (0, climate_automation_ledger_utils_1.canonical)(evidence) !== source.evidence)
|
|
739
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
740
|
+
const membership = await manager.findBy(climate_automation_entity_1.ClimateAutomationSlotEntity, { generationId: source.generationId });
|
|
741
|
+
if (membership.length !== installed.length ||
|
|
742
|
+
membership.some((row) => !installed.some(({ facts }) => (0, climate_automation_ledger_utils_1.canonical)(facts) === (0, climate_automation_ledger_utils_1.canonical)({ ...row }))))
|
|
743
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
744
|
+
});
|
|
745
|
+
return Object.freeze(installed);
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
catch (cause) {
|
|
749
|
+
this.fail(operation, cause);
|
|
750
|
+
throw cause;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
refreshInstalledSlot(manager, scope, expected, kind = 'intent', preserveUnchangedGraph = false) {
|
|
754
|
+
const operation = this.admit(manager, scope);
|
|
755
|
+
try {
|
|
756
|
+
if (preserveUnchangedGraph && kind !== 'graph')
|
|
757
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
758
|
+
const record = this.records.get(expected);
|
|
759
|
+
if (record?.operation !== operation || record.kind !== 'slot')
|
|
760
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
761
|
+
const previous = record.snapshot.facts;
|
|
762
|
+
if (record?.operation !== operation ||
|
|
763
|
+
record.kind !== 'slot' ||
|
|
764
|
+
!record.snapshot.controller ||
|
|
765
|
+
previous?.state !== 'LIVE' ||
|
|
766
|
+
previous.manualHold)
|
|
767
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
768
|
+
const provider = this.registry.captureProvider(previous.providerKey);
|
|
769
|
+
if (kind === 'graph') {
|
|
770
|
+
const capability = provider && (0, creation_capture_1.captureCreation)(provider.implementation, ['graphRefreshVersion']);
|
|
771
|
+
if (capability?.values.graphRefreshVersion !== 1)
|
|
772
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('unavailable');
|
|
773
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => provider.isCurrent() && capability.current());
|
|
774
|
+
}
|
|
775
|
+
const refresh = this.pin(provider, 'refreshControllerInManager');
|
|
776
|
+
const read = this.pin(provider, 'readControllerInManager');
|
|
777
|
+
operation.guards.push(refresh, read);
|
|
778
|
+
return this.enqueue(operation, async () => {
|
|
779
|
+
await this.validateRow(manager, record);
|
|
780
|
+
const source = await manager.findOneBy(climate_automation_entity_1.ClimateAutomationSourceEntity, { generationId: previous.generationId });
|
|
781
|
+
if (!source?.isCurrent || source.state !== 'FINALIZED_LIVE' || source.ownerId !== previous.ownerId)
|
|
782
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
783
|
+
const sourceBytes = (0, climate_automation_ledger_utils_1.canonical)({ ...source });
|
|
784
|
+
const producer = this.pin(this.registry.captureProducer(source.producerKey), 'validateInManager');
|
|
785
|
+
operation.guards.push(producer);
|
|
786
|
+
const validateSource = async () => {
|
|
787
|
+
this.requirePin(producer);
|
|
788
|
+
const evidence = await Reflect.apply(producer.method, producer.receiver, [manager, source, 'prepare']);
|
|
789
|
+
this.requirePin(producer);
|
|
790
|
+
const current = await manager.findOneBy(climate_automation_entity_1.ClimateAutomationSourceEntity, { generationId: source.generationId });
|
|
791
|
+
if (evidence === null ||
|
|
792
|
+
(0, climate_automation_ledger_utils_1.canonical)(evidence) !== source.evidence ||
|
|
793
|
+
!current ||
|
|
794
|
+
(0, climate_automation_ledger_utils_1.canonical)({ ...current }) !== sourceBytes)
|
|
795
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
796
|
+
};
|
|
797
|
+
await validateSource();
|
|
798
|
+
this.requirePin(refresh);
|
|
799
|
+
const controller = this.controllerFacts(await Reflect.apply(refresh.method, refresh.receiver, [manager, previous, expected.controller, kind]));
|
|
800
|
+
this.requirePin(refresh);
|
|
801
|
+
if (!controller)
|
|
802
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('unavailable');
|
|
803
|
+
const validate = async () => {
|
|
804
|
+
await validateSource();
|
|
805
|
+
this.requirePin(read);
|
|
806
|
+
const actual = this.controllerFacts(await Reflect.apply(read.method, read.receiver, [manager, previous.controllerId]));
|
|
807
|
+
this.requirePin(read);
|
|
808
|
+
if ((0, climate_automation_ledger_utils_1.canonical)(actual) !== (0, climate_automation_ledger_utils_1.canonical)(controller))
|
|
809
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
810
|
+
};
|
|
811
|
+
await validate();
|
|
812
|
+
await this.validateRow(manager, record);
|
|
813
|
+
const next = preserveUnchangedGraph && (0, climate_automation_ledger_utils_1.canonical)(controller) === previous.installEvidence
|
|
814
|
+
? previous
|
|
815
|
+
: Object.freeze({
|
|
816
|
+
...previous,
|
|
817
|
+
slotRevision: (0, climate_automation_ledger_utils_1.increment)(previous.slotRevision),
|
|
818
|
+
installEvidence: (0, climate_automation_ledger_utils_1.canonical)(controller),
|
|
819
|
+
});
|
|
820
|
+
if (next !== previous) {
|
|
821
|
+
const query = manager.createQueryBuilder().update(climate_automation_entity_1.ClimateAutomationSlotEntity).set(next);
|
|
822
|
+
for (const key of Object.keys(previous))
|
|
823
|
+
query.andWhere(`"${key}" IS :old_${key}`, { [`old_${key}`]: previous[key] });
|
|
824
|
+
if ((await query.execute()).affected !== 1)
|
|
825
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
826
|
+
}
|
|
827
|
+
const snapshot = privateSnapshot({ facts: next, controller });
|
|
828
|
+
this.issue(operation, snapshot, {
|
|
829
|
+
kind: 'slot',
|
|
830
|
+
operation,
|
|
831
|
+
controllerId: next.controllerId,
|
|
832
|
+
providerKey: next.providerKey,
|
|
833
|
+
snapshot,
|
|
834
|
+
validate,
|
|
835
|
+
}, true);
|
|
836
|
+
return snapshot;
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
catch (cause) {
|
|
840
|
+
this.fail(operation, cause);
|
|
841
|
+
throw cause;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
revokeSource(manager, scope, expectedSource, slots, deleted = false) {
|
|
845
|
+
return this.lifecycleCommand(manager, scope, (lifecycle) => lifecycle.revokeSource(expectedSource, slots, deleted));
|
|
846
|
+
}
|
|
847
|
+
finalizeInactive(manager, scope, expected) {
|
|
848
|
+
return this.lifecycleCommand(manager, scope, (lifecycle) => lifecycle.finalizeInactive(expected));
|
|
849
|
+
}
|
|
850
|
+
lifecycleCommand(manager, scope, capture) {
|
|
851
|
+
const operation = this.admit(manager, scope);
|
|
852
|
+
try {
|
|
853
|
+
const record = (snapshot) => {
|
|
854
|
+
const value = this.records.get(snapshot);
|
|
855
|
+
if (!value || value.operation !== operation)
|
|
856
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
857
|
+
return value;
|
|
858
|
+
};
|
|
859
|
+
const access = {
|
|
860
|
+
manager,
|
|
861
|
+
source: (snapshot) => {
|
|
862
|
+
const value = record(snapshot);
|
|
863
|
+
if (value.kind !== 'source')
|
|
864
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
865
|
+
if (!value.snapshot.facts)
|
|
866
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
867
|
+
return value.snapshot.facts;
|
|
868
|
+
},
|
|
869
|
+
slot: (snapshot) => {
|
|
870
|
+
const value = record(snapshot);
|
|
871
|
+
if (value.kind !== 'slot')
|
|
872
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
873
|
+
return {
|
|
874
|
+
...value.snapshot,
|
|
875
|
+
controllerId: value.controllerId,
|
|
876
|
+
providerKey: value.providerKey,
|
|
877
|
+
validateController: value.validate,
|
|
878
|
+
};
|
|
879
|
+
},
|
|
880
|
+
validate: (snapshot) => this.validateRow(manager, record(snapshot)),
|
|
881
|
+
producer: (key) => {
|
|
882
|
+
const pin = this.pin(this.registry.captureProducer(key), 'validateInManager');
|
|
883
|
+
operation.guards.push(pin);
|
|
884
|
+
return async (source) => {
|
|
885
|
+
this.requirePin(pin);
|
|
886
|
+
const actual = await Reflect.apply(pin.method, pin.receiver, [manager, source, 'prepare']);
|
|
887
|
+
this.requirePin(pin);
|
|
888
|
+
if (actual === null || (0, climate_automation_ledger_utils_1.canonical)(actual) !== source.evidence)
|
|
889
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
890
|
+
};
|
|
891
|
+
},
|
|
892
|
+
provider: (key) => {
|
|
893
|
+
const pin = this.pin(this.registry.captureProvider(key), 'validateSelectionInManager');
|
|
894
|
+
operation.guards.push(pin);
|
|
895
|
+
return async (id, facts, selection) => {
|
|
896
|
+
this.requirePin(pin);
|
|
897
|
+
const accepted = await Reflect.apply(pin.method, pin.receiver, [manager, id, facts, selection]);
|
|
898
|
+
this.requirePin(pin);
|
|
899
|
+
if (accepted !== true)
|
|
900
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
901
|
+
};
|
|
902
|
+
},
|
|
903
|
+
issueSource: (facts, validate) => this.sourceSnapshot(operation, facts.producerKey, facts.subjectId, facts, validate),
|
|
904
|
+
issueSlot: (facts, controller, validate) => {
|
|
905
|
+
const snapshot = privateSnapshot({ facts, controller });
|
|
906
|
+
this.issue(operation, snapshot, {
|
|
907
|
+
kind: 'slot',
|
|
908
|
+
operation,
|
|
909
|
+
controllerId: facts.controllerId,
|
|
910
|
+
providerKey: facts.providerKey,
|
|
911
|
+
snapshot,
|
|
912
|
+
validate,
|
|
913
|
+
}, true);
|
|
914
|
+
return snapshot;
|
|
915
|
+
},
|
|
916
|
+
};
|
|
917
|
+
const work = this.context.run({ operation, internal: true }, () => {
|
|
918
|
+
const captured = capture(new climate_automation_ledger_lifecycle_1.ClimateAutomationLedgerLifecycle(access));
|
|
919
|
+
this.healthy(operation);
|
|
920
|
+
return captured;
|
|
921
|
+
});
|
|
922
|
+
return this.enqueue(operation, work);
|
|
923
|
+
}
|
|
924
|
+
catch (cause) {
|
|
925
|
+
this.fail(operation, cause);
|
|
926
|
+
throw cause;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
admit(manager, scope) {
|
|
930
|
+
const context = this.context.getStore();
|
|
931
|
+
const operation = this.scopes.get(scope);
|
|
932
|
+
if (!operation || context?.operation !== operation) {
|
|
933
|
+
if (context)
|
|
934
|
+
throw this.refuse(context.operation);
|
|
935
|
+
throw new Error('Invalid private climate ledger scope');
|
|
936
|
+
}
|
|
937
|
+
if (operation.phase !== 'OPEN' ||
|
|
938
|
+
context.internal ||
|
|
939
|
+
operation.failure ||
|
|
940
|
+
operation.manager !== manager ||
|
|
941
|
+
manager.queryRunner !== operation.runner ||
|
|
942
|
+
!(0, sqlite_data_source_1.hasCurrentSqliteConnectionLease)(this.database) ||
|
|
943
|
+
!originalLeaseRead.call(this.structure))
|
|
944
|
+
throw this.refuse(operation);
|
|
945
|
+
return operation;
|
|
946
|
+
}
|
|
947
|
+
requireKey(operation, key) {
|
|
948
|
+
if (typeof key !== 'string' || key.length === 0) {
|
|
949
|
+
const cause = new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
950
|
+
this.fail(operation, cause);
|
|
951
|
+
throw cause;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
enqueue(operation, work) {
|
|
955
|
+
const task = operation.tail.then(() => {
|
|
956
|
+
this.healthy(operation);
|
|
957
|
+
return this.context.run({ operation, internal: true }, work);
|
|
958
|
+
});
|
|
959
|
+
operation.tail = task.then(() => { }, (cause) => this.fail(operation, cause));
|
|
960
|
+
return task;
|
|
961
|
+
}
|
|
962
|
+
fail(operation, cause) {
|
|
963
|
+
operation.failure ??= { cause };
|
|
964
|
+
}
|
|
965
|
+
healthy(operation) {
|
|
966
|
+
if (operation.failure)
|
|
967
|
+
throw operation.failure.cause;
|
|
968
|
+
}
|
|
969
|
+
refuse(operation) {
|
|
970
|
+
const cause = new Error('Private climate ledger admission requires its open original scope and manager');
|
|
971
|
+
if (operation.phase !== 'SETTLED')
|
|
972
|
+
this.fail(operation, cause);
|
|
973
|
+
return cause;
|
|
974
|
+
}
|
|
975
|
+
sourceSnapshot(operation, producerKey, subjectId, facts, validate) {
|
|
976
|
+
const snapshot = privateSnapshot({ facts });
|
|
977
|
+
this.issue(operation, snapshot, { kind: 'source', operation, producerKey, subjectId, snapshot, validate }, !!validate);
|
|
978
|
+
return snapshot;
|
|
979
|
+
}
|
|
980
|
+
issue(operation, snapshot, record, write = false) {
|
|
981
|
+
this.records.set(snapshot, record);
|
|
982
|
+
operation.issued.add(snapshot);
|
|
983
|
+
const key = record.kind === 'source'
|
|
984
|
+
? JSON.stringify(['source', record.producerKey, record.subjectId])
|
|
985
|
+
: JSON.stringify(['slot', record.controllerId]);
|
|
986
|
+
const previous = operation.latest.get(key);
|
|
987
|
+
const latest = previous?.written && !write ? previous : { ...record, written: write };
|
|
988
|
+
operation.latest.set(key, previous?.validate && !write
|
|
989
|
+
? {
|
|
990
|
+
...latest,
|
|
991
|
+
validate: record.validate
|
|
992
|
+
? async () => {
|
|
993
|
+
await previous.validate();
|
|
994
|
+
await record.validate();
|
|
995
|
+
}
|
|
996
|
+
: previous.validate,
|
|
997
|
+
}
|
|
998
|
+
: latest);
|
|
999
|
+
}
|
|
1000
|
+
async source(manager, producerKey, subjectId) {
|
|
1001
|
+
const row = await manager.findOneBy(climate_automation_entity_1.ClimateAutomationSourceEntity, { producerKey, subjectId, isCurrent: true });
|
|
1002
|
+
return row ? Object.freeze({ ...row }) : null;
|
|
1003
|
+
}
|
|
1004
|
+
async validateRow(manager, record) {
|
|
1005
|
+
const actual = record.kind === 'source'
|
|
1006
|
+
? await this.source(manager, record.producerKey, record.subjectId)
|
|
1007
|
+
: await manager.findOneBy(climate_automation_entity_1.ClimateAutomationSlotEntity, { controllerId: record.controllerId });
|
|
1008
|
+
if ((0, climate_automation_ledger_utils_1.canonical)(actual ? { ...actual } : null) !== (0, climate_automation_ledger_utils_1.canonical)(record.snapshot.facts))
|
|
1009
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('stale');
|
|
1010
|
+
}
|
|
1011
|
+
controllerFacts(value) {
|
|
1012
|
+
if (value === null)
|
|
1013
|
+
return null;
|
|
1014
|
+
const { controllerRevision, graphRevision, evidence, legacyBaseline } = value;
|
|
1015
|
+
if (!Number.isSafeInteger(controllerRevision) ||
|
|
1016
|
+
controllerRevision < 1 ||
|
|
1017
|
+
!Number.isSafeInteger(graphRevision) ||
|
|
1018
|
+
graphRevision < 0)
|
|
1019
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('invalid');
|
|
1020
|
+
return Object.freeze({
|
|
1021
|
+
controllerRevision,
|
|
1022
|
+
graphRevision,
|
|
1023
|
+
evidence: (0, climate_automation_ledger_utils_1.ownedJson)(evidence),
|
|
1024
|
+
legacyBaseline: (0, climate_automation_ledger_utils_1.ownedJson)(legacyBaseline),
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
pin(capture, key) {
|
|
1028
|
+
if (!capture)
|
|
1029
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('unavailable');
|
|
1030
|
+
const receiver = capture.implementation;
|
|
1031
|
+
const method = dataMethod(receiver, key);
|
|
1032
|
+
if (typeof method !== 'function')
|
|
1033
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('unavailable');
|
|
1034
|
+
return Object.freeze({
|
|
1035
|
+
receiver,
|
|
1036
|
+
method: method,
|
|
1037
|
+
current: () => capture.isCurrent() && dataMethod(receiver, key) === method,
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
requirePin(pin) {
|
|
1041
|
+
if (!pin.current())
|
|
1042
|
+
throw new climate_automation_ledger_utils_1.ClimateAutomationLedgerConflict('unavailable');
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
exports.ClimateAutomationLedgerService = ClimateAutomationLedgerService;
|
|
1046
|
+
exports.ClimateAutomationLedgerService = ClimateAutomationLedgerService = __decorate([
|
|
1047
|
+
(0, common_1.Injectable)(),
|
|
1048
|
+
__param(0, (0, typeorm_2.InjectDataSource)()),
|
|
1049
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
|
1050
|
+
device_structure_lock_service_1.DeviceStructureLockService,
|
|
1051
|
+
climate_automation_registry_service_1.ClimateAutomationRegistryService])
|
|
1052
|
+
], ClimateAutomationLedgerService);
|
|
1053
|
+
function dataMethod(receiver, key) {
|
|
1054
|
+
for (let item = receiver; item; item = Object.getPrototypeOf(item)) {
|
|
1055
|
+
const descriptor = Object.getOwnPropertyDescriptor(item, key);
|
|
1056
|
+
if (descriptor)
|
|
1057
|
+
return 'value' in descriptor ? descriptor.value : undefined;
|
|
1058
|
+
}
|
|
1059
|
+
return undefined;
|
|
1060
|
+
}
|
|
1061
|
+
//# sourceMappingURL=climate-automation-ledger.service.js.map
|