@fastybird/smart-panel-backend 0.12.0-alpha.0 → 1.0.0-beta.3

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