@fastybird/smart-panel-backend 0.12.0-alpha.0 → 1.0.0-beta.2
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.constants.js.map +1 -1
- package/dist/app.module.js +44 -17
- package/dist/app.module.js.map +1 -1
- package/dist/common/filters/bad-request-exception.filter.js +0 -6
- package/dist/common/filters/bad-request-exception.filter.js.map +1 -1
- package/dist/common/filters/global-error.filter.js +2 -6
- package/dist/common/filters/global-error.filter.js.map +1 -1
- package/dist/common/filters/internal-server-error-exception.filter.js +0 -5
- package/dist/common/filters/internal-server-error-exception.filter.js.map +1 -1
- package/dist/common/filters/not-found-exception.filter.d.ts +4 -0
- package/dist/common/filters/not-found-exception.filter.js +22 -3
- package/dist/common/filters/not-found-exception.filter.js.map +1 -1
- package/dist/common/filters/query-failed-exception.filter.js +0 -5
- package/dist/common/filters/query-failed-exception.filter.js.map +1 -1
- package/dist/common/filters/unprocessable-entity-exception.filter.js +0 -5
- package/dist/common/filters/unprocessable-entity-exception.filter.js.map +1 -1
- package/dist/common/plugin-relations/relation-loader.interface.d.ts +5 -0
- package/dist/common/plugin-relations/relation-loader.interface.js +3 -0
- package/dist/common/plugin-relations/relation-loader.interface.js.map +1 -0
- package/dist/common/services/app-instance-holder.service.d.ts +1 -2
- package/dist/common/services/app-instance-holder.service.js.map +1 -1
- package/dist/common/utils/config.utils.d.ts +0 -1
- package/dist/common/utils/config.utils.js +1 -11
- package/dist/common/utils/config.utils.js.map +1 -1
- package/dist/main.js +25 -6
- package/dist/main.js.map +1 -1
- package/dist/migrations/1000000000000-InitialSetup.js +8 -0
- package/dist/migrations/1000000000000-InitialSetup.js.map +1 -1
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.d.ts +6 -0
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js +15 -0
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js.map +1 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.d.ts +6 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.js +88 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.js.map +1 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.d.ts +6 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.js +165 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.js.map +1 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.d.ts +6 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.js +66 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.js.map +1 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.d.ts +6 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.js +32 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.js.map +1 -0
- package/dist/modules/api/interceptors/open-api-response.interceptor.js +1 -1
- package/dist/modules/api/interceptors/open-api-response.interceptor.js.map +1 -1
- package/dist/modules/auth/auth.module.js +44 -28
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.js +6 -0
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
- package/dist/modules/auth/controllers/tokens.controller.d.ts +10 -3
- package/dist/modules/auth/controllers/tokens.controller.js +96 -7
- package/dist/modules/auth/controllers/tokens.controller.js.map +1 -1
- package/dist/modules/auth/dto/create-personal-token.dto.d.ts +8 -0
- package/dist/modules/auth/dto/create-personal-token.dto.js +75 -0
- package/dist/modules/auth/dto/create-personal-token.dto.js.map +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts +1 -1
- package/dist/modules/auth/dto/register.dto.js +13 -11
- package/dist/modules/auth/dto/register.dto.js.map +1 -1
- package/dist/modules/auth/entities/auth.entity.d.ts +1 -0
- package/dist/modules/auth/entities/auth.entity.js +13 -0
- package/dist/modules/auth/entities/auth.entity.js.map +1 -1
- package/dist/modules/auth/guards/auth.guard.d.ts +0 -1
- package/dist/modules/auth/guards/auth.guard.js +8 -26
- package/dist/modules/auth/guards/auth.guard.js.map +1 -1
- package/dist/modules/auth/guards/display-aware-throttler.guard.d.ts +16 -0
- package/dist/modules/auth/guards/display-aware-throttler.guard.js +133 -0
- package/dist/modules/auth/guards/display-aware-throttler.guard.js.map +1 -0
- package/dist/modules/auth/services/auth.service.js +1 -1
- package/dist/modules/auth/services/auth.service.js.map +1 -1
- package/dist/modules/auth/services/tokens.service.d.ts +10 -0
- package/dist/modules/auth/services/tokens.service.js +35 -0
- package/dist/modules/auth/services/tokens.service.js.map +1 -1
- package/dist/modules/auth/utils/token.utils.d.ts +7 -0
- package/dist/modules/auth/utils/token.utils.js +12 -1
- package/dist/modules/auth/utils/token.utils.js.map +1 -1
- package/dist/modules/buddy/buddy.module.d.ts +5 -1
- package/dist/modules/buddy/buddy.module.js +42 -15
- package/dist/modules/buddy/buddy.module.js.map +1 -1
- package/dist/modules/buddy/buddy.utils.d.ts +8 -0
- package/dist/modules/buddy/buddy.utils.js +49 -0
- package/dist/modules/buddy/buddy.utils.js.map +1 -1
- package/dist/modules/buddy/controllers/buddy-suggestions.controller.js +2 -2
- package/dist/modules/buddy/controllers/buddy-suggestions.controller.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-conversation.entity.js +3 -3
- package/dist/modules/buddy/entities/buddy-conversation.entity.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-message.entity.js +2 -2
- package/dist/modules/buddy/entities/buddy-message.entity.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-suggestion.entity.d.ts +19 -0
- package/dist/modules/buddy/entities/buddy-suggestion.entity.js +93 -0
- package/dist/modules/buddy/entities/buddy-suggestion.entity.js.map +1 -0
- package/dist/modules/buddy/listeners/media-activity-event.listener.js +3 -3
- package/dist/modules/buddy/listeners/media-activity-event.listener.js.map +1 -1
- package/dist/modules/buddy/platforms/llm-provider.platform.d.ts +6 -0
- package/dist/modules/buddy/platforms/openai-sdk.utils.d.ts +2 -1
- package/dist/modules/buddy/platforms/openai-sdk.utils.js +12 -1
- package/dist/modules/buddy/platforms/openai-sdk.utils.js.map +1 -1
- package/dist/modules/buddy/services/buddy-context.service.js +2 -2
- package/dist/modules/buddy/services/buddy-context.service.js.map +1 -1
- package/dist/modules/buddy/services/buddy-conversation.service.js +23 -8
- package/dist/modules/buddy/services/buddy-conversation.service.js.map +1 -1
- package/dist/modules/buddy/services/buddy-personality.service.d.ts +1 -1
- package/dist/modules/buddy/services/buddy-personality.service.js.map +1 -1
- package/dist/modules/buddy/services/heartbeat.service.js +2 -2
- package/dist/modules/buddy/services/heartbeat.service.js.map +1 -1
- package/dist/modules/buddy/services/llm-provider.service.js +2 -10
- package/dist/modules/buddy/services/llm-provider.service.js.map +1 -1
- package/dist/modules/buddy/services/module-reset.service.d.ts +3 -1
- package/dist/modules/buddy/services/module-reset.service.js +6 -1
- package/dist/modules/buddy/services/module-reset.service.js.map +1 -1
- package/dist/modules/buddy/services/pattern-detector.service.d.ts +4 -1
- package/dist/modules/buddy/services/pattern-detector.service.js +10 -3
- package/dist/modules/buddy/services/pattern-detector.service.js.map +1 -1
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.d.ts +4 -1
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.js +10 -4
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.js.map +1 -1
- package/dist/modules/buddy/services/stt-provider.service.js +2 -10
- package/dist/modules/buddy/services/stt-provider.service.js.map +1 -1
- package/dist/modules/buddy/services/suggestion-engine.service.d.ts +19 -13
- package/dist/modules/buddy/services/suggestion-engine.service.js +170 -103
- package/dist/modules/buddy/services/suggestion-engine.service.js.map +1 -1
- package/dist/modules/buddy/services/tts-provider.service.js +2 -10
- package/dist/modules/buddy/services/tts-provider.service.js.map +1 -1
- package/dist/modules/config/config.constants.d.ts +2 -1
- package/dist/modules/config/config.constants.js +1 -0
- package/dist/modules/config/config.constants.js.map +1 -1
- package/dist/modules/config/config.module.d.ts +5 -1
- package/dist/modules/config/config.module.js +78 -14
- package/dist/modules/config/config.module.js.map +1 -1
- package/dist/modules/config/services/config.service.d.ts +1 -0
- package/dist/modules/config/services/config.service.js +11 -1
- package/dist/modules/config/services/config.service.js.map +1 -1
- package/dist/modules/dashboard/dashboard.module.js +21 -18
- package/dist/modules/dashboard/dashboard.module.js.map +1 -1
- package/dist/modules/dashboard/entities/dashboard.relations.d.ts +1 -5
- package/dist/modules/devices/devices.module.js +24 -16
- package/dist/modules/devices/devices.module.js.map +1 -1
- package/dist/modules/devices/services/device-zones.service.js +2 -2
- package/dist/modules/devices/services/device-zones.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/displays/displays.constants.d.ts +0 -5
- package/dist/modules/displays/displays.constants.js +1 -7
- package/dist/modules/displays/displays.constants.js.map +1 -1
- package/dist/modules/displays/displays.module.js +27 -23
- package/dist/modules/displays/displays.module.js.map +1 -1
- package/dist/modules/displays/dto/update-display.dto.d.ts +2 -3
- package/dist/modules/displays/dto/update-display.dto.js +4 -19
- package/dist/modules/displays/dto/update-display.dto.js.map +1 -1
- package/dist/modules/displays/entities/displays.entity.d.ts +3 -4
- package/dist/modules/displays/entities/displays.entity.js +8 -25
- package/dist/modules/displays/entities/displays.entity.js.map +1 -1
- package/dist/modules/displays/services/displays.service.d.ts +4 -2
- package/dist/modules/displays/services/displays.service.js +19 -24
- package/dist/modules/displays/services/displays.service.js.map +1 -1
- package/dist/modules/displays/services/home-resolution.service.d.ts +7 -2
- package/dist/modules/displays/services/home-resolution.service.js +50 -6
- package/dist/modules/displays/services/home-resolution.service.js.map +1 -1
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.d.ts +9 -0
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.js +26 -0
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.js.map +1 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.d.ts +9 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.js +26 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.js.map +1 -0
- package/dist/modules/energy/energy.module.js +29 -15
- package/dist/modules/energy/energy.module.js.map +1 -1
- package/dist/modules/extensions/controllers/actions.controller.d.ts +9 -4
- package/dist/modules/extensions/controllers/actions.controller.js +63 -10
- package/dist/modules/extensions/controllers/actions.controller.js.map +1 -1
- package/dist/modules/extensions/extensions.module.js +31 -28
- package/dist/modules/extensions/extensions.module.js.map +1 -1
- package/dist/modules/extensions/extensions.openapi.d.ts +3 -3
- package/dist/modules/extensions/extensions.openapi.js +2 -0
- package/dist/modules/extensions/extensions.openapi.js.map +1 -1
- package/dist/modules/extensions/models/action.model.d.ts +13 -0
- package/dist/modules/extensions/models/action.model.js +89 -3
- package/dist/modules/extensions/models/action.model.js.map +1 -1
- package/dist/modules/extensions/models/actions-response.model.d.ts +4 -1
- package/dist/modules/extensions/models/actions-response.model.js +19 -1
- package/dist/modules/extensions/models/actions-response.model.js.map +1 -1
- package/dist/modules/extensions/models/extension.model.js +5 -0
- package/dist/modules/extensions/models/extension.model.js.map +1 -1
- package/dist/modules/extensions/models/service-status.model.js +7 -0
- package/dist/modules/extensions/models/service-status.model.js.map +1 -1
- package/dist/modules/extensions/services/action-audit.service.d.ts +21 -0
- package/dist/modules/extensions/services/action-audit.service.js +49 -0
- package/dist/modules/extensions/services/action-audit.service.js.map +1 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.d.ts +11 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.js +28 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.js.map +1 -0
- package/dist/modules/extensions/services/extension-action-registry.service.d.ts +6 -1
- package/dist/modules/extensions/services/extension-action-registry.service.js +22 -3
- package/dist/modules/extensions/services/extension-action-registry.service.js.map +1 -1
- package/dist/modules/extensions/services/extension-action.interface.d.ts +3 -0
- package/dist/modules/extensions/services/extension-action.interface.js +3 -1
- package/dist/modules/extensions/services/extension-action.interface.js.map +1 -1
- package/dist/modules/intents/intents.module.js +27 -26
- package/dist/modules/intents/intents.module.js.map +1 -1
- package/dist/modules/mdns/mdns.module.js +24 -19
- package/dist/modules/mdns/mdns.module.js.map +1 -1
- package/dist/modules/platform/dto/system-info.dto.d.ts +2 -0
- package/dist/modules/platform/dto/system-info.dto.js +7 -0
- package/dist/modules/platform/dto/system-info.dto.js.map +1 -1
- package/dist/modules/platform/platform.module.js +25 -17
- package/dist/modules/platform/platform.module.js.map +1 -1
- package/dist/modules/platform/platforms/abstract.platform.d.ts +44 -0
- package/dist/modules/platform/platforms/abstract.platform.js +267 -0
- package/dist/modules/platform/platforms/abstract.platform.js.map +1 -1
- package/dist/modules/platform/platforms/docker.platform.d.ts +2 -0
- package/dist/modules/platform/platforms/docker.platform.js +3 -0
- package/dist/modules/platform/platforms/docker.platform.js.map +1 -1
- package/dist/modules/platform/platforms/generic.platform.d.ts +2 -1
- package/dist/modules/platform/platforms/generic.platform.js +17 -15
- package/dist/modules/platform/platforms/generic.platform.js.map +1 -1
- package/dist/modules/platform/platforms/home-assistant.platform.d.ts +4 -0
- package/dist/modules/platform/platforms/home-assistant.platform.js +21 -0
- package/dist/modules/platform/platforms/home-assistant.platform.js.map +1 -1
- package/dist/modules/platform/platforms/raspberry.platform.js +22 -40
- package/dist/modules/platform/platforms/raspberry.platform.js.map +1 -1
- package/dist/modules/platform/services/platform.service.d.ts +2 -0
- package/dist/modules/platform/services/platform.service.js +7 -0
- package/dist/modules/platform/services/platform.service.js.map +1 -1
- package/dist/modules/scenes/scenes.module.js +18 -18
- package/dist/modules/scenes/scenes.module.js.map +1 -1
- package/dist/modules/security/security.module.js +22 -17
- package/dist/modules/security/security.module.js.map +1 -1
- package/dist/modules/spaces/controllers/spaces.controller.d.ts +5 -115
- package/dist/modules/spaces/controllers/spaces.controller.js +22 -1922
- package/dist/modules/spaces/controllers/spaces.controller.js.map +1 -1
- package/dist/modules/spaces/dto/create-space.dto.d.ts +1 -5
- package/dist/modules/spaces/dto/create-space.dto.js +0 -61
- package/dist/modules/spaces/dto/create-space.dto.js.map +1 -1
- package/dist/modules/spaces/dto/update-space.dto.d.ts +1 -5
- package/dist/modules/spaces/dto/update-space.dto.js +0 -61
- package/dist/modules/spaces/dto/update-space.dto.js.map +1 -1
- package/dist/modules/spaces/entities/space-role.entity.d.ts +8 -0
- package/dist/modules/spaces/entities/space-role.entity.js +58 -0
- package/dist/modules/spaces/entities/space-role.entity.js.map +1 -0
- package/dist/modules/spaces/entities/space.entity.d.ts +3 -6
- package/dist/modules/spaces/entities/space.entity.js +11 -74
- package/dist/modules/spaces/entities/space.entity.js.map +1 -1
- package/dist/modules/spaces/entities/space.relations.d.ts +11 -0
- package/dist/modules/spaces/entities/space.relations.js +3 -0
- package/dist/modules/spaces/entities/space.relations.js.map +1 -0
- package/dist/modules/spaces/models/spaces-response.model.d.ts +1 -522
- package/dist/modules/spaces/models/spaces-response.model.js +23 -4150
- package/dist/modules/spaces/models/spaces-response.model.js.map +1 -1
- package/dist/modules/spaces/services/space-create-builder-registry.service.d.ts +6 -0
- package/dist/modules/spaces/services/space-create-builder-registry.service.js +26 -0
- package/dist/modules/spaces/services/space-create-builder-registry.service.js.map +1 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.d.ts +6 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.js +26 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.js.map +1 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.d.ts +12 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.js +39 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.d.ts +17 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.js +36 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces.service.d.ts +4 -12
- package/dist/modules/spaces/services/spaces.service.js +120 -160
- package/dist/modules/spaces/services/spaces.service.js.map +1 -1
- package/dist/modules/spaces/spaces.constants.d.ts +13 -292
- package/dist/modules/spaces/spaces.constants.js +13 -1449
- package/dist/modules/spaces/spaces.constants.js.map +1 -1
- package/dist/modules/spaces/spaces.module.d.ts +2 -9
- package/dist/modules/spaces/spaces.module.js +51 -108
- package/dist/modules/spaces/spaces.module.js.map +1 -1
- package/dist/modules/spaces/spaces.openapi.d.ts +3 -16
- package/dist/modules/spaces/spaces.openapi.js +0 -136
- package/dist/modules/spaces/spaces.openapi.js.map +1 -1
- package/dist/modules/stats/controllers/prometheus.controller.js +0 -2
- package/dist/modules/stats/controllers/prometheus.controller.js.map +1 -1
- package/dist/modules/storage/models/config.model.js +2 -4
- package/dist/modules/storage/models/config.model.js.map +1 -1
- package/dist/modules/storage/services/storage.service.d.ts +4 -10
- package/dist/modules/storage/services/storage.service.js +21 -60
- package/dist/modules/storage/services/storage.service.js.map +1 -1
- package/dist/modules/storage/storage.constants.d.ts +2 -0
- package/dist/modules/storage/storage.constants.js +3 -1
- package/dist/modules/storage/storage.constants.js.map +1 -1
- package/dist/modules/storage/storage.module.js +26 -7
- package/dist/modules/storage/storage.module.js.map +1 -1
- package/dist/modules/swagger/commands/serve-swagger.command.d.ts +14 -0
- package/dist/modules/swagger/commands/serve-swagger.command.js +60 -0
- package/dist/modules/swagger/commands/serve-swagger.command.js.map +1 -0
- package/dist/modules/swagger/swagger.module.js +2 -0
- package/dist/modules/swagger/swagger.module.js.map +1 -1
- package/dist/modules/system/backup-contribution.module.d.ts +2 -0
- package/dist/modules/system/backup-contribution.module.js +22 -0
- package/dist/modules/system/backup-contribution.module.js.map +1 -0
- package/dist/modules/system/controllers/backup.controller.d.ts +17 -0
- package/dist/modules/system/controllers/backup.controller.js +308 -0
- package/dist/modules/system/controllers/backup.controller.js.map +1 -0
- package/dist/modules/system/dto/create-backup.dto.d.ts +6 -0
- package/dist/modules/system/dto/create-backup.dto.js +43 -0
- package/dist/modules/system/dto/create-backup.dto.js.map +1 -0
- package/dist/modules/system/models/backup-response.model.d.ts +8 -0
- package/dist/modules/system/models/backup-response.model.js +46 -0
- package/dist/modules/system/models/backup-response.model.js.map +1 -0
- package/dist/modules/system/models/backup.model.d.ts +14 -0
- package/dist/modules/system/models/backup.model.js +103 -0
- package/dist/modules/system/models/backup.model.js.map +1 -0
- package/dist/modules/system/models/system.model.d.ts +3 -1
- package/dist/modules/system/models/system.model.js +26 -0
- package/dist/modules/system/models/system.model.js.map +1 -1
- package/dist/modules/system/scripts/update-worker.sh +304 -0
- package/dist/modules/system/services/backup-contribution-registry.service.d.ts +24 -0
- package/dist/modules/system/services/backup-contribution-registry.service.js +52 -0
- package/dist/modules/system/services/backup-contribution-registry.service.js.map +1 -0
- package/dist/modules/system/services/backup.service.d.ts +52 -0
- package/dist/modules/system/services/backup.service.js +630 -0
- package/dist/modules/system/services/backup.service.js.map +1 -0
- package/dist/modules/system/services/house-mode-actions.service.d.ts +1 -1
- package/dist/modules/system/services/house-mode-actions.service.js +5 -5
- package/dist/modules/system/services/house-mode-actions.service.js.map +1 -1
- package/dist/modules/system/services/system-command.service.d.ts +7 -1
- package/dist/modules/system/services/system-command.service.js +24 -4
- package/dist/modules/system/services/system-command.service.js.map +1 -1
- package/dist/modules/system/services/system.service.js +4 -1
- package/dist/modules/system/services/system.service.js.map +1 -1
- package/dist/modules/system/services/update-executor.service.d.ts +4 -0
- package/dist/modules/system/services/update-executor.service.js +130 -10
- package/dist/modules/system/services/update-executor.service.js.map +1 -1
- package/dist/modules/system/system.constants.d.ts +7 -0
- package/dist/modules/system/system.constants.js +9 -1
- package/dist/modules/system/system.constants.js.map +1 -1
- package/dist/modules/system/system.module.d.ts +5 -1
- package/dist/modules/system/system.module.js +95 -31
- package/dist/modules/system/system.module.js.map +1 -1
- package/dist/modules/system/system.openapi.d.ts +4 -1
- package/dist/modules/system/system.openapi.js +8 -0
- package/dist/modules/system/system.openapi.js.map +1 -1
- package/dist/modules/users/controllers/users.controller.js +9 -0
- package/dist/modules/users/controllers/users.controller.js.map +1 -1
- package/dist/modules/users/dto/create-user.dto.js +1 -0
- package/dist/modules/users/dto/create-user.dto.js.map +1 -1
- package/dist/modules/users/dto/update-user.dto.d.ts +1 -0
- package/dist/modules/users/dto/update-user.dto.js +15 -1
- package/dist/modules/users/dto/update-user.dto.js.map +1 -1
- package/dist/modules/users/services/users.service.d.ts +1 -0
- package/dist/modules/users/services/users.service.js +12 -2
- package/dist/modules/users/services/users.service.js.map +1 -1
- package/dist/modules/users/users.constants.d.ts +3 -0
- package/dist/modules/users/users.constants.js +35 -1
- package/dist/modules/users/users.constants.js.map +1 -1
- package/dist/modules/users/users.module.js +29 -13
- package/dist/modules/users/users.module.js.map +1 -1
- package/dist/modules/weather/weather.module.js +20 -18
- package/dist/modules/weather/weather.module.js.map +1 -1
- package/dist/modules/websocket/dto/client-user.dto.js +25 -0
- package/dist/modules/websocket/dto/client-user.dto.js.map +1 -1
- package/dist/modules/websocket/dto/ws-client.dto.js +26 -0
- package/dist/modules/websocket/dto/ws-client.dto.js.map +1 -1
- package/dist/modules/websocket/gateway/websocket.gateway.d.ts +2 -2
- package/dist/modules/websocket/gateway/websocket.gateway.js +27 -9
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/modules/websocket/services/command-event-registry.service.d.ts +3 -1
- package/dist/modules/websocket/services/command-event-registry.service.js +5 -4
- package/dist/modules/websocket/services/command-event-registry.service.js.map +1 -1
- package/dist/plugins/buddy-claude/buddy-claude.plugin.js +24 -11
- package/dist/plugins/buddy-claude/buddy-claude.plugin.js.map +1 -1
- package/dist/plugins/buddy-claude-setup-token/buddy-claude-setup-token.plugin.js +21 -11
- package/dist/plugins/buddy-claude-setup-token/buddy-claude-setup-token.plugin.js.map +1 -1
- package/dist/plugins/buddy-discord/buddy-discord.plugin.js +28 -16
- package/dist/plugins/buddy-discord/buddy-discord.plugin.js.map +1 -1
- package/dist/plugins/buddy-elevenlabs/buddy-elevenlabs.plugin.js +22 -11
- package/dist/plugins/buddy-elevenlabs/buddy-elevenlabs.plugin.js.map +1 -1
- package/dist/plugins/buddy-ollama/buddy-ollama.plugin.js +28 -12
- package/dist/plugins/buddy-ollama/buddy-ollama.plugin.js.map +1 -1
- package/dist/plugins/buddy-openai/buddy-openai.plugin.js +24 -15
- package/dist/plugins/buddy-openai/buddy-openai.plugin.js.map +1 -1
- package/dist/plugins/buddy-openai/platforms/openai.provider.js +1 -0
- package/dist/plugins/buddy-openai/platforms/openai.provider.js.map +1 -1
- package/dist/plugins/buddy-openai-codex/buddy-openai-codex.plugin.js +26 -15
- package/dist/plugins/buddy-openai-codex/buddy-openai-codex.plugin.js.map +1 -1
- package/dist/plugins/buddy-stt-whisper-local/buddy-stt-whisper-local.plugin.js +23 -9
- package/dist/plugins/buddy-stt-whisper-local/buddy-stt-whisper-local.plugin.js.map +1 -1
- package/dist/plugins/buddy-system-tts/buddy-system-tts.plugin.js +21 -10
- package/dist/plugins/buddy-system-tts/buddy-system-tts.plugin.js.map +1 -1
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.js +22 -11
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.js.map +1 -1
- package/dist/plugins/buddy-voiceai/buddy-voiceai.plugin.js +22 -12
- package/dist/plugins/buddy-voiceai/buddy-voiceai.plugin.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.js +24 -12
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.d.ts +2 -2
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.js +3 -3
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.d.ts +2 -1
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.js +31 -12
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.js.map +1 -1
- package/dist/plugins/data-sources-device-channel/data-sources-device-channel.plugin.js +16 -30
- package/dist/plugins/data-sources-device-channel/data-sources-device-channel.plugin.js.map +1 -1
- package/dist/plugins/data-sources-weather/data-sources-weather.plugin.js +17 -29
- package/dist/plugins/data-sources-weather/data-sources-weather.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +37 -136
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/home-assistant-discovered-helper.dto.js +22 -2
- package/dist/plugins/devices-home-assistant/dto/home-assistant-discovered-helper.dto.js.map +1 -1
- package/dist/plugins/devices-home-assistant/models/config.model.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/models/config.model.js +12 -0
- package/dist/plugins/devices-home-assistant/models/config.model.js.map +1 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.d.ts +3 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js +11 -2
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js +0 -6
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.d.ts +10 -0
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.js +47 -0
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.d.ts +3 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.js +8 -2
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.d.ts +5 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.js +27 -7
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +9 -7
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +58 -24
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +1 -0
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.js +20 -17
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.d.ts +7 -2
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.js +83 -2
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +4 -0
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +86 -11
- 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 +8 -0
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +45 -0
- 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 -3
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js +4 -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.d.ts +6 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +72 -21
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.js +24 -6
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/entities/devices-shelly-ng.entity.js +12 -0
- package/dist/plugins/devices-shelly-ng/entities/devices-shelly-ng.entity.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/entities/shelly-ng-device-address.entity.js +2 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-ng-device-address.entity.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/config.model.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/models/config.model.js +18 -6
- package/dist/plugins/devices-shelly-ng/models/config.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.d.ts +4 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.js +15 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.d.ts +30 -0
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.js +269 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.d.ts +64 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.js +301 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +17 -7
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +110 -15
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.d.ts +5 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +28 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +197 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.d.ts +7 -2
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.js +83 -2
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.d.ts +3 -3
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.js +4 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js +27 -23
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.d.ts +4 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.js +15 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.d.ts +31 -0
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.js +279 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.d.ts +0 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +2 -9
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.d.ts +0 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js +2 -15
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.d.ts +9 -2
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.js +93 -20
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.d.ts +62 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.js +314 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.d.ts +3 -6
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js +13 -37
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.d.ts +2 -0
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.js +23 -0
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.js.map +1 -0
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js +19 -23
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js.map +1 -1
- package/dist/plugins/devices-wled/devices-wled.plugin.js +30 -20
- package/dist/plugins/devices-wled/devices-wled.plugin.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js +0 -6
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled.service.d.ts +3 -6
- package/dist/plugins/devices-wled/services/wled.service.js +3 -20
- package/dist/plugins/devices-wled/services/wled.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.d.ts +14 -0
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.js +185 -0
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.d.ts +5 -3
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.js +12 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js +43 -54
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.d.ts +12 -0
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.js +73 -0
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.d.ts +38 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.js +259 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.d.ts +7 -0
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.js +30 -1
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +22 -0
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.d.ts +70 -0
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.js +361 -0
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js +23 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.d.ts +10 -7
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +46 -22
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.update-config.dto.d.ts → plugins/influx-v1/dto/update-config.dto.d.ts} +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.update-config.dto.js → plugins/influx-v1/dto/update-config.dto.js} +3 -3
- package/dist/plugins/influx-v1/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/influx-v1/influx-v1.constants.js.map +1 -0
- package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.openapi.d.ts +1 -1
- package/dist/plugins/influx-v1/influx-v1.openapi.js +7 -0
- package/dist/plugins/influx-v1/influx-v1.openapi.js.map +1 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.d.ts +15 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.js +109 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.js.map +1 -0
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.config.model.d.ts → plugins/influx-v1/models/config.model.d.ts} +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.config.model.js → plugins/influx-v1/models/config.model.js} +3 -3
- package/dist/plugins/influx-v1/models/config.model.js.map +1 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.d.ts +20 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js +128 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js.map +1 -0
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.plugin.d.ts → plugins/influx-v1/services/influx-v1.storage.d.ts} +3 -3
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.plugin.js → plugins/influx-v1/services/influx-v1.storage.js} +9 -9
- package/dist/plugins/influx-v1/services/influx-v1.storage.js.map +1 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.d.ts +8 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.js +82 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.constants.d.ts +4 -0
- package/dist/plugins/influx-v2/influx-v2.constants.js +8 -0
- package/dist/plugins/influx-v2/influx-v2.constants.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.d.ts +2 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.js +7 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.d.ts +15 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.js +109 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.js.map +1 -0
- package/dist/plugins/influx-v2/models/config.model.d.ts +9 -0
- package/dist/plugins/influx-v2/models/config.model.js +93 -0
- package/dist/plugins/influx-v2/models/config.model.js.map +1 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.d.ts +20 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js +132 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js.map +1 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.d.ts +33 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.js +230 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.js.map +1 -0
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.js +20 -29
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.js.map +1 -1
- package/dist/{modules/storage/plugins/memory/memory.update-config.dto.d.ts → plugins/memory-storage/dto/update-config.dto.d.ts} +1 -1
- package/dist/{modules/storage/plugins/memory/memory.update-config.dto.js → plugins/memory-storage/dto/update-config.dto.js} +5 -5
- package/dist/plugins/memory-storage/dto/update-config.dto.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.constants.js → plugins/memory-storage/memory-storage.constants.js} +1 -1
- package/dist/plugins/memory-storage/memory-storage.constants.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.openapi.d.ts → plugins/memory-storage/memory-storage.openapi.d.ts} +1 -1
- package/dist/plugins/memory-storage/memory-storage.openapi.js +7 -0
- package/dist/plugins/memory-storage/memory-storage.openapi.js.map +1 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.d.ts +15 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.js +92 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.config.model.d.ts → plugins/memory-storage/models/config.model.d.ts} +1 -1
- package/dist/{modules/storage/plugins/memory/memory.config.model.js → plugins/memory-storage/models/config.model.js} +5 -5
- package/dist/plugins/memory-storage/models/config.model.js.map +1 -0
- package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/in-memory-timeseries.store.d.ts +1 -1
- package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/in-memory-timeseries.store.js +4 -4
- package/dist/plugins/memory-storage/services/in-memory-timeseries.store.js.map +1 -0
- package/dist/plugins/memory-storage/services/influxql-parser.js.map +1 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.d.ts +14 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js +87 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.plugin.d.ts → plugins/memory-storage/services/memory-storage.storage.d.ts} +3 -3
- package/dist/{modules/storage/plugins/memory/memory.plugin.js → plugins/memory-storage/services/memory-storage.storage.js} +8 -8
- package/dist/plugins/memory-storage/services/memory-storage.storage.js.map +1 -0
- package/dist/plugins/pages-cards/pages-cards.plugin.js +15 -26
- package/dist/plugins/pages-cards/pages-cards.plugin.js.map +1 -1
- package/dist/plugins/pages-device-detail/pages-device-detail.plugin.js +16 -25
- package/dist/plugins/pages-device-detail/pages-device-detail.plugin.js.map +1 -1
- package/dist/plugins/pages-tiles/pages-tiles.plugin.js +15 -26
- package/dist/plugins/pages-tiles/pages-tiles.plugin.js.map +1 -1
- package/dist/plugins/scenes-local/scenes-local.plugin.js +21 -22
- package/dist/plugins/scenes-local/scenes-local.plugin.js.map +1 -1
- package/dist/plugins/simulator/services/scenario-executor.service.d.ts +5 -5
- package/dist/plugins/simulator/services/scenario-executor.service.js +7 -6
- package/dist/plugins/simulator/services/scenario-executor.service.js.map +1 -1
- package/dist/plugins/simulator/services/simulator-actions.service.js +3 -0
- package/dist/plugins/simulator/services/simulator-actions.service.js.map +1 -1
- package/dist/plugins/simulator/simulator.plugin.js +49 -58
- package/dist/plugins/simulator/simulator.plugin.js.map +1 -1
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.d.ts +119 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js +1958 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-intent.dto.js +24 -24
- package/dist/plugins/spaces-home-control/dto/climate-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/climate-role.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-intent.dto.js +18 -18
- package/dist/plugins/spaces-home-control/dto/covers-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/covers-role.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.d.ts +8 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.js +85 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-intent.dto.js +34 -34
- package/dist/plugins/spaces-home-control/dto/lighting-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/lighting-role.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/media-activity-binding.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/media-activity-binding.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/media-activity-binding.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/sensor-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/sensor-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/sensor-role.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/status-widget.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/suggestion.dto.d.ts +2 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/suggestion.dto.js +5 -4
- package/dist/plugins/spaces-home-control/dto/suggestion.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.d.ts +8 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.js +85 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.d.ts +8 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.js +91 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-active-media-activity.entity.d.ts +11 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-active-media-activity.entity.js +23 -30
- package/dist/plugins/spaces-home-control/entities/space-active-media-activity.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-climate-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-climate-role.entity.js +25 -32
- package/dist/plugins/spaces-home-control/entities/space-climate-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-covers-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-covers-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-covers-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-lighting-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-lighting-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-lighting-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-media-activity-binding.entity.d.ts +15 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-media-activity-binding.entity.js +20 -28
- package/dist/plugins/spaces-home-control/entities/space-media-activity-binding.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-sensor-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-sensor-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-sensor-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.d.ts +8 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.js +91 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-activity.listener.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-activity.listener.js +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-climate-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-climate-state.listener.js +6 -5
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-lighting-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-lighting-state.listener.js +6 -5
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-sensor-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-sensor-state.listener.js +9 -8
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/websocket-exchange.listener.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/websocket-exchange.listener.js +5 -5
- package/dist/plugins/spaces-home-control/listeners/websocket-exchange.listener.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-home-control/models/config.model.js +49 -0
- package/dist/plugins/spaces-home-control/models/config.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/derived-media-endpoint.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/derived-media-endpoint.model.js +4 -4
- package/dist/plugins/spaces-home-control/models/derived-media-endpoint.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity-binding.model.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity-binding.model.js +1 -1
- package/dist/plugins/spaces-home-control/models/media-activity-binding.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity.model.js +6 -6
- package/dist/plugins/spaces-home-control/models/media-activity.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-routing.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-routing.model.js +4 -4
- package/dist/plugins/spaces-home-control/models/media-routing.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.d.ts +524 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js +4145 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-scenario-templates.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-scenario-templates.js +3 -3
- package/dist/plugins/spaces-home-control/services/__fixtures__/media-scenario-templates.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-test-harness.d.ts +1 -1
- package/dist/plugins/spaces-home-control/services/__fixtures__/media-test-harness.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/climate-intent.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/climate-intent.service.js +35 -34
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/covers-intent.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/covers-intent.service.js +48 -47
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/derived-media-endpoint.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/derived-media-endpoint.service.js +28 -27
- package/dist/plugins/spaces-home-control/services/derived-media-endpoint.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.d.ts +4 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.js +20 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.d.ts +24 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.js +182 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/lighting-intent.service.d.ts +6 -6
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/lighting-intent.service.js +68 -67
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/media-capability.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/media-capability.service.js +20 -19
- package/dist/plugins/spaces-home-control/services/media-capability.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-role.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-role.service.js +18 -17
- package/dist/plugins/spaces-home-control/services/space-climate-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-state.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-state.service.js +32 -31
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-context-snapshot.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-context-snapshot.service.js +7 -6
- package/dist/plugins/spaces-home-control/services/space-context-snapshot.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-role.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-role.service.js +28 -25
- package/dist/plugins/spaces-home-control/services/space-covers-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-state.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-state.service.js +9 -8
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent-base.service.d.ts +1 -1
- package/dist/plugins/spaces-home-control/services/space-intent-base.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-role.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-role.service.js +25 -22
- package/dist/plugins/spaces-home-control/services/space-lighting-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-state.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-state.service.js +20 -19
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-tool.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-tool.service.js +8 -7
- package/dist/plugins/spaces-home-control/services/space-lighting-tool.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity-binding.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity-binding.service.js +31 -30
- package/dist/plugins/spaces-home-control/services/space-media-activity-binding.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity.service.js +38 -37
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-role.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-role.service.js +24 -23
- package/dist/plugins/spaces-home-control/services/space-sensor-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-state.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-state.service.js +19 -18
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion-heartbeat.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion-heartbeat.service.js +10 -9
- package/dist/plugins/spaces-home-control/services/space-suggestion-heartbeat.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion.service.d.ts +4 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion.service.js +8 -7
- package/dist/plugins/spaces-home-control/services/space-suggestion.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-undo-history.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-undo-history.service.js +5 -5
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/spaces-seeder.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/spaces-seeder.service.js +5 -5
- package/dist/plugins/spaces-home-control/services/spaces-seeder.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.d.ts +297 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.js +1460 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.d.ts +2 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js +155 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.d.ts +29 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +334 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -0
- package/dist/plugins/spaces-home-control/spec/index.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec-loader.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec-loader.service.js +1 -1
- package/dist/plugins/spaces-home-control/spec/intent-spec-loader.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/spec/intent-spec.types.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/validators/at-least-one-setpoint.validator.js +2 -2
- package/dist/plugins/spaces-home-control/validators/at-least-one-setpoint.validator.js.map +1 -0
- package/dist/plugins/spaces-home-control/validators/setpoint-order-constraint.validator.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/validators/space-category-constraint.validator.js +1 -1
- package/dist/plugins/spaces-home-control/validators/space-category-constraint.validator.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.d.ts +18 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.js +219 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.js +143 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.js +130 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.d.ts +10 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.js +78 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.d.ts +12 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.js +134 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.js +130 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.js +161 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.js +147 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.js +49 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.d.ts +8 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.js +46 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.d.ts +28 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.js +181 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.d.ts +4 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.js +20 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.d.ts +14 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.js +59 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.d.ts +17 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.js +23 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.d.ts +9 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.js +25 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.d.ts +2 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.js +31 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.d.ts +23 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.js +159 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.js +39 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.js +49 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.d.ts +7 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.js +11 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.d.ts +2 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.js +16 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.d.ts +15 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.js +124 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.js +39 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.js +49 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.d.ts +7 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.js +11 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.d.ts +2 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.js +16 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.d.ts +15 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.js +124 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.js.map +1 -0
- package/dist/plugins/tiles-device-preview/tiles-device-preview.plugin.js +16 -22
- package/dist/plugins/tiles-device-preview/tiles-device-preview.plugin.js.map +1 -1
- package/dist/plugins/tiles-scene/tiles-scene.plugin.js +15 -21
- package/dist/plugins/tiles-scene/tiles-scene.plugin.js.map +1 -1
- package/dist/plugins/tiles-time/tiles-time.plugin.js +13 -19
- package/dist/plugins/tiles-time/tiles-time.plugin.js.map +1 -1
- package/dist/plugins/tiles-weather/tiles-weather.plugin.js +16 -19
- package/dist/plugins/tiles-weather/tiles-weather.plugin.js.map +1 -1
- package/dist/plugins/weather-open-meteo/weather-open-meteo.plugin.js +32 -21
- package/dist/plugins/weather-open-meteo/weather-open-meteo.plugin.js.map +1 -1
- package/dist/plugins/weather-openweathermap/weather-openweathermap.plugin.js +22 -23
- package/dist/plugins/weather-openweathermap/weather-openweathermap.plugin.js.map +1 -1
- package/dist/plugins/weather-openweathermap-onecall/weather-openweathermap-onecall.plugin.js +27 -23
- package/dist/plugins/weather-openweathermap-onecall/weather-openweathermap-onecall.plugin.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +10 -6
- package/dist/modules/spaces/dto/climate-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/climate-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/covers-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/covers-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/lighting-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/lighting-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/media-activity-binding.dto.js.map +0 -1
- package/dist/modules/spaces/dto/sensor-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/status-widget.dto.js.map +0 -1
- package/dist/modules/spaces/dto/suggestion.dto.js.map +0 -1
- package/dist/modules/spaces/entities/space-active-media-activity.entity.d.ts +0 -12
- package/dist/modules/spaces/entities/space-active-media-activity.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-climate-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-climate-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-covers-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-covers-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-lighting-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-lighting-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-media-activity-binding.entity.d.ts +0 -16
- package/dist/modules/spaces/entities/space-media-activity-binding.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-sensor-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-sensor-role.entity.js.map +0 -1
- package/dist/modules/spaces/listeners/space-activity.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-climate-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-lighting-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-sensor-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/websocket-exchange.listener.js.map +0 -1
- package/dist/modules/spaces/models/derived-media-endpoint.model.js.map +0 -1
- package/dist/modules/spaces/models/media-activity-binding.model.js.map +0 -1
- package/dist/modules/spaces/models/media-activity.model.js.map +0 -1
- package/dist/modules/spaces/models/media-routing.model.js.map +0 -1
- package/dist/modules/spaces/services/__fixtures__/media-scenario-templates.js.map +0 -1
- package/dist/modules/spaces/services/__fixtures__/media-test-harness.js.map +0 -1
- package/dist/modules/spaces/services/climate-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/covers-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/derived-media-endpoint.service.js.map +0 -1
- package/dist/modules/spaces/services/lighting-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/media-capability.service.js.map +0 -1
- package/dist/modules/spaces/services/space-climate-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-climate-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-context-snapshot.service.js.map +0 -1
- package/dist/modules/spaces/services/space-covers-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-covers-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-intent-base.service.js.map +0 -1
- package/dist/modules/spaces/services/space-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-tool.service.js.map +0 -1
- package/dist/modules/spaces/services/space-media-activity-binding.service.js.map +0 -1
- package/dist/modules/spaces/services/space-media-activity.service.js.map +0 -1
- package/dist/modules/spaces/services/space-sensor-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-sensor-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-suggestion-heartbeat.service.js.map +0 -1
- package/dist/modules/spaces/services/space-suggestion.service.js.map +0 -1
- package/dist/modules/spaces/services/space-undo-history.service.js.map +0 -1
- package/dist/modules/spaces/services/spaces-seeder.service.js.map +0 -1
- package/dist/modules/spaces/spec/definitions/climate-intents.yaml +0 -94
- package/dist/modules/spaces/spec/definitions/covers-modes.yaml +0 -83
- package/dist/modules/spaces/spec/definitions/enums.yaml +0 -119
- package/dist/modules/spaces/spec/definitions/lighting-intents.yaml +0 -181
- package/dist/modules/spaces/spec/definitions/lighting-modes.yaml +0 -119
- package/dist/modules/spaces/spec/definitions/suggestions.yaml +0 -47
- package/dist/modules/spaces/spec/index.js.map +0 -1
- package/dist/modules/spaces/spec/intent-spec-loader.service.js.map +0 -1
- package/dist/modules/spaces/spec/intent-spec.types.js.map +0 -1
- package/dist/modules/spaces/validators/at-least-one-setpoint.validator.js.map +0 -1
- package/dist/modules/spaces/validators/setpoint-order-constraint.validator.js.map +0 -1
- package/dist/modules/spaces/validators/space-category-constraint.validator.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.config.model.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.constants.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.d.ts +0 -17
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.js +0 -94
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.openapi.js +0 -7
- package/dist/modules/storage/plugins/influx-v1/influx-v1.openapi.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.plugin.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.update-config.dto.js.map +0 -1
- package/dist/modules/storage/plugins/memory/in-memory-timeseries.store.js.map +0 -1
- package/dist/modules/storage/plugins/memory/influxql-parser.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.config.model.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.constants.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.module.d.ts +0 -13
- package/dist/modules/storage/plugins/memory/memory.module.js +0 -75
- package/dist/modules/storage/plugins/memory/memory.module.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.openapi.js +0 -7
- package/dist/modules/storage/plugins/memory/memory.openapi.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.plugin.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.update-config.dto.js.map +0 -1
- /package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.constants.d.ts +0 -0
- /package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.constants.js +0 -0
- /package/dist/{modules/storage/plugins/memory/memory.constants.d.ts → plugins/memory-storage/memory-storage.constants.d.ts} +0 -0
- /package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/influxql-parser.d.ts +0 -0
- /package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/influxql-parser.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/dto/status-widget.dto.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/dto/status-widget.dto.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-test-harness.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent-base.service.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent.service.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent.service.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/index.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/index.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec.types.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec.types.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/at-least-one-setpoint.validator.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/setpoint-order-constraint.validator.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/setpoint-order-constraint.validator.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/space-category-constraint.validator.d.ts +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OnModuleInit } from '@nestjs/common';
|
|
2
2
|
import { ModuleRef } from '@nestjs/core';
|
|
3
|
-
import {
|
|
3
|
+
import { SpacesService } from '../../../modules/spaces/services/spaces.service';
|
|
4
|
+
import { CoversRole, LightingRole } from '../spaces-home-control.constants';
|
|
4
5
|
import { ClimateState, SpaceClimateStateService } from './space-climate-state.service';
|
|
5
6
|
import { SpaceCoversRoleService } from './space-covers-role.service';
|
|
6
7
|
import { SpaceLightingRoleService } from './space-lighting-role.service';
|
|
7
|
-
import { SpacesService } from './spaces.service';
|
|
8
8
|
export interface LightStateSnapshot {
|
|
9
9
|
deviceId: string;
|
|
10
10
|
deviceName: string;
|
|
@@ -47,12 +47,13 @@ const common_1 = require("@nestjs/common");
|
|
|
47
47
|
const core_1 = require("@nestjs/core");
|
|
48
48
|
const extension_logger_service_1 = require("../../../common/logger/extension-logger.service");
|
|
49
49
|
const color_utils_1 = require("../../../common/utils/color.utils");
|
|
50
|
-
const devices_constants_1 = require("
|
|
51
|
-
const
|
|
50
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
51
|
+
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
52
|
+
const spaces_constants_1 = require("../../../modules/spaces/spaces.constants");
|
|
53
|
+
const spaces_home_control_constants_1 = require("../spaces-home-control.constants");
|
|
52
54
|
const space_climate_state_service_1 = require("./space-climate-state.service");
|
|
53
55
|
const space_covers_role_service_1 = require("./space-covers-role.service");
|
|
54
56
|
const space_lighting_role_service_1 = require("./space-lighting-role.service");
|
|
55
|
-
const spaces_service_1 = require("./spaces.service");
|
|
56
57
|
let SpaceContextSnapshotService = class SpaceContextSnapshotService {
|
|
57
58
|
constructor(spacesService, moduleRef, lightingRoleService, coversRoleService, climateStateService) {
|
|
58
59
|
this.spacesService = spacesService;
|
|
@@ -78,13 +79,13 @@ let SpaceContextSnapshotService = class SpaceContextSnapshotService {
|
|
|
78
79
|
const primaryThermostatId = primaryDevices.find((d) => d.heaterSetpointProperty || d.coolerSetpointProperty)?.device.id ?? null;
|
|
79
80
|
const defaultClimateState = {
|
|
80
81
|
hasClimate: false,
|
|
81
|
-
mode:
|
|
82
|
+
mode: spaces_home_control_constants_1.ClimateMode.OFF,
|
|
82
83
|
currentTemperature: null,
|
|
83
84
|
currentHumidity: null,
|
|
84
85
|
heatingSetpoint: null,
|
|
85
86
|
coolingSetpoint: null,
|
|
86
|
-
minSetpoint:
|
|
87
|
-
maxSetpoint:
|
|
87
|
+
minSetpoint: spaces_home_control_constants_1.DEFAULT_MIN_SETPOINT,
|
|
88
|
+
maxSetpoint: spaces_home_control_constants_1.DEFAULT_MAX_SETPOINT,
|
|
88
89
|
supportsHeating: false,
|
|
89
90
|
supportsCooling: false,
|
|
90
91
|
isHeating: false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-context-snapshot.service.js","sourceRoot":"","sources":["../../../../src/plugins/spaces-home-control/services/space-context-snapshot.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA0D;AAC1D,uCAAyC;AAEzC,8FAAwF;AACxF,mEAA6D;AAC7D,kFAA+G;AAE/G,oFAAgF;AAChF,+EAA8E;AAC9E,oFAM0C;AAE1C,+EAAuF;AACvF,2EAAqE;AACrE,+EAAyE;AAkFlE,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAKvC,YACkB,aAA4B,EAC5B,SAAoB,EACpB,mBAA6C,EAC7C,iBAAyC,EACzC,mBAA6C;QAJ7C,kBAAa,GA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ED,OAAO,KAAK,CAAC;IACd,CAAC;IAKO,uBAAuB,CAAC,QAAkD;QACjF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QAEpC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YAEjC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;QACtC,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAKO,sBAAsB,CAAC,QAAkD;QAChF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QAEpC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC3C,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AAhXY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;qCAOqB,8BAAa;QACjB,gBAAS;QACC,sDAAwB;QAC1B,kDAAsB;QACpB,sDAAwB;GAVnD,2BAA2B,CAgXvC"}
|
package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-role.service.d.ts
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Repository } from 'typeorm';
|
|
2
2
|
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
3
|
-
import { DeviceEntity } from '
|
|
3
|
+
import { DeviceEntity } from '../../../modules/devices/entities/devices.entity';
|
|
4
|
+
import { SpacesService } from '../../../modules/spaces/services/spaces.service';
|
|
4
5
|
import { SetCoversRoleDto } from '../dto/covers-role.dto';
|
|
5
6
|
import { SpaceCoversRoleEntity } from '../entities/space-covers-role.entity';
|
|
6
|
-
import { CoversRole } from '../spaces.constants';
|
|
7
|
-
import { SpacesService } from './spaces.service';
|
|
7
|
+
import { CoversRole } from '../spaces-home-control.constants';
|
|
8
8
|
export interface CoversTargetInfo {
|
|
9
9
|
deviceId: string;
|
|
10
10
|
deviceName: string;
|
package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-role.service.js
RENAMED
|
@@ -18,12 +18,13 @@ const common_1 = require("@nestjs/common");
|
|
|
18
18
|
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
19
19
|
const typeorm_2 = require("@nestjs/typeorm");
|
|
20
20
|
const logger_1 = require("../../../common/logger");
|
|
21
|
-
const devices_constants_1 = require("
|
|
22
|
-
const devices_entity_1 = require("
|
|
21
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
22
|
+
const devices_entity_1 = require("../../../modules/devices/entities/devices.entity");
|
|
23
|
+
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
24
|
+
const spaces_constants_1 = require("../../../modules/spaces/spaces.constants");
|
|
25
|
+
const spaces_exceptions_1 = require("../../../modules/spaces/spaces.exceptions");
|
|
23
26
|
const space_covers_role_entity_1 = require("../entities/space-covers-role.entity");
|
|
24
|
-
const
|
|
25
|
-
const spaces_exceptions_1 = require("../spaces.exceptions");
|
|
26
|
-
const spaces_service_1 = require("./spaces.service");
|
|
27
|
+
const spaces_home_control_constants_1 = require("../spaces-home-control.constants");
|
|
27
28
|
let SpaceCoversRoleService = class SpaceCoversRoleService {
|
|
28
29
|
constructor(repository, deviceRepository, spacesService, eventEmitter) {
|
|
29
30
|
this.repository = repository;
|
|
@@ -80,19 +81,21 @@ let SpaceCoversRoleService = class SpaceCoversRoleService {
|
|
|
80
81
|
else {
|
|
81
82
|
hasChanges = true;
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
if (existingRole) {
|
|
85
|
+
existingRole.role = newRole;
|
|
86
|
+
existingRole.priority = newPriority;
|
|
87
|
+
roleEntity = await transactionalManager.save(existingRole);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const newEntity = transactionalManager.create(space_covers_role_entity_1.SpaceCoversRoleEntity, {
|
|
91
|
+
spaceId,
|
|
92
|
+
deviceId: dto.deviceId,
|
|
93
|
+
channelId: dto.channelId,
|
|
94
|
+
role: newRole,
|
|
95
|
+
priority: newPriority,
|
|
96
|
+
});
|
|
97
|
+
roleEntity = await transactionalManager.save(newEntity);
|
|
98
|
+
}
|
|
96
99
|
});
|
|
97
100
|
if (!roleEntity) {
|
|
98
101
|
throw new spaces_exceptions_1.SpacesValidationException(`Failed to save covers role for device=${dto.deviceId} channel=${dto.channelId}`);
|
|
@@ -100,7 +103,7 @@ let SpaceCoversRoleService = class SpaceCoversRoleService {
|
|
|
100
103
|
if (hasChanges) {
|
|
101
104
|
const eventPayload = await this.buildCoversTargetEventPayload(spaceId, dto.deviceId, dto.channelId, dto.role, dto.priority ?? 0);
|
|
102
105
|
if (eventPayload) {
|
|
103
|
-
const eventType = isUpdate ?
|
|
106
|
+
const eventType = isUpdate ? spaces_home_control_constants_1.EventType.COVERS_TARGET_UPDATED : spaces_home_control_constants_1.EventType.COVERS_TARGET_CREATED;
|
|
104
107
|
this.eventEmitter.emit(eventType, eventPayload);
|
|
105
108
|
}
|
|
106
109
|
}
|
|
@@ -146,7 +149,7 @@ let SpaceCoversRoleService = class SpaceCoversRoleService {
|
|
|
146
149
|
const role = await this.findOne(spaceId, deviceId, channelId);
|
|
147
150
|
if (role) {
|
|
148
151
|
await this.repository.remove(role);
|
|
149
|
-
this.eventEmitter.emit(
|
|
152
|
+
this.eventEmitter.emit(spaces_home_control_constants_1.EventType.COVERS_TARGET_DELETED, {
|
|
150
153
|
id: `${deviceId}:${channelId}`,
|
|
151
154
|
space_id: spaceId,
|
|
152
155
|
device_id: deviceId,
|
|
@@ -211,22 +214,22 @@ let SpaceCoversRoleService = class SpaceCoversRoleService {
|
|
|
211
214
|
defaultRoles.push({
|
|
212
215
|
deviceId: coversTargets[0].deviceId,
|
|
213
216
|
channelId: coversTargets[0].channelId,
|
|
214
|
-
role:
|
|
217
|
+
role: spaces_home_control_constants_1.CoversRole.PRIMARY,
|
|
215
218
|
priority: 0,
|
|
216
219
|
});
|
|
217
220
|
for (let i = 1; i < coversTargets.length; i++) {
|
|
218
221
|
const target = coversTargets[i];
|
|
219
|
-
let inferredRole =
|
|
222
|
+
let inferredRole = spaces_home_control_constants_1.CoversRole.PRIMARY;
|
|
220
223
|
if (typeof target.coverType === 'string') {
|
|
221
224
|
const typeStr = target.coverType.toLowerCase();
|
|
222
225
|
if (typeStr.includes('blackout') || typeStr.includes('roller')) {
|
|
223
|
-
inferredRole =
|
|
226
|
+
inferredRole = spaces_home_control_constants_1.CoversRole.BLACKOUT;
|
|
224
227
|
}
|
|
225
228
|
else if (typeStr.includes('sheer') || typeStr.includes('curtain')) {
|
|
226
|
-
inferredRole =
|
|
229
|
+
inferredRole = spaces_home_control_constants_1.CoversRole.SHEER;
|
|
227
230
|
}
|
|
228
231
|
else if (typeStr.includes('outdoor') || typeStr.includes('awning') || typeStr.includes('shutter')) {
|
|
229
|
-
inferredRole =
|
|
232
|
+
inferredRole = spaces_home_control_constants_1.CoversRole.OUTDOOR;
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
235
|
defaultRoles.push({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-covers-role.service.js","sourceRoot":"","sources":["../../../../src/plugins/spaces-home-control/services/space-covers-role.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAqC;AAErC,2CAA4C;AAC5C,yDAAsD;AACtD,6CAAmD;AAEnD,mDAA+D;AAC/D,kFAA+G;AAC/G,qFAAgF;AAChF,oFAAgF;AAChF,+EAA8E;AAC9E,iFAAsF;AAEtF,mFAA6E;AAC7E,oFAAyE;AAyDlE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAGlC,YAEC,UAA8D,EAE9D,gBAA2D,EAC1C,aAA4B,EAC5B,YAA2B;QAJ3B,eAAU,GAAV,UAAU,CAAmC;QAE7C,qBAAgB,GAAhB,gBAAgB,CAA0B;QAC1C,kBAAa,GAAb,aAAa,CAAe;QAC5B,iBAAY,GAAZ,YAAY,CAAe;QAR5B,WAAM,GAAG,IAAA,8BAAqB,EAAC,qCAAkB,EAAE,wBAAwB,CAAC,CAAC;IAS3F,CAAC;IAKJ,KAAK,CAAC,WAAW,CAAC,OAAe;QAChC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,OAAO,EAAE,CAAC,CAAC;QAGnE,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAEhD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACxC,KAAK,EAAE,EAAE,OAAO,EAAE;YAClB,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;SACvC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,KAAK,CAAC,MAAM,8BAA8B,OAAO,EAAE,CAAC,CAAC;QAEhF,OAAO,KAAK,CAAC;IACd,CAAC;IAKD,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,QAAgB,EAAE,SAAiB;QACjE,OAAO,IAAI,CAAC,UAAU,CAAC,O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;YAC1B,IAAI;YACJ,QAAQ;YACR,YAAY,EAAE,WAAW;YACzB,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,OAAO;YACjB,UAAU,EAAE,SAAS;SACrB,CAAC;IACH,CAAC;CACD,CAAA;AA7YY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAKV,WAAA,IAAA,0BAAgB,EAAC,gDAAqB,CAAC,CAAA;IAEvC,WAAA,IAAA,0BAAgB,EAAC,6BAAY,CAAC,CAAA;qCADF,oBAAU;QAEJ,oBAAU;QACb,8BAAa;QACd,6BAAa;GATjC,sBAAsB,CA6YlC"}
|
package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-state.service.d.ts
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChannelEntity, ChannelPropertyEntity, DeviceEntity } from '
|
|
2
|
-
import { IntentTimeseriesService } from '
|
|
3
|
-
import {
|
|
1
|
+
import { ChannelEntity, ChannelPropertyEntity, DeviceEntity } from '../../../modules/devices/entities/devices.entity';
|
|
2
|
+
import { IntentTimeseriesService } from '../../../modules/intents/services/intent-timeseries.service';
|
|
3
|
+
import { SpacesService } from '../../../modules/spaces/services/spaces.service';
|
|
4
|
+
import { CoversMode, CoversRole } from '../spaces-home-control.constants';
|
|
4
5
|
import { IntentSpecLoaderService } from '../spec';
|
|
5
6
|
import { SpaceCoversRoleService } from './space-covers-role.service';
|
|
6
7
|
import { SpaceIntentBaseService } from './space-intent-base.service';
|
|
7
|
-
import { SpacesService } from './spaces.service';
|
|
8
8
|
export interface CoverDevice {
|
|
9
9
|
device: DeviceEntity;
|
|
10
10
|
coverChannel: ChannelEntity;
|
package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-state.service.js
RENAMED
|
@@ -12,13 +12,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.SpaceCoversStateService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const extension_logger_service_1 = require("../../../common/logger/extension-logger.service");
|
|
15
|
-
const devices_constants_1 = require("
|
|
16
|
-
const intent_timeseries_service_1 = require("
|
|
17
|
-
const
|
|
15
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
16
|
+
const intent_timeseries_service_1 = require("../../../modules/intents/services/intent-timeseries.service");
|
|
17
|
+
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
18
|
+
const spaces_constants_1 = require("../../../modules/spaces/spaces.constants");
|
|
19
|
+
const spaces_home_control_constants_1 = require("../spaces-home-control.constants");
|
|
18
20
|
const spec_1 = require("../spec");
|
|
19
21
|
const space_covers_role_service_1 = require("./space-covers-role.service");
|
|
20
22
|
const space_intent_base_service_1 = require("./space-intent-base.service");
|
|
21
|
-
const spaces_service_1 = require("./spaces.service");
|
|
22
23
|
let SpaceCoversStateService = class SpaceCoversStateService extends space_intent_base_service_1.SpaceIntentBaseService {
|
|
23
24
|
constructor(spacesService, coversRoleService, intentTimeseriesService, intentSpecLoaderService) {
|
|
24
25
|
super();
|
|
@@ -62,7 +63,7 @@ let SpaceCoversStateService = class SpaceCoversStateService extends space_intent
|
|
|
62
63
|
const roleGroups = new Map();
|
|
63
64
|
const coversByRole = {};
|
|
64
65
|
for (const cover of covers) {
|
|
65
|
-
const role = cover.role ??
|
|
66
|
+
const role = cover.role ?? spaces_home_control_constants_1.CoversRole.PRIMARY;
|
|
66
67
|
if (!roleGroups.has(role)) {
|
|
67
68
|
roleGroups.set(role, []);
|
|
68
69
|
}
|
|
@@ -100,7 +101,7 @@ let SpaceCoversStateService = class SpaceCoversStateService extends space_intent
|
|
|
100
101
|
const tiltResult = this.getUniformValue(allTilts);
|
|
101
102
|
const lastApplied = await this.intentTimeseriesService.getLastCoversMode(spaceId);
|
|
102
103
|
const lastAppliedMode = lastApplied?.mode
|
|
103
|
-
? Object.values(
|
|
104
|
+
? Object.values(spaces_home_control_constants_1.CoversMode).includes(lastApplied.mode)
|
|
104
105
|
? lastApplied.mode
|
|
105
106
|
: null
|
|
106
107
|
: null;
|
|
@@ -189,7 +190,7 @@ let SpaceCoversStateService = class SpaceCoversStateService extends space_intent
|
|
|
189
190
|
const allModes = this.intentSpecLoaderService.getAllCoversModeOrchestrations();
|
|
190
191
|
let bestMatch = null;
|
|
191
192
|
for (const modeId of allModes.keys()) {
|
|
192
|
-
if (!Object.values(
|
|
193
|
+
if (!Object.values(spaces_home_control_constants_1.CoversMode).includes(modeId)) {
|
|
193
194
|
continue;
|
|
194
195
|
}
|
|
195
196
|
const match = this.matchMode(modeId, roleStates);
|
|
@@ -278,7 +279,7 @@ let SpaceCoversStateService = class SpaceCoversStateService extends space_intent
|
|
|
278
279
|
const roleKey = `${device.id}:${coverChannel.id}`;
|
|
279
280
|
const roleEntity = roleMap.get(roleKey);
|
|
280
281
|
const role = roleEntity?.role ?? null;
|
|
281
|
-
if (role ===
|
|
282
|
+
if (role === spaces_home_control_constants_1.CoversRole.HIDDEN) {
|
|
282
283
|
this.logger.debug(`Skipping HIDDEN cover deviceId=${device.id} channelId=${coverChannel.id}`);
|
|
283
284
|
continue;
|
|
284
285
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-covers-state.service.js","sourceRoot":"","sources":["../../../../src/plugins/spaces-home-control/services/space-covers-state.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,8FAAwF;AACxF,kFAA+G;AAE/G,2GAAsG;AACtG,oFAAgF;AAChF,+EAA8E;AAC9E,oFAA0E;AAC1E,kCAAkD;AAElD,2EAAqE;AACrE,2EAAqE;AA6E9D,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,kDAAsB;IAGlE,YACkB,aAA4B,EAC5B,iBAAyC,EACzC,uBAAgD,EAChD,uBAAgD;QAEjE,KAAK,EAAE,CAAC;QALS,kBAAa,GAAb,aAAa,CAAe;QAC5B,sBAAiB,GAAjB,iBAAiB,CAAwB;QACzC,4BAAuB,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O,CAAC,CAAC;gBACxC,MAAM,IAAI,GAAG,UAAU,EAAE,IAAI,IAAI,IAAI,CAAC;gBAGtC,IAAI,IAAI,KAAK,0CAAU,CAAC,MAAM,EAAE,CAAC;oBAChC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,MAAM,CAAC,EAAE,cAAc,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC9F,SAAS;gBACV,CAAC;gBAED,MAAM,CAAC,IAAI,CAAC;oBACX,MAAM;oBACN,YAAY;oBACZ,gBAAgB;oBAChB,eAAe;oBACf,YAAY;oBACZ,IAAI;iBACJ,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;CACD,CAAA;AAhbY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAKqB,8BAAa;QACT,kDAAsB;QAChB,mDAAuB;QACvB,8BAAuB;GAPtD,uBAAuB,CAgbnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-intent-base.service.js","sourceRoot":"","sources":["../../../../src/plugins/spaces-home-control/services/space-intent-base.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAqBrC,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAKxB,iBAAiB,CAC1B,QAAkD,EAClD,aAAqB,CAAC,EACtB,aAAqB,GAAG;QAExB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;YACvB,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC;QAC7C,CAAC;QAGD,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAE/B,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACjD,MAAM,GAAG,GAAG,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,C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,EAAE,KAAK,CAAC;QAEpC,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACxE,OAAO,IAAI,CAAC;QACb,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IAKS,uBAAuB,CAAC,QAAkD;QACnF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QAEpC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YAEjC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;QACtC,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAKS,UAAU,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;QAC3D,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;CACD,CAAA;AA7FY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;GACA,sBAAsB,CA6FlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-intent.service.js","sourceRoot":"","sources":["../../../../src/plugins/spaces-home-control/services/space-intent.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAM5C,qEAAmG;AACnG,mEAA+F;AAC/F,uEAAkE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
|
3
|
-
import { DeviceEntity } from '
|
|
3
|
+
import { DeviceEntity } from '../../../modules/devices/entities/devices.entity';
|
|
4
|
+
import { SpacesService } from '../../../modules/spaces/services/spaces.service';
|
|
4
5
|
import { SetLightingRoleDto } from '../dto/lighting-role.dto';
|
|
5
6
|
import { SpaceLightingRoleEntity } from '../entities/space-lighting-role.entity';
|
|
6
|
-
import { LightingRole } from '../spaces.constants';
|
|
7
|
-
import { SpacesService } from './spaces.service';
|
|
7
|
+
import { LightingRole } from '../spaces-home-control.constants';
|
|
8
8
|
export interface LightTargetInfo {
|
|
9
9
|
deviceId: string;
|
|
10
10
|
deviceName: string;
|
package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-role.service.js
RENAMED
|
@@ -18,12 +18,13 @@ const common_1 = require("@nestjs/common");
|
|
|
18
18
|
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
19
19
|
const typeorm_2 = require("@nestjs/typeorm");
|
|
20
20
|
const logger_1 = require("../../../common/logger");
|
|
21
|
-
const devices_constants_1 = require("
|
|
22
|
-
const devices_entity_1 = require("
|
|
21
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
22
|
+
const devices_entity_1 = require("../../../modules/devices/entities/devices.entity");
|
|
23
|
+
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
24
|
+
const spaces_constants_1 = require("../../../modules/spaces/spaces.constants");
|
|
25
|
+
const spaces_exceptions_1 = require("../../../modules/spaces/spaces.exceptions");
|
|
23
26
|
const space_lighting_role_entity_1 = require("../entities/space-lighting-role.entity");
|
|
24
|
-
const
|
|
25
|
-
const spaces_exceptions_1 = require("../spaces.exceptions");
|
|
26
|
-
const spaces_service_1 = require("./spaces.service");
|
|
27
|
+
const spaces_home_control_constants_1 = require("../spaces-home-control.constants");
|
|
27
28
|
let SpaceLightingRoleService = class SpaceLightingRoleService {
|
|
28
29
|
constructor(repository, deviceRepository, spacesService, eventEmitter) {
|
|
29
30
|
this.repository = repository;
|
|
@@ -80,19 +81,21 @@ let SpaceLightingRoleService = class SpaceLightingRoleService {
|
|
|
80
81
|
else {
|
|
81
82
|
hasChanges = true;
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
if (existingRole) {
|
|
85
|
+
existingRole.role = newRole;
|
|
86
|
+
existingRole.priority = newPriority;
|
|
87
|
+
roleEntity = await transactionalManager.save(existingRole);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const newEntity = transactionalManager.create(space_lighting_role_entity_1.SpaceLightingRoleEntity, {
|
|
91
|
+
spaceId,
|
|
92
|
+
deviceId: dto.deviceId,
|
|
93
|
+
channelId: dto.channelId,
|
|
94
|
+
role: newRole,
|
|
95
|
+
priority: newPriority,
|
|
96
|
+
});
|
|
97
|
+
roleEntity = await transactionalManager.save(newEntity);
|
|
98
|
+
}
|
|
96
99
|
});
|
|
97
100
|
if (!roleEntity) {
|
|
98
101
|
throw new spaces_exceptions_1.SpacesValidationException(`Failed to save lighting role for device=${dto.deviceId} channel=${dto.channelId}`);
|
|
@@ -100,7 +103,7 @@ let SpaceLightingRoleService = class SpaceLightingRoleService {
|
|
|
100
103
|
if (hasChanges) {
|
|
101
104
|
const eventPayload = await this.buildLightTargetEventPayload(spaceId, dto.deviceId, dto.channelId, dto.role, dto.priority ?? 0);
|
|
102
105
|
if (eventPayload) {
|
|
103
|
-
const eventType = isUpdate ?
|
|
106
|
+
const eventType = isUpdate ? spaces_home_control_constants_1.EventType.LIGHT_TARGET_UPDATED : spaces_home_control_constants_1.EventType.LIGHT_TARGET_CREATED;
|
|
104
107
|
this.eventEmitter.emit(eventType, eventPayload);
|
|
105
108
|
}
|
|
106
109
|
}
|
|
@@ -146,7 +149,7 @@ let SpaceLightingRoleService = class SpaceLightingRoleService {
|
|
|
146
149
|
const role = await this.findOne(spaceId, deviceId, channelId);
|
|
147
150
|
if (role) {
|
|
148
151
|
await this.repository.remove(role);
|
|
149
|
-
this.eventEmitter.emit(
|
|
152
|
+
this.eventEmitter.emit(spaces_home_control_constants_1.EventType.LIGHT_TARGET_DELETED, {
|
|
150
153
|
id: `${deviceId}:${channelId}`,
|
|
151
154
|
space_id: spaceId,
|
|
152
155
|
device_id: deviceId,
|
|
@@ -209,14 +212,14 @@ let SpaceLightingRoleService = class SpaceLightingRoleService {
|
|
|
209
212
|
defaultRoles.push({
|
|
210
213
|
deviceId: lightTargets[0].deviceId,
|
|
211
214
|
channelId: lightTargets[0].channelId,
|
|
212
|
-
role:
|
|
215
|
+
role: spaces_home_control_constants_1.LightingRole.MAIN,
|
|
213
216
|
priority: 0,
|
|
214
217
|
});
|
|
215
218
|
for (let i = 1; i < lightTargets.length; i++) {
|
|
216
219
|
defaultRoles.push({
|
|
217
220
|
deviceId: lightTargets[i].deviceId,
|
|
218
221
|
channelId: lightTargets[i].channelId,
|
|
219
|
-
role:
|
|
222
|
+
role: spaces_home_control_constants_1.LightingRole.AMBIENT,
|
|
220
223
|
priority: i,
|
|
221
224
|
});
|
|
222
225
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-lighting-role.service.js","sourceRoot":"","sources":["../../../../src/plugins/spaces-home-control/services/space-lighting-role.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAqC;AAErC,2CAA4C;AAC5C,yDAAsD;AACtD,6CAAmD;AAEnD,mDAA+D;AAC/D,kFAA+G;AAC/G,qFAAgF;AAChF,oFAAgF;AAChF,+EAA8E;AAC9E,iFAAsF;AAEtF,uFAAiF;AACjF,oFAA2E;AAuDpE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAGpC,YAEC,UAAgE,EAEhE,gBAA2D,EAC1C,aAA4B,EAC5B,YAA2B;QAJ3B,eAAU,GAAV,UAAU,CAAqC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V,WAAA,IAAA,0BAAgB,EAAC,oDAAuB,CAAC,CAAA;IAEzC,WAAA,IAAA,0BAAgB,EAAC,6BAAY,CAAC,CAAA;qCADF,oBAAU;QAEJ,oBAAU;QACb,8BAAa;QACd,6BAAa;GATjC,wBAAwB,CA8XpC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IntentTimeseriesService } from '
|
|
2
|
-
import {
|
|
1
|
+
import { IntentTimeseriesService } from '../../../modules/intents/services/intent-timeseries.service';
|
|
2
|
+
import { SpacesService } from '../../../modules/spaces/services/spaces.service';
|
|
3
|
+
import { LightingMode, LightingRole } from '../spaces-home-control.constants';
|
|
3
4
|
import { IntentSpecLoaderService } from '../spec';
|
|
4
5
|
import { SpaceLightingRoleService } from './space-lighting-role.service';
|
|
5
|
-
import { SpacesService } from './spaces.service';
|
|
6
6
|
export interface RoleLastIntent {
|
|
7
7
|
brightness: number | null;
|
|
8
8
|
}
|
package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-state.service.js
RENAMED
|
@@ -13,12 +13,13 @@ exports.SpaceLightingStateService = void 0;
|
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const extension_logger_service_1 = require("../../../common/logger/extension-logger.service");
|
|
15
15
|
const color_utils_1 = require("../../../common/utils/color.utils");
|
|
16
|
-
const devices_constants_1 = require("
|
|
17
|
-
const intent_timeseries_service_1 = require("
|
|
18
|
-
const
|
|
16
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
17
|
+
const intent_timeseries_service_1 = require("../../../modules/intents/services/intent-timeseries.service");
|
|
18
|
+
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
19
|
+
const spaces_constants_1 = require("../../../modules/spaces/spaces.constants");
|
|
20
|
+
const spaces_home_control_constants_1 = require("../spaces-home-control.constants");
|
|
19
21
|
const spec_1 = require("../spec");
|
|
20
22
|
const space_lighting_role_service_1 = require("./space-lighting-role.service");
|
|
21
|
-
const spaces_service_1 = require("./spaces.service");
|
|
22
23
|
let SpaceLightingStateService = class SpaceLightingStateService {
|
|
23
24
|
constructor(spacesService, lightingRoleService, intentTimeseriesService, intentSpecLoaderService) {
|
|
24
25
|
this.spacesService = spacesService;
|
|
@@ -40,7 +41,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
40
41
|
}
|
|
41
42
|
const lastApplied = await this.intentTimeseriesService.getLastLightingMode(spaceId);
|
|
42
43
|
const lastAppliedMode = lastApplied?.mode
|
|
43
|
-
? Object.values(
|
|
44
|
+
? Object.values(spaces_home_control_constants_1.LightingMode).includes(lastApplied.mode)
|
|
44
45
|
? lastApplied.mode
|
|
45
46
|
: null
|
|
46
47
|
: null;
|
|
@@ -89,7 +90,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
89
90
|
for (const channel of lightChannels) {
|
|
90
91
|
const lightState = this.extractLightState(device, channel, roleMap);
|
|
91
92
|
if (lightState) {
|
|
92
|
-
if (lightState.role ===
|
|
93
|
+
if (lightState.role === spaces_home_control_constants_1.LightingRole.HIDDEN) {
|
|
93
94
|
continue;
|
|
94
95
|
}
|
|
95
96
|
lights.push(lightState);
|
|
@@ -132,7 +133,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
132
133
|
const roleStates = {};
|
|
133
134
|
const roleGroups = new Map();
|
|
134
135
|
for (const light of lights) {
|
|
135
|
-
if (light.role === null || light.role ===
|
|
136
|
+
if (light.role === null || light.role === spaces_home_control_constants_1.LightingRole.HIDDEN) {
|
|
136
137
|
continue;
|
|
137
138
|
}
|
|
138
139
|
if (!roleGroups.has(light.role)) {
|
|
@@ -140,7 +141,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
140
141
|
}
|
|
141
142
|
roleGroups.get(light.role).push(light);
|
|
142
143
|
}
|
|
143
|
-
const nightFallbackActive = lastAppliedMode ===
|
|
144
|
+
const nightFallbackActive = lastAppliedMode === spaces_home_control_constants_1.LightingMode.NIGHT && !roleGroups.has(spaces_home_control_constants_1.LightingRole.NIGHT);
|
|
144
145
|
for (const [role, roleLights] of roleGroups) {
|
|
145
146
|
roleStates[role] = this.aggregateLightGroup(role, roleLights, lastAppliedMode, nightFallbackActive);
|
|
146
147
|
}
|
|
@@ -290,7 +291,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
290
291
|
}
|
|
291
292
|
const rule = config.roles[role];
|
|
292
293
|
if (!rule) {
|
|
293
|
-
if (role ===
|
|
294
|
+
if (role === spaces_home_control_constants_1.LightingRole.OTHER) {
|
|
294
295
|
return {
|
|
295
296
|
brightness: config.mvpBrightness,
|
|
296
297
|
};
|
|
@@ -326,7 +327,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
326
327
|
const allModes = this.intentSpecLoaderService.getAllLightingModeOrchestrations();
|
|
327
328
|
let bestMatch = null;
|
|
328
329
|
for (const modeId of allModes.keys()) {
|
|
329
|
-
if (!Object.values(
|
|
330
|
+
if (!Object.values(spaces_home_control_constants_1.LightingMode).includes(modeId)) {
|
|
330
331
|
continue;
|
|
331
332
|
}
|
|
332
333
|
const match = this.matchMode(modeId, roleStates, otherState);
|
|
@@ -345,7 +346,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
345
346
|
const onLights = lights.filter((l) => l.isOn);
|
|
346
347
|
if (onLights.length === 0) {
|
|
347
348
|
return {
|
|
348
|
-
mode:
|
|
349
|
+
mode: spaces_home_control_constants_1.LightingMode.OFF,
|
|
349
350
|
confidence: 'exact',
|
|
350
351
|
matchPercentage: 100,
|
|
351
352
|
};
|
|
@@ -358,10 +359,10 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
358
359
|
const allModes = this.intentSpecLoaderService.getAllLightingModeOrchestrations();
|
|
359
360
|
const mvpModes = [];
|
|
360
361
|
for (const [modeId, config] of allModes) {
|
|
361
|
-
if (!Object.values(
|
|
362
|
+
if (!Object.values(spaces_home_control_constants_1.LightingMode).includes(modeId)) {
|
|
362
363
|
continue;
|
|
363
364
|
}
|
|
364
|
-
if (modeId ===
|
|
365
|
+
if (modeId === spaces_home_control_constants_1.LightingMode.OFF) {
|
|
365
366
|
continue;
|
|
366
367
|
}
|
|
367
368
|
if (config.mvpBrightness !== undefined && config.mvpBrightness !== null) {
|
|
@@ -410,8 +411,8 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
410
411
|
for (const [roleStr, rule] of Object.entries(rules)) {
|
|
411
412
|
const role = roleStr;
|
|
412
413
|
let roleState = roleStates[role];
|
|
413
|
-
if (role ===
|
|
414
|
-
roleState = this.getCombinedOtherState(roleStates[
|
|
414
|
+
if (role === spaces_home_control_constants_1.LightingRole.OTHER) {
|
|
415
|
+
roleState = this.getCombinedOtherState(roleStates[spaces_home_control_constants_1.LightingRole.OTHER], otherState);
|
|
415
416
|
}
|
|
416
417
|
if (!roleState) {
|
|
417
418
|
continue;
|
|
@@ -450,7 +451,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
450
451
|
}
|
|
451
452
|
if (!hasExplicit && hasUnassigned) {
|
|
452
453
|
return {
|
|
453
|
-
role:
|
|
454
|
+
role: spaces_home_control_constants_1.LightingRole.OTHER,
|
|
454
455
|
isOn: otherState.isOn,
|
|
455
456
|
isOnMixed: otherState.isOnMixed,
|
|
456
457
|
brightness: otherState.brightness,
|
|
@@ -528,7 +529,7 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
528
529
|
white = explicitOther.white ?? otherState.white;
|
|
529
530
|
}
|
|
530
531
|
return {
|
|
531
|
-
role:
|
|
532
|
+
role: spaces_home_control_constants_1.LightingRole.OTHER,
|
|
532
533
|
isOn,
|
|
533
534
|
isOnMixed,
|
|
534
535
|
brightness,
|
|
@@ -548,8 +549,8 @@ let SpaceLightingStateService = class SpaceLightingStateService {
|
|
|
548
549
|
if (!config.fallbackRoles || config.fallbackRoles.length === 0) {
|
|
549
550
|
return false;
|
|
550
551
|
}
|
|
551
|
-
if (mode ===
|
|
552
|
-
const nightState = roleStates[
|
|
552
|
+
if (mode === spaces_home_control_constants_1.LightingMode.NIGHT) {
|
|
553
|
+
const nightState = roleStates[spaces_home_control_constants_1.LightingRole.NIGHT];
|
|
553
554
|
return !nightState || nightState.devicesCount === 0;
|
|
554
555
|
}
|
|
555
556
|
return false;
|