@fastybird/smart-panel-backend 0.11.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 +14 -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 +35 -12
- 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 +64 -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
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.HomeControlSpacesService = void 0;
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const typeorm_2 = require("@nestjs/typeorm");
|
|
19
|
+
const logger_1 = require("../../../common/logger");
|
|
20
|
+
const devices_entity_1 = require("../../../modules/devices/entities/devices.entity");
|
|
21
|
+
const spaces_type_mapper_service_1 = require("../../../modules/spaces/services/spaces-type-mapper.service");
|
|
22
|
+
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
23
|
+
const spaces_constants_1 = require("../../../modules/spaces/spaces.constants");
|
|
24
|
+
let HomeControlSpacesService = class HomeControlSpacesService {
|
|
25
|
+
constructor(deviceRepository, dataSource, spacesService, spacesTypeMapper) {
|
|
26
|
+
this.deviceRepository = deviceRepository;
|
|
27
|
+
this.dataSource = dataSource;
|
|
28
|
+
this.spacesService = spacesService;
|
|
29
|
+
this.spacesTypeMapper = spacesTypeMapper;
|
|
30
|
+
this.logger = (0, logger_1.createExtensionLogger)(spaces_constants_1.SPACES_MODULE_NAME, 'HomeControlSpacesService');
|
|
31
|
+
}
|
|
32
|
+
async proposeSpaces() {
|
|
33
|
+
this.logger.debug('Proposing spaces based on device names');
|
|
34
|
+
const tokenMapping = {
|
|
35
|
+
'living room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.LIVING_ROOM },
|
|
36
|
+
bedroom: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.BEDROOM },
|
|
37
|
+
'master bedroom': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.BEDROOM },
|
|
38
|
+
'guest bedroom': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.GUEST_ROOM },
|
|
39
|
+
'guest room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.GUEST_ROOM },
|
|
40
|
+
'guests room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.GUEST_ROOM },
|
|
41
|
+
'kids bedroom': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.BEDROOM },
|
|
42
|
+
'children bedroom': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.BEDROOM },
|
|
43
|
+
kitchen: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.KITCHEN },
|
|
44
|
+
bathroom: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.BATHROOM },
|
|
45
|
+
'master bathroom': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.BATHROOM },
|
|
46
|
+
'guest bathroom': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.BATHROOM },
|
|
47
|
+
toilet: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.TOILET },
|
|
48
|
+
wc: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.TOILET },
|
|
49
|
+
restroom: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.TOILET },
|
|
50
|
+
lavatory: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.TOILET },
|
|
51
|
+
hallway: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.HALLWAY },
|
|
52
|
+
hall: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.HALLWAY },
|
|
53
|
+
corridor: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.HALLWAY },
|
|
54
|
+
entrance: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.ENTRYWAY },
|
|
55
|
+
entry: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.ENTRYWAY },
|
|
56
|
+
entryway: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.ENTRYWAY },
|
|
57
|
+
foyer: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.ENTRYWAY },
|
|
58
|
+
vestibule: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.ENTRYWAY },
|
|
59
|
+
garage: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.GARAGE },
|
|
60
|
+
office: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.OFFICE },
|
|
61
|
+
'home office': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.OFFICE },
|
|
62
|
+
study: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.OFFICE },
|
|
63
|
+
'dining room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.DINING_ROOM },
|
|
64
|
+
laundry: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.LAUNDRY },
|
|
65
|
+
'laundry room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.LAUNDRY },
|
|
66
|
+
'utility room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.UTILITY_ROOM },
|
|
67
|
+
utility: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.UTILITY_ROOM },
|
|
68
|
+
'boiler room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.UTILITY_ROOM },
|
|
69
|
+
nursery: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.NURSERY },
|
|
70
|
+
playroom: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.MEDIA_ROOM },
|
|
71
|
+
'game room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.MEDIA_ROOM },
|
|
72
|
+
'media room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.MEDIA_ROOM },
|
|
73
|
+
theater: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.MEDIA_ROOM },
|
|
74
|
+
gym: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.GYM },
|
|
75
|
+
workshop: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.WORKSHOP },
|
|
76
|
+
closet: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.CLOSET },
|
|
77
|
+
'walk-in closet': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.CLOSET },
|
|
78
|
+
wardrobe: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.CLOSET },
|
|
79
|
+
pantry: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.PANTRY },
|
|
80
|
+
storage: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.STORAGE },
|
|
81
|
+
'storage room': { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.STORAGE },
|
|
82
|
+
mudroom: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.HALLWAY },
|
|
83
|
+
sunroom: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.LIVING_ROOM },
|
|
84
|
+
sauna: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.OTHER },
|
|
85
|
+
basement: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.FLOOR_BASEMENT },
|
|
86
|
+
attic: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.FLOOR_ATTIC },
|
|
87
|
+
patio: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_TERRACE },
|
|
88
|
+
balcony: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_BALCONY },
|
|
89
|
+
terrace: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_TERRACE },
|
|
90
|
+
garden: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_GARDEN },
|
|
91
|
+
backyard: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_BACKYARD },
|
|
92
|
+
'front yard': { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_FRONT_YARD },
|
|
93
|
+
porch: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_TERRACE },
|
|
94
|
+
pool: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_BACKYARD },
|
|
95
|
+
spa: { type: spaces_constants_1.SpaceType.ROOM, category: spaces_constants_1.SpaceRoomCategory.OTHER },
|
|
96
|
+
driveway: { type: spaces_constants_1.SpaceType.ZONE, category: spaces_constants_1.SpaceZoneCategory.OUTDOOR_DRIVEWAY },
|
|
97
|
+
};
|
|
98
|
+
const tokens = Object.keys(tokenMapping);
|
|
99
|
+
const devices = await this.deviceRepository.find({
|
|
100
|
+
select: ['id', 'name'],
|
|
101
|
+
});
|
|
102
|
+
const spaceMap = new Map();
|
|
103
|
+
for (const device of devices) {
|
|
104
|
+
const deviceNameLower = device.name.toLowerCase();
|
|
105
|
+
let matchedToken = null;
|
|
106
|
+
let matchLength = 0;
|
|
107
|
+
for (const token of tokens) {
|
|
108
|
+
if (deviceNameLower.includes(token) && token.length > matchLength) {
|
|
109
|
+
matchedToken = token;
|
|
110
|
+
matchLength = token.length;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (matchedToken) {
|
|
114
|
+
const existingDevices = spaceMap.get(matchedToken) ?? [];
|
|
115
|
+
existingDevices.push(device.id);
|
|
116
|
+
spaceMap.set(matchedToken, existingDevices);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const proposals = Array.from(spaceMap.entries())
|
|
120
|
+
.map(([token, deviceIds]) => {
|
|
121
|
+
const mapping = tokenMapping[token];
|
|
122
|
+
const name = token
|
|
123
|
+
.split(' ')
|
|
124
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
125
|
+
.join(' ');
|
|
126
|
+
return {
|
|
127
|
+
name,
|
|
128
|
+
type: mapping.type,
|
|
129
|
+
category: mapping.category,
|
|
130
|
+
deviceIds,
|
|
131
|
+
deviceCount: deviceIds.length,
|
|
132
|
+
};
|
|
133
|
+
})
|
|
134
|
+
.sort((a, b) => b.deviceCount - a.deviceCount);
|
|
135
|
+
this.logger.debug(`Proposed ${proposals.length} spaces from device names`);
|
|
136
|
+
return proposals;
|
|
137
|
+
}
|
|
138
|
+
async getChildRooms(zoneId) {
|
|
139
|
+
this.logger.debug(`Fetching child rooms for zone id=${zoneId}`);
|
|
140
|
+
const zone = await this.spacesService.getOneOrThrow(zoneId);
|
|
141
|
+
if (zone.type !== spaces_constants_1.SpaceType.ZONE) {
|
|
142
|
+
this.logger.warn(`Space ${zoneId} is not a zone, returning empty list`);
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
const roomMapping = this.spacesTypeMapper.getMapping(spaces_constants_1.SpaceType.ROOM);
|
|
146
|
+
const children = await this.dataSource.getRepository(roomMapping.class).find({
|
|
147
|
+
where: { parentId: zoneId },
|
|
148
|
+
order: { displayOrder: 'ASC', name: 'ASC' },
|
|
149
|
+
});
|
|
150
|
+
this.logger.debug(`Found ${children.length} child rooms for zone`);
|
|
151
|
+
return children;
|
|
152
|
+
}
|
|
153
|
+
async getParentZone(roomId) {
|
|
154
|
+
this.logger.debug(`Fetching parent zone for room id=${roomId}`);
|
|
155
|
+
const room = await this.spacesService.getOneOrThrow(roomId);
|
|
156
|
+
if (!room.parentId) {
|
|
157
|
+
this.logger.debug(`Room ${roomId} has no parent zone`);
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
const parent = await this.spacesService.findOne(room.parentId);
|
|
161
|
+
return parent;
|
|
162
|
+
}
|
|
163
|
+
async findAllZones() {
|
|
164
|
+
this.logger.debug('Fetching all zones');
|
|
165
|
+
const zoneMapping = this.spacesTypeMapper.getMapping(spaces_constants_1.SpaceType.ZONE);
|
|
166
|
+
const zones = await this.dataSource.getRepository(zoneMapping.class).find({
|
|
167
|
+
order: { displayOrder: 'ASC', name: 'ASC' },
|
|
168
|
+
});
|
|
169
|
+
this.logger.debug(`Found ${zones.length} zones`);
|
|
170
|
+
return zones;
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
exports.HomeControlSpacesService = HomeControlSpacesService;
|
|
174
|
+
exports.HomeControlSpacesService = HomeControlSpacesService = __decorate([
|
|
175
|
+
(0, common_1.Injectable)(),
|
|
176
|
+
__param(0, (0, typeorm_2.InjectRepository)(devices_entity_1.DeviceEntity)),
|
|
177
|
+
__metadata("design:paramtypes", [typeorm_1.Repository,
|
|
178
|
+
typeorm_1.DataSource,
|
|
179
|
+
spaces_service_1.SpacesService,
|
|
180
|
+
spaces_type_mapper_service_1.SpacesTypeMapperService])
|
|
181
|
+
], HomeControlSpacesService);
|
|
182
|
+
//# sourceMappingURL=home-control-spaces.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-control-spaces.service.js","sourceRoot":"","sources":["../../../../src/plugins/spaces-home-control/services/home-control-spaces.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAiD;AAEjD,2CAA4C;AAC5C,6CAAmD;AAEnD,mDAA+D;AAC/D,qFAAgF;AAEhF,4GAAsG;AACtG,oFAAgF;AAChF,+EAKkD;AAY3C,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAGpC,YAEC,gBAA2D,EAC1C,UAAsB,EACtB,aAA4B,EAC5B,gBAAyC;QAHzC,qBAAgB,GAAhB,gBAAgB,CAA0B;QAC1C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AM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAIxC,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,4BAAS,CAAC,IAAI,CAAC,CAAC;QACrE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;YACzE,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;SAC3C,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC;QAEjD,OAAO,KAAK,CAAC;IACd,CAAC;CACD,CAAA;AAjNY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;IAKV,WAAA,IAAA,0BAAgB,EAAC,6BAAY,CAAC,CAAA;qCACI,oBAAU;QAChB,oBAAU;QACP,8BAAa;QACV,oDAAuB;GAR/C,wBAAwB,CAiNpC"}
|
package/dist/{modules/spaces → plugins/spaces-home-control}/services/lighting-intent.service.d.ts
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
2
|
-
import { ChannelEntity, ChannelPropertyEntity, DeviceEntity } from '
|
|
3
|
-
import { PlatformRegistryService } from '
|
|
4
|
-
import { IntentTimeseriesService } from '
|
|
5
|
-
import { IntentsService } from '
|
|
2
|
+
import { ChannelEntity, ChannelPropertyEntity, DeviceEntity } from '../../../modules/devices/entities/devices.entity';
|
|
3
|
+
import { PlatformRegistryService } from '../../../modules/devices/services/platform.registry.service';
|
|
4
|
+
import { IntentTimeseriesService } from '../../../modules/intents/services/intent-timeseries.service';
|
|
5
|
+
import { IntentsService } from '../../../modules/intents/services/intents.service';
|
|
6
|
+
import { SpacesService } from '../../../modules/spaces/services/spaces.service';
|
|
6
7
|
import { LightingIntentDto } from '../dto/lighting-intent.dto';
|
|
7
|
-
import { LightingMode, LightingRole, RoleBrightnessRule } from '../spaces.constants';
|
|
8
|
+
import { LightingMode, LightingRole, RoleBrightnessRule } from '../spaces-home-control.constants';
|
|
8
9
|
import { IntentSpecLoaderService, ResolvedModeOrchestration } from '../spec';
|
|
9
10
|
import { SpaceContextSnapshotService } from './space-context-snapshot.service';
|
|
10
11
|
import { IntentExecutionResult, SpaceIntentBaseService } from './space-intent-base.service';
|
|
11
12
|
import { SpaceLightingRoleService } from './space-lighting-role.service';
|
|
12
13
|
import { SpaceLightingStateService } from './space-lighting-state.service';
|
|
13
14
|
import { SpaceUndoHistoryService } from './space-undo-history.service';
|
|
14
|
-
import { SpacesService } from './spaces.service';
|
|
15
15
|
export interface LightDevice {
|
|
16
16
|
device: DeviceEntity;
|
|
17
17
|
lightChannel: ChannelEntity;
|
package/dist/{modules/spaces → plugins/spaces-home-control}/services/lighting-intent.service.js
RENAMED
|
@@ -14,20 +14,21 @@ exports.selectLightsForMode = selectLightsForMode;
|
|
|
14
14
|
const common_1 = require("@nestjs/common");
|
|
15
15
|
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
16
16
|
const extension_logger_service_1 = require("../../../common/logger/extension-logger.service");
|
|
17
|
-
const devices_constants_1 = require("
|
|
18
|
-
const platform_registry_service_1 = require("
|
|
19
|
-
const intents_constants_1 = require("
|
|
20
|
-
const intent_timeseries_service_1 = require("
|
|
21
|
-
const intents_service_1 = require("
|
|
17
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
18
|
+
const platform_registry_service_1 = require("../../../modules/devices/services/platform.registry.service");
|
|
19
|
+
const intents_constants_1 = require("../../../modules/intents/intents.constants");
|
|
20
|
+
const intent_timeseries_service_1 = require("../../../modules/intents/services/intent-timeseries.service");
|
|
21
|
+
const intents_service_1 = require("../../../modules/intents/services/intents.service");
|
|
22
|
+
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
23
|
+
const spaces_constants_1 = require("../../../modules/spaces/spaces.constants");
|
|
22
24
|
const spaces_response_model_1 = require("../models/spaces-response.model");
|
|
23
|
-
const
|
|
25
|
+
const spaces_home_control_constants_1 = require("../spaces-home-control.constants");
|
|
24
26
|
const spec_1 = require("../spec");
|
|
25
27
|
const space_context_snapshot_service_1 = require("./space-context-snapshot.service");
|
|
26
28
|
const space_intent_base_service_1 = require("./space-intent-base.service");
|
|
27
29
|
const space_lighting_role_service_1 = require("./space-lighting-role.service");
|
|
28
30
|
const space_lighting_state_service_1 = require("./space-lighting-state.service");
|
|
29
31
|
const space_undo_history_service_1 = require("./space-undo-history.service");
|
|
30
|
-
const spaces_service_1 = require("./spaces.service");
|
|
31
32
|
function selectLightsForMode(lights, mode, config) {
|
|
32
33
|
const selections = [];
|
|
33
34
|
const hasAnyRoles = lights.some((light) => light.role !== null);
|
|
@@ -43,8 +44,8 @@ function selectLightsForMode(lights, mode, config) {
|
|
|
43
44
|
return selections;
|
|
44
45
|
}
|
|
45
46
|
let useFallback = false;
|
|
46
|
-
if (mode ===
|
|
47
|
-
const hasNightLights = lights.some((light) => light.role ===
|
|
47
|
+
if (mode === spaces_home_control_constants_1.LightingMode.NIGHT && config.fallbackRoles) {
|
|
48
|
+
const hasNightLights = lights.some((light) => light.role === spaces_home_control_constants_1.LightingRole.NIGHT);
|
|
48
49
|
if (!hasNightLights) {
|
|
49
50
|
useFallback = true;
|
|
50
51
|
}
|
|
@@ -53,7 +54,7 @@ function selectLightsForMode(lights, mode, config) {
|
|
|
53
54
|
let rule;
|
|
54
55
|
let isFallback = false;
|
|
55
56
|
if (light.role === null) {
|
|
56
|
-
const otherRule = config.roles[
|
|
57
|
+
const otherRule = config.roles[spaces_home_control_constants_1.LightingRole.OTHER];
|
|
57
58
|
rule = otherRule ? { on: otherRule.on, brightness: otherRule.brightness } : { on: false, brightness: null };
|
|
58
59
|
}
|
|
59
60
|
else if (useFallback && config.fallbackRoles?.includes(light.role)) {
|
|
@@ -101,8 +102,8 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
101
102
|
const targetedOfflineIds = this.filterOfflineIdsByRole(allLights, offlineIds, intent);
|
|
102
103
|
const hasOnlineTargetedDevices = this.isRoleSpecificIntent(intent.type) && intent.role
|
|
103
104
|
? lights.some((l) => {
|
|
104
|
-
if (intent.role ===
|
|
105
|
-
return l.role ===
|
|
105
|
+
if (intent.role === spaces_home_control_constants_1.LightingRole.OTHER) {
|
|
106
|
+
return l.role === spaces_home_control_constants_1.LightingRole.OTHER || l.role === null;
|
|
106
107
|
}
|
|
107
108
|
return l.role === intent.role;
|
|
108
109
|
})
|
|
@@ -144,7 +145,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
144
145
|
});
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
|
-
if (intent.type ===
|
|
148
|
+
if (intent.type === spaces_home_control_constants_1.LightingIntentType.SET_MODE && intent.mode) {
|
|
148
149
|
result = await this.executeModeIntentWithResults(spaceId, lights, intent.mode, allLights.length, targetResults);
|
|
149
150
|
}
|
|
150
151
|
else if (this.isRoleSpecificIntent(intent.type)) {
|
|
@@ -169,16 +170,16 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
169
170
|
}
|
|
170
171
|
const overallSuccess = failedDevices === 0 || affectedDevices > 0;
|
|
171
172
|
this.logger.debug(`Lighting intent completed spaceId=${spaceId} affected=${affectedDevices} failed=${failedDevices} skipped=${targetedOfflineIds.length}`);
|
|
172
|
-
if (intent.type ===
|
|
173
|
-
void this.intentTimeseriesService.storeLightingModeChange(spaceId,
|
|
173
|
+
if (intent.type === spaces_home_control_constants_1.LightingIntentType.OFF && overallSuccess) {
|
|
174
|
+
void this.intentTimeseriesService.storeLightingModeChange(spaceId, spaces_home_control_constants_1.LightingMode.OFF, allLights.length, affectedDevices, failedDevices);
|
|
174
175
|
}
|
|
175
176
|
result = { success: overallSuccess, affectedDevices, failedDevices };
|
|
176
177
|
}
|
|
177
178
|
if (result.success) {
|
|
178
|
-
if (intent.type ===
|
|
179
|
+
if (intent.type === spaces_home_control_constants_1.LightingIntentType.OFF) {
|
|
179
180
|
void this.intentTimeseriesService.storeModeValidity(spaceId, 'lighting', true);
|
|
180
181
|
}
|
|
181
|
-
else if (intent.type !==
|
|
182
|
+
else if (intent.type !== spaces_home_control_constants_1.LightingIntentType.SET_MODE) {
|
|
182
183
|
void this.intentTimeseriesService.storeModeValidity(spaceId, 'lighting', false);
|
|
183
184
|
}
|
|
184
185
|
}
|
|
@@ -196,8 +197,8 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
196
197
|
buildLightingTargets(lights, intent) {
|
|
197
198
|
if (this.isRoleSpecificIntent(intent.type) && intent.role) {
|
|
198
199
|
const roleLights = lights.filter((light) => {
|
|
199
|
-
if (intent.role ===
|
|
200
|
-
return light.role ===
|
|
200
|
+
if (intent.role === spaces_home_control_constants_1.LightingRole.OTHER) {
|
|
201
|
+
return light.role === spaces_home_control_constants_1.LightingRole.OTHER || light.role === null;
|
|
201
202
|
}
|
|
202
203
|
return light.role === intent.role;
|
|
203
204
|
});
|
|
@@ -220,8 +221,8 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
220
221
|
if (l.device.id !== deviceId) {
|
|
221
222
|
return false;
|
|
222
223
|
}
|
|
223
|
-
if (intent.role ===
|
|
224
|
-
return l.role ===
|
|
224
|
+
if (intent.role === spaces_home_control_constants_1.LightingRole.OTHER) {
|
|
225
|
+
return l.role === spaces_home_control_constants_1.LightingRole.OTHER || l.role === null;
|
|
225
226
|
}
|
|
226
227
|
return l.role === intent.role;
|
|
227
228
|
});
|
|
@@ -229,27 +230,27 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
229
230
|
}
|
|
230
231
|
mapLightingIntentType(type) {
|
|
231
232
|
switch (type) {
|
|
232
|
-
case
|
|
233
|
+
case spaces_home_control_constants_1.LightingIntentType.ON:
|
|
233
234
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ON;
|
|
234
|
-
case
|
|
235
|
+
case spaces_home_control_constants_1.LightingIntentType.OFF:
|
|
235
236
|
return intents_constants_1.IntentType.SPACE_LIGHTING_OFF;
|
|
236
|
-
case
|
|
237
|
+
case spaces_home_control_constants_1.LightingIntentType.SET_MODE:
|
|
237
238
|
return intents_constants_1.IntentType.SPACE_LIGHTING_SET_MODE;
|
|
238
|
-
case
|
|
239
|
+
case spaces_home_control_constants_1.LightingIntentType.BRIGHTNESS_DELTA:
|
|
239
240
|
return intents_constants_1.IntentType.SPACE_LIGHTING_BRIGHTNESS_DELTA;
|
|
240
|
-
case
|
|
241
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_ON:
|
|
241
242
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ROLE_ON;
|
|
242
|
-
case
|
|
243
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_OFF:
|
|
243
244
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ROLE_OFF;
|
|
244
|
-
case
|
|
245
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_BRIGHTNESS:
|
|
245
246
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ROLE_BRIGHTNESS;
|
|
246
|
-
case
|
|
247
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_COLOR:
|
|
247
248
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ROLE_COLOR;
|
|
248
|
-
case
|
|
249
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_COLOR_TEMP:
|
|
249
250
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ROLE_COLOR_TEMP;
|
|
250
|
-
case
|
|
251
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_WHITE:
|
|
251
252
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ROLE_WHITE;
|
|
252
|
-
case
|
|
253
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_SET:
|
|
253
254
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ROLE_SET;
|
|
254
255
|
default:
|
|
255
256
|
return intents_constants_1.IntentType.SPACE_LIGHTING_ON;
|
|
@@ -284,7 +285,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
284
285
|
});
|
|
285
286
|
if (state) {
|
|
286
287
|
const stateModel = spaces_response_model_1.LightingStateDataModel.fromState(state);
|
|
287
|
-
this.eventEmitter.emit(
|
|
288
|
+
this.eventEmitter.emit(spaces_home_control_constants_1.EventType.LIGHTING_STATE_CHANGED, {
|
|
288
289
|
space_id: spaceId,
|
|
289
290
|
state: stateModel,
|
|
290
291
|
});
|
|
@@ -425,7 +426,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
425
426
|
const roleKey = `${device.id}:${lightChannel.id}`;
|
|
426
427
|
const roleEntity = roleMap.get(roleKey);
|
|
427
428
|
const role = roleEntity?.role ?? null;
|
|
428
|
-
if (role ===
|
|
429
|
+
if (role === spaces_home_control_constants_1.LightingRole.HIDDEN) {
|
|
429
430
|
this.logger.debug(`Skipping HIDDEN light deviceId=${device.id} channelId=${lightChannel.id}`);
|
|
430
431
|
continue;
|
|
431
432
|
}
|
|
@@ -455,7 +456,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
455
456
|
}
|
|
456
457
|
const commands = [];
|
|
457
458
|
switch (intent.type) {
|
|
458
|
-
case
|
|
459
|
+
case spaces_home_control_constants_1.LightingIntentType.OFF:
|
|
459
460
|
commands.push({
|
|
460
461
|
device: light.device,
|
|
461
462
|
channel: light.lightChannel,
|
|
@@ -463,7 +464,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
463
464
|
value: false,
|
|
464
465
|
});
|
|
465
466
|
break;
|
|
466
|
-
case
|
|
467
|
+
case spaces_home_control_constants_1.LightingIntentType.ON:
|
|
467
468
|
commands.push({
|
|
468
469
|
device: light.device,
|
|
469
470
|
channel: light.lightChannel,
|
|
@@ -471,14 +472,14 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
471
472
|
value: true,
|
|
472
473
|
});
|
|
473
474
|
break;
|
|
474
|
-
case
|
|
475
|
+
case spaces_home_control_constants_1.LightingIntentType.BRIGHTNESS_DELTA:
|
|
475
476
|
if (intent.delta === undefined || intent.increase === undefined) {
|
|
476
477
|
this.logger.warn('BRIGHTNESS_DELTA intent requires delta and increase parameters');
|
|
477
478
|
return false;
|
|
478
479
|
}
|
|
479
480
|
commands.push(...this.buildBrightnessDeltaCommands(light, intent.delta, intent.increase));
|
|
480
481
|
break;
|
|
481
|
-
case
|
|
482
|
+
case spaces_home_control_constants_1.LightingIntentType.SET_MODE:
|
|
482
483
|
this.logger.warn('SET_MODE should be handled via executeModeIntent');
|
|
483
484
|
return false;
|
|
484
485
|
default:
|
|
@@ -543,27 +544,27 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
543
544
|
}
|
|
544
545
|
buildIntentDescription(intent) {
|
|
545
546
|
switch (intent.type) {
|
|
546
|
-
case
|
|
547
|
+
case spaces_home_control_constants_1.LightingIntentType.OFF:
|
|
547
548
|
return 'Turn lights off';
|
|
548
|
-
case
|
|
549
|
+
case spaces_home_control_constants_1.LightingIntentType.ON:
|
|
549
550
|
return 'Turn lights on';
|
|
550
|
-
case
|
|
551
|
+
case spaces_home_control_constants_1.LightingIntentType.SET_MODE:
|
|
551
552
|
return `Set lighting mode to ${intent.mode ?? 'unknown'}`;
|
|
552
|
-
case
|
|
553
|
+
case spaces_home_control_constants_1.LightingIntentType.BRIGHTNESS_DELTA:
|
|
553
554
|
return intent.increase ? 'Increase brightness' : 'Decrease brightness';
|
|
554
|
-
case
|
|
555
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_ON:
|
|
555
556
|
return `Turn ${intent.role ?? 'role'} lights on`;
|
|
556
|
-
case
|
|
557
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_OFF:
|
|
557
558
|
return `Turn ${intent.role ?? 'role'} lights off`;
|
|
558
|
-
case
|
|
559
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_BRIGHTNESS:
|
|
559
560
|
return `Set ${intent.role ?? 'role'} brightness to ${intent.brightness ?? 0}%`;
|
|
560
|
-
case
|
|
561
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_COLOR:
|
|
561
562
|
return `Set ${intent.role ?? 'role'} color to ${intent.color ?? 'unknown'}`;
|
|
562
|
-
case
|
|
563
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_COLOR_TEMP:
|
|
563
564
|
return `Set ${intent.role ?? 'role'} color temperature to ${intent.colorTemperature ?? 0}K`;
|
|
564
|
-
case
|
|
565
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_WHITE:
|
|
565
566
|
return `Set ${intent.role ?? 'role'} white to ${intent.white ?? 0}%`;
|
|
566
|
-
case
|
|
567
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_SET:
|
|
567
568
|
return this.buildRoleSetDescription(intent);
|
|
568
569
|
default:
|
|
569
570
|
return 'Lighting intent';
|
|
@@ -594,13 +595,13 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
594
595
|
}
|
|
595
596
|
isRoleSpecificIntent(type) {
|
|
596
597
|
return [
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
598
|
+
spaces_home_control_constants_1.LightingIntentType.ROLE_ON,
|
|
599
|
+
spaces_home_control_constants_1.LightingIntentType.ROLE_OFF,
|
|
600
|
+
spaces_home_control_constants_1.LightingIntentType.ROLE_BRIGHTNESS,
|
|
601
|
+
spaces_home_control_constants_1.LightingIntentType.ROLE_COLOR,
|
|
602
|
+
spaces_home_control_constants_1.LightingIntentType.ROLE_COLOR_TEMP,
|
|
603
|
+
spaces_home_control_constants_1.LightingIntentType.ROLE_WHITE,
|
|
604
|
+
spaces_home_control_constants_1.LightingIntentType.ROLE_SET,
|
|
604
605
|
].includes(type);
|
|
605
606
|
}
|
|
606
607
|
async executeRoleIntent(spaceId, allLights, intent) {
|
|
@@ -609,8 +610,8 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
609
610
|
return { success: false, affectedDevices: 0, failedDevices: 0 };
|
|
610
611
|
}
|
|
611
612
|
const roleLights = allLights.filter((light) => {
|
|
612
|
-
if (intent.role ===
|
|
613
|
-
return light.role ===
|
|
613
|
+
if (intent.role === spaces_home_control_constants_1.LightingRole.OTHER) {
|
|
614
|
+
return light.role === spaces_home_control_constants_1.LightingRole.OTHER || light.role === null;
|
|
614
615
|
}
|
|
615
616
|
return light.role === intent.role;
|
|
616
617
|
});
|
|
@@ -640,8 +641,8 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
640
641
|
return { success: false, affectedDevices: 0, failedDevices: 0 };
|
|
641
642
|
}
|
|
642
643
|
const roleLights = allLights.filter((light) => {
|
|
643
|
-
if (intent.role ===
|
|
644
|
-
return light.role ===
|
|
644
|
+
if (intent.role === spaces_home_control_constants_1.LightingRole.OTHER) {
|
|
645
|
+
return light.role === spaces_home_control_constants_1.LightingRole.OTHER || light.role === null;
|
|
645
646
|
}
|
|
646
647
|
return light.role === intent.role;
|
|
647
648
|
});
|
|
@@ -678,7 +679,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
678
679
|
}
|
|
679
680
|
const commands = [];
|
|
680
681
|
switch (intent.type) {
|
|
681
|
-
case
|
|
682
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_ON:
|
|
682
683
|
commands.push({
|
|
683
684
|
device: light.device,
|
|
684
685
|
channel: light.lightChannel,
|
|
@@ -686,7 +687,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
686
687
|
value: true,
|
|
687
688
|
});
|
|
688
689
|
break;
|
|
689
|
-
case
|
|
690
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_OFF:
|
|
690
691
|
commands.push({
|
|
691
692
|
device: light.device,
|
|
692
693
|
channel: light.lightChannel,
|
|
@@ -694,7 +695,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
694
695
|
value: false,
|
|
695
696
|
});
|
|
696
697
|
break;
|
|
697
|
-
case
|
|
698
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_BRIGHTNESS:
|
|
698
699
|
if (intent.brightness === undefined) {
|
|
699
700
|
this.logger.warn('ROLE_BRIGHTNESS intent missing brightness parameter');
|
|
700
701
|
return false;
|
|
@@ -710,7 +711,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
710
711
|
value: intent.brightness,
|
|
711
712
|
});
|
|
712
713
|
break;
|
|
713
|
-
case
|
|
714
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_COLOR: {
|
|
714
715
|
if (!intent.color) {
|
|
715
716
|
this.logger.warn('ROLE_COLOR intent missing color parameter');
|
|
716
717
|
return false;
|
|
@@ -767,7 +768,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
767
768
|
}
|
|
768
769
|
break;
|
|
769
770
|
}
|
|
770
|
-
case
|
|
771
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_COLOR_TEMP:
|
|
771
772
|
if (intent.colorTemperature === undefined) {
|
|
772
773
|
this.logger.warn('ROLE_COLOR_TEMP intent missing colorTemperature parameter');
|
|
773
774
|
return false;
|
|
@@ -783,7 +784,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
783
784
|
value: intent.colorTemperature,
|
|
784
785
|
});
|
|
785
786
|
break;
|
|
786
|
-
case
|
|
787
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_WHITE:
|
|
787
788
|
if (intent.white === undefined) {
|
|
788
789
|
this.logger.warn('ROLE_WHITE intent missing white parameter');
|
|
789
790
|
return false;
|
|
@@ -799,7 +800,7 @@ let LightingIntentService = class LightingIntentService extends space_intent_bas
|
|
|
799
800
|
value: intent.white,
|
|
800
801
|
});
|
|
801
802
|
break;
|
|
802
|
-
case
|
|
803
|
+
case spaces_home_control_constants_1.LightingIntentType.ROLE_SET:
|
|
803
804
|
if (intent.on !== undefined) {
|
|
804
805
|
commands.push({
|
|
805
806
|
device: light.device,
|