@fastybird/smart-panel-backend 0.12.0-alpha.0 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.constants.js.map +1 -1
- package/dist/app.module.js +44 -17
- package/dist/app.module.js.map +1 -1
- package/dist/common/filters/bad-request-exception.filter.js +0 -6
- package/dist/common/filters/bad-request-exception.filter.js.map +1 -1
- package/dist/common/filters/global-error.filter.js +2 -6
- package/dist/common/filters/global-error.filter.js.map +1 -1
- package/dist/common/filters/internal-server-error-exception.filter.js +0 -5
- package/dist/common/filters/internal-server-error-exception.filter.js.map +1 -1
- package/dist/common/filters/not-found-exception.filter.d.ts +4 -0
- package/dist/common/filters/not-found-exception.filter.js +22 -3
- package/dist/common/filters/not-found-exception.filter.js.map +1 -1
- package/dist/common/filters/query-failed-exception.filter.js +0 -5
- package/dist/common/filters/query-failed-exception.filter.js.map +1 -1
- package/dist/common/filters/unprocessable-entity-exception.filter.js +0 -5
- package/dist/common/filters/unprocessable-entity-exception.filter.js.map +1 -1
- package/dist/common/plugin-relations/relation-loader.interface.d.ts +5 -0
- package/dist/common/plugin-relations/relation-loader.interface.js +3 -0
- package/dist/common/plugin-relations/relation-loader.interface.js.map +1 -0
- package/dist/common/services/app-instance-holder.service.d.ts +1 -2
- package/dist/common/services/app-instance-holder.service.js.map +1 -1
- package/dist/common/utils/config.utils.d.ts +0 -1
- package/dist/common/utils/config.utils.js +1 -11
- package/dist/common/utils/config.utils.js.map +1 -1
- package/dist/main.js +25 -6
- package/dist/main.js.map +1 -1
- package/dist/migrations/1000000000000-InitialSetup.js +8 -0
- package/dist/migrations/1000000000000-InitialSetup.js.map +1 -1
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.d.ts +6 -0
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js +15 -0
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js.map +1 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.d.ts +6 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.js +88 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.js.map +1 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.d.ts +6 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.js +165 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.js.map +1 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.d.ts +6 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.js +66 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.js.map +1 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.d.ts +6 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.js +32 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.js.map +1 -0
- package/dist/modules/api/interceptors/open-api-response.interceptor.js +1 -1
- package/dist/modules/api/interceptors/open-api-response.interceptor.js.map +1 -1
- package/dist/modules/auth/auth.module.js +44 -28
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.js +6 -0
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
- package/dist/modules/auth/controllers/tokens.controller.d.ts +10 -3
- package/dist/modules/auth/controllers/tokens.controller.js +96 -7
- package/dist/modules/auth/controllers/tokens.controller.js.map +1 -1
- package/dist/modules/auth/dto/create-personal-token.dto.d.ts +8 -0
- package/dist/modules/auth/dto/create-personal-token.dto.js +75 -0
- package/dist/modules/auth/dto/create-personal-token.dto.js.map +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts +1 -1
- package/dist/modules/auth/dto/register.dto.js +13 -11
- package/dist/modules/auth/dto/register.dto.js.map +1 -1
- package/dist/modules/auth/entities/auth.entity.d.ts +1 -0
- package/dist/modules/auth/entities/auth.entity.js +13 -0
- package/dist/modules/auth/entities/auth.entity.js.map +1 -1
- package/dist/modules/auth/guards/auth.guard.d.ts +0 -1
- package/dist/modules/auth/guards/auth.guard.js +8 -26
- package/dist/modules/auth/guards/auth.guard.js.map +1 -1
- package/dist/modules/auth/guards/display-aware-throttler.guard.d.ts +16 -0
- package/dist/modules/auth/guards/display-aware-throttler.guard.js +133 -0
- package/dist/modules/auth/guards/display-aware-throttler.guard.js.map +1 -0
- package/dist/modules/auth/services/auth.service.js +1 -1
- package/dist/modules/auth/services/auth.service.js.map +1 -1
- package/dist/modules/auth/services/tokens.service.d.ts +10 -0
- package/dist/modules/auth/services/tokens.service.js +35 -0
- package/dist/modules/auth/services/tokens.service.js.map +1 -1
- package/dist/modules/auth/utils/token.utils.d.ts +7 -0
- package/dist/modules/auth/utils/token.utils.js +12 -1
- package/dist/modules/auth/utils/token.utils.js.map +1 -1
- package/dist/modules/buddy/buddy.module.d.ts +5 -1
- package/dist/modules/buddy/buddy.module.js +42 -15
- package/dist/modules/buddy/buddy.module.js.map +1 -1
- package/dist/modules/buddy/buddy.utils.d.ts +8 -0
- package/dist/modules/buddy/buddy.utils.js +49 -0
- package/dist/modules/buddy/buddy.utils.js.map +1 -1
- package/dist/modules/buddy/controllers/buddy-suggestions.controller.js +2 -2
- package/dist/modules/buddy/controllers/buddy-suggestions.controller.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-conversation.entity.js +3 -3
- package/dist/modules/buddy/entities/buddy-conversation.entity.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-message.entity.js +2 -2
- package/dist/modules/buddy/entities/buddy-message.entity.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-suggestion.entity.d.ts +19 -0
- package/dist/modules/buddy/entities/buddy-suggestion.entity.js +93 -0
- package/dist/modules/buddy/entities/buddy-suggestion.entity.js.map +1 -0
- package/dist/modules/buddy/listeners/media-activity-event.listener.js +3 -3
- package/dist/modules/buddy/listeners/media-activity-event.listener.js.map +1 -1
- package/dist/modules/buddy/platforms/llm-provider.platform.d.ts +6 -0
- package/dist/modules/buddy/platforms/openai-sdk.utils.d.ts +2 -1
- package/dist/modules/buddy/platforms/openai-sdk.utils.js +12 -1
- package/dist/modules/buddy/platforms/openai-sdk.utils.js.map +1 -1
- package/dist/modules/buddy/services/buddy-context.service.js +2 -2
- package/dist/modules/buddy/services/buddy-context.service.js.map +1 -1
- package/dist/modules/buddy/services/buddy-conversation.service.js +23 -8
- package/dist/modules/buddy/services/buddy-conversation.service.js.map +1 -1
- package/dist/modules/buddy/services/buddy-personality.service.d.ts +1 -1
- package/dist/modules/buddy/services/buddy-personality.service.js.map +1 -1
- package/dist/modules/buddy/services/heartbeat.service.js +2 -2
- package/dist/modules/buddy/services/heartbeat.service.js.map +1 -1
- package/dist/modules/buddy/services/llm-provider.service.js +2 -10
- package/dist/modules/buddy/services/llm-provider.service.js.map +1 -1
- package/dist/modules/buddy/services/module-reset.service.d.ts +3 -1
- package/dist/modules/buddy/services/module-reset.service.js +6 -1
- package/dist/modules/buddy/services/module-reset.service.js.map +1 -1
- package/dist/modules/buddy/services/pattern-detector.service.d.ts +4 -1
- package/dist/modules/buddy/services/pattern-detector.service.js +10 -3
- package/dist/modules/buddy/services/pattern-detector.service.js.map +1 -1
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.d.ts +4 -1
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.js +10 -4
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.js.map +1 -1
- package/dist/modules/buddy/services/stt-provider.service.js +2 -10
- package/dist/modules/buddy/services/stt-provider.service.js.map +1 -1
- package/dist/modules/buddy/services/suggestion-engine.service.d.ts +19 -13
- package/dist/modules/buddy/services/suggestion-engine.service.js +170 -103
- package/dist/modules/buddy/services/suggestion-engine.service.js.map +1 -1
- package/dist/modules/buddy/services/tts-provider.service.js +2 -10
- package/dist/modules/buddy/services/tts-provider.service.js.map +1 -1
- package/dist/modules/config/config.constants.d.ts +2 -1
- package/dist/modules/config/config.constants.js +1 -0
- package/dist/modules/config/config.constants.js.map +1 -1
- package/dist/modules/config/config.module.d.ts +5 -1
- package/dist/modules/config/config.module.js +78 -14
- package/dist/modules/config/config.module.js.map +1 -1
- package/dist/modules/config/services/config.service.d.ts +1 -0
- package/dist/modules/config/services/config.service.js +11 -1
- package/dist/modules/config/services/config.service.js.map +1 -1
- package/dist/modules/dashboard/dashboard.module.js +21 -18
- package/dist/modules/dashboard/dashboard.module.js.map +1 -1
- package/dist/modules/dashboard/entities/dashboard.relations.d.ts +1 -5
- package/dist/modules/devices/devices.module.js +24 -16
- package/dist/modules/devices/devices.module.js.map +1 -1
- package/dist/modules/devices/services/device-zones.service.js +2 -2
- package/dist/modules/devices/services/device-zones.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/displays/displays.constants.d.ts +0 -5
- package/dist/modules/displays/displays.constants.js +1 -7
- package/dist/modules/displays/displays.constants.js.map +1 -1
- package/dist/modules/displays/displays.module.js +27 -23
- package/dist/modules/displays/displays.module.js.map +1 -1
- package/dist/modules/displays/dto/update-display.dto.d.ts +2 -3
- package/dist/modules/displays/dto/update-display.dto.js +4 -19
- package/dist/modules/displays/dto/update-display.dto.js.map +1 -1
- package/dist/modules/displays/entities/displays.entity.d.ts +3 -4
- package/dist/modules/displays/entities/displays.entity.js +8 -25
- package/dist/modules/displays/entities/displays.entity.js.map +1 -1
- package/dist/modules/displays/services/displays.service.d.ts +4 -2
- package/dist/modules/displays/services/displays.service.js +19 -24
- package/dist/modules/displays/services/displays.service.js.map +1 -1
- package/dist/modules/displays/services/home-resolution.service.d.ts +7 -2
- package/dist/modules/displays/services/home-resolution.service.js +50 -6
- package/dist/modules/displays/services/home-resolution.service.js.map +1 -1
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.d.ts +9 -0
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.js +26 -0
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.js.map +1 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.d.ts +9 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.js +26 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.js.map +1 -0
- package/dist/modules/energy/energy.module.js +29 -15
- package/dist/modules/energy/energy.module.js.map +1 -1
- package/dist/modules/extensions/controllers/actions.controller.d.ts +9 -4
- package/dist/modules/extensions/controllers/actions.controller.js +63 -10
- package/dist/modules/extensions/controllers/actions.controller.js.map +1 -1
- package/dist/modules/extensions/extensions.module.js +31 -28
- package/dist/modules/extensions/extensions.module.js.map +1 -1
- package/dist/modules/extensions/extensions.openapi.d.ts +3 -3
- package/dist/modules/extensions/extensions.openapi.js +2 -0
- package/dist/modules/extensions/extensions.openapi.js.map +1 -1
- package/dist/modules/extensions/models/action.model.d.ts +13 -0
- package/dist/modules/extensions/models/action.model.js +89 -3
- package/dist/modules/extensions/models/action.model.js.map +1 -1
- package/dist/modules/extensions/models/actions-response.model.d.ts +4 -1
- package/dist/modules/extensions/models/actions-response.model.js +19 -1
- package/dist/modules/extensions/models/actions-response.model.js.map +1 -1
- package/dist/modules/extensions/models/extension.model.js +5 -0
- package/dist/modules/extensions/models/extension.model.js.map +1 -1
- package/dist/modules/extensions/models/service-status.model.js +7 -0
- package/dist/modules/extensions/models/service-status.model.js.map +1 -1
- package/dist/modules/extensions/services/action-audit.service.d.ts +21 -0
- package/dist/modules/extensions/services/action-audit.service.js +49 -0
- package/dist/modules/extensions/services/action-audit.service.js.map +1 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.d.ts +11 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.js +28 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.js.map +1 -0
- package/dist/modules/extensions/services/extension-action-registry.service.d.ts +6 -1
- package/dist/modules/extensions/services/extension-action-registry.service.js +22 -3
- package/dist/modules/extensions/services/extension-action-registry.service.js.map +1 -1
- package/dist/modules/extensions/services/extension-action.interface.d.ts +3 -0
- package/dist/modules/extensions/services/extension-action.interface.js +3 -1
- package/dist/modules/extensions/services/extension-action.interface.js.map +1 -1
- package/dist/modules/intents/intents.module.js +27 -26
- package/dist/modules/intents/intents.module.js.map +1 -1
- package/dist/modules/mdns/mdns.module.js +24 -19
- package/dist/modules/mdns/mdns.module.js.map +1 -1
- package/dist/modules/platform/dto/system-info.dto.d.ts +2 -0
- package/dist/modules/platform/dto/system-info.dto.js +7 -0
- package/dist/modules/platform/dto/system-info.dto.js.map +1 -1
- package/dist/modules/platform/platform.module.js +25 -17
- package/dist/modules/platform/platform.module.js.map +1 -1
- package/dist/modules/platform/platforms/abstract.platform.d.ts +44 -0
- package/dist/modules/platform/platforms/abstract.platform.js +267 -0
- package/dist/modules/platform/platforms/abstract.platform.js.map +1 -1
- package/dist/modules/platform/platforms/docker.platform.d.ts +2 -0
- package/dist/modules/platform/platforms/docker.platform.js +3 -0
- package/dist/modules/platform/platforms/docker.platform.js.map +1 -1
- package/dist/modules/platform/platforms/generic.platform.d.ts +2 -1
- package/dist/modules/platform/platforms/generic.platform.js +17 -15
- package/dist/modules/platform/platforms/generic.platform.js.map +1 -1
- package/dist/modules/platform/platforms/home-assistant.platform.d.ts +4 -0
- package/dist/modules/platform/platforms/home-assistant.platform.js +21 -0
- package/dist/modules/platform/platforms/home-assistant.platform.js.map +1 -1
- package/dist/modules/platform/platforms/raspberry.platform.js +22 -40
- package/dist/modules/platform/platforms/raspberry.platform.js.map +1 -1
- package/dist/modules/platform/services/platform.service.d.ts +2 -0
- package/dist/modules/platform/services/platform.service.js +7 -0
- package/dist/modules/platform/services/platform.service.js.map +1 -1
- package/dist/modules/scenes/scenes.module.js +18 -18
- package/dist/modules/scenes/scenes.module.js.map +1 -1
- package/dist/modules/security/security.module.js +22 -17
- package/dist/modules/security/security.module.js.map +1 -1
- package/dist/modules/spaces/controllers/spaces.controller.d.ts +5 -115
- package/dist/modules/spaces/controllers/spaces.controller.js +22 -1922
- package/dist/modules/spaces/controllers/spaces.controller.js.map +1 -1
- package/dist/modules/spaces/dto/create-space.dto.d.ts +1 -5
- package/dist/modules/spaces/dto/create-space.dto.js +0 -61
- package/dist/modules/spaces/dto/create-space.dto.js.map +1 -1
- package/dist/modules/spaces/dto/update-space.dto.d.ts +1 -5
- package/dist/modules/spaces/dto/update-space.dto.js +0 -61
- package/dist/modules/spaces/dto/update-space.dto.js.map +1 -1
- package/dist/modules/spaces/entities/space-role.entity.d.ts +8 -0
- package/dist/modules/spaces/entities/space-role.entity.js +58 -0
- package/dist/modules/spaces/entities/space-role.entity.js.map +1 -0
- package/dist/modules/spaces/entities/space.entity.d.ts +3 -6
- package/dist/modules/spaces/entities/space.entity.js +11 -74
- package/dist/modules/spaces/entities/space.entity.js.map +1 -1
- package/dist/modules/spaces/entities/space.relations.d.ts +11 -0
- package/dist/modules/spaces/entities/space.relations.js +3 -0
- package/dist/modules/spaces/entities/space.relations.js.map +1 -0
- package/dist/modules/spaces/models/spaces-response.model.d.ts +1 -522
- package/dist/modules/spaces/models/spaces-response.model.js +23 -4150
- package/dist/modules/spaces/models/spaces-response.model.js.map +1 -1
- package/dist/modules/spaces/services/space-create-builder-registry.service.d.ts +6 -0
- package/dist/modules/spaces/services/space-create-builder-registry.service.js +26 -0
- package/dist/modules/spaces/services/space-create-builder-registry.service.js.map +1 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.d.ts +6 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.js +26 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.js.map +1 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.d.ts +12 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.js +39 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.d.ts +17 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.js +36 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces.service.d.ts +4 -12
- package/dist/modules/spaces/services/spaces.service.js +120 -160
- package/dist/modules/spaces/services/spaces.service.js.map +1 -1
- package/dist/modules/spaces/spaces.constants.d.ts +13 -292
- package/dist/modules/spaces/spaces.constants.js +13 -1449
- package/dist/modules/spaces/spaces.constants.js.map +1 -1
- package/dist/modules/spaces/spaces.module.d.ts +2 -9
- package/dist/modules/spaces/spaces.module.js +51 -108
- package/dist/modules/spaces/spaces.module.js.map +1 -1
- package/dist/modules/spaces/spaces.openapi.d.ts +3 -16
- package/dist/modules/spaces/spaces.openapi.js +0 -136
- package/dist/modules/spaces/spaces.openapi.js.map +1 -1
- package/dist/modules/stats/controllers/prometheus.controller.js +0 -2
- package/dist/modules/stats/controllers/prometheus.controller.js.map +1 -1
- package/dist/modules/storage/models/config.model.js +2 -4
- package/dist/modules/storage/models/config.model.js.map +1 -1
- package/dist/modules/storage/services/storage.service.d.ts +4 -10
- package/dist/modules/storage/services/storage.service.js +21 -60
- package/dist/modules/storage/services/storage.service.js.map +1 -1
- package/dist/modules/storage/storage.constants.d.ts +2 -0
- package/dist/modules/storage/storage.constants.js +3 -1
- package/dist/modules/storage/storage.constants.js.map +1 -1
- package/dist/modules/storage/storage.module.js +26 -7
- package/dist/modules/storage/storage.module.js.map +1 -1
- package/dist/modules/swagger/commands/serve-swagger.command.d.ts +14 -0
- package/dist/modules/swagger/commands/serve-swagger.command.js +60 -0
- package/dist/modules/swagger/commands/serve-swagger.command.js.map +1 -0
- package/dist/modules/swagger/swagger.module.js +2 -0
- package/dist/modules/swagger/swagger.module.js.map +1 -1
- package/dist/modules/system/backup-contribution.module.d.ts +2 -0
- package/dist/modules/system/backup-contribution.module.js +22 -0
- package/dist/modules/system/backup-contribution.module.js.map +1 -0
- package/dist/modules/system/controllers/backup.controller.d.ts +17 -0
- package/dist/modules/system/controllers/backup.controller.js +308 -0
- package/dist/modules/system/controllers/backup.controller.js.map +1 -0
- package/dist/modules/system/dto/create-backup.dto.d.ts +6 -0
- package/dist/modules/system/dto/create-backup.dto.js +43 -0
- package/dist/modules/system/dto/create-backup.dto.js.map +1 -0
- package/dist/modules/system/models/backup-response.model.d.ts +8 -0
- package/dist/modules/system/models/backup-response.model.js +46 -0
- package/dist/modules/system/models/backup-response.model.js.map +1 -0
- package/dist/modules/system/models/backup.model.d.ts +14 -0
- package/dist/modules/system/models/backup.model.js +103 -0
- package/dist/modules/system/models/backup.model.js.map +1 -0
- package/dist/modules/system/models/system.model.d.ts +3 -1
- package/dist/modules/system/models/system.model.js +26 -0
- package/dist/modules/system/models/system.model.js.map +1 -1
- package/dist/modules/system/scripts/update-worker.sh +304 -0
- package/dist/modules/system/services/backup-contribution-registry.service.d.ts +24 -0
- package/dist/modules/system/services/backup-contribution-registry.service.js +52 -0
- package/dist/modules/system/services/backup-contribution-registry.service.js.map +1 -0
- package/dist/modules/system/services/backup.service.d.ts +52 -0
- package/dist/modules/system/services/backup.service.js +630 -0
- package/dist/modules/system/services/backup.service.js.map +1 -0
- package/dist/modules/system/services/house-mode-actions.service.d.ts +1 -1
- package/dist/modules/system/services/house-mode-actions.service.js +5 -5
- package/dist/modules/system/services/house-mode-actions.service.js.map +1 -1
- package/dist/modules/system/services/system-command.service.d.ts +7 -1
- package/dist/modules/system/services/system-command.service.js +24 -4
- package/dist/modules/system/services/system-command.service.js.map +1 -1
- package/dist/modules/system/services/system.service.js +4 -1
- package/dist/modules/system/services/system.service.js.map +1 -1
- package/dist/modules/system/services/update-executor.service.d.ts +4 -0
- package/dist/modules/system/services/update-executor.service.js +130 -10
- package/dist/modules/system/services/update-executor.service.js.map +1 -1
- package/dist/modules/system/system.constants.d.ts +7 -0
- package/dist/modules/system/system.constants.js +9 -1
- package/dist/modules/system/system.constants.js.map +1 -1
- package/dist/modules/system/system.module.d.ts +5 -1
- package/dist/modules/system/system.module.js +95 -31
- package/dist/modules/system/system.module.js.map +1 -1
- package/dist/modules/system/system.openapi.d.ts +4 -1
- package/dist/modules/system/system.openapi.js +8 -0
- package/dist/modules/system/system.openapi.js.map +1 -1
- package/dist/modules/users/controllers/users.controller.js +9 -0
- package/dist/modules/users/controllers/users.controller.js.map +1 -1
- package/dist/modules/users/dto/create-user.dto.js +1 -0
- package/dist/modules/users/dto/create-user.dto.js.map +1 -1
- package/dist/modules/users/dto/update-user.dto.d.ts +1 -0
- package/dist/modules/users/dto/update-user.dto.js +15 -1
- package/dist/modules/users/dto/update-user.dto.js.map +1 -1
- package/dist/modules/users/services/users.service.d.ts +1 -0
- package/dist/modules/users/services/users.service.js +12 -2
- package/dist/modules/users/services/users.service.js.map +1 -1
- package/dist/modules/users/users.constants.d.ts +3 -0
- package/dist/modules/users/users.constants.js +35 -1
- package/dist/modules/users/users.constants.js.map +1 -1
- package/dist/modules/users/users.module.js +29 -13
- package/dist/modules/users/users.module.js.map +1 -1
- package/dist/modules/weather/weather.module.js +20 -18
- package/dist/modules/weather/weather.module.js.map +1 -1
- package/dist/modules/websocket/dto/client-user.dto.js +25 -0
- package/dist/modules/websocket/dto/client-user.dto.js.map +1 -1
- package/dist/modules/websocket/dto/ws-client.dto.js +26 -0
- package/dist/modules/websocket/dto/ws-client.dto.js.map +1 -1
- package/dist/modules/websocket/gateway/websocket.gateway.d.ts +2 -2
- package/dist/modules/websocket/gateway/websocket.gateway.js +27 -9
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/modules/websocket/services/command-event-registry.service.d.ts +3 -1
- package/dist/modules/websocket/services/command-event-registry.service.js +5 -4
- package/dist/modules/websocket/services/command-event-registry.service.js.map +1 -1
- package/dist/plugins/buddy-claude/buddy-claude.plugin.js +24 -11
- package/dist/plugins/buddy-claude/buddy-claude.plugin.js.map +1 -1
- package/dist/plugins/buddy-claude-setup-token/buddy-claude-setup-token.plugin.js +21 -11
- package/dist/plugins/buddy-claude-setup-token/buddy-claude-setup-token.plugin.js.map +1 -1
- package/dist/plugins/buddy-discord/buddy-discord.plugin.js +28 -16
- package/dist/plugins/buddy-discord/buddy-discord.plugin.js.map +1 -1
- package/dist/plugins/buddy-elevenlabs/buddy-elevenlabs.plugin.js +22 -11
- package/dist/plugins/buddy-elevenlabs/buddy-elevenlabs.plugin.js.map +1 -1
- package/dist/plugins/buddy-ollama/buddy-ollama.plugin.js +28 -12
- package/dist/plugins/buddy-ollama/buddy-ollama.plugin.js.map +1 -1
- package/dist/plugins/buddy-openai/buddy-openai.plugin.js +24 -15
- package/dist/plugins/buddy-openai/buddy-openai.plugin.js.map +1 -1
- package/dist/plugins/buddy-openai/platforms/openai.provider.js +1 -0
- package/dist/plugins/buddy-openai/platforms/openai.provider.js.map +1 -1
- package/dist/plugins/buddy-openai-codex/buddy-openai-codex.plugin.js +26 -15
- package/dist/plugins/buddy-openai-codex/buddy-openai-codex.plugin.js.map +1 -1
- package/dist/plugins/buddy-stt-whisper-local/buddy-stt-whisper-local.plugin.js +23 -9
- package/dist/plugins/buddy-stt-whisper-local/buddy-stt-whisper-local.plugin.js.map +1 -1
- package/dist/plugins/buddy-system-tts/buddy-system-tts.plugin.js +21 -10
- package/dist/plugins/buddy-system-tts/buddy-system-tts.plugin.js.map +1 -1
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.js +22 -11
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.js.map +1 -1
- package/dist/plugins/buddy-voiceai/buddy-voiceai.plugin.js +22 -12
- package/dist/plugins/buddy-voiceai/buddy-voiceai.plugin.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.js +24 -12
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.d.ts +2 -2
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.js +3 -3
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.d.ts +2 -1
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.js +31 -12
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.js.map +1 -1
- package/dist/plugins/data-sources-device-channel/data-sources-device-channel.plugin.js +16 -30
- package/dist/plugins/data-sources-device-channel/data-sources-device-channel.plugin.js.map +1 -1
- package/dist/plugins/data-sources-weather/data-sources-weather.plugin.js +17 -29
- package/dist/plugins/data-sources-weather/data-sources-weather.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +37 -136
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/home-assistant-discovered-helper.dto.js +22 -2
- package/dist/plugins/devices-home-assistant/dto/home-assistant-discovered-helper.dto.js.map +1 -1
- package/dist/plugins/devices-home-assistant/models/config.model.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/models/config.model.js +12 -0
- package/dist/plugins/devices-home-assistant/models/config.model.js.map +1 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.d.ts +3 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js +11 -2
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js +0 -6
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.d.ts +10 -0
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.js +47 -0
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.d.ts +3 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.js +8 -2
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.d.ts +5 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.js +27 -7
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +9 -7
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +58 -24
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +1 -0
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.js +20 -17
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.d.ts +7 -2
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.js +83 -2
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +4 -0
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +86 -11
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +8 -0
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +45 -0
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.d.ts +3 -3
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js +4 -0
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.d.ts +6 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +72 -21
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.js +24 -6
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/entities/devices-shelly-ng.entity.js +12 -0
- package/dist/plugins/devices-shelly-ng/entities/devices-shelly-ng.entity.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/entities/shelly-ng-device-address.entity.js +2 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-ng-device-address.entity.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/config.model.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/models/config.model.js +18 -6
- package/dist/plugins/devices-shelly-ng/models/config.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.d.ts +4 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.js +15 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.d.ts +30 -0
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.js +269 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.d.ts +64 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.js +301 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +17 -7
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +110 -15
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.d.ts +5 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +28 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +197 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.d.ts +7 -2
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.js +83 -2
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.d.ts +3 -3
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.js +4 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js +27 -23
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.d.ts +4 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.js +15 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.d.ts +31 -0
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.js +279 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.d.ts +0 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +2 -9
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.d.ts +0 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js +2 -15
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.d.ts +9 -2
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.js +93 -20
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.d.ts +62 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.js +314 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.d.ts +3 -6
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js +13 -37
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.d.ts +2 -0
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.js +23 -0
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.js.map +1 -0
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js +19 -23
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js.map +1 -1
- package/dist/plugins/devices-wled/devices-wled.plugin.js +30 -20
- package/dist/plugins/devices-wled/devices-wled.plugin.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js +0 -6
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled.service.d.ts +3 -6
- package/dist/plugins/devices-wled/services/wled.service.js +3 -20
- package/dist/plugins/devices-wled/services/wled.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.d.ts +14 -0
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.js +185 -0
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.d.ts +5 -3
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.js +12 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js +43 -54
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.d.ts +12 -0
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.js +73 -0
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.d.ts +38 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.js +259 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.d.ts +7 -0
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.js +30 -1
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +22 -0
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.d.ts +70 -0
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.js +361 -0
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js +23 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.d.ts +10 -7
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +46 -22
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.update-config.dto.d.ts → plugins/influx-v1/dto/update-config.dto.d.ts} +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.update-config.dto.js → plugins/influx-v1/dto/update-config.dto.js} +3 -3
- package/dist/plugins/influx-v1/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/influx-v1/influx-v1.constants.js.map +1 -0
- package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.openapi.d.ts +1 -1
- package/dist/plugins/influx-v1/influx-v1.openapi.js +7 -0
- package/dist/plugins/influx-v1/influx-v1.openapi.js.map +1 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.d.ts +15 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.js +109 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.js.map +1 -0
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.config.model.d.ts → plugins/influx-v1/models/config.model.d.ts} +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.config.model.js → plugins/influx-v1/models/config.model.js} +3 -3
- package/dist/plugins/influx-v1/models/config.model.js.map +1 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.d.ts +20 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js +128 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js.map +1 -0
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.plugin.d.ts → plugins/influx-v1/services/influx-v1.storage.d.ts} +3 -3
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.plugin.js → plugins/influx-v1/services/influx-v1.storage.js} +9 -9
- package/dist/plugins/influx-v1/services/influx-v1.storage.js.map +1 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.d.ts +8 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.js +82 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.constants.d.ts +4 -0
- package/dist/plugins/influx-v2/influx-v2.constants.js +8 -0
- package/dist/plugins/influx-v2/influx-v2.constants.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.d.ts +2 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.js +7 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.d.ts +15 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.js +109 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.js.map +1 -0
- package/dist/plugins/influx-v2/models/config.model.d.ts +9 -0
- package/dist/plugins/influx-v2/models/config.model.js +93 -0
- package/dist/plugins/influx-v2/models/config.model.js.map +1 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.d.ts +20 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js +132 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js.map +1 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.d.ts +33 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.js +230 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.js.map +1 -0
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.js +20 -29
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.js.map +1 -1
- package/dist/{modules/storage/plugins/memory/memory.update-config.dto.d.ts → plugins/memory-storage/dto/update-config.dto.d.ts} +1 -1
- package/dist/{modules/storage/plugins/memory/memory.update-config.dto.js → plugins/memory-storage/dto/update-config.dto.js} +5 -5
- package/dist/plugins/memory-storage/dto/update-config.dto.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.constants.js → plugins/memory-storage/memory-storage.constants.js} +1 -1
- package/dist/plugins/memory-storage/memory-storage.constants.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.openapi.d.ts → plugins/memory-storage/memory-storage.openapi.d.ts} +1 -1
- package/dist/plugins/memory-storage/memory-storage.openapi.js +7 -0
- package/dist/plugins/memory-storage/memory-storage.openapi.js.map +1 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.d.ts +15 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.js +92 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.config.model.d.ts → plugins/memory-storage/models/config.model.d.ts} +1 -1
- package/dist/{modules/storage/plugins/memory/memory.config.model.js → plugins/memory-storage/models/config.model.js} +5 -5
- package/dist/plugins/memory-storage/models/config.model.js.map +1 -0
- package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/in-memory-timeseries.store.d.ts +1 -1
- package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/in-memory-timeseries.store.js +4 -4
- package/dist/plugins/memory-storage/services/in-memory-timeseries.store.js.map +1 -0
- package/dist/plugins/memory-storage/services/influxql-parser.js.map +1 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.d.ts +14 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js +87 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.plugin.d.ts → plugins/memory-storage/services/memory-storage.storage.d.ts} +3 -3
- package/dist/{modules/storage/plugins/memory/memory.plugin.js → plugins/memory-storage/services/memory-storage.storage.js} +8 -8
- package/dist/plugins/memory-storage/services/memory-storage.storage.js.map +1 -0
- package/dist/plugins/pages-cards/pages-cards.plugin.js +15 -26
- package/dist/plugins/pages-cards/pages-cards.plugin.js.map +1 -1
- package/dist/plugins/pages-device-detail/pages-device-detail.plugin.js +16 -25
- package/dist/plugins/pages-device-detail/pages-device-detail.plugin.js.map +1 -1
- package/dist/plugins/pages-tiles/pages-tiles.plugin.js +15 -26
- package/dist/plugins/pages-tiles/pages-tiles.plugin.js.map +1 -1
- package/dist/plugins/scenes-local/scenes-local.plugin.js +21 -22
- package/dist/plugins/scenes-local/scenes-local.plugin.js.map +1 -1
- package/dist/plugins/simulator/services/scenario-executor.service.d.ts +5 -5
- package/dist/plugins/simulator/services/scenario-executor.service.js +7 -6
- package/dist/plugins/simulator/services/scenario-executor.service.js.map +1 -1
- package/dist/plugins/simulator/services/simulator-actions.service.js +3 -0
- package/dist/plugins/simulator/services/simulator-actions.service.js.map +1 -1
- package/dist/plugins/simulator/simulator.plugin.js +49 -58
- package/dist/plugins/simulator/simulator.plugin.js.map +1 -1
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.d.ts +119 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js +1958 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-intent.dto.js +24 -24
- package/dist/plugins/spaces-home-control/dto/climate-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/climate-role.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-intent.dto.js +18 -18
- package/dist/plugins/spaces-home-control/dto/covers-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/covers-role.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.d.ts +8 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.js +85 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-intent.dto.js +34 -34
- package/dist/plugins/spaces-home-control/dto/lighting-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/lighting-role.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/media-activity-binding.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/media-activity-binding.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/media-activity-binding.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/sensor-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/sensor-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/sensor-role.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/status-widget.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/suggestion.dto.d.ts +2 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/suggestion.dto.js +5 -4
- package/dist/plugins/spaces-home-control/dto/suggestion.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.d.ts +8 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.js +85 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.d.ts +8 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.js +91 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-active-media-activity.entity.d.ts +11 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-active-media-activity.entity.js +23 -30
- package/dist/plugins/spaces-home-control/entities/space-active-media-activity.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-climate-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-climate-role.entity.js +25 -32
- package/dist/plugins/spaces-home-control/entities/space-climate-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-covers-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-covers-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-covers-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-lighting-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-lighting-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-lighting-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-media-activity-binding.entity.d.ts +15 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-media-activity-binding.entity.js +20 -28
- package/dist/plugins/spaces-home-control/entities/space-media-activity-binding.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-sensor-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-sensor-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-sensor-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.d.ts +8 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.js +91 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-activity.listener.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-activity.listener.js +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-climate-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-climate-state.listener.js +6 -5
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-lighting-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-lighting-state.listener.js +6 -5
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-sensor-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-sensor-state.listener.js +9 -8
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/websocket-exchange.listener.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/websocket-exchange.listener.js +5 -5
- package/dist/plugins/spaces-home-control/listeners/websocket-exchange.listener.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-home-control/models/config.model.js +49 -0
- package/dist/plugins/spaces-home-control/models/config.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/derived-media-endpoint.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/derived-media-endpoint.model.js +4 -4
- package/dist/plugins/spaces-home-control/models/derived-media-endpoint.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity-binding.model.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity-binding.model.js +1 -1
- package/dist/plugins/spaces-home-control/models/media-activity-binding.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity.model.js +6 -6
- package/dist/plugins/spaces-home-control/models/media-activity.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-routing.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-routing.model.js +4 -4
- package/dist/plugins/spaces-home-control/models/media-routing.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.d.ts +524 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js +4145 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-scenario-templates.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-scenario-templates.js +3 -3
- package/dist/plugins/spaces-home-control/services/__fixtures__/media-scenario-templates.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-test-harness.d.ts +1 -1
- package/dist/plugins/spaces-home-control/services/__fixtures__/media-test-harness.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/climate-intent.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/climate-intent.service.js +35 -34
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/covers-intent.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/covers-intent.service.js +48 -47
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/derived-media-endpoint.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/derived-media-endpoint.service.js +28 -27
- package/dist/plugins/spaces-home-control/services/derived-media-endpoint.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.d.ts +4 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.js +20 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.d.ts +24 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.js +182 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/lighting-intent.service.d.ts +6 -6
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/lighting-intent.service.js +68 -67
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/media-capability.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/media-capability.service.js +20 -19
- package/dist/plugins/spaces-home-control/services/media-capability.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-role.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-role.service.js +18 -17
- package/dist/plugins/spaces-home-control/services/space-climate-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-state.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-state.service.js +32 -31
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-context-snapshot.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-context-snapshot.service.js +7 -6
- package/dist/plugins/spaces-home-control/services/space-context-snapshot.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-role.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-role.service.js +28 -25
- package/dist/plugins/spaces-home-control/services/space-covers-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-state.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-state.service.js +9 -8
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent-base.service.d.ts +1 -1
- package/dist/plugins/spaces-home-control/services/space-intent-base.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-role.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-role.service.js +25 -22
- package/dist/plugins/spaces-home-control/services/space-lighting-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-state.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-state.service.js +20 -19
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-tool.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-tool.service.js +8 -7
- package/dist/plugins/spaces-home-control/services/space-lighting-tool.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity-binding.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity-binding.service.js +31 -30
- package/dist/plugins/spaces-home-control/services/space-media-activity-binding.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity.service.js +38 -37
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-role.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-role.service.js +24 -23
- package/dist/plugins/spaces-home-control/services/space-sensor-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-state.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-state.service.js +19 -18
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion-heartbeat.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion-heartbeat.service.js +10 -9
- package/dist/plugins/spaces-home-control/services/space-suggestion-heartbeat.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion.service.d.ts +4 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion.service.js +8 -7
- package/dist/plugins/spaces-home-control/services/space-suggestion.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-undo-history.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-undo-history.service.js +5 -5
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/spaces-seeder.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/spaces-seeder.service.js +5 -5
- package/dist/plugins/spaces-home-control/services/spaces-seeder.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.d.ts +297 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.js +1460 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.d.ts +2 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js +155 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.d.ts +29 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +334 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -0
- package/dist/plugins/spaces-home-control/spec/index.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec-loader.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec-loader.service.js +1 -1
- package/dist/plugins/spaces-home-control/spec/intent-spec-loader.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/spec/intent-spec.types.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/validators/at-least-one-setpoint.validator.js +2 -2
- package/dist/plugins/spaces-home-control/validators/at-least-one-setpoint.validator.js.map +1 -0
- package/dist/plugins/spaces-home-control/validators/setpoint-order-constraint.validator.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/validators/space-category-constraint.validator.js +1 -1
- package/dist/plugins/spaces-home-control/validators/space-category-constraint.validator.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.d.ts +18 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.js +219 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.js +143 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.js +130 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.d.ts +10 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.js +78 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.d.ts +12 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.js +134 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.js +130 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.js +161 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.js +147 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.js +49 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.d.ts +8 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.js +46 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.d.ts +28 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.js +181 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.d.ts +4 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.js +20 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.d.ts +14 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.js +59 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.d.ts +17 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.js +23 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.d.ts +9 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.js +25 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.d.ts +2 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.js +31 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.d.ts +23 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.js +159 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.js +39 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.js +49 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.d.ts +7 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.js +11 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.d.ts +2 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.js +16 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.d.ts +15 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.js +124 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.js +39 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.js +49 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.d.ts +7 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.js +11 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.d.ts +2 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.js +16 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.d.ts +15 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.js +124 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.js.map +1 -0
- package/dist/plugins/tiles-device-preview/tiles-device-preview.plugin.js +16 -22
- package/dist/plugins/tiles-device-preview/tiles-device-preview.plugin.js.map +1 -1
- package/dist/plugins/tiles-scene/tiles-scene.plugin.js +15 -21
- package/dist/plugins/tiles-scene/tiles-scene.plugin.js.map +1 -1
- package/dist/plugins/tiles-time/tiles-time.plugin.js +13 -19
- package/dist/plugins/tiles-time/tiles-time.plugin.js.map +1 -1
- package/dist/plugins/tiles-weather/tiles-weather.plugin.js +16 -19
- package/dist/plugins/tiles-weather/tiles-weather.plugin.js.map +1 -1
- package/dist/plugins/weather-open-meteo/weather-open-meteo.plugin.js +32 -21
- package/dist/plugins/weather-open-meteo/weather-open-meteo.plugin.js.map +1 -1
- package/dist/plugins/weather-openweathermap/weather-openweathermap.plugin.js +22 -23
- package/dist/plugins/weather-openweathermap/weather-openweathermap.plugin.js.map +1 -1
- package/dist/plugins/weather-openweathermap-onecall/weather-openweathermap-onecall.plugin.js +27 -23
- package/dist/plugins/weather-openweathermap-onecall/weather-openweathermap-onecall.plugin.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +10 -6
- package/dist/modules/spaces/dto/climate-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/climate-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/covers-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/covers-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/lighting-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/lighting-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/media-activity-binding.dto.js.map +0 -1
- package/dist/modules/spaces/dto/sensor-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/status-widget.dto.js.map +0 -1
- package/dist/modules/spaces/dto/suggestion.dto.js.map +0 -1
- package/dist/modules/spaces/entities/space-active-media-activity.entity.d.ts +0 -12
- package/dist/modules/spaces/entities/space-active-media-activity.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-climate-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-climate-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-covers-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-covers-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-lighting-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-lighting-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-media-activity-binding.entity.d.ts +0 -16
- package/dist/modules/spaces/entities/space-media-activity-binding.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-sensor-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-sensor-role.entity.js.map +0 -1
- package/dist/modules/spaces/listeners/space-activity.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-climate-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-lighting-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-sensor-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/websocket-exchange.listener.js.map +0 -1
- package/dist/modules/spaces/models/derived-media-endpoint.model.js.map +0 -1
- package/dist/modules/spaces/models/media-activity-binding.model.js.map +0 -1
- package/dist/modules/spaces/models/media-activity.model.js.map +0 -1
- package/dist/modules/spaces/models/media-routing.model.js.map +0 -1
- package/dist/modules/spaces/services/__fixtures__/media-scenario-templates.js.map +0 -1
- package/dist/modules/spaces/services/__fixtures__/media-test-harness.js.map +0 -1
- package/dist/modules/spaces/services/climate-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/covers-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/derived-media-endpoint.service.js.map +0 -1
- package/dist/modules/spaces/services/lighting-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/media-capability.service.js.map +0 -1
- package/dist/modules/spaces/services/space-climate-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-climate-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-context-snapshot.service.js.map +0 -1
- package/dist/modules/spaces/services/space-covers-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-covers-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-intent-base.service.js.map +0 -1
- package/dist/modules/spaces/services/space-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-tool.service.js.map +0 -1
- package/dist/modules/spaces/services/space-media-activity-binding.service.js.map +0 -1
- package/dist/modules/spaces/services/space-media-activity.service.js.map +0 -1
- package/dist/modules/spaces/services/space-sensor-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-sensor-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-suggestion-heartbeat.service.js.map +0 -1
- package/dist/modules/spaces/services/space-suggestion.service.js.map +0 -1
- package/dist/modules/spaces/services/space-undo-history.service.js.map +0 -1
- package/dist/modules/spaces/services/spaces-seeder.service.js.map +0 -1
- package/dist/modules/spaces/spec/definitions/climate-intents.yaml +0 -94
- package/dist/modules/spaces/spec/definitions/covers-modes.yaml +0 -83
- package/dist/modules/spaces/spec/definitions/enums.yaml +0 -119
- package/dist/modules/spaces/spec/definitions/lighting-intents.yaml +0 -181
- package/dist/modules/spaces/spec/definitions/lighting-modes.yaml +0 -119
- package/dist/modules/spaces/spec/definitions/suggestions.yaml +0 -47
- package/dist/modules/spaces/spec/index.js.map +0 -1
- package/dist/modules/spaces/spec/intent-spec-loader.service.js.map +0 -1
- package/dist/modules/spaces/spec/intent-spec.types.js.map +0 -1
- package/dist/modules/spaces/validators/at-least-one-setpoint.validator.js.map +0 -1
- package/dist/modules/spaces/validators/setpoint-order-constraint.validator.js.map +0 -1
- package/dist/modules/spaces/validators/space-category-constraint.validator.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.config.model.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.constants.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.d.ts +0 -17
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.js +0 -94
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.openapi.js +0 -7
- package/dist/modules/storage/plugins/influx-v1/influx-v1.openapi.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.plugin.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.update-config.dto.js.map +0 -1
- package/dist/modules/storage/plugins/memory/in-memory-timeseries.store.js.map +0 -1
- package/dist/modules/storage/plugins/memory/influxql-parser.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.config.model.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.constants.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.module.d.ts +0 -13
- package/dist/modules/storage/plugins/memory/memory.module.js +0 -75
- package/dist/modules/storage/plugins/memory/memory.module.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.openapi.js +0 -7
- package/dist/modules/storage/plugins/memory/memory.openapi.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.plugin.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.update-config.dto.js.map +0 -1
- /package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.constants.d.ts +0 -0
- /package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.constants.js +0 -0
- /package/dist/{modules/storage/plugins/memory/memory.constants.d.ts → plugins/memory-storage/memory-storage.constants.d.ts} +0 -0
- /package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/influxql-parser.d.ts +0 -0
- /package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/influxql-parser.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/dto/status-widget.dto.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/dto/status-widget.dto.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-test-harness.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent-base.service.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent.service.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent.service.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/index.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/index.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec.types.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec.types.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/at-least-one-setpoint.validator.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/setpoint-order-constraint.validator.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/setpoint-order-constraint.validator.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/space-category-constraint.validator.d.ts +0 -0
|
@@ -0,0 +1,1958 @@
|
|
|
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.SpacesDomainController = void 0;
|
|
16
|
+
const uuid_1 = require("uuid");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
19
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
20
|
+
const logger_1 = require("../../../common/logger");
|
|
21
|
+
const spaces_response_model_1 = require("../../../modules/spaces/models/spaces-response.model");
|
|
22
|
+
const spaces_service_1 = require("../../../modules/spaces/services/spaces.service");
|
|
23
|
+
const spaces_exceptions_1 = require("../../../modules/spaces/spaces.exceptions");
|
|
24
|
+
const api_documentation_decorator_1 = require("../../../modules/swagger/decorators/api-documentation.decorator");
|
|
25
|
+
const roles_guard_1 = require("../../../modules/users/guards/roles.guard");
|
|
26
|
+
const users_constants_1 = require("../../../modules/users/users.constants");
|
|
27
|
+
const climate_intent_dto_1 = require("../dto/climate-intent.dto");
|
|
28
|
+
const climate_role_dto_1 = require("../dto/climate-role.dto");
|
|
29
|
+
const covers_intent_dto_1 = require("../dto/covers-intent.dto");
|
|
30
|
+
const covers_role_dto_1 = require("../dto/covers-role.dto");
|
|
31
|
+
const lighting_intent_dto_1 = require("../dto/lighting-intent.dto");
|
|
32
|
+
const lighting_role_dto_1 = require("../dto/lighting-role.dto");
|
|
33
|
+
const media_activity_binding_dto_1 = require("../dto/media-activity-binding.dto");
|
|
34
|
+
const sensor_role_dto_1 = require("../dto/sensor-role.dto");
|
|
35
|
+
const suggestion_dto_1 = require("../dto/suggestion.dto");
|
|
36
|
+
const derived_media_endpoint_model_1 = require("../models/derived-media-endpoint.model");
|
|
37
|
+
const media_activity_binding_model_1 = require("../models/media-activity-binding.model");
|
|
38
|
+
const media_activity_model_1 = require("../models/media-activity.model");
|
|
39
|
+
const spaces_response_model_2 = require("../models/spaces-response.model");
|
|
40
|
+
const derived_media_endpoint_service_1 = require("../services/derived-media-endpoint.service");
|
|
41
|
+
const home_control_spaces_service_1 = require("../services/home-control-spaces.service");
|
|
42
|
+
const space_climate_role_service_1 = require("../services/space-climate-role.service");
|
|
43
|
+
const space_context_snapshot_service_1 = require("../services/space-context-snapshot.service");
|
|
44
|
+
const space_covers_role_service_1 = require("../services/space-covers-role.service");
|
|
45
|
+
const space_intent_service_1 = require("../services/space-intent.service");
|
|
46
|
+
const space_lighting_role_service_1 = require("../services/space-lighting-role.service");
|
|
47
|
+
const space_lighting_state_service_1 = require("../services/space-lighting-state.service");
|
|
48
|
+
const space_media_activity_binding_service_1 = require("../services/space-media-activity-binding.service");
|
|
49
|
+
const space_media_activity_service_1 = require("../services/space-media-activity.service");
|
|
50
|
+
const space_sensor_role_service_1 = require("../services/space-sensor-role.service");
|
|
51
|
+
const space_sensor_state_service_1 = require("../services/space-sensor-state.service");
|
|
52
|
+
const space_suggestion_heartbeat_service_1 = require("../services/space-suggestion-heartbeat.service");
|
|
53
|
+
const space_suggestion_service_1 = require("../services/space-suggestion.service");
|
|
54
|
+
const space_undo_history_service_1 = require("../services/space-undo-history.service");
|
|
55
|
+
const spaces_home_control_constants_1 = require("../spaces-home-control.constants");
|
|
56
|
+
const spaces_home_control_constants_2 = require("../spaces-home-control.constants");
|
|
57
|
+
const spec_1 = require("../spec");
|
|
58
|
+
let SpacesDomainController = class SpacesDomainController {
|
|
59
|
+
constructor(spacesService, homeControlSpacesService, spaceIntentService, spaceLightingRoleService, spaceLightingStateService, spaceClimateRoleService, spaceCoversRoleService, spaceSensorRoleService, spaceSensorStateService, spaceSuggestionService, spaceSuggestionHeartbeatService, spaceContextSnapshotService, spaceUndoHistoryService, intentSpecLoaderService, derivedMediaEndpointService, spaceMediaActivityBindingService, spaceMediaActivityService, eventEmitter) {
|
|
60
|
+
this.spacesService = spacesService;
|
|
61
|
+
this.homeControlSpacesService = homeControlSpacesService;
|
|
62
|
+
this.spaceIntentService = spaceIntentService;
|
|
63
|
+
this.spaceLightingRoleService = spaceLightingRoleService;
|
|
64
|
+
this.spaceLightingStateService = spaceLightingStateService;
|
|
65
|
+
this.spaceClimateRoleService = spaceClimateRoleService;
|
|
66
|
+
this.spaceCoversRoleService = spaceCoversRoleService;
|
|
67
|
+
this.spaceSensorRoleService = spaceSensorRoleService;
|
|
68
|
+
this.spaceSensorStateService = spaceSensorStateService;
|
|
69
|
+
this.spaceSuggestionService = spaceSuggestionService;
|
|
70
|
+
this.spaceSuggestionHeartbeatService = spaceSuggestionHeartbeatService;
|
|
71
|
+
this.spaceContextSnapshotService = spaceContextSnapshotService;
|
|
72
|
+
this.spaceUndoHistoryService = spaceUndoHistoryService;
|
|
73
|
+
this.intentSpecLoaderService = intentSpecLoaderService;
|
|
74
|
+
this.derivedMediaEndpointService = derivedMediaEndpointService;
|
|
75
|
+
this.spaceMediaActivityBindingService = spaceMediaActivityBindingService;
|
|
76
|
+
this.spaceMediaActivityService = spaceMediaActivityService;
|
|
77
|
+
this.eventEmitter = eventEmitter;
|
|
78
|
+
this.logger = (0, logger_1.createExtensionLogger)(spaces_home_control_constants_2.SPACES_HOME_CONTROL_PLUGIN_NAME, 'SpacesDomainController');
|
|
79
|
+
}
|
|
80
|
+
async proposeSpaces() {
|
|
81
|
+
this.logger.debug('Proposing spaces from device names');
|
|
82
|
+
const proposals = await this.homeControlSpacesService.proposeSpaces();
|
|
83
|
+
const response = new spaces_response_model_2.ProposedSpacesResponseModel();
|
|
84
|
+
response.data = proposals.map((p) => {
|
|
85
|
+
const model = new spaces_response_model_2.ProposedSpaceDataModel();
|
|
86
|
+
model.name = p.name;
|
|
87
|
+
model.type = p.type;
|
|
88
|
+
model.category = p.category;
|
|
89
|
+
model.deviceIds = p.deviceIds;
|
|
90
|
+
model.deviceCount = p.deviceCount;
|
|
91
|
+
return model;
|
|
92
|
+
});
|
|
93
|
+
return response;
|
|
94
|
+
}
|
|
95
|
+
getCategoryTemplates() {
|
|
96
|
+
this.logger.debug('Fetching category templates');
|
|
97
|
+
const templates = Object.entries(spaces_home_control_constants_1.SPACE_CATEGORY_TEMPLATES).map(([category, template]) => {
|
|
98
|
+
const model = new spaces_response_model_1.CategoryTemplateDataModel();
|
|
99
|
+
model.category = category;
|
|
100
|
+
model.icon = template.icon;
|
|
101
|
+
model.description = template.description;
|
|
102
|
+
return model;
|
|
103
|
+
});
|
|
104
|
+
const response = new spaces_response_model_1.CategoryTemplatesResponseModel();
|
|
105
|
+
response.data = templates;
|
|
106
|
+
return response;
|
|
107
|
+
}
|
|
108
|
+
async findAllZones() {
|
|
109
|
+
this.logger.debug('Fetching all zones');
|
|
110
|
+
const zones = await this.homeControlSpacesService.findAllZones();
|
|
111
|
+
const response = new spaces_response_model_1.SpacesResponseModel();
|
|
112
|
+
response.data = zones;
|
|
113
|
+
return response;
|
|
114
|
+
}
|
|
115
|
+
async findChildren(id) {
|
|
116
|
+
this.logger.debug(`Fetching child rooms for zone with id=${id}`);
|
|
117
|
+
const children = await this.homeControlSpacesService.getChildRooms(id);
|
|
118
|
+
const response = new spaces_response_model_1.SpacesResponseModel();
|
|
119
|
+
response.data = children;
|
|
120
|
+
return response;
|
|
121
|
+
}
|
|
122
|
+
async findParent(id) {
|
|
123
|
+
this.logger.debug(`Fetching parent zone for room with id=${id}`);
|
|
124
|
+
const parent = await this.homeControlSpacesService.getParentZone(id);
|
|
125
|
+
const response = new spaces_response_model_1.SpaceResponseModel();
|
|
126
|
+
response.data = parent;
|
|
127
|
+
return response;
|
|
128
|
+
}
|
|
129
|
+
getIntentCatalog() {
|
|
130
|
+
this.logger.debug('Fetching intent catalog');
|
|
131
|
+
const intentCatalog = this.intentSpecLoaderService.getIntentCatalog();
|
|
132
|
+
const categories = intentCatalog.map((cat) => {
|
|
133
|
+
const categoryData = new spaces_response_model_2.IntentCategoryDataModel();
|
|
134
|
+
categoryData.category = cat.category;
|
|
135
|
+
categoryData.label = cat.label;
|
|
136
|
+
categoryData.description = cat.description;
|
|
137
|
+
categoryData.icon = cat.icon;
|
|
138
|
+
categoryData.intents = cat.intents.map((intent) => {
|
|
139
|
+
const intentData = new spaces_response_model_2.IntentTypeDataModel();
|
|
140
|
+
intentData.type = intent.type;
|
|
141
|
+
intentData.label = intent.label;
|
|
142
|
+
intentData.description = intent.description;
|
|
143
|
+
intentData.icon = intent.icon;
|
|
144
|
+
intentData.params = intent.params.map((param) => {
|
|
145
|
+
const paramData = new spaces_response_model_2.IntentParamDataModel();
|
|
146
|
+
paramData.name = param.name;
|
|
147
|
+
paramData.type = param.type;
|
|
148
|
+
paramData.required = param.required;
|
|
149
|
+
paramData.description = param.description;
|
|
150
|
+
paramData.minValue = param.minValue;
|
|
151
|
+
paramData.maxValue = param.maxValue;
|
|
152
|
+
if (param.enumValues) {
|
|
153
|
+
paramData.enumValues = param.enumValues.map((ev) => {
|
|
154
|
+
const enumData = new spaces_response_model_2.IntentEnumValueDataModel();
|
|
155
|
+
enumData.value = ev.value;
|
|
156
|
+
enumData.label = ev.label;
|
|
157
|
+
enumData.description = ev.description;
|
|
158
|
+
enumData.icon = ev.icon;
|
|
159
|
+
return enumData;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return paramData;
|
|
163
|
+
});
|
|
164
|
+
return intentData;
|
|
165
|
+
});
|
|
166
|
+
return categoryData;
|
|
167
|
+
});
|
|
168
|
+
const quickActions = spaces_home_control_constants_1.QUICK_ACTION_CATALOG.map((qa) => {
|
|
169
|
+
const actionData = new spaces_response_model_2.QuickActionDataModel();
|
|
170
|
+
actionData.type = qa.type;
|
|
171
|
+
actionData.label = qa.label;
|
|
172
|
+
actionData.description = qa.description;
|
|
173
|
+
actionData.icon = qa.icon;
|
|
174
|
+
actionData.category = qa.category;
|
|
175
|
+
return actionData;
|
|
176
|
+
});
|
|
177
|
+
const lightingRolesFromSpec = this.intentSpecLoaderService
|
|
178
|
+
.getIntentCatalog()
|
|
179
|
+
.find((c) => c.category === 'lighting');
|
|
180
|
+
const roleParam = lightingRolesFromSpec?.intents
|
|
181
|
+
.find((i) => i.type === 'role_on')
|
|
182
|
+
?.params.find((p) => p.name === 'role');
|
|
183
|
+
const lightingRoles = (roleParam?.enumValues ?? []).map((role) => {
|
|
184
|
+
const roleData = new spaces_response_model_2.LightingRoleMetaDataModel();
|
|
185
|
+
roleData.value = role.value;
|
|
186
|
+
roleData.label = role.label;
|
|
187
|
+
roleData.description = role.description;
|
|
188
|
+
roleData.icon = role.icon;
|
|
189
|
+
return roleData;
|
|
190
|
+
});
|
|
191
|
+
const lightingModesMap = this.intentSpecLoaderService.getAllLightingModeOrchestrations();
|
|
192
|
+
const lightingModes = [];
|
|
193
|
+
for (const [modeKey, modeConfig] of lightingModesMap) {
|
|
194
|
+
const modeData = new spaces_response_model_2.LightingModeOrchestrationDataModel();
|
|
195
|
+
modeData.mode = modeKey;
|
|
196
|
+
modeData.label = modeConfig.label;
|
|
197
|
+
modeData.description = modeConfig.description;
|
|
198
|
+
modeData.icon = modeConfig.icon;
|
|
199
|
+
modeData.mvpBrightness = modeConfig.mvpBrightness;
|
|
200
|
+
modeData.fallbackRoles = modeConfig.fallbackRoles;
|
|
201
|
+
modeData.fallbackBrightness = modeConfig.fallbackBrightness;
|
|
202
|
+
const roles = {};
|
|
203
|
+
for (const [roleKey, roleRule] of Object.entries(modeConfig.roles)) {
|
|
204
|
+
const ruleData = new spaces_response_model_2.LightingRoleBrightnessRuleDataModel();
|
|
205
|
+
ruleData.on = roleRule.on;
|
|
206
|
+
ruleData.brightness = roleRule.brightness;
|
|
207
|
+
roles[roleKey] = ruleData;
|
|
208
|
+
}
|
|
209
|
+
modeData.roles = roles;
|
|
210
|
+
lightingModes.push(modeData);
|
|
211
|
+
}
|
|
212
|
+
const coversModesMap = this.intentSpecLoaderService.getAllCoversModeOrchestrations();
|
|
213
|
+
const coversModes = [];
|
|
214
|
+
for (const [modeKey, modeConfig] of coversModesMap) {
|
|
215
|
+
const modeData = new spaces_response_model_2.CoversModeOrchestrationDataModel();
|
|
216
|
+
modeData.mode = modeKey;
|
|
217
|
+
modeData.label = modeConfig.label;
|
|
218
|
+
modeData.description = modeConfig.description;
|
|
219
|
+
modeData.icon = modeConfig.icon;
|
|
220
|
+
modeData.mvpPosition = modeConfig.mvpPosition;
|
|
221
|
+
const roles = {};
|
|
222
|
+
for (const [roleKey, roleRule] of Object.entries(modeConfig.roles)) {
|
|
223
|
+
const ruleData = new spaces_response_model_2.CoversRolePositionRuleDataModel();
|
|
224
|
+
ruleData.position = roleRule.position;
|
|
225
|
+
ruleData.tilt = roleRule.tilt;
|
|
226
|
+
roles[roleKey] = ruleData;
|
|
227
|
+
}
|
|
228
|
+
modeData.roles = roles;
|
|
229
|
+
coversModes.push(modeData);
|
|
230
|
+
}
|
|
231
|
+
const catalogData = new spaces_response_model_2.IntentCatalogDataModel();
|
|
232
|
+
catalogData.categories = categories;
|
|
233
|
+
catalogData.quickActions = quickActions;
|
|
234
|
+
catalogData.lightingRoles = lightingRoles;
|
|
235
|
+
catalogData.lightingModes = lightingModes;
|
|
236
|
+
catalogData.coversModes = coversModes;
|
|
237
|
+
const response = new spaces_response_model_2.IntentCatalogResponseModel();
|
|
238
|
+
response.data = catalogData;
|
|
239
|
+
return response;
|
|
240
|
+
}
|
|
241
|
+
async executeLightingIntent(id, body) {
|
|
242
|
+
this.logger.debug(`Executing lighting intent for space with id=${id}`);
|
|
243
|
+
const result = await this.spaceIntentService.executeLightingIntent(id, body.data);
|
|
244
|
+
if (!result) {
|
|
245
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Space not found');
|
|
246
|
+
}
|
|
247
|
+
const resultData = new spaces_response_model_2.LightingIntentResultDataModel();
|
|
248
|
+
resultData.success = result.success;
|
|
249
|
+
resultData.affectedDevices = result.affectedDevices;
|
|
250
|
+
resultData.failedDevices = result.failedDevices;
|
|
251
|
+
resultData.skippedOfflineDevices = result.skippedOfflineDevices;
|
|
252
|
+
resultData.offlineDeviceIds = result.offlineDeviceIds;
|
|
253
|
+
resultData.failedTargets = result.failedTargets ?? null;
|
|
254
|
+
const response = new spaces_response_model_2.LightingIntentResponseModel();
|
|
255
|
+
response.data = resultData;
|
|
256
|
+
return response;
|
|
257
|
+
}
|
|
258
|
+
async getClimateState(id) {
|
|
259
|
+
this.logger.debug(`Fetching climate state for space with id=${id}`);
|
|
260
|
+
const state = await this.spaceIntentService.getClimateState(id);
|
|
261
|
+
if (!state) {
|
|
262
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Space not found');
|
|
263
|
+
}
|
|
264
|
+
const stateData = new spaces_response_model_2.ClimateStateDataModel();
|
|
265
|
+
stateData.hasClimate = state.hasClimate;
|
|
266
|
+
stateData.mode = state.mode;
|
|
267
|
+
stateData.currentTemperature = state.currentTemperature;
|
|
268
|
+
stateData.currentHumidity = state.currentHumidity;
|
|
269
|
+
stateData.heatingSetpoint = state.heatingSetpoint;
|
|
270
|
+
stateData.coolingSetpoint = state.coolingSetpoint;
|
|
271
|
+
stateData.minSetpoint = state.minSetpoint;
|
|
272
|
+
stateData.maxSetpoint = state.maxSetpoint;
|
|
273
|
+
stateData.supportsHeating = state.supportsHeating;
|
|
274
|
+
stateData.supportsCooling = state.supportsCooling;
|
|
275
|
+
stateData.isHeating = state.isHeating;
|
|
276
|
+
stateData.isCooling = state.isCooling;
|
|
277
|
+
stateData.isMixed = state.isMixed;
|
|
278
|
+
stateData.devicesCount = state.devicesCount;
|
|
279
|
+
const response = new spaces_response_model_2.ClimateStateResponseModel();
|
|
280
|
+
response.data = stateData;
|
|
281
|
+
return response;
|
|
282
|
+
}
|
|
283
|
+
async executeClimateIntent(id, body) {
|
|
284
|
+
this.logger.debug(`Executing climate intent for space with id=${id}, ` +
|
|
285
|
+
`type=${body.data.type}, mode=${body.data.mode}, ` +
|
|
286
|
+
`heatingSetpoint=${body.data.heatingSetpoint}, coolingSetpoint=${body.data.coolingSetpoint}`);
|
|
287
|
+
const result = await this.spaceIntentService.executeClimateIntent(id, body.data);
|
|
288
|
+
if (!result) {
|
|
289
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Space not found');
|
|
290
|
+
}
|
|
291
|
+
const resultData = new spaces_response_model_2.ClimateIntentResultDataModel();
|
|
292
|
+
resultData.success = result.success;
|
|
293
|
+
resultData.affectedDevices = result.affectedDevices;
|
|
294
|
+
resultData.failedDevices = result.failedDevices;
|
|
295
|
+
resultData.skippedOfflineDevices = result.skippedOfflineDevices;
|
|
296
|
+
resultData.offlineDeviceIds = result.offlineDeviceIds;
|
|
297
|
+
resultData.failedTargets = result.failedTargets ?? null;
|
|
298
|
+
resultData.mode = result.mode;
|
|
299
|
+
resultData.heatingSetpoint = result.heatingSetpoint;
|
|
300
|
+
resultData.coolingSetpoint = result.coolingSetpoint;
|
|
301
|
+
const response = new spaces_response_model_2.ClimateIntentResponseModel();
|
|
302
|
+
response.data = resultData;
|
|
303
|
+
return response;
|
|
304
|
+
}
|
|
305
|
+
async getLightingState(id) {
|
|
306
|
+
this.logger.debug(`Fetching lighting state for space with id=${id}`);
|
|
307
|
+
const state = await this.spaceLightingStateService.getLightingState(id);
|
|
308
|
+
if (!state) {
|
|
309
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Space not found');
|
|
310
|
+
}
|
|
311
|
+
const stateData = new spaces_response_model_2.LightingStateDataModel();
|
|
312
|
+
stateData.hasLights = state.hasLights;
|
|
313
|
+
stateData.detectedMode = state.detectedMode;
|
|
314
|
+
stateData.modeConfidence = state.modeConfidence;
|
|
315
|
+
stateData.modeMatchPercentage = state.modeMatchPercentage;
|
|
316
|
+
stateData.isModeFromIntent = state.isModeFromIntent;
|
|
317
|
+
stateData.lastAppliedMode = state.lastAppliedMode;
|
|
318
|
+
stateData.lastAppliedAt = state.lastAppliedAt;
|
|
319
|
+
stateData.totalLights = state.totalLights;
|
|
320
|
+
stateData.lightsOn = state.lightsOn;
|
|
321
|
+
stateData.averageBrightness = state.averageBrightness;
|
|
322
|
+
stateData.lightsByRole = state.lightsByRole;
|
|
323
|
+
const rolesMap = new spaces_response_model_2.RolesStateMapDataModel();
|
|
324
|
+
for (const [roleKey, roleState] of Object.entries(state.roles)) {
|
|
325
|
+
const roleData = new spaces_response_model_2.RoleAggregatedStateDataModel();
|
|
326
|
+
roleData.role = roleState.role;
|
|
327
|
+
roleData.isOn = roleState.isOn;
|
|
328
|
+
roleData.isOnMixed = roleState.isOnMixed;
|
|
329
|
+
roleData.brightness = roleState.brightness;
|
|
330
|
+
roleData.colorTemperature = roleState.colorTemperature;
|
|
331
|
+
roleData.color = roleState.color;
|
|
332
|
+
roleData.white = roleState.white;
|
|
333
|
+
roleData.isBrightnessMixed = roleState.isBrightnessMixed;
|
|
334
|
+
roleData.isColorTemperatureMixed = roleState.isColorTemperatureMixed;
|
|
335
|
+
roleData.isColorMixed = roleState.isColorMixed;
|
|
336
|
+
roleData.isWhiteMixed = roleState.isWhiteMixed;
|
|
337
|
+
roleData.lastIntent = roleState.lastIntent;
|
|
338
|
+
roleData.devicesCount = roleState.devicesCount;
|
|
339
|
+
roleData.devicesOn = roleState.devicesOn;
|
|
340
|
+
rolesMap[roleKey] = roleData;
|
|
341
|
+
}
|
|
342
|
+
stateData.roles = rolesMap;
|
|
343
|
+
const otherData = new spaces_response_model_2.OtherLightsStateDataModel();
|
|
344
|
+
otherData.isOn = state.other.isOn;
|
|
345
|
+
otherData.isOnMixed = state.other.isOnMixed;
|
|
346
|
+
otherData.brightness = state.other.brightness;
|
|
347
|
+
otherData.colorTemperature = state.other.colorTemperature;
|
|
348
|
+
otherData.color = state.other.color;
|
|
349
|
+
otherData.white = state.other.white;
|
|
350
|
+
otherData.isBrightnessMixed = state.other.isBrightnessMixed;
|
|
351
|
+
otherData.isColorTemperatureMixed = state.other.isColorTemperatureMixed;
|
|
352
|
+
otherData.isColorMixed = state.other.isColorMixed;
|
|
353
|
+
otherData.isWhiteMixed = state.other.isWhiteMixed;
|
|
354
|
+
otherData.devicesCount = state.other.devicesCount;
|
|
355
|
+
otherData.devicesOn = state.other.devicesOn;
|
|
356
|
+
stateData.other = otherData;
|
|
357
|
+
const response = new spaces_response_model_2.LightingStateResponseModel();
|
|
358
|
+
response.data = stateData;
|
|
359
|
+
return response;
|
|
360
|
+
}
|
|
361
|
+
async getLightTargets(id) {
|
|
362
|
+
this.logger.debug(`Fetching light targets for space with id=${id}`);
|
|
363
|
+
const targets = await this.spaceLightingRoleService.getLightTargetsInSpace(id);
|
|
364
|
+
const response = new spaces_response_model_2.LightTargetsResponseModel();
|
|
365
|
+
response.data = targets.map((t) => {
|
|
366
|
+
const model = new spaces_response_model_2.LightTargetDataModel();
|
|
367
|
+
model.deviceId = t.deviceId;
|
|
368
|
+
model.deviceName = t.deviceName;
|
|
369
|
+
model.channelId = t.channelId;
|
|
370
|
+
model.channelName = t.channelName;
|
|
371
|
+
model.role = t.role;
|
|
372
|
+
model.priority = t.priority;
|
|
373
|
+
model.hasBrightness = t.hasBrightness;
|
|
374
|
+
model.hasColorTemp = t.hasColorTemp;
|
|
375
|
+
model.hasColor = t.hasColor;
|
|
376
|
+
return model;
|
|
377
|
+
});
|
|
378
|
+
return response;
|
|
379
|
+
}
|
|
380
|
+
async setLightingRole(id, body) {
|
|
381
|
+
this.logger.debug(`Setting lighting role for space with id=${id}`);
|
|
382
|
+
const role = await this.spaceLightingRoleService.setRole(id, body.data);
|
|
383
|
+
const response = new spaces_response_model_2.LightingRoleResponseModel();
|
|
384
|
+
response.data = role;
|
|
385
|
+
return response;
|
|
386
|
+
}
|
|
387
|
+
async bulkSetLightingRoles(id, body) {
|
|
388
|
+
this.logger.debug(`Bulk setting lighting roles for space with id=${id}`);
|
|
389
|
+
const result = await this.spaceLightingRoleService.bulkSetRoles(id, body.data.roles);
|
|
390
|
+
const resultData = new spaces_response_model_2.BulkLightingRolesResultDataModel();
|
|
391
|
+
resultData.success = result.success;
|
|
392
|
+
resultData.totalCount = result.totalCount;
|
|
393
|
+
resultData.successCount = result.successCount;
|
|
394
|
+
resultData.failureCount = result.failureCount;
|
|
395
|
+
resultData.results = result.results.map((item) => {
|
|
396
|
+
const resultItem = new spaces_response_model_2.BulkLightingRoleResultItemModel();
|
|
397
|
+
resultItem.deviceId = item.deviceId;
|
|
398
|
+
resultItem.channelId = item.channelId;
|
|
399
|
+
resultItem.success = item.success;
|
|
400
|
+
resultItem.role = item.role;
|
|
401
|
+
resultItem.error = item.error;
|
|
402
|
+
return resultItem;
|
|
403
|
+
});
|
|
404
|
+
const response = new spaces_response_model_2.BulkLightingRolesResponseModel();
|
|
405
|
+
response.data = resultData;
|
|
406
|
+
return response;
|
|
407
|
+
}
|
|
408
|
+
async applyDefaultLightingRoles(id) {
|
|
409
|
+
this.logger.debug(`Applying default lighting roles for space with id=${id}`);
|
|
410
|
+
const defaultRoles = await this.spaceLightingRoleService.inferDefaultLightingRoles(id);
|
|
411
|
+
const result = await this.spaceLightingRoleService.bulkSetRoles(id, defaultRoles);
|
|
412
|
+
const resultData = new spaces_response_model_2.BulkLightingRolesResultDataModel();
|
|
413
|
+
resultData.success = result.success;
|
|
414
|
+
resultData.totalCount = result.totalCount;
|
|
415
|
+
resultData.successCount = result.successCount;
|
|
416
|
+
resultData.failureCount = result.failureCount;
|
|
417
|
+
resultData.results = result.results.map((item) => {
|
|
418
|
+
const resultItem = new spaces_response_model_2.BulkLightingRoleResultItemModel();
|
|
419
|
+
resultItem.deviceId = item.deviceId;
|
|
420
|
+
resultItem.channelId = item.channelId;
|
|
421
|
+
resultItem.success = item.success;
|
|
422
|
+
resultItem.role = item.role;
|
|
423
|
+
resultItem.error = item.error;
|
|
424
|
+
return resultItem;
|
|
425
|
+
});
|
|
426
|
+
const response = new spaces_response_model_2.BulkLightingRolesResponseModel();
|
|
427
|
+
response.data = resultData;
|
|
428
|
+
return response;
|
|
429
|
+
}
|
|
430
|
+
async deleteLightingRole(id, deviceId, channelId) {
|
|
431
|
+
this.logger.debug(`Deleting lighting role for space=${id} device=${deviceId} channel=${channelId}`);
|
|
432
|
+
await this.spaceLightingRoleService.deleteRole(id, deviceId, channelId);
|
|
433
|
+
this.logger.debug(`Successfully deleted lighting role for device=${deviceId} channel=${channelId}`);
|
|
434
|
+
}
|
|
435
|
+
async getClimateTargets(id) {
|
|
436
|
+
this.logger.debug(`Fetching climate targets for space with id=${id}`);
|
|
437
|
+
const targets = await this.spaceClimateRoleService.getClimateTargetsInSpace(id);
|
|
438
|
+
const response = new spaces_response_model_2.ClimateTargetsResponseModel();
|
|
439
|
+
response.data = targets.map((t) => {
|
|
440
|
+
const model = new spaces_response_model_2.ClimateTargetDataModel();
|
|
441
|
+
model.deviceId = t.deviceId;
|
|
442
|
+
model.deviceName = t.deviceName;
|
|
443
|
+
model.deviceCategory = t.deviceCategory;
|
|
444
|
+
model.channelId = t.channelId;
|
|
445
|
+
model.channelName = t.channelName;
|
|
446
|
+
model.channelCategory = t.channelCategory;
|
|
447
|
+
model.role = t.role;
|
|
448
|
+
model.priority = t.priority;
|
|
449
|
+
model.hasTemperature = t.hasTemperature;
|
|
450
|
+
model.hasHumidity = t.hasHumidity;
|
|
451
|
+
model.hasAirQuality = t.hasAirQuality;
|
|
452
|
+
model.hasAirParticulate = t.hasAirParticulate;
|
|
453
|
+
model.hasCarbonDioxide = t.hasCarbonDioxide;
|
|
454
|
+
model.hasVolatileOrganicCompounds = t.hasVolatileOrganicCompounds;
|
|
455
|
+
model.hasPressure = t.hasPressure;
|
|
456
|
+
model.hasMode = t.hasMode;
|
|
457
|
+
return model;
|
|
458
|
+
});
|
|
459
|
+
return response;
|
|
460
|
+
}
|
|
461
|
+
async setClimateRole(id, body) {
|
|
462
|
+
this.logger.debug(`Setting climate role for space with id=${id}`);
|
|
463
|
+
const role = await this.spaceClimateRoleService.setRole(id, body.data);
|
|
464
|
+
const response = new spaces_response_model_2.ClimateRoleResponseModel();
|
|
465
|
+
response.data = role;
|
|
466
|
+
return response;
|
|
467
|
+
}
|
|
468
|
+
async bulkSetClimateRoles(id, body) {
|
|
469
|
+
this.logger.debug(`Bulk setting climate roles for space with id=${id}`);
|
|
470
|
+
const result = await this.spaceClimateRoleService.bulkSetRoles(id, body.data.roles);
|
|
471
|
+
const resultData = new spaces_response_model_2.BulkClimateRolesResultDataModel();
|
|
472
|
+
resultData.success = result.success;
|
|
473
|
+
resultData.totalCount = result.totalCount;
|
|
474
|
+
resultData.successCount = result.successCount;
|
|
475
|
+
resultData.failureCount = result.failureCount;
|
|
476
|
+
resultData.results = result.results.map((item) => {
|
|
477
|
+
const resultItem = new spaces_response_model_2.BulkClimateRoleResultItemModel();
|
|
478
|
+
resultItem.deviceId = item.deviceId;
|
|
479
|
+
resultItem.channelId = item.channelId;
|
|
480
|
+
resultItem.success = item.success;
|
|
481
|
+
resultItem.role = item.role;
|
|
482
|
+
resultItem.error = item.error;
|
|
483
|
+
return resultItem;
|
|
484
|
+
});
|
|
485
|
+
const response = new spaces_response_model_2.BulkClimateRolesResponseModel();
|
|
486
|
+
response.data = resultData;
|
|
487
|
+
return response;
|
|
488
|
+
}
|
|
489
|
+
async applyDefaultClimateRoles(id) {
|
|
490
|
+
this.logger.debug(`Applying default climate roles for space with id=${id}`);
|
|
491
|
+
const defaultRoles = await this.spaceClimateRoleService.inferDefaultClimateRoles(id);
|
|
492
|
+
const result = await this.spaceClimateRoleService.bulkSetRoles(id, defaultRoles);
|
|
493
|
+
const resultData = new spaces_response_model_2.BulkClimateRolesResultDataModel();
|
|
494
|
+
resultData.success = result.success;
|
|
495
|
+
resultData.totalCount = result.totalCount;
|
|
496
|
+
resultData.successCount = result.successCount;
|
|
497
|
+
resultData.failureCount = result.failureCount;
|
|
498
|
+
resultData.results = result.results.map((item) => {
|
|
499
|
+
const resultItem = new spaces_response_model_2.BulkClimateRoleResultItemModel();
|
|
500
|
+
resultItem.deviceId = item.deviceId;
|
|
501
|
+
resultItem.channelId = item.channelId;
|
|
502
|
+
resultItem.success = item.success;
|
|
503
|
+
resultItem.role = item.role;
|
|
504
|
+
resultItem.error = item.error;
|
|
505
|
+
return resultItem;
|
|
506
|
+
});
|
|
507
|
+
const response = new spaces_response_model_2.BulkClimateRolesResponseModel();
|
|
508
|
+
response.data = resultData;
|
|
509
|
+
return response;
|
|
510
|
+
}
|
|
511
|
+
async deleteClimateRole(id, deviceId, channelId) {
|
|
512
|
+
this.logger.debug(`Deleting climate role for space=${id} device=${deviceId} channel=${channelId ?? 'null'}`);
|
|
513
|
+
await this.spaceClimateRoleService.deleteRole(id, deviceId, channelId);
|
|
514
|
+
this.logger.debug(`Successfully deleted climate role for device=${deviceId} channel=${channelId ?? 'null'}`);
|
|
515
|
+
}
|
|
516
|
+
async getCoversState(id) {
|
|
517
|
+
this.logger.debug(`Fetching covers state for space with id=${id}`);
|
|
518
|
+
const state = await this.spaceIntentService.getCoversState(id);
|
|
519
|
+
if (!state) {
|
|
520
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Space not found');
|
|
521
|
+
}
|
|
522
|
+
const response = new spaces_response_model_2.CoversStateResponseModel();
|
|
523
|
+
response.data = spaces_response_model_2.CoversStateDataModel.fromState(state);
|
|
524
|
+
return response;
|
|
525
|
+
}
|
|
526
|
+
async executeCoversIntent(id, body) {
|
|
527
|
+
this.logger.debug(`Executing covers intent for space with id=${id}`);
|
|
528
|
+
const result = await this.spaceIntentService.executeCoversIntent(id, body.data);
|
|
529
|
+
if (!result) {
|
|
530
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Space not found');
|
|
531
|
+
}
|
|
532
|
+
const resultData = new spaces_response_model_2.CoversIntentResultDataModel();
|
|
533
|
+
resultData.success = result.success;
|
|
534
|
+
resultData.affectedDevices = result.affectedDevices;
|
|
535
|
+
resultData.failedDevices = result.failedDevices;
|
|
536
|
+
resultData.skippedOfflineDevices = result.skippedOfflineDevices;
|
|
537
|
+
resultData.offlineDeviceIds = result.offlineDeviceIds;
|
|
538
|
+
resultData.failedTargets = result.failedTargets ?? null;
|
|
539
|
+
resultData.newPosition = result.newPosition;
|
|
540
|
+
const response = new spaces_response_model_2.CoversIntentResponseModel();
|
|
541
|
+
response.data = resultData;
|
|
542
|
+
return response;
|
|
543
|
+
}
|
|
544
|
+
async getCoversTargets(id) {
|
|
545
|
+
this.logger.debug(`Fetching covers targets for space with id=${id}`);
|
|
546
|
+
const targets = await this.spaceCoversRoleService.getCoversTargetsInSpace(id);
|
|
547
|
+
const response = new spaces_response_model_2.CoversTargetsResponseModel();
|
|
548
|
+
response.data = targets.map((t) => {
|
|
549
|
+
const model = new spaces_response_model_2.CoversTargetDataModel();
|
|
550
|
+
model.deviceId = t.deviceId;
|
|
551
|
+
model.deviceName = t.deviceName;
|
|
552
|
+
model.channelId = t.channelId;
|
|
553
|
+
model.channelName = t.channelName;
|
|
554
|
+
model.role = t.role;
|
|
555
|
+
model.priority = t.priority;
|
|
556
|
+
model.hasPosition = t.hasPosition;
|
|
557
|
+
model.hasCommand = t.hasCommand;
|
|
558
|
+
model.hasTilt = t.hasTilt;
|
|
559
|
+
model.coverType = t.coverType;
|
|
560
|
+
return model;
|
|
561
|
+
});
|
|
562
|
+
return response;
|
|
563
|
+
}
|
|
564
|
+
async setCoversRole(id, body) {
|
|
565
|
+
this.logger.debug(`Setting covers role for space with id=${id}`);
|
|
566
|
+
const role = await this.spaceCoversRoleService.setRole(id, body.data);
|
|
567
|
+
const response = new spaces_response_model_2.CoversRoleResponseModel();
|
|
568
|
+
response.data = role;
|
|
569
|
+
return response;
|
|
570
|
+
}
|
|
571
|
+
async bulkSetCoversRoles(id, body) {
|
|
572
|
+
this.logger.debug(`Bulk setting covers roles for space with id=${id}`);
|
|
573
|
+
const result = await this.spaceCoversRoleService.bulkSetRoles(id, body.data.roles);
|
|
574
|
+
const resultData = new spaces_response_model_2.BulkCoversRolesResultDataModel();
|
|
575
|
+
resultData.success = result.success;
|
|
576
|
+
resultData.totalCount = result.totalCount;
|
|
577
|
+
resultData.successCount = result.successCount;
|
|
578
|
+
resultData.failureCount = result.failureCount;
|
|
579
|
+
resultData.results = result.results.map((item) => {
|
|
580
|
+
const resultItem = new spaces_response_model_2.BulkCoversRoleResultItemModel();
|
|
581
|
+
resultItem.deviceId = item.deviceId;
|
|
582
|
+
resultItem.channelId = item.channelId;
|
|
583
|
+
resultItem.success = item.success;
|
|
584
|
+
resultItem.role = item.role;
|
|
585
|
+
resultItem.error = item.error;
|
|
586
|
+
return resultItem;
|
|
587
|
+
});
|
|
588
|
+
const response = new spaces_response_model_2.BulkCoversRolesResponseModel();
|
|
589
|
+
response.data = resultData;
|
|
590
|
+
return response;
|
|
591
|
+
}
|
|
592
|
+
async applyDefaultCoversRoles(id) {
|
|
593
|
+
this.logger.debug(`Applying default covers roles for space with id=${id}`);
|
|
594
|
+
const defaultRoles = await this.spaceCoversRoleService.inferDefaultCoversRoles(id);
|
|
595
|
+
const result = await this.spaceCoversRoleService.bulkSetRoles(id, defaultRoles);
|
|
596
|
+
const resultData = new spaces_response_model_2.BulkCoversRolesResultDataModel();
|
|
597
|
+
resultData.success = result.success;
|
|
598
|
+
resultData.totalCount = result.totalCount;
|
|
599
|
+
resultData.successCount = result.successCount;
|
|
600
|
+
resultData.failureCount = result.failureCount;
|
|
601
|
+
resultData.results = result.results.map((item) => {
|
|
602
|
+
const resultItem = new spaces_response_model_2.BulkCoversRoleResultItemModel();
|
|
603
|
+
resultItem.deviceId = item.deviceId;
|
|
604
|
+
resultItem.channelId = item.channelId;
|
|
605
|
+
resultItem.success = item.success;
|
|
606
|
+
resultItem.role = item.role;
|
|
607
|
+
resultItem.error = item.error;
|
|
608
|
+
return resultItem;
|
|
609
|
+
});
|
|
610
|
+
const response = new spaces_response_model_2.BulkCoversRolesResponseModel();
|
|
611
|
+
response.data = resultData;
|
|
612
|
+
return response;
|
|
613
|
+
}
|
|
614
|
+
async deleteCoversRole(id, deviceId, channelId) {
|
|
615
|
+
this.logger.debug(`Deleting covers role for space=${id} device=${deviceId} channel=${channelId}`);
|
|
616
|
+
await this.spaceCoversRoleService.deleteRole(id, deviceId, channelId);
|
|
617
|
+
this.logger.debug(`Successfully deleted covers role for device=${deviceId} channel=${channelId}`);
|
|
618
|
+
}
|
|
619
|
+
async getSensorState(id) {
|
|
620
|
+
this.logger.debug(`Fetching sensor state for space with id=${id}`);
|
|
621
|
+
const state = await this.spaceSensorStateService.getSensorState(id);
|
|
622
|
+
if (!state) {
|
|
623
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Space not found');
|
|
624
|
+
}
|
|
625
|
+
const stateData = new spaces_response_model_2.SensorStateDataModel();
|
|
626
|
+
stateData.hasSensors = state.hasSensors;
|
|
627
|
+
stateData.totalSensors = state.totalSensors;
|
|
628
|
+
stateData.sensorsByRole = state.sensorsByRole;
|
|
629
|
+
if (state.environment) {
|
|
630
|
+
const envData = new spaces_response_model_2.EnvironmentSummaryDataModel();
|
|
631
|
+
envData.averageTemperature = state.environment.averageTemperature;
|
|
632
|
+
envData.averageHumidity = state.environment.averageHumidity;
|
|
633
|
+
envData.averagePressure = state.environment.averagePressure;
|
|
634
|
+
envData.averageIlluminance = state.environment.averageIlluminance;
|
|
635
|
+
stateData.environment = envData;
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
stateData.environment = null;
|
|
639
|
+
}
|
|
640
|
+
stateData.safetyAlerts = state.safetyAlerts.map((alert) => {
|
|
641
|
+
const alertData = new spaces_response_model_2.SafetyAlertDataModel();
|
|
642
|
+
alertData.channelCategory = alert.channelCategory;
|
|
643
|
+
alertData.deviceId = alert.deviceId;
|
|
644
|
+
alertData.deviceName = alert.deviceName;
|
|
645
|
+
alertData.channelId = alert.channelId;
|
|
646
|
+
alertData.triggered = alert.triggered;
|
|
647
|
+
return alertData;
|
|
648
|
+
});
|
|
649
|
+
stateData.hasSafetyAlert = state.hasSafetyAlert;
|
|
650
|
+
stateData.motionDetected = state.motionDetected;
|
|
651
|
+
stateData.occupancyDetected = state.occupancyDetected;
|
|
652
|
+
stateData.readings = state.readings.map((roleReadings) => {
|
|
653
|
+
const roleData = new spaces_response_model_2.SensorRoleReadingsDataModel();
|
|
654
|
+
roleData.role = roleReadings.role;
|
|
655
|
+
roleData.sensorsCount = roleReadings.sensorsCount;
|
|
656
|
+
roleData.readings = roleReadings.readings.map((reading) => {
|
|
657
|
+
const readingData = new spaces_response_model_2.SensorReadingDataModel();
|
|
658
|
+
readingData.deviceId = reading.deviceId;
|
|
659
|
+
readingData.deviceName = reading.deviceName;
|
|
660
|
+
readingData.channelId = reading.channelId;
|
|
661
|
+
readingData.channelName = reading.channelName;
|
|
662
|
+
readingData.channelCategory = reading.channelCategory;
|
|
663
|
+
readingData.propertyId = reading.propertyId;
|
|
664
|
+
readingData.value = reading.value;
|
|
665
|
+
readingData.unit = reading.unit;
|
|
666
|
+
readingData.role = reading.role;
|
|
667
|
+
readingData.updatedAt = reading.updatedAt;
|
|
668
|
+
readingData.trend = reading.trend;
|
|
669
|
+
readingData.additionalReadings = reading.additionalReadings.map((ar) => {
|
|
670
|
+
const arData = new spaces_response_model_2.SensorAdditionalReadingDataModel();
|
|
671
|
+
arData.propertyId = ar.propertyId;
|
|
672
|
+
arData.propertyCategory = ar.propertyCategory;
|
|
673
|
+
arData.value = ar.value;
|
|
674
|
+
arData.unit = ar.unit;
|
|
675
|
+
arData.updatedAt = ar.updatedAt;
|
|
676
|
+
arData.trend = ar.trend;
|
|
677
|
+
return arData;
|
|
678
|
+
});
|
|
679
|
+
return readingData;
|
|
680
|
+
});
|
|
681
|
+
return roleData;
|
|
682
|
+
});
|
|
683
|
+
const response = new spaces_response_model_2.SensorStateResponseModel();
|
|
684
|
+
response.data = stateData;
|
|
685
|
+
return response;
|
|
686
|
+
}
|
|
687
|
+
async getSensorTargets(id) {
|
|
688
|
+
this.logger.debug(`Fetching sensor targets for space with id=${id}`);
|
|
689
|
+
const targets = await this.spaceSensorRoleService.getSensorTargetsInSpace(id);
|
|
690
|
+
const response = new spaces_response_model_2.SensorTargetsResponseModel();
|
|
691
|
+
response.data = targets.map((t) => {
|
|
692
|
+
const model = new spaces_response_model_2.SensorTargetDataModel();
|
|
693
|
+
model.deviceId = t.deviceId;
|
|
694
|
+
model.deviceName = t.deviceName;
|
|
695
|
+
model.deviceCategory = t.deviceCategory;
|
|
696
|
+
model.channelId = t.channelId;
|
|
697
|
+
model.channelName = t.channelName;
|
|
698
|
+
model.channelCategory = t.channelCategory;
|
|
699
|
+
model.role = t.role;
|
|
700
|
+
model.priority = t.priority;
|
|
701
|
+
return model;
|
|
702
|
+
});
|
|
703
|
+
return response;
|
|
704
|
+
}
|
|
705
|
+
async setSensorRole(id, body) {
|
|
706
|
+
this.logger.debug(`Setting sensor role for space with id=${id}`);
|
|
707
|
+
const role = await this.spaceSensorRoleService.setRole(id, body.data);
|
|
708
|
+
const response = new spaces_response_model_2.SensorRoleResponseModel();
|
|
709
|
+
response.data = role;
|
|
710
|
+
return response;
|
|
711
|
+
}
|
|
712
|
+
async bulkSetSensorRoles(id, body) {
|
|
713
|
+
this.logger.debug(`Bulk setting sensor roles for space with id=${id}`);
|
|
714
|
+
const result = await this.spaceSensorRoleService.bulkSetRoles(id, body.data.roles);
|
|
715
|
+
const resultData = new spaces_response_model_2.BulkSensorRolesResultDataModel();
|
|
716
|
+
resultData.success = result.success;
|
|
717
|
+
resultData.totalCount = result.totalCount;
|
|
718
|
+
resultData.successCount = result.successCount;
|
|
719
|
+
resultData.failureCount = result.failureCount;
|
|
720
|
+
resultData.results = result.results.map((item) => {
|
|
721
|
+
const resultItem = new spaces_response_model_2.BulkSensorRoleResultItemModel();
|
|
722
|
+
resultItem.deviceId = item.deviceId;
|
|
723
|
+
resultItem.channelId = item.channelId;
|
|
724
|
+
resultItem.success = item.success;
|
|
725
|
+
resultItem.role = item.role;
|
|
726
|
+
resultItem.error = item.error;
|
|
727
|
+
return resultItem;
|
|
728
|
+
});
|
|
729
|
+
const response = new spaces_response_model_2.BulkSensorRolesResponseModel();
|
|
730
|
+
response.data = resultData;
|
|
731
|
+
return response;
|
|
732
|
+
}
|
|
733
|
+
async applyDefaultSensorRoles(id) {
|
|
734
|
+
this.logger.debug(`Applying default sensor roles for space with id=${id}`);
|
|
735
|
+
const defaultRoles = await this.spaceSensorRoleService.inferDefaultSensorRoles(id);
|
|
736
|
+
const result = await this.spaceSensorRoleService.bulkSetRoles(id, defaultRoles);
|
|
737
|
+
const resultData = new spaces_response_model_2.BulkSensorRolesResultDataModel();
|
|
738
|
+
resultData.success = result.success;
|
|
739
|
+
resultData.totalCount = result.totalCount;
|
|
740
|
+
resultData.successCount = result.successCount;
|
|
741
|
+
resultData.failureCount = result.failureCount;
|
|
742
|
+
resultData.results = result.results.map((item) => {
|
|
743
|
+
const resultItem = new spaces_response_model_2.BulkSensorRoleResultItemModel();
|
|
744
|
+
resultItem.deviceId = item.deviceId;
|
|
745
|
+
resultItem.channelId = item.channelId;
|
|
746
|
+
resultItem.success = item.success;
|
|
747
|
+
resultItem.role = item.role;
|
|
748
|
+
resultItem.error = item.error;
|
|
749
|
+
return resultItem;
|
|
750
|
+
});
|
|
751
|
+
const response = new spaces_response_model_2.BulkSensorRolesResponseModel();
|
|
752
|
+
response.data = resultData;
|
|
753
|
+
return response;
|
|
754
|
+
}
|
|
755
|
+
async deleteSensorRole(id, deviceId, channelId) {
|
|
756
|
+
this.logger.debug(`Deleting sensor role for space=${id} device=${deviceId} channel=${channelId}`);
|
|
757
|
+
await this.spaceSensorRoleService.deleteRole(id, deviceId, channelId);
|
|
758
|
+
this.logger.debug(`Successfully deleted sensor role for device=${deviceId} channel=${channelId}`);
|
|
759
|
+
}
|
|
760
|
+
async getDerivedMediaEndpoints(id) {
|
|
761
|
+
this.logger.debug(`Fetching derived media endpoints for space with id=${id}`);
|
|
762
|
+
const result = await this.derivedMediaEndpointService.buildEndpointsForSpace(id);
|
|
763
|
+
const response = new derived_media_endpoint_model_1.DerivedMediaEndpointsResponseModel();
|
|
764
|
+
response.data = result;
|
|
765
|
+
return response;
|
|
766
|
+
}
|
|
767
|
+
async getSuggestion(id) {
|
|
768
|
+
this.logger.debug(`Getting suggestion for space with id=${id}`);
|
|
769
|
+
const suggestion = await this.spaceSuggestionService.getSuggestion(id);
|
|
770
|
+
const response = new spaces_response_model_2.SuggestionResponseModel();
|
|
771
|
+
if (suggestion) {
|
|
772
|
+
const suggestionData = new spaces_response_model_2.SuggestionDataModel();
|
|
773
|
+
suggestionData.type = suggestion.type;
|
|
774
|
+
suggestionData.title = suggestion.title;
|
|
775
|
+
suggestionData.reason = suggestion.reason;
|
|
776
|
+
suggestionData.intentType = suggestion.intentType;
|
|
777
|
+
suggestionData.intentMode = suggestion.intentMode;
|
|
778
|
+
response.data = suggestionData;
|
|
779
|
+
}
|
|
780
|
+
else {
|
|
781
|
+
response.data = null;
|
|
782
|
+
}
|
|
783
|
+
return response;
|
|
784
|
+
}
|
|
785
|
+
async submitSuggestionFeedback(id, body) {
|
|
786
|
+
this.logger.debug(`Submitting suggestion feedback for space with id=${id}`);
|
|
787
|
+
const result = await this.spaceSuggestionService.recordFeedback(id, body.data.suggestionType, body.data.feedback);
|
|
788
|
+
const resultData = new spaces_response_model_2.SuggestionFeedbackResultDataModel();
|
|
789
|
+
resultData.success = result.success;
|
|
790
|
+
resultData.intentExecuted = result.intentExecuted;
|
|
791
|
+
const response = new spaces_response_model_2.SuggestionFeedbackResponseModel();
|
|
792
|
+
response.data = resultData;
|
|
793
|
+
return response;
|
|
794
|
+
}
|
|
795
|
+
async captureContextSnapshot(id) {
|
|
796
|
+
this.logger.debug(`Capturing context snapshot for space with id=${id}`);
|
|
797
|
+
const snapshot = await this.spaceContextSnapshotService.captureSnapshot(id);
|
|
798
|
+
if (!snapshot) {
|
|
799
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Space not found');
|
|
800
|
+
}
|
|
801
|
+
const lightingSummary = new spaces_response_model_2.LightingSummaryDataModel();
|
|
802
|
+
lightingSummary.totalLights = snapshot.lighting.summary.totalLights;
|
|
803
|
+
lightingSummary.lightsOn = snapshot.lighting.summary.lightsOn;
|
|
804
|
+
lightingSummary.averageBrightness = snapshot.lighting.summary.averageBrightness;
|
|
805
|
+
const lights = snapshot.lighting.lights.map((light) => {
|
|
806
|
+
const lightData = new spaces_response_model_2.LightStateSnapshotDataModel();
|
|
807
|
+
lightData.deviceId = light.deviceId;
|
|
808
|
+
lightData.deviceName = light.deviceName;
|
|
809
|
+
lightData.channelId = light.channelId;
|
|
810
|
+
lightData.channelName = light.channelName;
|
|
811
|
+
lightData.role = light.role;
|
|
812
|
+
lightData.isOn = light.isOn;
|
|
813
|
+
lightData.brightness = light.brightness;
|
|
814
|
+
lightData.colorTemperature = light.colorTemperature;
|
|
815
|
+
lightData.color = light.color;
|
|
816
|
+
return lightData;
|
|
817
|
+
});
|
|
818
|
+
const lightingContext = new spaces_response_model_2.LightingContextDataModel();
|
|
819
|
+
lightingContext.summary = lightingSummary;
|
|
820
|
+
lightingContext.lights = lights;
|
|
821
|
+
const climateState = new spaces_response_model_2.ClimateStateDataModel();
|
|
822
|
+
climateState.hasClimate = snapshot.climate.hasClimate;
|
|
823
|
+
climateState.mode = snapshot.climate.mode;
|
|
824
|
+
climateState.currentTemperature = snapshot.climate.currentTemperature;
|
|
825
|
+
climateState.currentHumidity = snapshot.climate.currentHumidity;
|
|
826
|
+
climateState.heatingSetpoint = snapshot.climate.heatingSetpoint;
|
|
827
|
+
climateState.coolingSetpoint = snapshot.climate.coolingSetpoint;
|
|
828
|
+
climateState.minSetpoint = snapshot.climate.minSetpoint;
|
|
829
|
+
climateState.maxSetpoint = snapshot.climate.maxSetpoint;
|
|
830
|
+
climateState.supportsHeating = snapshot.climate.supportsHeating;
|
|
831
|
+
climateState.supportsCooling = snapshot.climate.supportsCooling;
|
|
832
|
+
climateState.isHeating = snapshot.climate.isHeating;
|
|
833
|
+
climateState.isCooling = snapshot.climate.isCooling;
|
|
834
|
+
climateState.isMixed = snapshot.climate.isMixed;
|
|
835
|
+
climateState.devicesCount = snapshot.climate.devicesCount;
|
|
836
|
+
const snapshotData = new spaces_response_model_2.ContextSnapshotDataModel();
|
|
837
|
+
snapshotData.spaceId = snapshot.spaceId;
|
|
838
|
+
snapshotData.spaceName = snapshot.spaceName;
|
|
839
|
+
snapshotData.capturedAt = snapshot.capturedAt;
|
|
840
|
+
snapshotData.lighting = lightingContext;
|
|
841
|
+
snapshotData.climate = climateState;
|
|
842
|
+
const response = new spaces_response_model_2.ContextSnapshotResponseModel();
|
|
843
|
+
response.data = snapshotData;
|
|
844
|
+
return response;
|
|
845
|
+
}
|
|
846
|
+
async getUndoState(id) {
|
|
847
|
+
this.logger.debug(`Fetching undo state for space with id=${id}`);
|
|
848
|
+
await this.spacesService.getOneOrThrow(id);
|
|
849
|
+
const undoEntry = this.spaceUndoHistoryService.peekUndoEntry(id);
|
|
850
|
+
const stateData = new spaces_response_model_2.UndoStateDataModel();
|
|
851
|
+
if (undoEntry) {
|
|
852
|
+
const ttlMs = this.spaceUndoHistoryService.getEntryTtlMs();
|
|
853
|
+
const expiresAt = new Date(undoEntry.capturedAt.getTime() + ttlMs);
|
|
854
|
+
const expiresInMs = expiresAt.getTime() - Date.now();
|
|
855
|
+
const expiresInSeconds = Math.max(0, Math.floor(expiresInMs / 1000));
|
|
856
|
+
stateData.canUndo = true;
|
|
857
|
+
stateData.actionDescription = undoEntry.actionDescription;
|
|
858
|
+
stateData.intentCategory = undoEntry.intentCategory;
|
|
859
|
+
stateData.capturedAt = undoEntry.capturedAt;
|
|
860
|
+
stateData.expiresInSeconds = expiresInSeconds;
|
|
861
|
+
}
|
|
862
|
+
else {
|
|
863
|
+
stateData.canUndo = false;
|
|
864
|
+
stateData.actionDescription = null;
|
|
865
|
+
stateData.intentCategory = null;
|
|
866
|
+
stateData.capturedAt = null;
|
|
867
|
+
stateData.expiresInSeconds = null;
|
|
868
|
+
}
|
|
869
|
+
const response = new spaces_response_model_2.UndoStateResponseModel();
|
|
870
|
+
response.data = stateData;
|
|
871
|
+
return response;
|
|
872
|
+
}
|
|
873
|
+
async executeUndo(id) {
|
|
874
|
+
this.logger.debug(`Executing undo for space with id=${id}`);
|
|
875
|
+
await this.spacesService.getOneOrThrow(id);
|
|
876
|
+
const result = await this.spaceUndoHistoryService.executeUndo(id);
|
|
877
|
+
const resultData = new spaces_response_model_2.UndoResultDataModel();
|
|
878
|
+
resultData.success = result.success;
|
|
879
|
+
resultData.restoredDevices = result.restoredDevices;
|
|
880
|
+
resultData.failedDevices = result.failedDevices;
|
|
881
|
+
resultData.message = result.message;
|
|
882
|
+
const response = new spaces_response_model_2.UndoResultResponseModel();
|
|
883
|
+
response.data = resultData;
|
|
884
|
+
return response;
|
|
885
|
+
}
|
|
886
|
+
async getMediaActivityBindings(id) {
|
|
887
|
+
this.logger.debug(`Fetching media activity bindings for space with id=${id}`);
|
|
888
|
+
const bindings = await this.spaceMediaActivityBindingService.findBySpace(id);
|
|
889
|
+
const response = new media_activity_binding_model_1.MediaActivityBindingsResponseModel();
|
|
890
|
+
response.data = bindings;
|
|
891
|
+
return response;
|
|
892
|
+
}
|
|
893
|
+
async applyDefaultMediaActivityBindings(id) {
|
|
894
|
+
this.logger.debug(`Applying default media activity bindings for space=${id}`);
|
|
895
|
+
const bindings = await this.spaceMediaActivityBindingService.applyDefaults(id);
|
|
896
|
+
const response = new media_activity_binding_model_1.MediaActivityBindingsResponseModel();
|
|
897
|
+
response.data = bindings;
|
|
898
|
+
return response;
|
|
899
|
+
}
|
|
900
|
+
async validateMediaActivityBindings(id) {
|
|
901
|
+
this.logger.debug(`Validating media activity bindings for space=${id}`);
|
|
902
|
+
const reports = await this.spaceMediaActivityBindingService.validateBindings(id);
|
|
903
|
+
const data = reports.map((r) => {
|
|
904
|
+
const report = new media_activity_binding_model_1.BindingValidationReportModel();
|
|
905
|
+
report.activityKey = r.activityKey;
|
|
906
|
+
report.bindingId = r.bindingId;
|
|
907
|
+
report.valid = r.valid;
|
|
908
|
+
report.issues = r.issues;
|
|
909
|
+
return report;
|
|
910
|
+
});
|
|
911
|
+
const response = new media_activity_binding_model_1.BindingValidationResponseModel();
|
|
912
|
+
response.data = data;
|
|
913
|
+
return response;
|
|
914
|
+
}
|
|
915
|
+
async getMediaActivityBinding(id, bindingId) {
|
|
916
|
+
this.logger.debug(`Fetching media activity binding id=${bindingId} for space=${id}`);
|
|
917
|
+
const binding = await this.spaceMediaActivityBindingService.getOneOrThrowForSpace(id, bindingId);
|
|
918
|
+
const response = new media_activity_binding_model_1.MediaActivityBindingResponseModel();
|
|
919
|
+
response.data = binding;
|
|
920
|
+
return response;
|
|
921
|
+
}
|
|
922
|
+
async createMediaActivityBinding(id, body) {
|
|
923
|
+
this.logger.debug(`Creating media activity binding for space=${id} key=${body.data.activityKey}`);
|
|
924
|
+
const binding = await this.spaceMediaActivityBindingService.create(id, body.data);
|
|
925
|
+
const response = new media_activity_binding_model_1.MediaActivityBindingResponseModel();
|
|
926
|
+
response.data = binding;
|
|
927
|
+
return response;
|
|
928
|
+
}
|
|
929
|
+
async updateMediaActivityBinding(id, bindingId, body) {
|
|
930
|
+
this.logger.debug(`Updating media activity binding id=${bindingId} for space=${id}`);
|
|
931
|
+
const binding = await this.spaceMediaActivityBindingService.updateForSpace(id, bindingId, body.data);
|
|
932
|
+
const response = new media_activity_binding_model_1.MediaActivityBindingResponseModel();
|
|
933
|
+
response.data = binding;
|
|
934
|
+
return response;
|
|
935
|
+
}
|
|
936
|
+
async deleteMediaActivityBinding(id, bindingId) {
|
|
937
|
+
this.logger.debug(`Deleting media activity binding id=${bindingId} for space=${id}`);
|
|
938
|
+
await this.spaceMediaActivityBindingService.deleteForSpace(id, bindingId);
|
|
939
|
+
}
|
|
940
|
+
async getActiveMediaActivity(id) {
|
|
941
|
+
this.logger.debug(`Fetching active media activity for space=${id}`);
|
|
942
|
+
const record = await this.spaceMediaActivityService.getActive(id);
|
|
943
|
+
const response = new media_activity_model_1.ActiveMediaActivityResponseModel();
|
|
944
|
+
response.data = record;
|
|
945
|
+
return response;
|
|
946
|
+
}
|
|
947
|
+
async previewMediaActivity(id, activityKey) {
|
|
948
|
+
this.logger.debug(`Dry-run preview media activity=${activityKey} for space=${id}`);
|
|
949
|
+
const preview = await this.spaceMediaActivityService.preview(id, activityKey);
|
|
950
|
+
const response = new media_activity_model_1.MediaActivityDryRunPreviewResponseModel();
|
|
951
|
+
response.data = preview;
|
|
952
|
+
return response;
|
|
953
|
+
}
|
|
954
|
+
async activateMediaActivity(id, activityKey) {
|
|
955
|
+
this.logger.debug(`Activating media activity=${activityKey} for space=${id}`);
|
|
956
|
+
const result = await this.spaceMediaActivityService.activate(id, activityKey);
|
|
957
|
+
const response = new media_activity_model_1.MediaActivityActivationResponseModel();
|
|
958
|
+
response.data = result;
|
|
959
|
+
return response;
|
|
960
|
+
}
|
|
961
|
+
async deactivateMediaActivity(id) {
|
|
962
|
+
this.logger.debug(`Deactivating media activity for space=${id}`);
|
|
963
|
+
const result = await this.spaceMediaActivityService.deactivate(id);
|
|
964
|
+
const response = new media_activity_model_1.MediaActivityActivationResponseModel();
|
|
965
|
+
response.data = result;
|
|
966
|
+
return response;
|
|
967
|
+
}
|
|
968
|
+
async triggerSuggestionHeartbeat() {
|
|
969
|
+
this.logger.debug('Manually triggering suggestion heartbeat cycle');
|
|
970
|
+
await this.spaceSuggestionHeartbeatService.runCycle();
|
|
971
|
+
return { data: { triggered: true } };
|
|
972
|
+
}
|
|
973
|
+
async emitTestSuggestion(body) {
|
|
974
|
+
let space;
|
|
975
|
+
if (body?.data?.space_id) {
|
|
976
|
+
space = await this.spacesService.findOne(body.data.space_id);
|
|
977
|
+
}
|
|
978
|
+
if (!space) {
|
|
979
|
+
const spaces = await this.spacesService.findAll();
|
|
980
|
+
space = spaces[0];
|
|
981
|
+
}
|
|
982
|
+
if (!space) {
|
|
983
|
+
return { data: { emitted: false } };
|
|
984
|
+
}
|
|
985
|
+
const event = {
|
|
986
|
+
id: (0, uuid_1.v4)(),
|
|
987
|
+
type: spaces_home_control_constants_1.SuggestionType.LIGHTING_RELAX,
|
|
988
|
+
title: 'Relax lighting',
|
|
989
|
+
reason: 'Evening time — switch to a calmer lighting mode',
|
|
990
|
+
intent_type: 'set_mode',
|
|
991
|
+
intent_mode: 'relax',
|
|
992
|
+
space_id: space.id,
|
|
993
|
+
created_at: new Date().toISOString(),
|
|
994
|
+
expires_at: new Date(Date.now() + spaces_home_control_constants_1.SUGGESTION_EXPIRY_MS).toISOString(),
|
|
995
|
+
};
|
|
996
|
+
this.eventEmitter.emit(spaces_home_control_constants_1.EventType.SUGGESTION_CREATED, event);
|
|
997
|
+
this.logger.debug(`Test suggestion emitted for space id=${space.id}`);
|
|
998
|
+
return { data: { emitted: true, space_id: space.id } };
|
|
999
|
+
}
|
|
1000
|
+
};
|
|
1001
|
+
exports.SpacesDomainController = SpacesDomainController;
|
|
1002
|
+
__decorate([
|
|
1003
|
+
(0, common_1.Get)('propose'),
|
|
1004
|
+
(0, swagger_1.ApiOperation)({
|
|
1005
|
+
operationId: 'get-spaces-module-propose',
|
|
1006
|
+
summary: 'Propose spaces from device names',
|
|
1007
|
+
description: 'Analyzes device names and proposes space (room) names based on common patterns. ' +
|
|
1008
|
+
'Returns a list of proposed spaces with matching device IDs. Requires owner or admin role.',
|
|
1009
|
+
}),
|
|
1010
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.ProposedSpacesResponseModel, 'Returns proposed spaces'),
|
|
1011
|
+
__metadata("design:type", Function),
|
|
1012
|
+
__metadata("design:paramtypes", []),
|
|
1013
|
+
__metadata("design:returntype", Promise)
|
|
1014
|
+
], SpacesDomainController.prototype, "proposeSpaces", null);
|
|
1015
|
+
__decorate([
|
|
1016
|
+
(0, common_1.Get)('categories/templates'),
|
|
1017
|
+
(0, swagger_1.ApiOperation)({
|
|
1018
|
+
operationId: 'get-spaces-module-category-templates',
|
|
1019
|
+
summary: 'List space category templates',
|
|
1020
|
+
description: 'Retrieves all available space category templates with their default icons and descriptions. ' +
|
|
1021
|
+
'Templates provide suggested values when creating spaces of common room types.',
|
|
1022
|
+
}),
|
|
1023
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_1.CategoryTemplatesResponseModel, 'Returns category templates'),
|
|
1024
|
+
__metadata("design:type", Function),
|
|
1025
|
+
__metadata("design:paramtypes", []),
|
|
1026
|
+
__metadata("design:returntype", spaces_response_model_1.CategoryTemplatesResponseModel)
|
|
1027
|
+
], SpacesDomainController.prototype, "getCategoryTemplates", null);
|
|
1028
|
+
__decorate([
|
|
1029
|
+
(0, common_1.Get)('zones'),
|
|
1030
|
+
(0, swagger_1.ApiOperation)({
|
|
1031
|
+
operationId: 'get-spaces-module-zones',
|
|
1032
|
+
summary: 'List all zones',
|
|
1033
|
+
description: 'Retrieves all spaces of type zone. Useful for parent selection dropdowns.',
|
|
1034
|
+
}),
|
|
1035
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_1.SpacesResponseModel, 'Returns a list of zones'),
|
|
1036
|
+
__metadata("design:type", Function),
|
|
1037
|
+
__metadata("design:paramtypes", []),
|
|
1038
|
+
__metadata("design:returntype", Promise)
|
|
1039
|
+
], SpacesDomainController.prototype, "findAllZones", null);
|
|
1040
|
+
__decorate([
|
|
1041
|
+
(0, common_1.Get)(':id/children'),
|
|
1042
|
+
(0, swagger_1.ApiOperation)({
|
|
1043
|
+
operationId: 'get-spaces-module-space-children',
|
|
1044
|
+
summary: 'List child rooms of a zone',
|
|
1045
|
+
description: 'Retrieves all child rooms that belong to a zone. Only applicable for zones; returns empty for rooms.',
|
|
1046
|
+
}),
|
|
1047
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Zone ID' }),
|
|
1048
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_1.SpacesResponseModel, 'Returns the list of child rooms'),
|
|
1049
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1050
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1051
|
+
__metadata("design:type", Function),
|
|
1052
|
+
__metadata("design:paramtypes", [String]),
|
|
1053
|
+
__metadata("design:returntype", Promise)
|
|
1054
|
+
], SpacesDomainController.prototype, "findChildren", null);
|
|
1055
|
+
__decorate([
|
|
1056
|
+
(0, common_1.Get)(':id/parent'),
|
|
1057
|
+
(0, swagger_1.ApiOperation)({
|
|
1058
|
+
operationId: 'get-spaces-module-space-parent',
|
|
1059
|
+
summary: 'Get parent zone of a room',
|
|
1060
|
+
description: 'Retrieves the parent zone for a room. Returns null if the room has no parent zone. ' +
|
|
1061
|
+
'Zones do not have parents.',
|
|
1062
|
+
}),
|
|
1063
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Room ID' }),
|
|
1064
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_1.SpaceResponseModel, 'Returns the parent zone or null'),
|
|
1065
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1066
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1067
|
+
__metadata("design:type", Function),
|
|
1068
|
+
__metadata("design:paramtypes", [String]),
|
|
1069
|
+
__metadata("design:returntype", Promise)
|
|
1070
|
+
], SpacesDomainController.prototype, "findParent", null);
|
|
1071
|
+
__decorate([
|
|
1072
|
+
(0, common_1.Get)('intents/catalog'),
|
|
1073
|
+
(0, swagger_1.ApiOperation)({
|
|
1074
|
+
operationId: 'get-spaces-module-intent-catalog',
|
|
1075
|
+
summary: 'Get intent catalog',
|
|
1076
|
+
description: 'Retrieves the complete intent catalog with all available intent categories, intent types, ' +
|
|
1077
|
+
'quick actions, and lighting roles. This provides metadata for building UI controls ' +
|
|
1078
|
+
'and discovering available space control capabilities.',
|
|
1079
|
+
}),
|
|
1080
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.IntentCatalogResponseModel, 'Returns the intent catalog'),
|
|
1081
|
+
__metadata("design:type", Function),
|
|
1082
|
+
__metadata("design:paramtypes", []),
|
|
1083
|
+
__metadata("design:returntype", spaces_response_model_2.IntentCatalogResponseModel)
|
|
1084
|
+
], SpacesDomainController.prototype, "getIntentCatalog", null);
|
|
1085
|
+
__decorate([
|
|
1086
|
+
(0, common_1.Post)(':id/intents/lighting'),
|
|
1087
|
+
(0, swagger_1.ApiOperation)({
|
|
1088
|
+
operationId: 'create-spaces-module-space-lighting-intent',
|
|
1089
|
+
summary: 'Execute lighting intent for space',
|
|
1090
|
+
description: 'Executes a lighting intent command for all lights in the space. ' +
|
|
1091
|
+
'Supports off, on, mode (work/relax/night), and brightness delta operations. ' +
|
|
1092
|
+
'Commands are applied only to lighting devices with supported capabilities.',
|
|
1093
|
+
}),
|
|
1094
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1095
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.LightingIntentResponseModel, 'Returns the intent execution result'),
|
|
1096
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1097
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Invalid intent data'),
|
|
1098
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1099
|
+
__param(1, (0, common_1.Body)()),
|
|
1100
|
+
__metadata("design:type", Function),
|
|
1101
|
+
__metadata("design:paramtypes", [String, lighting_intent_dto_1.ReqLightingIntentDto]),
|
|
1102
|
+
__metadata("design:returntype", Promise)
|
|
1103
|
+
], SpacesDomainController.prototype, "executeLightingIntent", null);
|
|
1104
|
+
__decorate([
|
|
1105
|
+
(0, common_1.Get)(':id/climate'),
|
|
1106
|
+
(0, swagger_1.ApiOperation)({
|
|
1107
|
+
operationId: 'get-spaces-module-space-climate',
|
|
1108
|
+
summary: 'Get climate state for space',
|
|
1109
|
+
description: 'Retrieves the current climate state for a space, including temperature readings, ' +
|
|
1110
|
+
'target setpoint, and information about available climate control capabilities.',
|
|
1111
|
+
}),
|
|
1112
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1113
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.ClimateStateResponseModel, 'Returns the climate state'),
|
|
1114
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1115
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1116
|
+
__metadata("design:type", Function),
|
|
1117
|
+
__metadata("design:paramtypes", [String]),
|
|
1118
|
+
__metadata("design:returntype", Promise)
|
|
1119
|
+
], SpacesDomainController.prototype, "getClimateState", null);
|
|
1120
|
+
__decorate([
|
|
1121
|
+
(0, common_1.Post)(':id/intents/climate'),
|
|
1122
|
+
(0, swagger_1.ApiOperation)({
|
|
1123
|
+
operationId: 'create-spaces-module-space-climate-intent',
|
|
1124
|
+
summary: 'Execute climate intent for space',
|
|
1125
|
+
description: 'Executes a climate intent command for all primary climate devices (thermostats, heating units, air conditioners) in the space. ' +
|
|
1126
|
+
'Supports setpoint delta (+/- adjustments), direct setpoint set, and mode changes (HEAT/COOL/AUTO/OFF). ' +
|
|
1127
|
+
'Devices are filtered by their role (HEATING_ONLY, COOLING_ONLY, AUTO) and capability (presence of HEATER/COOLER channels). ' +
|
|
1128
|
+
'The target setpoint is clamped to the intersection of all device limits (most restrictive range).',
|
|
1129
|
+
}),
|
|
1130
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1131
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.ClimateIntentResponseModel, 'Returns the intent execution result'),
|
|
1132
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1133
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Invalid intent data'),
|
|
1134
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1135
|
+
__param(1, (0, common_1.Body)()),
|
|
1136
|
+
__metadata("design:type", Function),
|
|
1137
|
+
__metadata("design:paramtypes", [String, climate_intent_dto_1.ReqClimateIntentDto]),
|
|
1138
|
+
__metadata("design:returntype", Promise)
|
|
1139
|
+
], SpacesDomainController.prototype, "executeClimateIntent", null);
|
|
1140
|
+
__decorate([
|
|
1141
|
+
(0, common_1.Get)(':id/lighting/state'),
|
|
1142
|
+
(0, swagger_1.ApiOperation)({
|
|
1143
|
+
operationId: 'get-spaces-module-space-lighting-state',
|
|
1144
|
+
summary: 'Get aggregated lighting state for space',
|
|
1145
|
+
description: 'Retrieves the aggregated lighting state for a space, including per-role state (on/off, brightness, mixed status), ' +
|
|
1146
|
+
'mode detection (which lighting mode current state matches), and summary statistics. ' +
|
|
1147
|
+
'This endpoint provides pre-calculated values for UI display without panel-side calculation.',
|
|
1148
|
+
}),
|
|
1149
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1150
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.LightingStateResponseModel, 'Returns the aggregated lighting state'),
|
|
1151
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1152
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1153
|
+
__metadata("design:type", Function),
|
|
1154
|
+
__metadata("design:paramtypes", [String]),
|
|
1155
|
+
__metadata("design:returntype", Promise)
|
|
1156
|
+
], SpacesDomainController.prototype, "getLightingState", null);
|
|
1157
|
+
__decorate([
|
|
1158
|
+
(0, common_1.Get)(':id/lighting/targets'),
|
|
1159
|
+
(0, swagger_1.ApiOperation)({
|
|
1160
|
+
operationId: 'get-spaces-module-space-lighting-targets',
|
|
1161
|
+
summary: 'List light targets in space',
|
|
1162
|
+
description: 'Retrieves all controllable light targets (device/channel pairs) in a space ' +
|
|
1163
|
+
'along with their current role assignments and capabilities.',
|
|
1164
|
+
}),
|
|
1165
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1166
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.LightTargetsResponseModel, 'Returns the list of light targets with role assignments'),
|
|
1167
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1168
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1169
|
+
__metadata("design:type", Function),
|
|
1170
|
+
__metadata("design:paramtypes", [String]),
|
|
1171
|
+
__metadata("design:returntype", Promise)
|
|
1172
|
+
], SpacesDomainController.prototype, "getLightTargets", null);
|
|
1173
|
+
__decorate([
|
|
1174
|
+
(0, common_1.Post)(':id/lighting/roles'),
|
|
1175
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1176
|
+
(0, swagger_1.ApiOperation)({
|
|
1177
|
+
operationId: 'create-spaces-module-space-lighting-role',
|
|
1178
|
+
summary: 'Set lighting role for a light target',
|
|
1179
|
+
description: 'Sets or updates the lighting role for a specific device/channel in a space. ' + 'Requires owner or admin role.',
|
|
1180
|
+
}),
|
|
1181
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1182
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.LightingRoleResponseModel, 'Returns the created/updated lighting role assignment'),
|
|
1183
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1184
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid role data'),
|
|
1185
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Role assignment validation failed'),
|
|
1186
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1187
|
+
__param(1, (0, common_1.Body)()),
|
|
1188
|
+
__metadata("design:type", Function),
|
|
1189
|
+
__metadata("design:paramtypes", [String, lighting_role_dto_1.ReqSetLightingRoleDto]),
|
|
1190
|
+
__metadata("design:returntype", Promise)
|
|
1191
|
+
], SpacesDomainController.prototype, "setLightingRole", null);
|
|
1192
|
+
__decorate([
|
|
1193
|
+
(0, common_1.Post)(':id/lighting/roles/bulk'),
|
|
1194
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1195
|
+
(0, swagger_1.ApiOperation)({
|
|
1196
|
+
operationId: 'create-spaces-module-space-lighting-roles-bulk',
|
|
1197
|
+
summary: 'Bulk set lighting roles for light targets',
|
|
1198
|
+
description: 'Sets or updates lighting roles for multiple device/channels in a space in a single operation. ' +
|
|
1199
|
+
'Requires owner or admin role.',
|
|
1200
|
+
}),
|
|
1201
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1202
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.BulkLightingRolesResponseModel, 'Returns the bulk update result'),
|
|
1203
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1204
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid role data'),
|
|
1205
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Role assignment validation failed'),
|
|
1206
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1207
|
+
__param(1, (0, common_1.Body)()),
|
|
1208
|
+
__metadata("design:type", Function),
|
|
1209
|
+
__metadata("design:paramtypes", [String, lighting_role_dto_1.ReqBulkSetLightingRolesDto]),
|
|
1210
|
+
__metadata("design:returntype", Promise)
|
|
1211
|
+
], SpacesDomainController.prototype, "bulkSetLightingRoles", null);
|
|
1212
|
+
__decorate([
|
|
1213
|
+
(0, common_1.Post)(':id/lighting/roles/defaults'),
|
|
1214
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1215
|
+
(0, swagger_1.ApiOperation)({
|
|
1216
|
+
operationId: 'create-spaces-module-space-lighting-roles-defaults',
|
|
1217
|
+
summary: 'Apply default lighting roles',
|
|
1218
|
+
description: 'Infers and applies default lighting roles for all lights in the space. ' +
|
|
1219
|
+
'First light becomes MAIN, remaining lights become AMBIENT. Requires owner or admin role.',
|
|
1220
|
+
}),
|
|
1221
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1222
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.BulkLightingRolesResponseModel, 'Returns the bulk update result'),
|
|
1223
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1224
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1225
|
+
__metadata("design:type", Function),
|
|
1226
|
+
__metadata("design:paramtypes", [String]),
|
|
1227
|
+
__metadata("design:returntype", Promise)
|
|
1228
|
+
], SpacesDomainController.prototype, "applyDefaultLightingRoles", null);
|
|
1229
|
+
__decorate([
|
|
1230
|
+
(0, common_1.Delete)(':id/lighting/roles/:deviceId/:channelId'),
|
|
1231
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1232
|
+
(0, swagger_1.ApiOperation)({
|
|
1233
|
+
operationId: 'delete-spaces-module-space-lighting-role',
|
|
1234
|
+
summary: 'Delete lighting role assignment',
|
|
1235
|
+
description: 'Removes the lighting role assignment for a specific device/channel in a space. ' +
|
|
1236
|
+
'Requires owner or admin role.',
|
|
1237
|
+
}),
|
|
1238
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1239
|
+
(0, swagger_1.ApiParam)({ name: 'deviceId', type: 'string', format: 'uuid', description: 'Device ID' }),
|
|
1240
|
+
(0, swagger_1.ApiParam)({ name: 'channelId', type: 'string', format: 'uuid', description: 'Channel ID' }),
|
|
1241
|
+
(0, swagger_1.ApiNoContentResponse)({ description: 'Lighting role deleted successfully' }),
|
|
1242
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1243
|
+
(0, common_1.HttpCode)(204),
|
|
1244
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1245
|
+
__param(1, (0, common_1.Param)('deviceId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1246
|
+
__param(2, (0, common_1.Param)('channelId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1247
|
+
__metadata("design:type", Function),
|
|
1248
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
1249
|
+
__metadata("design:returntype", Promise)
|
|
1250
|
+
], SpacesDomainController.prototype, "deleteLightingRole", null);
|
|
1251
|
+
__decorate([
|
|
1252
|
+
(0, common_1.Get)(':id/climate/targets'),
|
|
1253
|
+
(0, swagger_1.ApiOperation)({
|
|
1254
|
+
operationId: 'get-spaces-module-space-climate-targets',
|
|
1255
|
+
summary: 'List climate targets in space',
|
|
1256
|
+
description: 'Retrieves all controllable climate devices in a space ' +
|
|
1257
|
+
'along with their current role assignments and capabilities.',
|
|
1258
|
+
}),
|
|
1259
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1260
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.ClimateTargetsResponseModel, 'Returns the list of climate devices with role assignments'),
|
|
1261
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1262
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1263
|
+
__metadata("design:type", Function),
|
|
1264
|
+
__metadata("design:paramtypes", [String]),
|
|
1265
|
+
__metadata("design:returntype", Promise)
|
|
1266
|
+
], SpacesDomainController.prototype, "getClimateTargets", null);
|
|
1267
|
+
__decorate([
|
|
1268
|
+
(0, common_1.Post)(':id/climate/roles'),
|
|
1269
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1270
|
+
(0, swagger_1.ApiOperation)({
|
|
1271
|
+
operationId: 'create-spaces-module-space-climate-role',
|
|
1272
|
+
summary: 'Set or remove climate role for a climate device',
|
|
1273
|
+
description: 'Sets, updates, or removes the climate role for a specific device in a space. ' +
|
|
1274
|
+
'Omit the role field or set it to null to remove an existing role assignment. ' +
|
|
1275
|
+
'Requires owner or admin role.',
|
|
1276
|
+
}),
|
|
1277
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1278
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.ClimateRoleResponseModel, 'Returns the created/updated climate role assignment, or null if removed'),
|
|
1279
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1280
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid role data'),
|
|
1281
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Role assignment validation failed'),
|
|
1282
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1283
|
+
__param(1, (0, common_1.Body)()),
|
|
1284
|
+
__metadata("design:type", Function),
|
|
1285
|
+
__metadata("design:paramtypes", [String, climate_role_dto_1.ReqSetClimateRoleDto]),
|
|
1286
|
+
__metadata("design:returntype", Promise)
|
|
1287
|
+
], SpacesDomainController.prototype, "setClimateRole", null);
|
|
1288
|
+
__decorate([
|
|
1289
|
+
(0, common_1.Post)(':id/climate/roles/bulk'),
|
|
1290
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1291
|
+
(0, swagger_1.ApiOperation)({
|
|
1292
|
+
operationId: 'create-spaces-module-space-climate-roles-bulk',
|
|
1293
|
+
summary: 'Bulk set climate roles for climate devices',
|
|
1294
|
+
description: 'Sets or updates climate roles for multiple devices in a space in a single operation. ' +
|
|
1295
|
+
'Requires owner or admin role.',
|
|
1296
|
+
}),
|
|
1297
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1298
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.BulkClimateRolesResponseModel, 'Returns the bulk update result'),
|
|
1299
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1300
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid role data'),
|
|
1301
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Role assignment validation failed'),
|
|
1302
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1303
|
+
__param(1, (0, common_1.Body)()),
|
|
1304
|
+
__metadata("design:type", Function),
|
|
1305
|
+
__metadata("design:paramtypes", [String, climate_role_dto_1.ReqBulkSetClimateRolesDto]),
|
|
1306
|
+
__metadata("design:returntype", Promise)
|
|
1307
|
+
], SpacesDomainController.prototype, "bulkSetClimateRoles", null);
|
|
1308
|
+
__decorate([
|
|
1309
|
+
(0, common_1.Post)(':id/climate/roles/defaults'),
|
|
1310
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1311
|
+
(0, swagger_1.ApiOperation)({
|
|
1312
|
+
operationId: 'create-spaces-module-space-climate-roles-defaults',
|
|
1313
|
+
summary: 'Apply default climate roles',
|
|
1314
|
+
description: 'Infers and applies default climate roles for all climate devices in the space. ' +
|
|
1315
|
+
'Thermostats become PRIMARY, heaters/AC become AUXILIARY, fans become VENTILATION, ' +
|
|
1316
|
+
'humidifiers/dehumidifiers become HUMIDITY. Requires owner or admin role.',
|
|
1317
|
+
}),
|
|
1318
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1319
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.BulkClimateRolesResponseModel, 'Returns the bulk update result'),
|
|
1320
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1321
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1322
|
+
__metadata("design:type", Function),
|
|
1323
|
+
__metadata("design:paramtypes", [String]),
|
|
1324
|
+
__metadata("design:returntype", Promise)
|
|
1325
|
+
], SpacesDomainController.prototype, "applyDefaultClimateRoles", null);
|
|
1326
|
+
__decorate([
|
|
1327
|
+
(0, common_1.Delete)(':id/climate/roles/:deviceId'),
|
|
1328
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1329
|
+
(0, swagger_1.ApiOperation)({
|
|
1330
|
+
operationId: 'delete-spaces-module-space-climate-role',
|
|
1331
|
+
summary: 'Delete climate role assignment',
|
|
1332
|
+
description: 'Removes the climate role assignment for a specific device in a space. ' +
|
|
1333
|
+
'For actuator roles (PRIMARY, AUXILIARY, etc.), only deviceId is needed. ' +
|
|
1334
|
+
'For sensor roles (TEMPERATURE_SENSOR, HUMIDITY_SENSOR), channelId query parameter must be provided. ' +
|
|
1335
|
+
'Requires owner or admin role.',
|
|
1336
|
+
}),
|
|
1337
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1338
|
+
(0, swagger_1.ApiParam)({ name: 'deviceId', type: 'string', format: 'uuid', description: 'Device ID' }),
|
|
1339
|
+
(0, swagger_1.ApiQuery)({
|
|
1340
|
+
name: 'channelId',
|
|
1341
|
+
type: 'string',
|
|
1342
|
+
format: 'uuid',
|
|
1343
|
+
required: false,
|
|
1344
|
+
description: 'Channel ID (required for sensor roles, omit for actuator roles)',
|
|
1345
|
+
}),
|
|
1346
|
+
(0, swagger_1.ApiNoContentResponse)({ description: 'Climate role deleted successfully' }),
|
|
1347
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1348
|
+
(0, common_1.HttpCode)(204),
|
|
1349
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1350
|
+
__param(1, (0, common_1.Param)('deviceId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1351
|
+
__param(2, (0, common_1.Query)('channelId', new common_1.ParseUUIDPipe({ version: '4', optional: true }))),
|
|
1352
|
+
__metadata("design:type", Function),
|
|
1353
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
1354
|
+
__metadata("design:returntype", Promise)
|
|
1355
|
+
], SpacesDomainController.prototype, "deleteClimateRole", null);
|
|
1356
|
+
__decorate([
|
|
1357
|
+
(0, common_1.Get)(':id/covers'),
|
|
1358
|
+
(0, swagger_1.ApiOperation)({
|
|
1359
|
+
operationId: 'get-spaces-module-space-covers',
|
|
1360
|
+
summary: 'Get covers state for space',
|
|
1361
|
+
description: 'Retrieves the current covers state for a space, including average position, ' +
|
|
1362
|
+
'open/closed status, and device counts by role.',
|
|
1363
|
+
}),
|
|
1364
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1365
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.CoversStateResponseModel, 'Returns the covers state'),
|
|
1366
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1367
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1368
|
+
__metadata("design:type", Function),
|
|
1369
|
+
__metadata("design:paramtypes", [String]),
|
|
1370
|
+
__metadata("design:returntype", Promise)
|
|
1371
|
+
], SpacesDomainController.prototype, "getCoversState", null);
|
|
1372
|
+
__decorate([
|
|
1373
|
+
(0, common_1.Post)(':id/intents/covers'),
|
|
1374
|
+
(0, swagger_1.ApiOperation)({
|
|
1375
|
+
operationId: 'create-spaces-module-space-covers-intent',
|
|
1376
|
+
summary: 'Execute covers intent for space',
|
|
1377
|
+
description: 'Executes a covers intent command for all window coverings in the space. ' +
|
|
1378
|
+
'Supports open, close, set_position, position_delta, role_position, and set_mode operations. ' +
|
|
1379
|
+
'Commands are applied based on device capabilities and role assignments.',
|
|
1380
|
+
}),
|
|
1381
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1382
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.CoversIntentResponseModel, 'Returns the intent execution result'),
|
|
1383
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1384
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Invalid intent data'),
|
|
1385
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1386
|
+
__param(1, (0, common_1.Body)()),
|
|
1387
|
+
__metadata("design:type", Function),
|
|
1388
|
+
__metadata("design:paramtypes", [String, covers_intent_dto_1.ReqCoversIntentDto]),
|
|
1389
|
+
__metadata("design:returntype", Promise)
|
|
1390
|
+
], SpacesDomainController.prototype, "executeCoversIntent", null);
|
|
1391
|
+
__decorate([
|
|
1392
|
+
(0, common_1.Get)(':id/covers/targets'),
|
|
1393
|
+
(0, swagger_1.ApiOperation)({
|
|
1394
|
+
operationId: 'get-spaces-module-space-covers-targets',
|
|
1395
|
+
summary: 'List covers targets in space',
|
|
1396
|
+
description: 'Retrieves all controllable window covering targets (device/channel pairs) in a space ' +
|
|
1397
|
+
'along with their current role assignments and capabilities.',
|
|
1398
|
+
}),
|
|
1399
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1400
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.CoversTargetsResponseModel, 'Returns the list of covers targets with role assignments'),
|
|
1401
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1402
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1403
|
+
__metadata("design:type", Function),
|
|
1404
|
+
__metadata("design:paramtypes", [String]),
|
|
1405
|
+
__metadata("design:returntype", Promise)
|
|
1406
|
+
], SpacesDomainController.prototype, "getCoversTargets", null);
|
|
1407
|
+
__decorate([
|
|
1408
|
+
(0, common_1.Post)(':id/covers/roles'),
|
|
1409
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1410
|
+
(0, swagger_1.ApiOperation)({
|
|
1411
|
+
operationId: 'create-spaces-module-space-covers-role',
|
|
1412
|
+
summary: 'Set covers role for a covers target',
|
|
1413
|
+
description: 'Sets or updates the covers role for a specific device/channel in a space. ' + 'Requires owner or admin role.',
|
|
1414
|
+
}),
|
|
1415
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1416
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.CoversRoleResponseModel, 'Returns the created/updated covers role assignment'),
|
|
1417
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1418
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid role data'),
|
|
1419
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Role assignment validation failed'),
|
|
1420
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1421
|
+
__param(1, (0, common_1.Body)()),
|
|
1422
|
+
__metadata("design:type", Function),
|
|
1423
|
+
__metadata("design:paramtypes", [String, covers_role_dto_1.ReqSetCoversRoleDto]),
|
|
1424
|
+
__metadata("design:returntype", Promise)
|
|
1425
|
+
], SpacesDomainController.prototype, "setCoversRole", null);
|
|
1426
|
+
__decorate([
|
|
1427
|
+
(0, common_1.Post)(':id/covers/roles/bulk'),
|
|
1428
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1429
|
+
(0, swagger_1.ApiOperation)({
|
|
1430
|
+
operationId: 'create-spaces-module-space-covers-roles-bulk',
|
|
1431
|
+
summary: 'Bulk set covers roles for covers targets',
|
|
1432
|
+
description: 'Sets or updates covers roles for multiple device/channels in a space in a single operation. ' +
|
|
1433
|
+
'Requires owner or admin role.',
|
|
1434
|
+
}),
|
|
1435
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1436
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.BulkCoversRolesResponseModel, 'Returns the bulk update result'),
|
|
1437
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1438
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid role data'),
|
|
1439
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Role assignment validation failed'),
|
|
1440
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1441
|
+
__param(1, (0, common_1.Body)()),
|
|
1442
|
+
__metadata("design:type", Function),
|
|
1443
|
+
__metadata("design:paramtypes", [String, covers_role_dto_1.ReqBulkSetCoversRolesDto]),
|
|
1444
|
+
__metadata("design:returntype", Promise)
|
|
1445
|
+
], SpacesDomainController.prototype, "bulkSetCoversRoles", null);
|
|
1446
|
+
__decorate([
|
|
1447
|
+
(0, common_1.Post)(':id/covers/roles/defaults'),
|
|
1448
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1449
|
+
(0, swagger_1.ApiOperation)({
|
|
1450
|
+
operationId: 'create-spaces-module-space-covers-roles-defaults',
|
|
1451
|
+
summary: 'Apply default covers roles',
|
|
1452
|
+
description: 'Infers and applies default covers roles for all window coverings in the space. ' +
|
|
1453
|
+
'First cover becomes PRIMARY, remaining covers are assigned based on type. Requires owner or admin role.',
|
|
1454
|
+
}),
|
|
1455
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1456
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.BulkCoversRolesResponseModel, 'Returns the bulk update result'),
|
|
1457
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1458
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1459
|
+
__metadata("design:type", Function),
|
|
1460
|
+
__metadata("design:paramtypes", [String]),
|
|
1461
|
+
__metadata("design:returntype", Promise)
|
|
1462
|
+
], SpacesDomainController.prototype, "applyDefaultCoversRoles", null);
|
|
1463
|
+
__decorate([
|
|
1464
|
+
(0, common_1.Delete)(':id/covers/roles/:deviceId/:channelId'),
|
|
1465
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1466
|
+
(0, swagger_1.ApiOperation)({
|
|
1467
|
+
operationId: 'delete-spaces-module-space-covers-role',
|
|
1468
|
+
summary: 'Delete covers role assignment',
|
|
1469
|
+
description: 'Removes the covers role assignment for a specific device/channel in a space. Requires owner or admin role.',
|
|
1470
|
+
}),
|
|
1471
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1472
|
+
(0, swagger_1.ApiParam)({ name: 'deviceId', type: 'string', format: 'uuid', description: 'Device ID' }),
|
|
1473
|
+
(0, swagger_1.ApiParam)({ name: 'channelId', type: 'string', format: 'uuid', description: 'Channel ID' }),
|
|
1474
|
+
(0, swagger_1.ApiNoContentResponse)({ description: 'Covers role deleted successfully' }),
|
|
1475
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1476
|
+
(0, common_1.HttpCode)(204),
|
|
1477
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1478
|
+
__param(1, (0, common_1.Param)('deviceId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1479
|
+
__param(2, (0, common_1.Param)('channelId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1480
|
+
__metadata("design:type", Function),
|
|
1481
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
1482
|
+
__metadata("design:returntype", Promise)
|
|
1483
|
+
], SpacesDomainController.prototype, "deleteCoversRole", null);
|
|
1484
|
+
__decorate([
|
|
1485
|
+
(0, common_1.Get)(':id/sensors'),
|
|
1486
|
+
(0, swagger_1.ApiOperation)({
|
|
1487
|
+
operationId: 'get-spaces-module-space-sensors',
|
|
1488
|
+
summary: 'Get sensor state for space',
|
|
1489
|
+
description: 'Retrieves the current sensor state for a space, including aggregated readings, ' +
|
|
1490
|
+
'environment summary, safety alerts, motion/occupancy status, and readings grouped by role.',
|
|
1491
|
+
}),
|
|
1492
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1493
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.SensorStateResponseModel, 'Returns the sensor state'),
|
|
1494
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1495
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1496
|
+
__metadata("design:type", Function),
|
|
1497
|
+
__metadata("design:paramtypes", [String]),
|
|
1498
|
+
__metadata("design:returntype", Promise)
|
|
1499
|
+
], SpacesDomainController.prototype, "getSensorState", null);
|
|
1500
|
+
__decorate([
|
|
1501
|
+
(0, common_1.Get)(':id/sensors/targets'),
|
|
1502
|
+
(0, swagger_1.ApiOperation)({
|
|
1503
|
+
operationId: 'get-spaces-module-space-sensor-targets',
|
|
1504
|
+
summary: 'Get sensor targets in space',
|
|
1505
|
+
description: 'Retrieves all sensor channels in a space that can be assigned roles, ' +
|
|
1506
|
+
'including their current role assignments.',
|
|
1507
|
+
}),
|
|
1508
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1509
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.SensorTargetsResponseModel, 'Returns the list of sensor targets'),
|
|
1510
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1511
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1512
|
+
__metadata("design:type", Function),
|
|
1513
|
+
__metadata("design:paramtypes", [String]),
|
|
1514
|
+
__metadata("design:returntype", Promise)
|
|
1515
|
+
], SpacesDomainController.prototype, "getSensorTargets", null);
|
|
1516
|
+
__decorate([
|
|
1517
|
+
(0, common_1.Post)(':id/sensors/roles'),
|
|
1518
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1519
|
+
(0, swagger_1.ApiOperation)({
|
|
1520
|
+
operationId: 'create-spaces-module-space-sensor-role',
|
|
1521
|
+
summary: 'Set sensor role for a sensor target',
|
|
1522
|
+
description: 'Sets or updates the sensor role for a specific device/channel in a space. ' + 'Requires owner or admin role.',
|
|
1523
|
+
}),
|
|
1524
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1525
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.SensorRoleResponseModel, 'Returns the created/updated sensor role assignment'),
|
|
1526
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1527
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid role data'),
|
|
1528
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Role assignment validation failed'),
|
|
1529
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1530
|
+
__param(1, (0, common_1.Body)()),
|
|
1531
|
+
__metadata("design:type", Function),
|
|
1532
|
+
__metadata("design:paramtypes", [String, sensor_role_dto_1.ReqSetSensorRoleDto]),
|
|
1533
|
+
__metadata("design:returntype", Promise)
|
|
1534
|
+
], SpacesDomainController.prototype, "setSensorRole", null);
|
|
1535
|
+
__decorate([
|
|
1536
|
+
(0, common_1.Post)(':id/sensors/roles/bulk'),
|
|
1537
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1538
|
+
(0, swagger_1.ApiOperation)({
|
|
1539
|
+
operationId: 'create-spaces-module-space-sensor-roles-bulk',
|
|
1540
|
+
summary: 'Bulk set sensor roles for sensor targets',
|
|
1541
|
+
description: 'Sets or updates sensor roles for multiple device/channels in a space in a single operation. ' +
|
|
1542
|
+
'Requires owner or admin role.',
|
|
1543
|
+
}),
|
|
1544
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1545
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.BulkSensorRolesResponseModel, 'Returns the bulk update result'),
|
|
1546
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1547
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid role data'),
|
|
1548
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Role assignment validation failed'),
|
|
1549
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1550
|
+
__param(1, (0, common_1.Body)()),
|
|
1551
|
+
__metadata("design:type", Function),
|
|
1552
|
+
__metadata("design:paramtypes", [String, sensor_role_dto_1.ReqBulkSetSensorRolesDto]),
|
|
1553
|
+
__metadata("design:returntype", Promise)
|
|
1554
|
+
], SpacesDomainController.prototype, "bulkSetSensorRoles", null);
|
|
1555
|
+
__decorate([
|
|
1556
|
+
(0, common_1.Post)(':id/sensors/roles/defaults'),
|
|
1557
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1558
|
+
(0, swagger_1.ApiOperation)({
|
|
1559
|
+
operationId: 'create-spaces-module-space-sensor-roles-defaults',
|
|
1560
|
+
summary: 'Apply default sensor roles',
|
|
1561
|
+
description: 'Infers and applies default sensor roles for all sensor channels in the space ' +
|
|
1562
|
+
'based on channel category (environment, safety, security, air quality, energy). ' +
|
|
1563
|
+
'Requires owner or admin role.',
|
|
1564
|
+
}),
|
|
1565
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1566
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.BulkSensorRolesResponseModel, 'Returns the bulk update result'),
|
|
1567
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1568
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1569
|
+
__metadata("design:type", Function),
|
|
1570
|
+
__metadata("design:paramtypes", [String]),
|
|
1571
|
+
__metadata("design:returntype", Promise)
|
|
1572
|
+
], SpacesDomainController.prototype, "applyDefaultSensorRoles", null);
|
|
1573
|
+
__decorate([
|
|
1574
|
+
(0, common_1.Delete)(':id/sensors/roles/:deviceId/:channelId'),
|
|
1575
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1576
|
+
(0, swagger_1.ApiOperation)({
|
|
1577
|
+
operationId: 'delete-spaces-module-space-sensor-role',
|
|
1578
|
+
summary: 'Delete sensor role assignment',
|
|
1579
|
+
description: 'Removes the sensor role assignment for a specific device/channel in a space. Requires owner or admin role.',
|
|
1580
|
+
}),
|
|
1581
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1582
|
+
(0, swagger_1.ApiParam)({ name: 'deviceId', type: 'string', format: 'uuid', description: 'Device ID' }),
|
|
1583
|
+
(0, swagger_1.ApiParam)({ name: 'channelId', type: 'string', format: 'uuid', description: 'Channel ID' }),
|
|
1584
|
+
(0, swagger_1.ApiNoContentResponse)({ description: 'Sensor role deleted successfully' }),
|
|
1585
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1586
|
+
(0, common_1.HttpCode)(204),
|
|
1587
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1588
|
+
__param(1, (0, common_1.Param)('deviceId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1589
|
+
__param(2, (0, common_1.Param)('channelId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1590
|
+
__metadata("design:type", Function),
|
|
1591
|
+
__metadata("design:paramtypes", [String, String, String]),
|
|
1592
|
+
__metadata("design:returntype", Promise)
|
|
1593
|
+
], SpacesDomainController.prototype, "deleteSensorRole", null);
|
|
1594
|
+
__decorate([
|
|
1595
|
+
(0, common_1.Get)(':id/media/endpoints'),
|
|
1596
|
+
(0, swagger_1.ApiOperation)({
|
|
1597
|
+
operationId: 'get-spaces-module-space-media-endpoints',
|
|
1598
|
+
summary: 'List derived media endpoints for space',
|
|
1599
|
+
description: 'Returns a derived read model of all media endpoints in a space. ' +
|
|
1600
|
+
'Endpoints are computed on-the-fly from device capabilities and use deterministic IDs. ' +
|
|
1601
|
+
'A single device may produce multiple endpoints (e.g., TV as display + audio_output + remote_target).',
|
|
1602
|
+
}),
|
|
1603
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1604
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(derived_media_endpoint_model_1.DerivedMediaEndpointsResponseModel, 'Returns derived media endpoints for the space'),
|
|
1605
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1606
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1607
|
+
__metadata("design:type", Function),
|
|
1608
|
+
__metadata("design:paramtypes", [String]),
|
|
1609
|
+
__metadata("design:returntype", Promise)
|
|
1610
|
+
], SpacesDomainController.prototype, "getDerivedMediaEndpoints", null);
|
|
1611
|
+
__decorate([
|
|
1612
|
+
(0, common_1.Get)(':id/suggestion'),
|
|
1613
|
+
(0, swagger_1.ApiOperation)({
|
|
1614
|
+
operationId: 'get-spaces-module-space-suggestion',
|
|
1615
|
+
summary: 'Get suggestion for space',
|
|
1616
|
+
description: 'Retrieves a single, non-intrusive suggestion for the space based on current time and lighting state. ' +
|
|
1617
|
+
'Returns null if no suggestion is applicable or suggestions are disabled for this space. ' +
|
|
1618
|
+
'Suggestions have a cooldown period to avoid repetition.',
|
|
1619
|
+
}),
|
|
1620
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1621
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.SuggestionResponseModel, 'Returns the suggestion or null'),
|
|
1622
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1623
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1624
|
+
__metadata("design:type", Function),
|
|
1625
|
+
__metadata("design:paramtypes", [String]),
|
|
1626
|
+
__metadata("design:returntype", Promise)
|
|
1627
|
+
], SpacesDomainController.prototype, "getSuggestion", null);
|
|
1628
|
+
__decorate([
|
|
1629
|
+
(0, common_1.Post)(':id/suggestion/feedback'),
|
|
1630
|
+
(0, swagger_1.ApiOperation)({
|
|
1631
|
+
operationId: 'create-spaces-module-space-suggestion-feedback',
|
|
1632
|
+
summary: 'Submit suggestion feedback',
|
|
1633
|
+
description: 'Records user feedback for a suggestion (applied or dismissed). ' +
|
|
1634
|
+
'If applied, the corresponding lighting intent is executed. ' +
|
|
1635
|
+
'A cooldown is set to prevent the same suggestion from reappearing immediately.',
|
|
1636
|
+
}),
|
|
1637
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1638
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.SuggestionFeedbackResponseModel, 'Returns the feedback result'),
|
|
1639
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1640
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid feedback data'),
|
|
1641
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1642
|
+
__param(1, (0, common_1.Body)()),
|
|
1643
|
+
__metadata("design:type", Function),
|
|
1644
|
+
__metadata("design:paramtypes", [String, suggestion_dto_1.ReqSuggestionFeedbackDto]),
|
|
1645
|
+
__metadata("design:returntype", Promise)
|
|
1646
|
+
], SpacesDomainController.prototype, "submitSuggestionFeedback", null);
|
|
1647
|
+
__decorate([
|
|
1648
|
+
(0, common_1.Get)(':id/context/snapshot'),
|
|
1649
|
+
(0, swagger_1.ApiOperation)({
|
|
1650
|
+
operationId: 'get-spaces-module-space-context-snapshot',
|
|
1651
|
+
summary: 'Capture context snapshot for space',
|
|
1652
|
+
description: 'Captures a complete context snapshot of the current state of a space, including ' +
|
|
1653
|
+
'lighting state (on/off, brightness, color) for all lights and climate state ' +
|
|
1654
|
+
'(current temperature, setpoint). Useful for undo functionality, scene saving, ' +
|
|
1655
|
+
'and providing context for automation decisions.',
|
|
1656
|
+
}),
|
|
1657
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1658
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.ContextSnapshotResponseModel, 'Returns the context snapshot'),
|
|
1659
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1660
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1661
|
+
__metadata("design:type", Function),
|
|
1662
|
+
__metadata("design:paramtypes", [String]),
|
|
1663
|
+
__metadata("design:returntype", Promise)
|
|
1664
|
+
], SpacesDomainController.prototype, "captureContextSnapshot", null);
|
|
1665
|
+
__decorate([
|
|
1666
|
+
(0, common_1.Get)(':id/undo'),
|
|
1667
|
+
(0, swagger_1.ApiOperation)({
|
|
1668
|
+
operationId: 'get-spaces-module-space-undo-state',
|
|
1669
|
+
summary: 'Get undo state for space',
|
|
1670
|
+
description: 'Retrieves the current undo state for a space, indicating whether an undo action is available. ' +
|
|
1671
|
+
'The undo entry expires after 5 minutes and only the most recent intent can be undone.',
|
|
1672
|
+
}),
|
|
1673
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1674
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.UndoStateResponseModel, 'Returns the undo state'),
|
|
1675
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1676
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1677
|
+
__metadata("design:type", Function),
|
|
1678
|
+
__metadata("design:paramtypes", [String]),
|
|
1679
|
+
__metadata("design:returntype", Promise)
|
|
1680
|
+
], SpacesDomainController.prototype, "getUndoState", null);
|
|
1681
|
+
__decorate([
|
|
1682
|
+
(0, common_1.Post)(':id/intents/undo'),
|
|
1683
|
+
(0, swagger_1.ApiOperation)({
|
|
1684
|
+
operationId: 'create-spaces-module-space-undo',
|
|
1685
|
+
summary: 'Undo the last intent for space',
|
|
1686
|
+
description: 'Reverts the most recent lighting or climate intent by restoring device states to their ' +
|
|
1687
|
+
'values before the intent was executed. Only the most recent intent can be undone, and ' +
|
|
1688
|
+
'the undo entry expires after 5 minutes.',
|
|
1689
|
+
}),
|
|
1690
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1691
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(spaces_response_model_2.UndoResultResponseModel, 'Returns the undo result'),
|
|
1692
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1693
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1694
|
+
__metadata("design:type", Function),
|
|
1695
|
+
__metadata("design:paramtypes", [String]),
|
|
1696
|
+
__metadata("design:returntype", Promise)
|
|
1697
|
+
], SpacesDomainController.prototype, "executeUndo", null);
|
|
1698
|
+
__decorate([
|
|
1699
|
+
(0, common_1.Get)(':id/media/bindings'),
|
|
1700
|
+
(0, swagger_1.ApiOperation)({
|
|
1701
|
+
operationId: 'get-spaces-module-space-media-bindings',
|
|
1702
|
+
summary: 'List media activity bindings for space',
|
|
1703
|
+
description: 'Returns all media activity bindings for a space. ' +
|
|
1704
|
+
'Each binding maps a predefined activity (watch, listen, gaming, background, off) ' +
|
|
1705
|
+
'to concrete derived endpoint IDs.',
|
|
1706
|
+
}),
|
|
1707
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1708
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_binding_model_1.MediaActivityBindingsResponseModel, 'Returns media activity bindings for the space'),
|
|
1709
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1710
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1711
|
+
__metadata("design:type", Function),
|
|
1712
|
+
__metadata("design:paramtypes", [String]),
|
|
1713
|
+
__metadata("design:returntype", Promise)
|
|
1714
|
+
], SpacesDomainController.prototype, "getMediaActivityBindings", null);
|
|
1715
|
+
__decorate([
|
|
1716
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1717
|
+
(0, common_1.Post)(':id/media/bindings/apply-defaults'),
|
|
1718
|
+
(0, swagger_1.ApiOperation)({
|
|
1719
|
+
operationId: 'create-spaces-module-space-media-bindings-apply-defaults',
|
|
1720
|
+
summary: 'Apply default activity bindings',
|
|
1721
|
+
description: 'Creates missing activity bindings with heuristic defaults based on available endpoints. ' +
|
|
1722
|
+
'Does not overwrite existing bindings. Returns the full set of bindings after applying defaults.',
|
|
1723
|
+
}),
|
|
1724
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1725
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_binding_model_1.MediaActivityBindingsResponseModel, 'Default bindings applied successfully'),
|
|
1726
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1727
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1728
|
+
__metadata("design:type", Function),
|
|
1729
|
+
__metadata("design:paramtypes", [String]),
|
|
1730
|
+
__metadata("design:returntype", Promise)
|
|
1731
|
+
], SpacesDomainController.prototype, "applyDefaultMediaActivityBindings", null);
|
|
1732
|
+
__decorate([
|
|
1733
|
+
(0, common_1.Get)(':id/media/bindings/validate'),
|
|
1734
|
+
(0, swagger_1.ApiOperation)({
|
|
1735
|
+
operationId: 'get-spaces-module-space-media-bindings-validate',
|
|
1736
|
+
summary: 'Validate media activity bindings',
|
|
1737
|
+
description: 'Returns a diagnostic report for all activity bindings in a space. ' +
|
|
1738
|
+
'Reports missing slots, invalid endpoints, type mismatches, and override issues.',
|
|
1739
|
+
}),
|
|
1740
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1741
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_binding_model_1.BindingValidationResponseModel, 'Binding validation report'),
|
|
1742
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1743
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1744
|
+
__metadata("design:type", Function),
|
|
1745
|
+
__metadata("design:paramtypes", [String]),
|
|
1746
|
+
__metadata("design:returntype", Promise)
|
|
1747
|
+
], SpacesDomainController.prototype, "validateMediaActivityBindings", null);
|
|
1748
|
+
__decorate([
|
|
1749
|
+
(0, common_1.Get)(':id/media/bindings/:bindingId'),
|
|
1750
|
+
(0, swagger_1.ApiOperation)({
|
|
1751
|
+
operationId: 'get-spaces-module-space-media-binding',
|
|
1752
|
+
summary: 'Get a single media activity binding',
|
|
1753
|
+
description: 'Returns a single media activity binding by ID.',
|
|
1754
|
+
}),
|
|
1755
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1756
|
+
(0, swagger_1.ApiParam)({ name: 'bindingId', type: 'string', format: 'uuid', description: 'Binding ID' }),
|
|
1757
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_binding_model_1.MediaActivityBindingResponseModel, 'Returns the media activity binding'),
|
|
1758
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space or binding not found'),
|
|
1759
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1760
|
+
__param(1, (0, common_1.Param)('bindingId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1761
|
+
__metadata("design:type", Function),
|
|
1762
|
+
__metadata("design:paramtypes", [String, String]),
|
|
1763
|
+
__metadata("design:returntype", Promise)
|
|
1764
|
+
], SpacesDomainController.prototype, "getMediaActivityBinding", null);
|
|
1765
|
+
__decorate([
|
|
1766
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1767
|
+
(0, common_1.Post)(':id/media/bindings'),
|
|
1768
|
+
(0, swagger_1.ApiOperation)({
|
|
1769
|
+
operationId: 'create-spaces-module-space-media-binding',
|
|
1770
|
+
summary: 'Create a media activity binding',
|
|
1771
|
+
description: 'Creates a new media activity binding for a space. ' +
|
|
1772
|
+
'Validates that referenced endpoint IDs exist and match the expected slot types. ' +
|
|
1773
|
+
'Only one binding per activity key is allowed per space.',
|
|
1774
|
+
}),
|
|
1775
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1776
|
+
(0, api_documentation_decorator_1.ApiCreatedSuccessResponse)(media_activity_binding_model_1.MediaActivityBindingResponseModel, 'Binding created successfully'),
|
|
1777
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid binding data'),
|
|
1778
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Validation failed (endpoint not found, type mismatch, etc.)'),
|
|
1779
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1780
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1781
|
+
__param(1, (0, common_1.Body)()),
|
|
1782
|
+
__metadata("design:type", Function),
|
|
1783
|
+
__metadata("design:paramtypes", [String, media_activity_binding_dto_1.ReqCreateMediaActivityBindingDto]),
|
|
1784
|
+
__metadata("design:returntype", Promise)
|
|
1785
|
+
], SpacesDomainController.prototype, "createMediaActivityBinding", null);
|
|
1786
|
+
__decorate([
|
|
1787
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1788
|
+
(0, common_1.Patch)(':id/media/bindings/:bindingId'),
|
|
1789
|
+
(0, swagger_1.ApiOperation)({
|
|
1790
|
+
operationId: 'update-spaces-module-space-media-binding',
|
|
1791
|
+
summary: 'Update a media activity binding',
|
|
1792
|
+
description: 'Updates an existing media activity binding. ' +
|
|
1793
|
+
'Validates endpoint IDs and overrides against current derived endpoints.',
|
|
1794
|
+
}),
|
|
1795
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1796
|
+
(0, swagger_1.ApiParam)({ name: 'bindingId', type: 'string', format: 'uuid', description: 'Binding ID' }),
|
|
1797
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_binding_model_1.MediaActivityBindingResponseModel, 'Binding updated successfully'),
|
|
1798
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid binding data'),
|
|
1799
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Validation failed'),
|
|
1800
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space or binding not found'),
|
|
1801
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1802
|
+
__param(1, (0, common_1.Param)('bindingId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1803
|
+
__param(2, (0, common_1.Body)()),
|
|
1804
|
+
__metadata("design:type", Function),
|
|
1805
|
+
__metadata("design:paramtypes", [String, String, media_activity_binding_dto_1.ReqUpdateMediaActivityBindingDto]),
|
|
1806
|
+
__metadata("design:returntype", Promise)
|
|
1807
|
+
], SpacesDomainController.prototype, "updateMediaActivityBinding", null);
|
|
1808
|
+
__decorate([
|
|
1809
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1810
|
+
(0, common_1.Delete)(':id/media/bindings/:bindingId'),
|
|
1811
|
+
(0, common_1.HttpCode)(204),
|
|
1812
|
+
(0, swagger_1.ApiOperation)({
|
|
1813
|
+
operationId: 'delete-spaces-module-space-media-binding',
|
|
1814
|
+
summary: 'Delete a media activity binding',
|
|
1815
|
+
description: 'Deletes a media activity binding.',
|
|
1816
|
+
}),
|
|
1817
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1818
|
+
(0, swagger_1.ApiParam)({ name: 'bindingId', type: 'string', format: 'uuid', description: 'Binding ID' }),
|
|
1819
|
+
(0, swagger_1.ApiNoContentResponse)({ description: 'Binding deleted successfully' }),
|
|
1820
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space or binding not found'),
|
|
1821
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1822
|
+
__param(1, (0, common_1.Param)('bindingId', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1823
|
+
__metadata("design:type", Function),
|
|
1824
|
+
__metadata("design:paramtypes", [String, String]),
|
|
1825
|
+
__metadata("design:returntype", Promise)
|
|
1826
|
+
], SpacesDomainController.prototype, "deleteMediaActivityBinding", null);
|
|
1827
|
+
__decorate([
|
|
1828
|
+
(0, common_1.Get)(':id/media/activities/active'),
|
|
1829
|
+
(0, swagger_1.ApiOperation)({
|
|
1830
|
+
operationId: 'get-spaces-module-space-active-media-activity',
|
|
1831
|
+
summary: 'Get active media activity',
|
|
1832
|
+
description: 'Returns the currently active media activity for a space, or null if no activity is active.',
|
|
1833
|
+
}),
|
|
1834
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1835
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_model_1.ActiveMediaActivityResponseModel, 'Active media activity state'),
|
|
1836
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1837
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1838
|
+
__metadata("design:type", Function),
|
|
1839
|
+
__metadata("design:paramtypes", [String]),
|
|
1840
|
+
__metadata("design:returntype", Promise)
|
|
1841
|
+
], SpacesDomainController.prototype, "getActiveMediaActivity", null);
|
|
1842
|
+
__decorate([
|
|
1843
|
+
(0, common_1.Post)(':id/media/activities/:activityKey/preview'),
|
|
1844
|
+
(0, swagger_1.ApiOperation)({
|
|
1845
|
+
operationId: 'preview-spaces-module-space-media-activity',
|
|
1846
|
+
summary: 'Preview a media activity execution plan (dry-run)',
|
|
1847
|
+
description: 'Returns the resolved execution plan for a media activity without executing any commands, ' +
|
|
1848
|
+
'changing state, or emitting WebSocket events. Useful for debugging bindings and endpoints.',
|
|
1849
|
+
}),
|
|
1850
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1851
|
+
(0, swagger_1.ApiParam)({
|
|
1852
|
+
name: 'activityKey',
|
|
1853
|
+
type: 'string',
|
|
1854
|
+
enum: Object.values(spaces_home_control_constants_1.MediaActivityKey),
|
|
1855
|
+
description: 'Activity key to preview',
|
|
1856
|
+
}),
|
|
1857
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_model_1.MediaActivityDryRunPreviewResponseModel, 'Dry-run execution plan preview'),
|
|
1858
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid activity key'),
|
|
1859
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Binding missing or validation failed'),
|
|
1860
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1861
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1862
|
+
__param(1, (0, common_1.Param)('activityKey')),
|
|
1863
|
+
__metadata("design:type", Function),
|
|
1864
|
+
__metadata("design:paramtypes", [String, String]),
|
|
1865
|
+
__metadata("design:returntype", Promise)
|
|
1866
|
+
], SpacesDomainController.prototype, "previewMediaActivity", null);
|
|
1867
|
+
__decorate([
|
|
1868
|
+
(0, common_1.Post)(':id/media/activities/:activityKey/activate'),
|
|
1869
|
+
(0, swagger_1.ApiOperation)({
|
|
1870
|
+
operationId: 'activate-spaces-module-space-media-activity',
|
|
1871
|
+
summary: 'Activate a media activity',
|
|
1872
|
+
description: 'Activates a media activity for a space. Resolves the binding into an execution plan, ' +
|
|
1873
|
+
'executes device commands (power, input, volume), and persists the active state.',
|
|
1874
|
+
}),
|
|
1875
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1876
|
+
(0, swagger_1.ApiParam)({
|
|
1877
|
+
name: 'activityKey',
|
|
1878
|
+
type: 'string',
|
|
1879
|
+
enum: Object.values(spaces_home_control_constants_1.MediaActivityKey),
|
|
1880
|
+
description: 'Activity key to activate',
|
|
1881
|
+
}),
|
|
1882
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_model_1.MediaActivityActivationResponseModel, 'Activity activation result'),
|
|
1883
|
+
(0, api_documentation_decorator_1.ApiBadRequestResponse)('Invalid activity key'),
|
|
1884
|
+
(0, api_documentation_decorator_1.ApiUnprocessableEntityResponse)('Binding missing or validation failed'),
|
|
1885
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1886
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1887
|
+
__param(1, (0, common_1.Param)('activityKey')),
|
|
1888
|
+
__metadata("design:type", Function),
|
|
1889
|
+
__metadata("design:paramtypes", [String, String]),
|
|
1890
|
+
__metadata("design:returntype", Promise)
|
|
1891
|
+
], SpacesDomainController.prototype, "activateMediaActivity", null);
|
|
1892
|
+
__decorate([
|
|
1893
|
+
(0, common_1.Post)(':id/media/activities/deactivate'),
|
|
1894
|
+
(0, swagger_1.ApiOperation)({
|
|
1895
|
+
operationId: 'deactivate-spaces-module-space-media-activity',
|
|
1896
|
+
summary: 'Deactivate media activity',
|
|
1897
|
+
description: 'Deactivates the current media activity for a space, resetting the active state.',
|
|
1898
|
+
}),
|
|
1899
|
+
(0, swagger_1.ApiParam)({ name: 'id', type: 'string', format: 'uuid', description: 'Space ID' }),
|
|
1900
|
+
(0, api_documentation_decorator_1.ApiSuccessResponse)(media_activity_model_1.MediaActivityActivationResponseModel, 'Activity deactivated'),
|
|
1901
|
+
(0, api_documentation_decorator_1.ApiNotFoundResponse)('Space not found'),
|
|
1902
|
+
__param(0, (0, common_1.Param)('id', new common_1.ParseUUIDPipe({ version: '4' }))),
|
|
1903
|
+
__metadata("design:type", Function),
|
|
1904
|
+
__metadata("design:paramtypes", [String]),
|
|
1905
|
+
__metadata("design:returntype", Promise)
|
|
1906
|
+
], SpacesDomainController.prototype, "deactivateMediaActivity", null);
|
|
1907
|
+
__decorate([
|
|
1908
|
+
(0, common_1.Post)('suggestions/heartbeat'),
|
|
1909
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1910
|
+
(0, common_1.HttpCode)(200),
|
|
1911
|
+
(0, swagger_1.ApiOperation)({
|
|
1912
|
+
operationId: 'trigger-spaces-module-suggestion-heartbeat',
|
|
1913
|
+
summary: 'Trigger suggestion heartbeat (debug)',
|
|
1914
|
+
description: 'Manually runs the space suggestion heartbeat cycle. Evaluates all enabled spaces and emits suggestion events via WebSocket.',
|
|
1915
|
+
}),
|
|
1916
|
+
__metadata("design:type", Function),
|
|
1917
|
+
__metadata("design:paramtypes", []),
|
|
1918
|
+
__metadata("design:returntype", Promise)
|
|
1919
|
+
], SpacesDomainController.prototype, "triggerSuggestionHeartbeat", null);
|
|
1920
|
+
__decorate([
|
|
1921
|
+
(0, common_1.Post)('suggestions/test'),
|
|
1922
|
+
(0, roles_guard_1.Roles)(users_constants_1.UserRole.OWNER, users_constants_1.UserRole.ADMIN),
|
|
1923
|
+
(0, common_1.HttpCode)(200),
|
|
1924
|
+
(0, swagger_1.ApiOperation)({
|
|
1925
|
+
operationId: 'trigger-spaces-module-suggestion-test',
|
|
1926
|
+
summary: 'Emit a fake suggestion (debug)',
|
|
1927
|
+
description: 'Emits a fake lighting suggestion via WebSocket, bypassing all rules and cooldowns. ' +
|
|
1928
|
+
'Optionally specify a space_id in the request body to target a specific space.',
|
|
1929
|
+
}),
|
|
1930
|
+
__param(0, (0, common_1.Body)()),
|
|
1931
|
+
__metadata("design:type", Function),
|
|
1932
|
+
__metadata("design:paramtypes", [Object]),
|
|
1933
|
+
__metadata("design:returntype", Promise)
|
|
1934
|
+
], SpacesDomainController.prototype, "emitTestSuggestion", null);
|
|
1935
|
+
exports.SpacesDomainController = SpacesDomainController = __decorate([
|
|
1936
|
+
(0, swagger_1.ApiTags)(spaces_home_control_constants_2.SPACES_HOME_CONTROL_PLUGIN_API_TAG_NAME),
|
|
1937
|
+
(0, swagger_1.ApiExtraModels)(spaces_response_model_2.LightingStateResponseModel, spaces_response_model_2.LightingStateDataModel, spaces_response_model_2.RolesStateMapDataModel, spaces_response_model_2.RoleAggregatedStateDataModel, spaces_response_model_2.RoleLastIntentDataModel, spaces_response_model_2.OtherLightsStateDataModel, spaces_response_model_2.SensorStateResponseModel, spaces_response_model_2.SensorStateDataModel, spaces_response_model_2.SensorAdditionalReadingDataModel, spaces_response_model_2.SensorReadingDataModel, spaces_response_model_2.SensorRoleReadingsDataModel, spaces_response_model_2.EnvironmentSummaryDataModel, spaces_response_model_2.SafetyAlertDataModel, spaces_response_model_2.SensorTargetsResponseModel, spaces_response_model_2.SensorTargetDataModel, spaces_response_model_2.SensorRoleResponseModel, spaces_response_model_2.BulkSensorRolesResponseModel, spaces_response_model_2.BulkSensorRolesResultDataModel, spaces_response_model_2.BulkSensorRoleResultItemModel, media_activity_binding_model_1.BindingValidationResponseModel, media_activity_binding_model_1.BindingValidationReportModel, media_activity_binding_model_1.BindingValidationIssueModel, media_activity_model_1.MediaActivityDryRunPreviewResponseModel, media_activity_model_1.MediaActivityDryRunPreviewModel, media_activity_model_1.MediaActivityDryRunWarningModel),
|
|
1938
|
+
(0, common_1.Controller)('spaces'),
|
|
1939
|
+
__metadata("design:paramtypes", [spaces_service_1.SpacesService,
|
|
1940
|
+
home_control_spaces_service_1.HomeControlSpacesService,
|
|
1941
|
+
space_intent_service_1.SpaceIntentService,
|
|
1942
|
+
space_lighting_role_service_1.SpaceLightingRoleService,
|
|
1943
|
+
space_lighting_state_service_1.SpaceLightingStateService,
|
|
1944
|
+
space_climate_role_service_1.SpaceClimateRoleService,
|
|
1945
|
+
space_covers_role_service_1.SpaceCoversRoleService,
|
|
1946
|
+
space_sensor_role_service_1.SpaceSensorRoleService,
|
|
1947
|
+
space_sensor_state_service_1.SpaceSensorStateService,
|
|
1948
|
+
space_suggestion_service_1.SpaceSuggestionService,
|
|
1949
|
+
space_suggestion_heartbeat_service_1.SpaceSuggestionHeartbeatService,
|
|
1950
|
+
space_context_snapshot_service_1.SpaceContextSnapshotService,
|
|
1951
|
+
space_undo_history_service_1.SpaceUndoHistoryService,
|
|
1952
|
+
spec_1.IntentSpecLoaderService,
|
|
1953
|
+
derived_media_endpoint_service_1.DerivedMediaEndpointService,
|
|
1954
|
+
space_media_activity_binding_service_1.SpaceMediaActivityBindingService,
|
|
1955
|
+
space_media_activity_service_1.SpaceMediaActivityService,
|
|
1956
|
+
event_emitter_1.EventEmitter2])
|
|
1957
|
+
], SpacesDomainController);
|
|
1958
|
+
//# sourceMappingURL=spaces-domain.controller.js.map
|