@fastybird/smart-panel-backend 0.12.0-alpha.0 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.constants.js.map +1 -1
- package/dist/app.module.js +44 -17
- package/dist/app.module.js.map +1 -1
- package/dist/common/filters/bad-request-exception.filter.js +0 -6
- package/dist/common/filters/bad-request-exception.filter.js.map +1 -1
- package/dist/common/filters/global-error.filter.js +2 -6
- package/dist/common/filters/global-error.filter.js.map +1 -1
- package/dist/common/filters/internal-server-error-exception.filter.js +0 -5
- package/dist/common/filters/internal-server-error-exception.filter.js.map +1 -1
- package/dist/common/filters/not-found-exception.filter.d.ts +4 -0
- package/dist/common/filters/not-found-exception.filter.js +22 -3
- package/dist/common/filters/not-found-exception.filter.js.map +1 -1
- package/dist/common/filters/query-failed-exception.filter.js +0 -5
- package/dist/common/filters/query-failed-exception.filter.js.map +1 -1
- package/dist/common/filters/unprocessable-entity-exception.filter.js +0 -5
- package/dist/common/filters/unprocessable-entity-exception.filter.js.map +1 -1
- package/dist/common/plugin-relations/relation-loader.interface.d.ts +5 -0
- package/dist/common/plugin-relations/relation-loader.interface.js +3 -0
- package/dist/common/plugin-relations/relation-loader.interface.js.map +1 -0
- package/dist/common/services/app-instance-holder.service.d.ts +1 -2
- package/dist/common/services/app-instance-holder.service.js.map +1 -1
- package/dist/common/utils/config.utils.d.ts +0 -1
- package/dist/common/utils/config.utils.js +1 -11
- package/dist/common/utils/config.utils.js.map +1 -1
- package/dist/main.js +25 -6
- package/dist/main.js.map +1 -1
- package/dist/migrations/1000000000000-InitialSetup.js +8 -0
- package/dist/migrations/1000000000000-InitialSetup.js.map +1 -1
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.d.ts +6 -0
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js +15 -0
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js.map +1 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.d.ts +6 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.js +88 -0
- package/dist/migrations/1000000000003-UnifySpaceRoleTables.js.map +1 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.d.ts +6 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.js +165 -0
- package/dist/migrations/1000000000004-DisplaysSpaceOnly.js.map +1 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.d.ts +6 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.js +66 -0
- package/dist/migrations/1000000000005-SpacesSignageInfoPanel.js.map +1 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.d.ts +6 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.js +32 -0
- package/dist/migrations/1000000000006-DropLegacyRoleTables.js.map +1 -0
- package/dist/modules/api/interceptors/open-api-response.interceptor.js +1 -1
- package/dist/modules/api/interceptors/open-api-response.interceptor.js.map +1 -1
- package/dist/modules/auth/auth.module.js +44 -28
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.js +6 -0
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
- package/dist/modules/auth/controllers/tokens.controller.d.ts +10 -3
- package/dist/modules/auth/controllers/tokens.controller.js +96 -7
- package/dist/modules/auth/controllers/tokens.controller.js.map +1 -1
- package/dist/modules/auth/dto/create-personal-token.dto.d.ts +8 -0
- package/dist/modules/auth/dto/create-personal-token.dto.js +75 -0
- package/dist/modules/auth/dto/create-personal-token.dto.js.map +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts +1 -1
- package/dist/modules/auth/dto/register.dto.js +13 -11
- package/dist/modules/auth/dto/register.dto.js.map +1 -1
- package/dist/modules/auth/entities/auth.entity.d.ts +1 -0
- package/dist/modules/auth/entities/auth.entity.js +13 -0
- package/dist/modules/auth/entities/auth.entity.js.map +1 -1
- package/dist/modules/auth/guards/auth.guard.d.ts +0 -1
- package/dist/modules/auth/guards/auth.guard.js +8 -26
- package/dist/modules/auth/guards/auth.guard.js.map +1 -1
- package/dist/modules/auth/guards/display-aware-throttler.guard.d.ts +16 -0
- package/dist/modules/auth/guards/display-aware-throttler.guard.js +133 -0
- package/dist/modules/auth/guards/display-aware-throttler.guard.js.map +1 -0
- package/dist/modules/auth/services/auth.service.js +1 -1
- package/dist/modules/auth/services/auth.service.js.map +1 -1
- package/dist/modules/auth/services/tokens.service.d.ts +10 -0
- package/dist/modules/auth/services/tokens.service.js +35 -0
- package/dist/modules/auth/services/tokens.service.js.map +1 -1
- package/dist/modules/auth/utils/token.utils.d.ts +7 -0
- package/dist/modules/auth/utils/token.utils.js +12 -1
- package/dist/modules/auth/utils/token.utils.js.map +1 -1
- package/dist/modules/buddy/buddy.module.d.ts +5 -1
- package/dist/modules/buddy/buddy.module.js +42 -15
- package/dist/modules/buddy/buddy.module.js.map +1 -1
- package/dist/modules/buddy/buddy.utils.d.ts +8 -0
- package/dist/modules/buddy/buddy.utils.js +49 -0
- package/dist/modules/buddy/buddy.utils.js.map +1 -1
- package/dist/modules/buddy/controllers/buddy-suggestions.controller.js +2 -2
- package/dist/modules/buddy/controllers/buddy-suggestions.controller.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-conversation.entity.js +3 -3
- package/dist/modules/buddy/entities/buddy-conversation.entity.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-message.entity.js +2 -2
- package/dist/modules/buddy/entities/buddy-message.entity.js.map +1 -1
- package/dist/modules/buddy/entities/buddy-suggestion.entity.d.ts +19 -0
- package/dist/modules/buddy/entities/buddy-suggestion.entity.js +93 -0
- package/dist/modules/buddy/entities/buddy-suggestion.entity.js.map +1 -0
- package/dist/modules/buddy/listeners/media-activity-event.listener.js +3 -3
- package/dist/modules/buddy/listeners/media-activity-event.listener.js.map +1 -1
- package/dist/modules/buddy/platforms/llm-provider.platform.d.ts +6 -0
- package/dist/modules/buddy/platforms/openai-sdk.utils.d.ts +2 -1
- package/dist/modules/buddy/platforms/openai-sdk.utils.js +12 -1
- package/dist/modules/buddy/platforms/openai-sdk.utils.js.map +1 -1
- package/dist/modules/buddy/services/buddy-context.service.js +2 -2
- package/dist/modules/buddy/services/buddy-context.service.js.map +1 -1
- package/dist/modules/buddy/services/buddy-conversation.service.js +23 -8
- package/dist/modules/buddy/services/buddy-conversation.service.js.map +1 -1
- package/dist/modules/buddy/services/buddy-personality.service.d.ts +1 -1
- package/dist/modules/buddy/services/buddy-personality.service.js.map +1 -1
- package/dist/modules/buddy/services/heartbeat.service.js +2 -2
- package/dist/modules/buddy/services/heartbeat.service.js.map +1 -1
- package/dist/modules/buddy/services/llm-provider.service.js +2 -10
- package/dist/modules/buddy/services/llm-provider.service.js.map +1 -1
- package/dist/modules/buddy/services/module-reset.service.d.ts +3 -1
- package/dist/modules/buddy/services/module-reset.service.js +6 -1
- package/dist/modules/buddy/services/module-reset.service.js.map +1 -1
- package/dist/modules/buddy/services/pattern-detector.service.d.ts +4 -1
- package/dist/modules/buddy/services/pattern-detector.service.js +10 -3
- package/dist/modules/buddy/services/pattern-detector.service.js.map +1 -1
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.d.ts +4 -1
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.js +10 -4
- package/dist/modules/buddy/services/scene-suggestion-evaluator.service.js.map +1 -1
- package/dist/modules/buddy/services/stt-provider.service.js +2 -10
- package/dist/modules/buddy/services/stt-provider.service.js.map +1 -1
- package/dist/modules/buddy/services/suggestion-engine.service.d.ts +19 -13
- package/dist/modules/buddy/services/suggestion-engine.service.js +170 -103
- package/dist/modules/buddy/services/suggestion-engine.service.js.map +1 -1
- package/dist/modules/buddy/services/tts-provider.service.js +2 -10
- package/dist/modules/buddy/services/tts-provider.service.js.map +1 -1
- package/dist/modules/config/config.constants.d.ts +2 -1
- package/dist/modules/config/config.constants.js +1 -0
- package/dist/modules/config/config.constants.js.map +1 -1
- package/dist/modules/config/config.module.d.ts +5 -1
- package/dist/modules/config/config.module.js +78 -14
- package/dist/modules/config/config.module.js.map +1 -1
- package/dist/modules/config/services/config.service.d.ts +1 -0
- package/dist/modules/config/services/config.service.js +11 -1
- package/dist/modules/config/services/config.service.js.map +1 -1
- package/dist/modules/dashboard/dashboard.module.js +21 -18
- package/dist/modules/dashboard/dashboard.module.js.map +1 -1
- package/dist/modules/dashboard/entities/dashboard.relations.d.ts +1 -5
- package/dist/modules/devices/devices.module.js +24 -16
- package/dist/modules/devices/devices.module.js.map +1 -1
- package/dist/modules/devices/services/device-zones.service.js +2 -2
- package/dist/modules/devices/services/device-zones.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/displays/displays.constants.d.ts +0 -5
- package/dist/modules/displays/displays.constants.js +1 -7
- package/dist/modules/displays/displays.constants.js.map +1 -1
- package/dist/modules/displays/displays.module.js +27 -23
- package/dist/modules/displays/displays.module.js.map +1 -1
- package/dist/modules/displays/dto/update-display.dto.d.ts +2 -3
- package/dist/modules/displays/dto/update-display.dto.js +4 -19
- package/dist/modules/displays/dto/update-display.dto.js.map +1 -1
- package/dist/modules/displays/entities/displays.entity.d.ts +3 -4
- package/dist/modules/displays/entities/displays.entity.js +8 -25
- package/dist/modules/displays/entities/displays.entity.js.map +1 -1
- package/dist/modules/displays/services/displays.service.d.ts +4 -2
- package/dist/modules/displays/services/displays.service.js +19 -24
- package/dist/modules/displays/services/displays.service.js.map +1 -1
- package/dist/modules/displays/services/home-resolution.service.d.ts +7 -2
- package/dist/modules/displays/services/home-resolution.service.js +50 -6
- package/dist/modules/displays/services/home-resolution.service.js.map +1 -1
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.d.ts +9 -0
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.js +26 -0
- package/dist/modules/displays/services/space-home-page-resolver-registry.service.js.map +1 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.d.ts +9 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.js +26 -0
- package/dist/modules/displays/services/space-selection-validator-registry.service.js.map +1 -0
- package/dist/modules/energy/energy.module.js +29 -15
- package/dist/modules/energy/energy.module.js.map +1 -1
- package/dist/modules/extensions/controllers/actions.controller.d.ts +9 -4
- package/dist/modules/extensions/controllers/actions.controller.js +63 -10
- package/dist/modules/extensions/controllers/actions.controller.js.map +1 -1
- package/dist/modules/extensions/extensions.module.js +31 -28
- package/dist/modules/extensions/extensions.module.js.map +1 -1
- package/dist/modules/extensions/extensions.openapi.d.ts +3 -3
- package/dist/modules/extensions/extensions.openapi.js +2 -0
- package/dist/modules/extensions/extensions.openapi.js.map +1 -1
- package/dist/modules/extensions/models/action.model.d.ts +13 -0
- package/dist/modules/extensions/models/action.model.js +89 -3
- package/dist/modules/extensions/models/action.model.js.map +1 -1
- package/dist/modules/extensions/models/actions-response.model.d.ts +4 -1
- package/dist/modules/extensions/models/actions-response.model.js +19 -1
- package/dist/modules/extensions/models/actions-response.model.js.map +1 -1
- package/dist/modules/extensions/models/extension.model.js +5 -0
- package/dist/modules/extensions/models/extension.model.js.map +1 -1
- package/dist/modules/extensions/models/service-status.model.js +7 -0
- package/dist/modules/extensions/models/service-status.model.js.map +1 -1
- package/dist/modules/extensions/services/action-audit.service.d.ts +21 -0
- package/dist/modules/extensions/services/action-audit.service.js +49 -0
- package/dist/modules/extensions/services/action-audit.service.js.map +1 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.d.ts +11 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.js +28 -0
- package/dist/modules/extensions/services/base-managed-plugin.service.js.map +1 -0
- package/dist/modules/extensions/services/extension-action-registry.service.d.ts +6 -1
- package/dist/modules/extensions/services/extension-action-registry.service.js +22 -3
- package/dist/modules/extensions/services/extension-action-registry.service.js.map +1 -1
- package/dist/modules/extensions/services/extension-action.interface.d.ts +3 -0
- package/dist/modules/extensions/services/extension-action.interface.js +3 -1
- package/dist/modules/extensions/services/extension-action.interface.js.map +1 -1
- package/dist/modules/intents/intents.module.js +27 -26
- package/dist/modules/intents/intents.module.js.map +1 -1
- package/dist/modules/mdns/mdns.module.js +24 -19
- package/dist/modules/mdns/mdns.module.js.map +1 -1
- package/dist/modules/platform/dto/system-info.dto.d.ts +2 -0
- package/dist/modules/platform/dto/system-info.dto.js +7 -0
- package/dist/modules/platform/dto/system-info.dto.js.map +1 -1
- package/dist/modules/platform/platform.module.js +25 -17
- package/dist/modules/platform/platform.module.js.map +1 -1
- package/dist/modules/platform/platforms/abstract.platform.d.ts +44 -0
- package/dist/modules/platform/platforms/abstract.platform.js +267 -0
- package/dist/modules/platform/platforms/abstract.platform.js.map +1 -1
- package/dist/modules/platform/platforms/docker.platform.d.ts +2 -0
- package/dist/modules/platform/platforms/docker.platform.js +3 -0
- package/dist/modules/platform/platforms/docker.platform.js.map +1 -1
- package/dist/modules/platform/platforms/generic.platform.d.ts +2 -1
- package/dist/modules/platform/platforms/generic.platform.js +17 -15
- package/dist/modules/platform/platforms/generic.platform.js.map +1 -1
- package/dist/modules/platform/platforms/home-assistant.platform.d.ts +4 -0
- package/dist/modules/platform/platforms/home-assistant.platform.js +21 -0
- package/dist/modules/platform/platforms/home-assistant.platform.js.map +1 -1
- package/dist/modules/platform/platforms/raspberry.platform.js +22 -40
- package/dist/modules/platform/platforms/raspberry.platform.js.map +1 -1
- package/dist/modules/platform/services/platform.service.d.ts +2 -0
- package/dist/modules/platform/services/platform.service.js +7 -0
- package/dist/modules/platform/services/platform.service.js.map +1 -1
- package/dist/modules/scenes/scenes.module.js +18 -18
- package/dist/modules/scenes/scenes.module.js.map +1 -1
- package/dist/modules/security/security.module.js +22 -17
- package/dist/modules/security/security.module.js.map +1 -1
- package/dist/modules/spaces/controllers/spaces.controller.d.ts +5 -115
- package/dist/modules/spaces/controllers/spaces.controller.js +22 -1922
- package/dist/modules/spaces/controllers/spaces.controller.js.map +1 -1
- package/dist/modules/spaces/dto/create-space.dto.d.ts +1 -5
- package/dist/modules/spaces/dto/create-space.dto.js +0 -61
- package/dist/modules/spaces/dto/create-space.dto.js.map +1 -1
- package/dist/modules/spaces/dto/update-space.dto.d.ts +1 -5
- package/dist/modules/spaces/dto/update-space.dto.js +0 -61
- package/dist/modules/spaces/dto/update-space.dto.js.map +1 -1
- package/dist/modules/spaces/entities/space-role.entity.d.ts +8 -0
- package/dist/modules/spaces/entities/space-role.entity.js +58 -0
- package/dist/modules/spaces/entities/space-role.entity.js.map +1 -0
- package/dist/modules/spaces/entities/space.entity.d.ts +3 -6
- package/dist/modules/spaces/entities/space.entity.js +11 -74
- package/dist/modules/spaces/entities/space.entity.js.map +1 -1
- package/dist/modules/spaces/entities/space.relations.d.ts +11 -0
- package/dist/modules/spaces/entities/space.relations.js +3 -0
- package/dist/modules/spaces/entities/space.relations.js.map +1 -0
- package/dist/modules/spaces/models/spaces-response.model.d.ts +1 -522
- package/dist/modules/spaces/models/spaces-response.model.js +23 -4150
- package/dist/modules/spaces/models/spaces-response.model.js.map +1 -1
- package/dist/modules/spaces/services/space-create-builder-registry.service.d.ts +6 -0
- package/dist/modules/spaces/services/space-create-builder-registry.service.js +26 -0
- package/dist/modules/spaces/services/space-create-builder-registry.service.js.map +1 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.d.ts +6 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.js +26 -0
- package/dist/modules/spaces/services/space-relations-loader-registry.service.js.map +1 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.d.ts +12 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.js +39 -0
- package/dist/modules/spaces/services/space-roles-type-mapper.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.d.ts +17 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.js +36 -0
- package/dist/modules/spaces/services/spaces-type-mapper.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces.service.d.ts +4 -12
- package/dist/modules/spaces/services/spaces.service.js +120 -160
- package/dist/modules/spaces/services/spaces.service.js.map +1 -1
- package/dist/modules/spaces/spaces.constants.d.ts +13 -292
- package/dist/modules/spaces/spaces.constants.js +13 -1449
- package/dist/modules/spaces/spaces.constants.js.map +1 -1
- package/dist/modules/spaces/spaces.module.d.ts +2 -9
- package/dist/modules/spaces/spaces.module.js +51 -108
- package/dist/modules/spaces/spaces.module.js.map +1 -1
- package/dist/modules/spaces/spaces.openapi.d.ts +3 -16
- package/dist/modules/spaces/spaces.openapi.js +0 -136
- package/dist/modules/spaces/spaces.openapi.js.map +1 -1
- package/dist/modules/stats/controllers/prometheus.controller.js +0 -2
- package/dist/modules/stats/controllers/prometheus.controller.js.map +1 -1
- package/dist/modules/storage/models/config.model.js +2 -4
- package/dist/modules/storage/models/config.model.js.map +1 -1
- package/dist/modules/storage/services/storage.service.d.ts +4 -10
- package/dist/modules/storage/services/storage.service.js +21 -60
- package/dist/modules/storage/services/storage.service.js.map +1 -1
- package/dist/modules/storage/storage.constants.d.ts +2 -0
- package/dist/modules/storage/storage.constants.js +3 -1
- package/dist/modules/storage/storage.constants.js.map +1 -1
- package/dist/modules/storage/storage.module.js +26 -7
- package/dist/modules/storage/storage.module.js.map +1 -1
- package/dist/modules/swagger/commands/serve-swagger.command.d.ts +14 -0
- package/dist/modules/swagger/commands/serve-swagger.command.js +60 -0
- package/dist/modules/swagger/commands/serve-swagger.command.js.map +1 -0
- package/dist/modules/swagger/swagger.module.js +2 -0
- package/dist/modules/swagger/swagger.module.js.map +1 -1
- package/dist/modules/system/backup-contribution.module.d.ts +2 -0
- package/dist/modules/system/backup-contribution.module.js +22 -0
- package/dist/modules/system/backup-contribution.module.js.map +1 -0
- package/dist/modules/system/controllers/backup.controller.d.ts +17 -0
- package/dist/modules/system/controllers/backup.controller.js +308 -0
- package/dist/modules/system/controllers/backup.controller.js.map +1 -0
- package/dist/modules/system/dto/create-backup.dto.d.ts +6 -0
- package/dist/modules/system/dto/create-backup.dto.js +43 -0
- package/dist/modules/system/dto/create-backup.dto.js.map +1 -0
- package/dist/modules/system/models/backup-response.model.d.ts +8 -0
- package/dist/modules/system/models/backup-response.model.js +46 -0
- package/dist/modules/system/models/backup-response.model.js.map +1 -0
- package/dist/modules/system/models/backup.model.d.ts +14 -0
- package/dist/modules/system/models/backup.model.js +103 -0
- package/dist/modules/system/models/backup.model.js.map +1 -0
- package/dist/modules/system/models/system.model.d.ts +3 -1
- package/dist/modules/system/models/system.model.js +26 -0
- package/dist/modules/system/models/system.model.js.map +1 -1
- package/dist/modules/system/scripts/update-worker.sh +304 -0
- package/dist/modules/system/services/backup-contribution-registry.service.d.ts +24 -0
- package/dist/modules/system/services/backup-contribution-registry.service.js +52 -0
- package/dist/modules/system/services/backup-contribution-registry.service.js.map +1 -0
- package/dist/modules/system/services/backup.service.d.ts +52 -0
- package/dist/modules/system/services/backup.service.js +630 -0
- package/dist/modules/system/services/backup.service.js.map +1 -0
- package/dist/modules/system/services/house-mode-actions.service.d.ts +1 -1
- package/dist/modules/system/services/house-mode-actions.service.js +5 -5
- package/dist/modules/system/services/house-mode-actions.service.js.map +1 -1
- package/dist/modules/system/services/system-command.service.d.ts +7 -1
- package/dist/modules/system/services/system-command.service.js +24 -4
- package/dist/modules/system/services/system-command.service.js.map +1 -1
- package/dist/modules/system/services/system.service.js +4 -1
- package/dist/modules/system/services/system.service.js.map +1 -1
- package/dist/modules/system/services/update-executor.service.d.ts +4 -0
- package/dist/modules/system/services/update-executor.service.js +130 -10
- package/dist/modules/system/services/update-executor.service.js.map +1 -1
- package/dist/modules/system/system.constants.d.ts +7 -0
- package/dist/modules/system/system.constants.js +9 -1
- package/dist/modules/system/system.constants.js.map +1 -1
- package/dist/modules/system/system.module.d.ts +5 -1
- package/dist/modules/system/system.module.js +95 -31
- package/dist/modules/system/system.module.js.map +1 -1
- package/dist/modules/system/system.openapi.d.ts +4 -1
- package/dist/modules/system/system.openapi.js +8 -0
- package/dist/modules/system/system.openapi.js.map +1 -1
- package/dist/modules/users/controllers/users.controller.js +9 -0
- package/dist/modules/users/controllers/users.controller.js.map +1 -1
- package/dist/modules/users/dto/create-user.dto.js +1 -0
- package/dist/modules/users/dto/create-user.dto.js.map +1 -1
- package/dist/modules/users/dto/update-user.dto.d.ts +1 -0
- package/dist/modules/users/dto/update-user.dto.js +15 -1
- package/dist/modules/users/dto/update-user.dto.js.map +1 -1
- package/dist/modules/users/services/users.service.d.ts +1 -0
- package/dist/modules/users/services/users.service.js +12 -2
- package/dist/modules/users/services/users.service.js.map +1 -1
- package/dist/modules/users/users.constants.d.ts +3 -0
- package/dist/modules/users/users.constants.js +35 -1
- package/dist/modules/users/users.constants.js.map +1 -1
- package/dist/modules/users/users.module.js +29 -13
- package/dist/modules/users/users.module.js.map +1 -1
- package/dist/modules/weather/weather.module.js +20 -18
- package/dist/modules/weather/weather.module.js.map +1 -1
- package/dist/modules/websocket/dto/client-user.dto.js +25 -0
- package/dist/modules/websocket/dto/client-user.dto.js.map +1 -1
- package/dist/modules/websocket/dto/ws-client.dto.js +26 -0
- package/dist/modules/websocket/dto/ws-client.dto.js.map +1 -1
- package/dist/modules/websocket/gateway/websocket.gateway.d.ts +2 -2
- package/dist/modules/websocket/gateway/websocket.gateway.js +27 -9
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/modules/websocket/services/command-event-registry.service.d.ts +3 -1
- package/dist/modules/websocket/services/command-event-registry.service.js +5 -4
- package/dist/modules/websocket/services/command-event-registry.service.js.map +1 -1
- package/dist/plugins/buddy-claude/buddy-claude.plugin.js +24 -11
- package/dist/plugins/buddy-claude/buddy-claude.plugin.js.map +1 -1
- package/dist/plugins/buddy-claude-setup-token/buddy-claude-setup-token.plugin.js +21 -11
- package/dist/plugins/buddy-claude-setup-token/buddy-claude-setup-token.plugin.js.map +1 -1
- package/dist/plugins/buddy-discord/buddy-discord.plugin.js +28 -16
- package/dist/plugins/buddy-discord/buddy-discord.plugin.js.map +1 -1
- package/dist/plugins/buddy-elevenlabs/buddy-elevenlabs.plugin.js +22 -11
- package/dist/plugins/buddy-elevenlabs/buddy-elevenlabs.plugin.js.map +1 -1
- package/dist/plugins/buddy-ollama/buddy-ollama.plugin.js +28 -12
- package/dist/plugins/buddy-ollama/buddy-ollama.plugin.js.map +1 -1
- package/dist/plugins/buddy-openai/buddy-openai.plugin.js +24 -15
- package/dist/plugins/buddy-openai/buddy-openai.plugin.js.map +1 -1
- package/dist/plugins/buddy-openai/platforms/openai.provider.js +1 -0
- package/dist/plugins/buddy-openai/platforms/openai.provider.js.map +1 -1
- package/dist/plugins/buddy-openai-codex/buddy-openai-codex.plugin.js +26 -15
- package/dist/plugins/buddy-openai-codex/buddy-openai-codex.plugin.js.map +1 -1
- package/dist/plugins/buddy-stt-whisper-local/buddy-stt-whisper-local.plugin.js +23 -9
- package/dist/plugins/buddy-stt-whisper-local/buddy-stt-whisper-local.plugin.js.map +1 -1
- package/dist/plugins/buddy-system-tts/buddy-system-tts.plugin.js +21 -10
- package/dist/plugins/buddy-system-tts/buddy-system-tts.plugin.js.map +1 -1
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.js +22 -11
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.js.map +1 -1
- package/dist/plugins/buddy-voiceai/buddy-voiceai.plugin.js +22 -12
- package/dist/plugins/buddy-voiceai/buddy-voiceai.plugin.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.js +24 -12
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.d.ts +2 -2
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.js +3 -3
- package/dist/plugins/buddy-whatsapp/controllers/whatsapp-webhook.controller.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.d.ts +2 -1
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.js +31 -12
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.js.map +1 -1
- package/dist/plugins/data-sources-device-channel/data-sources-device-channel.plugin.js +16 -30
- package/dist/plugins/data-sources-device-channel/data-sources-device-channel.plugin.js.map +1 -1
- package/dist/plugins/data-sources-weather/data-sources-weather.plugin.js +17 -29
- package/dist/plugins/data-sources-weather/data-sources-weather.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +37 -136
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/home-assistant-discovered-helper.dto.js +22 -2
- package/dist/plugins/devices-home-assistant/dto/home-assistant-discovered-helper.dto.js.map +1 -1
- package/dist/plugins/devices-home-assistant/models/config.model.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/models/config.model.js +12 -0
- package/dist/plugins/devices-home-assistant/models/config.model.js.map +1 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.d.ts +3 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js +11 -2
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js +0 -6
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.d.ts +10 -0
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.js +47 -0
- package/dist/plugins/devices-home-assistant/services/ha-supervisor.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.d.ts +3 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.js +8 -2
- package/dist/plugins/devices-home-assistant/services/home-assistant-config-validator.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.d.ts +5 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.js +27 -7
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +9 -7
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +58 -24
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +1 -0
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.js +20 -17
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.d.ts +7 -2
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.js +83 -2
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +4 -0
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +86 -11
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +8 -0
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +45 -0
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.d.ts +3 -3
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js +4 -0
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.d.ts +6 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +72 -21
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.js +24 -6
- package/dist/plugins/devices-shelly-ng/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/entities/devices-shelly-ng.entity.js +12 -0
- package/dist/plugins/devices-shelly-ng/entities/devices-shelly-ng.entity.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/entities/shelly-ng-device-address.entity.js +2 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-ng-device-address.entity.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/config.model.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/models/config.model.js +18 -6
- package/dist/plugins/devices-shelly-ng/models/config.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.d.ts +4 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.js +15 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.d.ts +30 -0
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.js +269 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.d.ts +64 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.js +301 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-discovery.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +17 -7
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +110 -15
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.d.ts +5 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +28 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +197 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.d.ts +7 -2
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.js +83 -2
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.d.ts +3 -3
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.js +4 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js +27 -23
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.d.ts +4 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.js +15 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.d.ts +31 -0
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.js +279 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.d.ts +0 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +2 -9
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.d.ts +0 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js +2 -15
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.d.ts +9 -2
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.js +93 -20
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.d.ts +62 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.js +314 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-discovery.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.d.ts +3 -6
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js +13 -37
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.d.ts +2 -0
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.js +23 -0
- package/dist/plugins/devices-shelly-v1/utils/descriptor.utils.js.map +1 -0
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js +19 -23
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js.map +1 -1
- package/dist/plugins/devices-wled/devices-wled.plugin.js +30 -20
- package/dist/plugins/devices-wled/devices-wled.plugin.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js +0 -6
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled.service.d.ts +3 -6
- package/dist/plugins/devices-wled/services/wled.service.js +3 -20
- package/dist/plugins/devices-wled/services/wled.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.d.ts +14 -0
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.js +185 -0
- package/dist/plugins/devices-zigbee2mqtt/controllers/zigbee2mqtt-wizard.controller.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.d.ts +5 -3
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.js +12 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.openapi.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js +43 -54
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.d.ts +12 -0
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.js +73 -0
- package/dist/plugins/devices-zigbee2mqtt/dto/wizard-adopt.dto.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.d.ts +38 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.js +259 -0
- package/dist/plugins/devices-zigbee2mqtt/models/wizard.model.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.d.ts +7 -0
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.js +30 -1
- package/dist/plugins/devices-zigbee2mqtt/models/zigbee2mqtt-response.model.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +22 -0
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.d.ts +70 -0
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.js +361 -0
- package/dist/plugins/devices-zigbee2mqtt/services/wizard.service.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js +23 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.d.ts +10 -7
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +46 -22
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.update-config.dto.d.ts → plugins/influx-v1/dto/update-config.dto.d.ts} +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.update-config.dto.js → plugins/influx-v1/dto/update-config.dto.js} +3 -3
- package/dist/plugins/influx-v1/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/influx-v1/influx-v1.constants.js.map +1 -0
- package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.openapi.d.ts +1 -1
- package/dist/plugins/influx-v1/influx-v1.openapi.js +7 -0
- package/dist/plugins/influx-v1/influx-v1.openapi.js.map +1 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.d.ts +15 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.js +109 -0
- package/dist/plugins/influx-v1/influx-v1.plugin.js.map +1 -0
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.config.model.d.ts → plugins/influx-v1/models/config.model.d.ts} +1 -1
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.config.model.js → plugins/influx-v1/models/config.model.js} +3 -3
- package/dist/plugins/influx-v1/models/config.model.js.map +1 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.d.ts +20 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js +128 -0
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js.map +1 -0
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.plugin.d.ts → plugins/influx-v1/services/influx-v1.storage.d.ts} +3 -3
- package/dist/{modules/storage/plugins/influx-v1/influx-v1.plugin.js → plugins/influx-v1/services/influx-v1.storage.js} +9 -9
- package/dist/plugins/influx-v1/services/influx-v1.storage.js.map +1 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.d.ts +8 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.js +82 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.constants.d.ts +4 -0
- package/dist/plugins/influx-v2/influx-v2.constants.js +8 -0
- package/dist/plugins/influx-v2/influx-v2.constants.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.d.ts +2 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.js +7 -0
- package/dist/plugins/influx-v2/influx-v2.openapi.js.map +1 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.d.ts +15 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.js +109 -0
- package/dist/plugins/influx-v2/influx-v2.plugin.js.map +1 -0
- package/dist/plugins/influx-v2/models/config.model.d.ts +9 -0
- package/dist/plugins/influx-v2/models/config.model.js +93 -0
- package/dist/plugins/influx-v2/models/config.model.js.map +1 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.d.ts +20 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js +132 -0
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js.map +1 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.d.ts +33 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.js +230 -0
- package/dist/plugins/influx-v2/services/influx-v2.storage.js.map +1 -0
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.js +20 -29
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.js.map +1 -1
- package/dist/{modules/storage/plugins/memory/memory.update-config.dto.d.ts → plugins/memory-storage/dto/update-config.dto.d.ts} +1 -1
- package/dist/{modules/storage/plugins/memory/memory.update-config.dto.js → plugins/memory-storage/dto/update-config.dto.js} +5 -5
- package/dist/plugins/memory-storage/dto/update-config.dto.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.constants.js → plugins/memory-storage/memory-storage.constants.js} +1 -1
- package/dist/plugins/memory-storage/memory-storage.constants.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.openapi.d.ts → plugins/memory-storage/memory-storage.openapi.d.ts} +1 -1
- package/dist/plugins/memory-storage/memory-storage.openapi.js +7 -0
- package/dist/plugins/memory-storage/memory-storage.openapi.js.map +1 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.d.ts +15 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.js +92 -0
- package/dist/plugins/memory-storage/memory-storage.plugin.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.config.model.d.ts → plugins/memory-storage/models/config.model.d.ts} +1 -1
- package/dist/{modules/storage/plugins/memory/memory.config.model.js → plugins/memory-storage/models/config.model.js} +5 -5
- package/dist/plugins/memory-storage/models/config.model.js.map +1 -0
- package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/in-memory-timeseries.store.d.ts +1 -1
- package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/in-memory-timeseries.store.js +4 -4
- package/dist/plugins/memory-storage/services/in-memory-timeseries.store.js.map +1 -0
- package/dist/plugins/memory-storage/services/influxql-parser.js.map +1 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.d.ts +14 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js +87 -0
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js.map +1 -0
- package/dist/{modules/storage/plugins/memory/memory.plugin.d.ts → plugins/memory-storage/services/memory-storage.storage.d.ts} +3 -3
- package/dist/{modules/storage/plugins/memory/memory.plugin.js → plugins/memory-storage/services/memory-storage.storage.js} +8 -8
- package/dist/plugins/memory-storage/services/memory-storage.storage.js.map +1 -0
- package/dist/plugins/pages-cards/pages-cards.plugin.js +15 -26
- package/dist/plugins/pages-cards/pages-cards.plugin.js.map +1 -1
- package/dist/plugins/pages-device-detail/pages-device-detail.plugin.js +16 -25
- package/dist/plugins/pages-device-detail/pages-device-detail.plugin.js.map +1 -1
- package/dist/plugins/pages-tiles/pages-tiles.plugin.js +15 -26
- package/dist/plugins/pages-tiles/pages-tiles.plugin.js.map +1 -1
- package/dist/plugins/scenes-local/scenes-local.plugin.js +21 -22
- package/dist/plugins/scenes-local/scenes-local.plugin.js.map +1 -1
- package/dist/plugins/simulator/services/scenario-executor.service.d.ts +5 -5
- package/dist/plugins/simulator/services/scenario-executor.service.js +7 -6
- package/dist/plugins/simulator/services/scenario-executor.service.js.map +1 -1
- package/dist/plugins/simulator/services/simulator-actions.service.js +3 -0
- package/dist/plugins/simulator/services/simulator-actions.service.js.map +1 -1
- package/dist/plugins/simulator/simulator.plugin.js +49 -58
- package/dist/plugins/simulator/simulator.plugin.js.map +1 -1
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.d.ts +119 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js +1958 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-intent.dto.js +24 -24
- package/dist/plugins/spaces-home-control/dto/climate-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/climate-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/climate-role.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-intent.dto.js +18 -18
- package/dist/plugins/spaces-home-control/dto/covers-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/covers-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/covers-role.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.d.ts +8 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.js +85 -0
- package/dist/plugins/spaces-home-control/dto/create-home-control-space.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-intent.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-intent.dto.js +34 -34
- package/dist/plugins/spaces-home-control/dto/lighting-intent.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/lighting-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/lighting-role.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/media-activity-binding.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/media-activity-binding.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/media-activity-binding.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/sensor-role.dto.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/sensor-role.dto.js +4 -4
- package/dist/plugins/spaces-home-control/dto/sensor-role.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/status-widget.dto.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/suggestion.dto.d.ts +2 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/dto/suggestion.dto.js +5 -4
- package/dist/plugins/spaces-home-control/dto/suggestion.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-home-control/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.d.ts +8 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.js +85 -0
- package/dist/plugins/spaces-home-control/dto/update-home-control-space.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.d.ts +8 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.js +91 -0
- package/dist/plugins/spaces-home-control/entities/room-space.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-active-media-activity.entity.d.ts +11 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-active-media-activity.entity.js +23 -30
- package/dist/plugins/spaces-home-control/entities/space-active-media-activity.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-climate-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-climate-role.entity.js +25 -32
- package/dist/plugins/spaces-home-control/entities/space-climate-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-covers-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-covers-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-covers-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-lighting-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-lighting-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-lighting-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-media-activity-binding.entity.d.ts +15 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-media-activity-binding.entity.js +20 -28
- package/dist/plugins/spaces-home-control/entities/space-media-activity-binding.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-sensor-role.entity.d.ts +13 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/entities/space-sensor-role.entity.js +27 -34
- package/dist/plugins/spaces-home-control/entities/space-sensor-role.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.d.ts +8 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.js +91 -0
- package/dist/plugins/spaces-home-control/entities/zone-space.entity.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-activity.listener.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-activity.listener.js +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-climate-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-climate-state.listener.js +6 -5
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-lighting-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-lighting-state.listener.js +6 -5
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-sensor-state.listener.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/space-sensor-state.listener.js +9 -8
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/websocket-exchange.listener.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/listeners/websocket-exchange.listener.js +5 -5
- package/dist/plugins/spaces-home-control/listeners/websocket-exchange.listener.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-home-control/models/config.model.js +49 -0
- package/dist/plugins/spaces-home-control/models/config.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/derived-media-endpoint.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/derived-media-endpoint.model.js +4 -4
- package/dist/plugins/spaces-home-control/models/derived-media-endpoint.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity-binding.model.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity-binding.model.js +1 -1
- package/dist/plugins/spaces-home-control/models/media-activity-binding.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-activity.model.js +6 -6
- package/dist/plugins/spaces-home-control/models/media-activity.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-routing.model.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/models/media-routing.model.js +4 -4
- package/dist/plugins/spaces-home-control/models/media-routing.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.d.ts +524 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js +4145 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-scenario-templates.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-scenario-templates.js +3 -3
- package/dist/plugins/spaces-home-control/services/__fixtures__/media-scenario-templates.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-test-harness.d.ts +1 -1
- package/dist/plugins/spaces-home-control/services/__fixtures__/media-test-harness.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/climate-intent.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/climate-intent.service.js +35 -34
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/covers-intent.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/covers-intent.service.js +48 -47
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/derived-media-endpoint.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/derived-media-endpoint.service.js +28 -27
- package/dist/plugins/spaces-home-control/services/derived-media-endpoint.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.d.ts +4 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.js +20 -0
- package/dist/plugins/spaces-home-control/services/home-control-home-page.resolver.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.d.ts +24 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.js +182 -0
- package/dist/plugins/spaces-home-control/services/home-control-spaces.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/lighting-intent.service.d.ts +6 -6
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/lighting-intent.service.js +68 -67
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/media-capability.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/media-capability.service.js +20 -19
- package/dist/plugins/spaces-home-control/services/media-capability.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-role.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-role.service.js +18 -17
- package/dist/plugins/spaces-home-control/services/space-climate-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-state.service.d.ts +5 -5
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-climate-state.service.js +32 -31
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-context-snapshot.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-context-snapshot.service.js +7 -6
- package/dist/plugins/spaces-home-control/services/space-context-snapshot.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-role.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-role.service.js +28 -25
- package/dist/plugins/spaces-home-control/services/space-covers-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-state.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-covers-state.service.js +9 -8
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent-base.service.d.ts +1 -1
- package/dist/plugins/spaces-home-control/services/space-intent-base.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-intent.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-role.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-role.service.js +25 -22
- package/dist/plugins/spaces-home-control/services/space-lighting-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-state.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-state.service.js +20 -19
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-tool.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-lighting-tool.service.js +8 -7
- package/dist/plugins/spaces-home-control/services/space-lighting-tool.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity-binding.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity-binding.service.js +31 -30
- package/dist/plugins/spaces-home-control/services/space-media-activity-binding.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-media-activity.service.js +38 -37
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-role.service.d.ts +4 -4
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-role.service.js +24 -23
- package/dist/plugins/spaces-home-control/services/space-sensor-role.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-state.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-sensor-state.service.js +19 -18
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion-heartbeat.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion-heartbeat.service.js +10 -9
- package/dist/plugins/spaces-home-control/services/space-suggestion-heartbeat.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion.service.d.ts +4 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-suggestion.service.js +8 -7
- package/dist/plugins/spaces-home-control/services/space-suggestion.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-undo-history.service.d.ts +3 -3
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-undo-history.service.js +5 -5
- package/dist/plugins/spaces-home-control/services/space-undo-history.service.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/spaces-seeder.service.d.ts +2 -2
- package/dist/{modules/spaces → plugins/spaces-home-control}/services/spaces-seeder.service.js +5 -5
- package/dist/plugins/spaces-home-control/services/spaces-seeder.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.d.ts +297 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.js +1460 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.constants.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.d.ts +2 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js +155 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.d.ts +29 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +334 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -0
- package/dist/plugins/spaces-home-control/spec/index.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec-loader.service.d.ts +1 -1
- package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec-loader.service.js +1 -1
- package/dist/plugins/spaces-home-control/spec/intent-spec-loader.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/spec/intent-spec.types.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/validators/at-least-one-setpoint.validator.js +2 -2
- package/dist/plugins/spaces-home-control/validators/at-least-one-setpoint.validator.js.map +1 -0
- package/dist/plugins/spaces-home-control/validators/setpoint-order-constraint.validator.js.map +1 -0
- package/dist/{modules/spaces → plugins/spaces-home-control}/validators/space-category-constraint.validator.js +1 -1
- package/dist/plugins/spaces-home-control/validators/space-category-constraint.validator.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.d.ts +18 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.js +219 -0
- package/dist/plugins/spaces-signage-info-panel/controllers/signage-announcements.controller.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.js +143 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-announcement.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.js +130 -0
- package/dist/plugins/spaces-signage-info-panel/dto/create-signage-info-panel-space.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.d.ts +10 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.js +78 -0
- package/dist/plugins/spaces-signage-info-panel/dto/reorder-announcements.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.d.ts +12 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.js +134 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-announcement.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.js +130 -0
- package/dist/plugins/spaces-signage-info-panel/dto/update-signage-info-panel-space.dto.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.js +161 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-announcement.entity.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.d.ts +13 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.js +147 -0
- package/dist/plugins/spaces-signage-info-panel/entities/signage-info-panel-space.entity.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.js +49 -0
- package/dist/plugins/spaces-signage-info-panel/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.d.ts +8 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.js +46 -0
- package/dist/plugins/spaces-signage-info-panel/models/signage-announcement-response.model.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.d.ts +28 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.js +181 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-announcements.service.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.d.ts +4 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.js +20 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-home-page.resolver.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.d.ts +14 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.js +59 -0
- package/dist/plugins/spaces-signage-info-panel/services/signage-info-panel-reset.service.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.d.ts +17 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.js +23 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.constants.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.d.ts +9 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.js +25 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.exceptions.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.d.ts +2 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.js +31 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.openapi.js.map +1 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.d.ts +23 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.js +159 -0
- package/dist/plugins/spaces-signage-info-panel/spaces-signage-info-panel.plugin.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-entry/dto/create-entry-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-entry/dto/update-entry-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.js +39 -0
- package/dist/plugins/spaces-synthetic-entry/entities/entry-space.entity.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.js +49 -0
- package/dist/plugins/spaces-synthetic-entry/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.d.ts +7 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.js +11 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.constants.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.d.ts +2 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.js +16 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.openapi.js.map +1 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.d.ts +15 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.js +124 -0
- package/dist/plugins/spaces-synthetic-entry/spaces-synthetic-entry.plugin.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-master/dto/create-master-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.js +34 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.js +31 -0
- package/dist/plugins/spaces-synthetic-master/dto/update-master-space.dto.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.js +39 -0
- package/dist/plugins/spaces-synthetic-master/entities/master-space.entity.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.d.ts +5 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.js +49 -0
- package/dist/plugins/spaces-synthetic-master/models/config.model.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.d.ts +7 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.js +11 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.constants.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.d.ts +2 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.js +16 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.openapi.js.map +1 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.d.ts +15 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.js +124 -0
- package/dist/plugins/spaces-synthetic-master/spaces-synthetic-master.plugin.js.map +1 -0
- package/dist/plugins/tiles-device-preview/tiles-device-preview.plugin.js +16 -22
- package/dist/plugins/tiles-device-preview/tiles-device-preview.plugin.js.map +1 -1
- package/dist/plugins/tiles-scene/tiles-scene.plugin.js +15 -21
- package/dist/plugins/tiles-scene/tiles-scene.plugin.js.map +1 -1
- package/dist/plugins/tiles-time/tiles-time.plugin.js +13 -19
- package/dist/plugins/tiles-time/tiles-time.plugin.js.map +1 -1
- package/dist/plugins/tiles-weather/tiles-weather.plugin.js +16 -19
- package/dist/plugins/tiles-weather/tiles-weather.plugin.js.map +1 -1
- package/dist/plugins/weather-open-meteo/weather-open-meteo.plugin.js +32 -21
- package/dist/plugins/weather-open-meteo/weather-open-meteo.plugin.js.map +1 -1
- package/dist/plugins/weather-openweathermap/weather-openweathermap.plugin.js +22 -23
- package/dist/plugins/weather-openweathermap/weather-openweathermap.plugin.js.map +1 -1
- package/dist/plugins/weather-openweathermap-onecall/weather-openweathermap-onecall.plugin.js +27 -23
- package/dist/plugins/weather-openweathermap-onecall/weather-openweathermap-onecall.plugin.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +10 -6
- package/dist/modules/spaces/dto/climate-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/climate-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/covers-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/covers-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/lighting-intent.dto.js.map +0 -1
- package/dist/modules/spaces/dto/lighting-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/media-activity-binding.dto.js.map +0 -1
- package/dist/modules/spaces/dto/sensor-role.dto.js.map +0 -1
- package/dist/modules/spaces/dto/status-widget.dto.js.map +0 -1
- package/dist/modules/spaces/dto/suggestion.dto.js.map +0 -1
- package/dist/modules/spaces/entities/space-active-media-activity.entity.d.ts +0 -12
- package/dist/modules/spaces/entities/space-active-media-activity.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-climate-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-climate-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-covers-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-covers-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-lighting-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-lighting-role.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-media-activity-binding.entity.d.ts +0 -16
- package/dist/modules/spaces/entities/space-media-activity-binding.entity.js.map +0 -1
- package/dist/modules/spaces/entities/space-sensor-role.entity.d.ts +0 -14
- package/dist/modules/spaces/entities/space-sensor-role.entity.js.map +0 -1
- package/dist/modules/spaces/listeners/space-activity.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-climate-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-lighting-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/space-sensor-state.listener.js.map +0 -1
- package/dist/modules/spaces/listeners/websocket-exchange.listener.js.map +0 -1
- package/dist/modules/spaces/models/derived-media-endpoint.model.js.map +0 -1
- package/dist/modules/spaces/models/media-activity-binding.model.js.map +0 -1
- package/dist/modules/spaces/models/media-activity.model.js.map +0 -1
- package/dist/modules/spaces/models/media-routing.model.js.map +0 -1
- package/dist/modules/spaces/services/__fixtures__/media-scenario-templates.js.map +0 -1
- package/dist/modules/spaces/services/__fixtures__/media-test-harness.js.map +0 -1
- package/dist/modules/spaces/services/climate-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/covers-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/derived-media-endpoint.service.js.map +0 -1
- package/dist/modules/spaces/services/lighting-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/media-capability.service.js.map +0 -1
- package/dist/modules/spaces/services/space-climate-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-climate-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-context-snapshot.service.js.map +0 -1
- package/dist/modules/spaces/services/space-covers-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-covers-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-intent-base.service.js.map +0 -1
- package/dist/modules/spaces/services/space-intent.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-lighting-tool.service.js.map +0 -1
- package/dist/modules/spaces/services/space-media-activity-binding.service.js.map +0 -1
- package/dist/modules/spaces/services/space-media-activity.service.js.map +0 -1
- package/dist/modules/spaces/services/space-sensor-role.service.js.map +0 -1
- package/dist/modules/spaces/services/space-sensor-state.service.js.map +0 -1
- package/dist/modules/spaces/services/space-suggestion-heartbeat.service.js.map +0 -1
- package/dist/modules/spaces/services/space-suggestion.service.js.map +0 -1
- package/dist/modules/spaces/services/space-undo-history.service.js.map +0 -1
- package/dist/modules/spaces/services/spaces-seeder.service.js.map +0 -1
- package/dist/modules/spaces/spec/definitions/climate-intents.yaml +0 -94
- package/dist/modules/spaces/spec/definitions/covers-modes.yaml +0 -83
- package/dist/modules/spaces/spec/definitions/enums.yaml +0 -119
- package/dist/modules/spaces/spec/definitions/lighting-intents.yaml +0 -181
- package/dist/modules/spaces/spec/definitions/lighting-modes.yaml +0 -119
- package/dist/modules/spaces/spec/definitions/suggestions.yaml +0 -47
- package/dist/modules/spaces/spec/index.js.map +0 -1
- package/dist/modules/spaces/spec/intent-spec-loader.service.js.map +0 -1
- package/dist/modules/spaces/spec/intent-spec.types.js.map +0 -1
- package/dist/modules/spaces/validators/at-least-one-setpoint.validator.js.map +0 -1
- package/dist/modules/spaces/validators/setpoint-order-constraint.validator.js.map +0 -1
- package/dist/modules/spaces/validators/space-category-constraint.validator.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.config.model.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.constants.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.d.ts +0 -17
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.js +0 -94
- package/dist/modules/storage/plugins/influx-v1/influx-v1.module.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.openapi.js +0 -7
- package/dist/modules/storage/plugins/influx-v1/influx-v1.openapi.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.plugin.js.map +0 -1
- package/dist/modules/storage/plugins/influx-v1/influx-v1.update-config.dto.js.map +0 -1
- package/dist/modules/storage/plugins/memory/in-memory-timeseries.store.js.map +0 -1
- package/dist/modules/storage/plugins/memory/influxql-parser.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.config.model.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.constants.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.module.d.ts +0 -13
- package/dist/modules/storage/plugins/memory/memory.module.js +0 -75
- package/dist/modules/storage/plugins/memory/memory.module.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.openapi.js +0 -7
- package/dist/modules/storage/plugins/memory/memory.openapi.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.plugin.js.map +0 -1
- package/dist/modules/storage/plugins/memory/memory.update-config.dto.js.map +0 -1
- /package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.constants.d.ts +0 -0
- /package/dist/{modules/storage/plugins → plugins}/influx-v1/influx-v1.constants.js +0 -0
- /package/dist/{modules/storage/plugins/memory/memory.constants.d.ts → plugins/memory-storage/memory-storage.constants.d.ts} +0 -0
- /package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/influxql-parser.d.ts +0 -0
- /package/dist/{modules/storage/plugins/memory → plugins/memory-storage/services}/influxql-parser.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/dto/status-widget.dto.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/dto/status-widget.dto.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/__fixtures__/media-test-harness.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent-base.service.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent.service.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/services/space-intent.service.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/index.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/index.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec.types.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/spec/intent-spec.types.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/at-least-one-setpoint.validator.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/setpoint-order-constraint.validator.d.ts +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/setpoint-order-constraint.validator.js +0 -0
- /package/dist/{modules/spaces → plugins/spaces-home-control}/validators/space-category-constraint.validator.d.ts +0 -0
|
@@ -1,14 +1,260 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.Platform = void 0;
|
|
4
7
|
const class_validator_1 = require("class-validator");
|
|
8
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
9
|
+
const node_child_process_1 = require("node:child_process");
|
|
10
|
+
const os_1 = __importDefault(require("os"));
|
|
11
|
+
const systeminformation_1 = __importDefault(require("systeminformation"));
|
|
12
|
+
const util_1 = require("util");
|
|
5
13
|
const logger_1 = require("../../../common/logger");
|
|
6
14
|
const transform_utils_1 = require("../../../common/utils/transform.utils");
|
|
15
|
+
const system_constants_1 = require("../../system/system.constants");
|
|
16
|
+
const system_info_dto_1 = require("../dto/system-info.dto");
|
|
17
|
+
const throttle_status_dto_1 = require("../dto/throttle-status.dto");
|
|
7
18
|
const platform_constants_1 = require("../platform.constants");
|
|
8
19
|
const platform_exceptions_1 = require("../platform.exceptions");
|
|
20
|
+
const execFileAsync = (0, util_1.promisify)(node_child_process_1.execFile);
|
|
9
21
|
class Platform {
|
|
10
22
|
constructor() {
|
|
11
23
|
this.logger = (0, logger_1.createExtensionLogger)(platform_constants_1.PLATFORM_MODULE_NAME, 'Platform');
|
|
24
|
+
this.siOsInfoCache = null;
|
|
25
|
+
this.siGraphicsCache = null;
|
|
26
|
+
this.siNetworkInterfacesCache = null;
|
|
27
|
+
this.siFsSizeCache = null;
|
|
28
|
+
this.networkModeCache = null;
|
|
29
|
+
}
|
|
30
|
+
async cachedOsInfo() {
|
|
31
|
+
if (this.siOsInfoCache && Date.now() - this.siOsInfoCache.at < Platform.SLOW_CACHE_TTL_MS) {
|
|
32
|
+
return this.siOsInfoCache.data;
|
|
33
|
+
}
|
|
34
|
+
const data = await systeminformation_1.default.osInfo();
|
|
35
|
+
this.siOsInfoCache = { data, at: Date.now() };
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
38
|
+
async cachedGraphics() {
|
|
39
|
+
if (this.siGraphicsCache && Date.now() - this.siGraphicsCache.at < Platform.SLOW_CACHE_TTL_MS) {
|
|
40
|
+
return this.siGraphicsCache.data;
|
|
41
|
+
}
|
|
42
|
+
const data = await systeminformation_1.default.graphics();
|
|
43
|
+
this.siGraphicsCache = { data, at: Date.now() };
|
|
44
|
+
return data;
|
|
45
|
+
}
|
|
46
|
+
async cachedNetworkInterfaces() {
|
|
47
|
+
if (this.siNetworkInterfacesCache && Date.now() - this.siNetworkInterfacesCache.at < Platform.SLOW_CACHE_TTL_MS) {
|
|
48
|
+
return this.siNetworkInterfacesCache.data;
|
|
49
|
+
}
|
|
50
|
+
const data = await systeminformation_1.default.networkInterfaces('default');
|
|
51
|
+
this.siNetworkInterfacesCache = { data, at: Date.now() };
|
|
52
|
+
return data;
|
|
53
|
+
}
|
|
54
|
+
async cachedFsSize() {
|
|
55
|
+
if (this.siFsSizeCache && Date.now() - this.siFsSizeCache.at < Platform.STORAGE_CACHE_TTL_MS) {
|
|
56
|
+
return this.siFsSizeCache.data;
|
|
57
|
+
}
|
|
58
|
+
const data = await systeminformation_1.default.fsSize();
|
|
59
|
+
this.siFsSizeCache = { data, at: Date.now() };
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
parseThrottleFlags(status) {
|
|
63
|
+
return {
|
|
64
|
+
undervoltage: !!(status & 0x1),
|
|
65
|
+
frequencyCapping: !!(status & 0x2),
|
|
66
|
+
throttling: !!(status & 0x4),
|
|
67
|
+
softTempLimit: !!(status & 0x8),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
async readThrottleFromSysfs() {
|
|
71
|
+
try {
|
|
72
|
+
const data = await promises_1.default.readFile(Platform.THROTTLE_SYSFS_PATH, 'utf-8');
|
|
73
|
+
const status = parseInt(data.trim(), 16);
|
|
74
|
+
if (!isNaN(status)) {
|
|
75
|
+
return this.validateDto(throttle_status_dto_1.ThrottleStatusDto, this.parseThrottleFlags(status));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
async readContainerMemory() {
|
|
83
|
+
try {
|
|
84
|
+
const [maxRaw, currentRaw] = await Promise.all([
|
|
85
|
+
promises_1.default.readFile('/sys/fs/cgroup/memory.max', 'utf-8'),
|
|
86
|
+
promises_1.default.readFile('/sys/fs/cgroup/memory.current', 'utf-8'),
|
|
87
|
+
]);
|
|
88
|
+
const max = maxRaw.trim();
|
|
89
|
+
const current = parseInt(currentRaw.trim(), 10);
|
|
90
|
+
if (max !== 'max' && !isNaN(current)) {
|
|
91
|
+
const total = parseInt(max, 10);
|
|
92
|
+
if (!isNaN(total) && total > 0) {
|
|
93
|
+
return { total, used: current, free: Math.max(0, total - current) };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
}
|
|
99
|
+
try {
|
|
100
|
+
const [limitRaw, usageRaw] = await Promise.all([
|
|
101
|
+
promises_1.default.readFile('/sys/fs/cgroup/memory/memory.limit_in_bytes', 'utf-8'),
|
|
102
|
+
promises_1.default.readFile('/sys/fs/cgroup/memory/memory.usage_in_bytes', 'utf-8'),
|
|
103
|
+
]);
|
|
104
|
+
const limit = parseInt(limitRaw.trim(), 10);
|
|
105
|
+
const usage = parseInt(usageRaw.trim(), 10);
|
|
106
|
+
if (!isNaN(limit) && !isNaN(usage) && limit < 2 ** 62) {
|
|
107
|
+
return { total: limit, used: usage, free: Math.max(0, limit - usage) };
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
}
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
async readContainerCpuCount() {
|
|
115
|
+
try {
|
|
116
|
+
const raw = await promises_1.default.readFile('/sys/fs/cgroup/cpu.max', 'utf-8');
|
|
117
|
+
const [quotaStr, periodStr] = raw.trim().split(/\s+/);
|
|
118
|
+
if (quotaStr !== 'max') {
|
|
119
|
+
const quota = parseInt(quotaStr, 10);
|
|
120
|
+
const period = parseInt(periodStr, 10);
|
|
121
|
+
if (!isNaN(quota) && quota > 0 && !isNaN(period) && period > 0) {
|
|
122
|
+
return quota / period;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
}
|
|
128
|
+
try {
|
|
129
|
+
const [quotaRaw, periodRaw] = await Promise.all([
|
|
130
|
+
promises_1.default.readFile('/sys/fs/cgroup/cpu/cpu.cfs_quota_us', 'utf-8'),
|
|
131
|
+
promises_1.default.readFile('/sys/fs/cgroup/cpu/cpu.cfs_period_us', 'utf-8'),
|
|
132
|
+
]);
|
|
133
|
+
const quota = parseInt(quotaRaw.trim(), 10);
|
|
134
|
+
const period = parseInt(periodRaw.trim(), 10);
|
|
135
|
+
if (!isNaN(quota) && quota > 0 && !isNaN(period) && period > 0) {
|
|
136
|
+
return quota / period;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
}
|
|
141
|
+
return os_1.default.cpus().length || 1;
|
|
142
|
+
}
|
|
143
|
+
async readContainerCpuLoad() {
|
|
144
|
+
const cpuCount = await this.readContainerCpuCount();
|
|
145
|
+
try {
|
|
146
|
+
const readV2 = async () => {
|
|
147
|
+
const stat = await promises_1.default.readFile('/sys/fs/cgroup/cpu.stat', 'utf-8');
|
|
148
|
+
const match = stat.match(/usage_usec\s+(\d+)/);
|
|
149
|
+
if (!match) {
|
|
150
|
+
throw new Error('usage_usec not found');
|
|
151
|
+
}
|
|
152
|
+
return parseInt(match[1], 10);
|
|
153
|
+
};
|
|
154
|
+
const t1 = Date.now();
|
|
155
|
+
const u1 = await readV2();
|
|
156
|
+
await new Promise((r) => setTimeout(r, 200));
|
|
157
|
+
const t2 = Date.now();
|
|
158
|
+
const u2 = await readV2();
|
|
159
|
+
const elapsedUs = (t2 - t1) * 1000;
|
|
160
|
+
const cpuUs = u2 - u1;
|
|
161
|
+
if (elapsedUs > 0) {
|
|
162
|
+
return Math.min(100, (cpuUs / (elapsedUs * cpuCount)) * 100);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
}
|
|
167
|
+
try {
|
|
168
|
+
const readV1 = async () => {
|
|
169
|
+
const raw = await promises_1.default.readFile('/sys/fs/cgroup/cpuacct/cpuacct.usage', 'utf-8');
|
|
170
|
+
return parseInt(raw.trim(), 10);
|
|
171
|
+
};
|
|
172
|
+
const t1 = Date.now();
|
|
173
|
+
const u1 = await readV1();
|
|
174
|
+
await new Promise((r) => setTimeout(r, 200));
|
|
175
|
+
const t2 = Date.now();
|
|
176
|
+
const u2 = await readV1();
|
|
177
|
+
const elapsedNs = (t2 - t1) * 1_000_000;
|
|
178
|
+
const cpuNs = u2 - u1;
|
|
179
|
+
if (elapsedNs > 0) {
|
|
180
|
+
return Math.min(100, (cpuNs / (elapsedNs * cpuCount)) * 100);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
filterContainerStorage(fsList) {
|
|
188
|
+
const PSEUDO_FS = new Set(['tmpfs', 'devtmpfs', 'squashfs', 'proc', 'sysfs', 'ramfs']);
|
|
189
|
+
return fsList
|
|
190
|
+
.filter((d) => d.size > 0 && !PSEUDO_FS.has(d.type) && !d.type.startsWith('cgroup'))
|
|
191
|
+
.map((d) => ({ fs: d.fs, used: d.used, size: d.size, available: d.available }));
|
|
192
|
+
}
|
|
193
|
+
async getContainerSystemInfo() {
|
|
194
|
+
const [hostCpu, hostMemory, temp, network, containerMemory, containerCpu, storage, osInfo, graphics, networkInterface,] = await Promise.all([
|
|
195
|
+
systeminformation_1.default.currentLoad(),
|
|
196
|
+
systeminformation_1.default.mem(),
|
|
197
|
+
systeminformation_1.default.cpuTemperature(),
|
|
198
|
+
systeminformation_1.default.networkStats(),
|
|
199
|
+
this.readContainerMemory(),
|
|
200
|
+
this.readContainerCpuLoad(),
|
|
201
|
+
this.cachedFsSize(),
|
|
202
|
+
this.cachedOsInfo(),
|
|
203
|
+
this.cachedGraphics(),
|
|
204
|
+
this.cachedNetworkInterfaces(),
|
|
205
|
+
]);
|
|
206
|
+
const time = systeminformation_1.default.time();
|
|
207
|
+
const memory = containerMemory ?? {
|
|
208
|
+
total: hostMemory.total,
|
|
209
|
+
used: hostMemory.used,
|
|
210
|
+
free: hostMemory.free,
|
|
211
|
+
};
|
|
212
|
+
const cpuLoad = containerCpu ?? hostCpu.currentLoad;
|
|
213
|
+
const containerStorage = this.filterContainerStorage(storage);
|
|
214
|
+
const defaultNetworkInterface = Array.isArray(networkInterface) ? networkInterface[0] : networkInterface;
|
|
215
|
+
const networkMode = await this.detectNetworkMode(defaultNetworkInterface?.ip4 ?? '');
|
|
216
|
+
const rawData = {
|
|
217
|
+
networkMode,
|
|
218
|
+
cpuLoad,
|
|
219
|
+
memory,
|
|
220
|
+
storage: containerStorage,
|
|
221
|
+
primaryStorage: containerStorage[0] ?? { fs: '', used: 0, size: 0, available: 0 },
|
|
222
|
+
os: {
|
|
223
|
+
platform: osInfo.platform,
|
|
224
|
+
distro: osInfo.distro,
|
|
225
|
+
release: osInfo.release,
|
|
226
|
+
uptime: Math.floor(process.uptime()),
|
|
227
|
+
node: process.version.replace(/^v/, ''),
|
|
228
|
+
npm: null,
|
|
229
|
+
timezone: time.timezone,
|
|
230
|
+
},
|
|
231
|
+
temperature: {
|
|
232
|
+
cpu: temp.main,
|
|
233
|
+
},
|
|
234
|
+
network: network.map((row) => ({
|
|
235
|
+
interface: row.iface,
|
|
236
|
+
rxBytes: row.rx_bytes,
|
|
237
|
+
txBytes: row.tx_bytes,
|
|
238
|
+
})),
|
|
239
|
+
defaultNetwork: {
|
|
240
|
+
interface: defaultNetworkInterface?.iface ?? '',
|
|
241
|
+
ip4: defaultNetworkInterface?.ip4 ?? '',
|
|
242
|
+
ip6: defaultNetworkInterface?.ip6 ?? '',
|
|
243
|
+
mac: defaultNetworkInterface?.mac ?? '',
|
|
244
|
+
hostname: osInfo.hostname,
|
|
245
|
+
},
|
|
246
|
+
display: {
|
|
247
|
+
resolutionX: graphics.displays[0]?.resolutionX || 0,
|
|
248
|
+
resolutionY: graphics.displays[0]?.resolutionY || 0,
|
|
249
|
+
currentResX: graphics.displays[0]?.currentResX || 0,
|
|
250
|
+
currentResY: graphics.displays[0]?.currentResY || 0,
|
|
251
|
+
},
|
|
252
|
+
process: {
|
|
253
|
+
pid: process.pid,
|
|
254
|
+
uptime: Math.floor(process.uptime()),
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
return this.validateDto(system_info_dto_1.SystemInfoDto, rawData);
|
|
12
258
|
}
|
|
13
259
|
async validateDto(dtoClass, rawData) {
|
|
14
260
|
const instance = (0, transform_utils_1.toInstance)(dtoClass, rawData);
|
|
@@ -22,6 +268,27 @@ class Platform {
|
|
|
22
268
|
this.logger.debug(`DTO validation passed: ${dtoClass.name}`);
|
|
23
269
|
return instance;
|
|
24
270
|
}
|
|
271
|
+
async detectNetworkMode(ip4) {
|
|
272
|
+
if (this.networkModeCache &&
|
|
273
|
+
this.networkModeCache.ip4 === ip4 &&
|
|
274
|
+
Date.now() - this.networkModeCache.at < Platform.NETWORK_MODE_CACHE_TTL_MS) {
|
|
275
|
+
return this.networkModeCache.data;
|
|
276
|
+
}
|
|
277
|
+
let mode;
|
|
278
|
+
try {
|
|
279
|
+
await execFileAsync('systemctl', ['is-active', 'smart-panel-portal.service'], { timeout: 2000 });
|
|
280
|
+
mode = system_constants_1.NetworkMode.SETUP;
|
|
281
|
+
}
|
|
282
|
+
catch {
|
|
283
|
+
mode = ip4 && ip4 !== '0.0.0.0' ? system_constants_1.NetworkMode.ONLINE : system_constants_1.NetworkMode.OFFLINE;
|
|
284
|
+
}
|
|
285
|
+
this.networkModeCache = { data: mode, ip4, at: Date.now() };
|
|
286
|
+
return mode;
|
|
287
|
+
}
|
|
25
288
|
}
|
|
26
289
|
exports.Platform = Platform;
|
|
290
|
+
Platform.SLOW_CACHE_TTL_MS = 60_000;
|
|
291
|
+
Platform.STORAGE_CACHE_TTL_MS = 30_000;
|
|
292
|
+
Platform.NETWORK_MODE_CACHE_TTL_MS = 30_000;
|
|
293
|
+
Platform.THROTTLE_SYSFS_PATH = '/sys/devices/platform/soc/soc:firmware/get_throttled';
|
|
27
294
|
//# sourceMappingURL=abstract.platform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract.platform.js","sourceRoot":"","sources":["../../../../src/modules/platform/platforms/abstract.platform.ts"],"names":[],"mappings":";;;AAAA,qDAA2C;AAE3C,mDAA+D;AAC/D,2EAAmE;AAMnE,8DAA6D;AAC7D,gEAA2D;AAE3D,MAAsB,QAAQ;IAA9B;QACW,WAAM,GAAG,IAAA,8BAAqB,EAAC,yCAAoB,EAAE,UAAU,CAAC,CAAC;IAoC5E,CAAC;IAjBU,KAAK,CAAC,WAAW,CAAmB,QAAqB,EAAE,OAAgB;QACpF,MAAM,QAAQ,GAAG,IAAA,4BAAU,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAE/C,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAQ,EAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAE7D,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,QAAQ,CAAC,IAA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;AArbwB,0BAAiB,GAAG,MAAM,AAAT,CAAU;AAC3B,6BAAoB,GAAG,MAAM,AAAT,CAAU;AAS9B,kCAAyB,GAAG,MAAM,AAAT,CAAU;AAqEjC,4BAAmB,GAAG,sDAAsD,AAAzD,CAA0D"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { SystemInfoDto } from '../dto/system-info.dto';
|
|
1
2
|
import { GenericPlatform } from './generic.platform';
|
|
2
3
|
export declare class DockerPlatform extends GenericPlatform {
|
|
4
|
+
getSystemInfo(): Promise<SystemInfoDto>;
|
|
3
5
|
rebootDevice(): Promise<void>;
|
|
4
6
|
powerOffDevice(): Promise<void>;
|
|
5
7
|
private getContainerId;
|
|
@@ -11,6 +11,9 @@ const util_1 = require("util");
|
|
|
11
11
|
const generic_platform_1 = require("./generic.platform");
|
|
12
12
|
const execFileAsync = (0, util_1.promisify)(child_process_1.execFile);
|
|
13
13
|
class DockerPlatform extends generic_platform_1.GenericPlatform {
|
|
14
|
+
async getSystemInfo() {
|
|
15
|
+
return this.getContainerSystemInfo();
|
|
16
|
+
}
|
|
14
17
|
async rebootDevice() {
|
|
15
18
|
this.logger.log('[SYSTEM] Restarting container via Docker API...');
|
|
16
19
|
const containerId = await this.getContainerId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.platform.js","sourceRoot":"","sources":["../../../../src/modules/platform/platforms/docker.platform.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAyC;AACzC,0CAAuC;AACvC,4CAAoB;AACpB,+BAAiC;
|
|
1
|
+
{"version":3,"file":"docker.platform.js","sourceRoot":"","sources":["../../../../src/modules/platform/platforms/docker.platform.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAyC;AACzC,0CAAuC;AACvC,4CAAoB;AACpB,+BAAiC;AAIjC,yDAAqD;AAErD,MAAM,aAAa,GAAG,IAAA,gBAAS,EAAC,wBAAQ,CAAC,CAAC;AAE1C,MAAa,cAAe,SAAQ,kCAAe;IAClD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@@
|
|
|
1
1
|
import { NetworkStatsDto } from '../dto/network-stats.dto';
|
|
2
2
|
import { StorageDto, SystemInfoDto } from '../dto/system-info.dto';
|
|
3
3
|
import { TemperatureDto } from '../dto/temperature.dto';
|
|
4
|
+
import { ThrottleStatusDto } from '../dto/throttle-status.dto';
|
|
4
5
|
import { WifiNetworksDto } from '../dto/wifi-networks.dto';
|
|
5
6
|
import { Platform } from './abstract.platform';
|
|
6
7
|
export declare class GenericPlatform extends Platform {
|
|
7
8
|
private cachedNpmVersion;
|
|
8
9
|
getSystemInfo(): Promise<SystemInfoDto>;
|
|
9
|
-
getThrottleStatus(): Promise<
|
|
10
|
+
getThrottleStatus(): Promise<ThrottleStatusDto>;
|
|
10
11
|
getTemperature(): Promise<TemperatureDto>;
|
|
11
12
|
getNetworkStats(): Promise<NetworkStatsDto[]>;
|
|
12
13
|
getWifiNetworks(): Promise<WifiNetworksDto[]>;
|
|
@@ -19,19 +19,21 @@ class GenericPlatform extends abstract_platform_1.Platform {
|
|
|
19
19
|
this.cachedNpmVersion = null;
|
|
20
20
|
}
|
|
21
21
|
async getSystemInfo() {
|
|
22
|
-
const [cpu, memory,
|
|
22
|
+
const [cpu, memory, temp, network, storage, osInfo, graphics, networkInterface] = await Promise.all([
|
|
23
23
|
systeminformation_1.default.currentLoad(),
|
|
24
24
|
systeminformation_1.default.mem(),
|
|
25
|
-
systeminformation_1.default.fsSize(),
|
|
26
|
-
systeminformation_1.default.osInfo(),
|
|
27
25
|
systeminformation_1.default.cpuTemperature(),
|
|
28
26
|
systeminformation_1.default.networkStats(),
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
this.cachedFsSize(),
|
|
28
|
+
this.cachedOsInfo(),
|
|
29
|
+
this.cachedGraphics(),
|
|
30
|
+
this.cachedNetworkInterfaces(),
|
|
31
31
|
]);
|
|
32
32
|
const time = systeminformation_1.default.time();
|
|
33
|
-
const defaultNetworkInterface =
|
|
33
|
+
const defaultNetworkInterface = Array.isArray(networkInterface) ? networkInterface[0] : networkInterface;
|
|
34
|
+
const networkMode = await this.detectNetworkMode(defaultNetworkInterface?.ip4 ?? '');
|
|
34
35
|
const rawData = {
|
|
36
|
+
networkMode,
|
|
35
37
|
cpuLoad: cpu.currentLoad,
|
|
36
38
|
memory: {
|
|
37
39
|
total: memory.total,
|
|
@@ -46,9 +48,9 @@ class GenericPlatform extends abstract_platform_1.Platform {
|
|
|
46
48
|
})),
|
|
47
49
|
primaryStorage: await this.getPrimaryDisk(),
|
|
48
50
|
os: {
|
|
49
|
-
platform:
|
|
50
|
-
distro:
|
|
51
|
-
release:
|
|
51
|
+
platform: osInfo.platform,
|
|
52
|
+
distro: osInfo.distro,
|
|
53
|
+
release: osInfo.release,
|
|
52
54
|
uptime: time.uptime,
|
|
53
55
|
node: await this.getNodeVersion(),
|
|
54
56
|
npm: await this.getNpmVersion(),
|
|
@@ -63,11 +65,11 @@ class GenericPlatform extends abstract_platform_1.Platform {
|
|
|
63
65
|
txBytes: row.tx_bytes,
|
|
64
66
|
})),
|
|
65
67
|
defaultNetwork: {
|
|
66
|
-
interface: defaultNetworkInterface
|
|
67
|
-
ip4: defaultNetworkInterface
|
|
68
|
-
ip6: defaultNetworkInterface
|
|
69
|
-
mac: defaultNetworkInterface
|
|
70
|
-
hostname:
|
|
68
|
+
interface: defaultNetworkInterface?.iface ?? '',
|
|
69
|
+
ip4: defaultNetworkInterface?.ip4 ?? '',
|
|
70
|
+
ip6: defaultNetworkInterface?.ip6 ?? '',
|
|
71
|
+
mac: defaultNetworkInterface?.mac ?? '',
|
|
72
|
+
hostname: osInfo.hostname,
|
|
71
73
|
},
|
|
72
74
|
display: {
|
|
73
75
|
resolutionX: graphics.displays[0]?.resolutionX || 0,
|
|
@@ -160,7 +162,7 @@ class GenericPlatform extends abstract_platform_1.Platform {
|
|
|
160
162
|
}
|
|
161
163
|
async getPrimaryDisk() {
|
|
162
164
|
const targetPath = process.cwd();
|
|
163
|
-
const fsList = await
|
|
165
|
+
const fsList = await this.cachedFsSize();
|
|
164
166
|
const filtered = fsList.filter((d) => !this.isPseudoFs(d.type) && d.size > 0);
|
|
165
167
|
const normalized = node_path_1.default.resolve(targetPath);
|
|
166
168
|
let best = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.platform.js","sourceRoot":"","sources":["../../../../src/modules/platform/platforms/generic.platform.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA8C;AAC9C,0DAA6B;AAC7B,0EAA0D;AAE1D,gEAA2D;AAC3D,4DAAmE;AACnE,4DAAwD;
|
|
1
|
+
{"version":3,"file":"generic.platform.js","sourceRoot":"","sources":["../../../../src/modules/platform/platforms/generic.platform.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA8C;AAC9C,0DAA6B;AAC7B,0EAA0D;AAE1D,gEAA2D;AAC3D,4DAAmE;AACnE,4DAAwD;AAExD,gEAA2D;AAC3D,gEAAuE;AAEvE,2DAA+C;AAE/C,MAAa,eAAgB,SAAQ,4BAAQ;IAA7C;;QACS,qBAAgB,GAAkB,IAAI,CAAC;IAqOhD,CAAC;IAnOA,KAAK,CAAC,aAAa;QAGlB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACnG,2BAAE,CAAC,WAAW,EAAE;YAChB,2BAAE,CAAC,GAAG,EAAE;YACR,2BAAE,CAAC,cAAc,EAAE;YACnB,2BAAE,CAAC,YAAY,EAAE;YACjB,IAAI,CAAC,YAAY,EAAE;YACnB,IAAI,CAAC,YAAY,EAAE;YACnB,IAAI,CAAC,cAAc,EAAE;YACrB,IAAI,CAAC,uBAAuB,EAAE;SAC9B,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,2BAAE,CAAC,IAAI,EAAE,CAAC;QAEvB,MAAM,uBAAuB,GAAG,KAAK,CAAC,OAAO,CAAC,gBAAgB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AAC;QAED,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACb,CAAC;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;CACD;AAtOD,0CAsOC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { SystemInfoDto } from '../dto/system-info.dto';
|
|
2
|
+
import { ThrottleStatusDto } from '../dto/throttle-status.dto';
|
|
1
3
|
import { GenericPlatform } from './generic.platform';
|
|
2
4
|
export declare class HomeAssistantPlatform extends GenericPlatform {
|
|
3
5
|
private readonly supervisorToken;
|
|
4
6
|
private readonly supervisorUrl;
|
|
5
7
|
constructor();
|
|
8
|
+
getSystemInfo(): Promise<SystemInfoDto>;
|
|
9
|
+
getThrottleStatus(): Promise<ThrottleStatusDto>;
|
|
6
10
|
rebootDevice(): Promise<void>;
|
|
7
11
|
powerOffDevice(): Promise<void>;
|
|
8
12
|
private callSupervisorApi;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HomeAssistantPlatform = void 0;
|
|
4
|
+
const throttle_status_dto_1 = require("../dto/throttle-status.dto");
|
|
4
5
|
const platform_exceptions_1 = require("../platform.exceptions");
|
|
5
6
|
const generic_platform_1 = require("./generic.platform");
|
|
6
7
|
class HomeAssistantPlatform extends generic_platform_1.GenericPlatform {
|
|
@@ -9,6 +10,16 @@ class HomeAssistantPlatform extends generic_platform_1.GenericPlatform {
|
|
|
9
10
|
this.supervisorToken = process.env.SUPERVISOR_TOKEN ?? null;
|
|
10
11
|
this.supervisorUrl = process.env.SUPERVISOR_URL ?? 'http://supervisor';
|
|
11
12
|
}
|
|
13
|
+
async getSystemInfo() {
|
|
14
|
+
return this.getContainerSystemInfo();
|
|
15
|
+
}
|
|
16
|
+
async getThrottleStatus() {
|
|
17
|
+
const result = await this.readThrottleFromSysfs();
|
|
18
|
+
if (result) {
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
return this.validateDto(throttle_status_dto_1.ThrottleStatusDto, this.parseThrottleFlags(0));
|
|
22
|
+
}
|
|
12
23
|
async rebootDevice() {
|
|
13
24
|
this.logger.log('[SYSTEM] Restarting add-on via HA Supervisor API...');
|
|
14
25
|
await this.callSupervisorApi('/addons/self/restart', 'POST');
|
|
@@ -22,6 +33,8 @@ class HomeAssistantPlatform extends generic_platform_1.GenericPlatform {
|
|
|
22
33
|
throw new platform_exceptions_1.PlatformException('SUPERVISOR_TOKEN is not set. This platform requires the Home Assistant Supervisor environment.');
|
|
23
34
|
}
|
|
24
35
|
const url = `${this.supervisorUrl}${endpoint}`;
|
|
36
|
+
const controller = new AbortController();
|
|
37
|
+
const timeoutId = setTimeout(() => controller.abort(), 30_000);
|
|
25
38
|
try {
|
|
26
39
|
const response = await fetch(url, {
|
|
27
40
|
method,
|
|
@@ -29,6 +42,7 @@ class HomeAssistantPlatform extends generic_platform_1.GenericPlatform {
|
|
|
29
42
|
Authorization: `Bearer ${this.supervisorToken}`,
|
|
30
43
|
'Content-Type': 'application/json',
|
|
31
44
|
},
|
|
45
|
+
signal: controller.signal,
|
|
32
46
|
});
|
|
33
47
|
if (!response.ok) {
|
|
34
48
|
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
@@ -37,9 +51,16 @@ class HomeAssistantPlatform extends generic_platform_1.GenericPlatform {
|
|
|
37
51
|
}
|
|
38
52
|
catch (error) {
|
|
39
53
|
const err = error;
|
|
54
|
+
if (err.name === 'AbortError') {
|
|
55
|
+
this.logger.error(`Supervisor API call timed out: ${method} ${endpoint}`);
|
|
56
|
+
throw new platform_exceptions_1.PlatformException(`Home Assistant Supervisor API call timed out: ${method} ${endpoint}`);
|
|
57
|
+
}
|
|
40
58
|
this.logger.error(`Supervisor API call failed: ${method} ${endpoint} - ${err.message}`);
|
|
41
59
|
throw new platform_exceptions_1.PlatformException(`Home Assistant Supervisor API call failed: ${err.message}`);
|
|
42
60
|
}
|
|
61
|
+
finally {
|
|
62
|
+
clearTimeout(timeoutId);
|
|
63
|
+
}
|
|
43
64
|
}
|
|
44
65
|
}
|
|
45
66
|
exports.HomeAssistantPlatform = HomeAssistantPlatform;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-assistant.platform.js","sourceRoot":"","sources":["../../../../src/modules/platform/platforms/home-assistant.platform.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"home-assistant.platform.js","sourceRoot":"","sources":["../../../../src/modules/platform/platforms/home-assistant.platform.ts"],"names":[],"mappings":";;;AACA,oEAA+D;AAC/D,gEAA2D;AAE3D,yDAAqD;AAErD,MAAa,qBAAsB,SAAQ,kCAAe;IAIzD;QACC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,IAAI,CAAC;QAC5D,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,mBAAmB,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,aAAa;QAClB,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC;IACtC,CAAC;IAQD,KAAK,CAAC,iBAAiB;QACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAElD,IAAI,MAAM,EAAE,CAAC;YACZ,OAAO,MAAM,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,uCAAiB,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,YAAY;QACjB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QAEvE,MAAM,IAAI,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,cAA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