@fastybird/smart-panel-backend 1.0.0-beta.3 → 1.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.module.js +54 -0
- package/dist/app.module.js.map +1 -1
- package/dist/common/utils/shared-lock-socket-path.utils.d.ts +1 -0
- package/dist/common/utils/shared-lock-socket-path.utils.js +34 -0
- package/dist/common/utils/shared-lock-socket-path.utils.js.map +1 -0
- package/dist/common/utils/sqlite-fts.utils.d.ts +17 -0
- package/dist/common/utils/sqlite-fts.utils.js +63 -0
- package/dist/common/utils/sqlite-fts.utils.js.map +1 -0
- package/dist/common/utils/transform.utils.d.ts +2 -0
- package/dist/common/utils/transform.utils.js +17 -2
- package/dist/common/utils/transform.utils.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/main.js +9 -2
- package/dist/main.js.map +1 -1
- package/dist/migrations/1000000000007-AddVirtualDevicesSupport.d.ts +6 -0
- package/dist/migrations/1000000000007-AddVirtualDevicesSupport.js +26 -0
- package/dist/migrations/1000000000007-AddVirtualDevicesSupport.js.map +1 -0
- package/dist/migrations/1000000000008-AddMcpClients.d.ts +6 -0
- package/dist/migrations/1000000000008-AddMcpClients.js +41 -0
- package/dist/migrations/1000000000008-AddMcpClients.js.map +1 -0
- package/dist/migrations/1000000000009-AddDeviceHiddenBy.d.ts +6 -0
- package/dist/migrations/1000000000009-AddDeviceHiddenBy.js +19 -0
- package/dist/migrations/1000000000009-AddDeviceHiddenBy.js.map +1 -0
- package/dist/migrations/1000000000010-AddEnergyClaimToProjections.d.ts +7 -0
- package/dist/migrations/1000000000010-AddEnergyClaimToProjections.js +59 -0
- package/dist/migrations/1000000000010-AddEnergyClaimToProjections.js.map +1 -0
- package/dist/migrations/1000000000010-AddMcpOAuthFoundation.d.ts +6 -0
- package/dist/migrations/1000000000010-AddMcpOAuthFoundation.js +124 -0
- package/dist/migrations/1000000000010-AddMcpOAuthFoundation.js.map +1 -0
- package/dist/migrations/1000000000011-AddMcpOAuthProviderArtifacts.d.ts +6 -0
- package/dist/migrations/1000000000011-AddMcpOAuthProviderArtifacts.js +33 -0
- package/dist/migrations/1000000000011-AddMcpOAuthProviderArtifacts.js.map +1 -0
- package/dist/migrations/1000000000012-LinkMcpOAuthProviderGrants.d.ts +6 -0
- package/dist/migrations/1000000000012-LinkMcpOAuthProviderGrants.js +18 -0
- package/dist/migrations/1000000000012-LinkMcpOAuthProviderGrants.js.map +1 -0
- package/dist/migrations/1000000000013-AddMcpOAuthProviderManagementIds.d.ts +8 -0
- package/dist/migrations/1000000000013-AddMcpOAuthProviderManagementIds.js +80 -0
- package/dist/migrations/1000000000013-AddMcpOAuthProviderManagementIds.js.map +1 -0
- package/dist/migrations/1000000000014-AddMcpOAuthProviderRefreshFamilyRevocations.d.ts +6 -0
- package/dist/migrations/1000000000014-AddMcpOAuthProviderRefreshFamilyRevocations.js +18 -0
- package/dist/migrations/1000000000014-AddMcpOAuthProviderRefreshFamilyRevocations.js.map +1 -0
- package/dist/migrations/1000000000015-AddMcpOAuthProviderRefreshFamilyLineage.d.ts +6 -0
- package/dist/migrations/1000000000015-AddMcpOAuthProviderRefreshFamilyLineage.js +26 -0
- package/dist/migrations/1000000000015-AddMcpOAuthProviderRefreshFamilyLineage.js.map +1 -0
- package/dist/migrations/1000000000016-AddMcpOAuthApproverAuthorities.d.ts +6 -0
- package/dist/migrations/1000000000016-AddMcpOAuthApproverAuthorities.js +20 -0
- package/dist/migrations/1000000000016-AddMcpOAuthApproverAuthorities.js.map +1 -0
- package/dist/migrations/1000000000017-AddMcpOAuthAuthorizationSnapshots.d.ts +6 -0
- package/dist/migrations/1000000000017-AddMcpOAuthAuthorizationSnapshots.js +69 -0
- package/dist/migrations/1000000000017-AddMcpOAuthAuthorizationSnapshots.js.map +1 -0
- package/dist/migrations/1000000000018-AddWledHardwareIdentity.d.ts +6 -0
- package/dist/migrations/1000000000018-AddWledHardwareIdentity.js +23 -0
- package/dist/migrations/1000000000018-AddWledHardwareIdentity.js.map +1 -0
- package/dist/migrations/1000000000019-EnforceUniqueWledHardwareIdentity.d.ts +6 -0
- package/dist/migrations/1000000000019-EnforceUniqueWledHardwareIdentity.js +31 -0
- package/dist/migrations/1000000000019-EnforceUniqueWledHardwareIdentity.js.map +1 -0
- package/dist/migrations/1000000000020-AddHomeEntitySearchIndex.d.ts +7 -0
- package/dist/migrations/1000000000020-AddHomeEntitySearchIndex.js +106 -0
- package/dist/migrations/1000000000020-AddHomeEntitySearchIndex.js.map +1 -0
- package/dist/migrations/1000000000021-AddHomeyCapabilityIdentity.d.ts +6 -0
- package/dist/migrations/1000000000021-AddHomeyCapabilityIdentity.js +22 -0
- package/dist/migrations/1000000000021-AddHomeyCapabilityIdentity.js.map +1 -0
- package/dist/migrations/1000000000022-AddHomeyAdoptionLocks.d.ts +6 -0
- package/dist/migrations/1000000000022-AddHomeyAdoptionLocks.js +20 -0
- package/dist/migrations/1000000000022-AddHomeyAdoptionLocks.js.map +1 -0
- package/dist/migrations/1000000000023-AddPropertyValueLocks.d.ts +6 -0
- package/dist/migrations/1000000000023-AddPropertyValueLocks.js +20 -0
- package/dist/migrations/1000000000023-AddPropertyValueLocks.js.map +1 -0
- package/dist/migrations/1000000000024-MigrateHomeyDiscriminators.d.ts +6 -0
- package/dist/migrations/1000000000024-MigrateHomeyDiscriminators.js +26 -0
- package/dist/migrations/1000000000024-MigrateHomeyDiscriminators.js.map +1 -0
- package/dist/migrations/1000000000025-AddNotifications.d.ts +6 -0
- package/dist/migrations/1000000000025-AddNotifications.js +44 -0
- package/dist/migrations/1000000000025-AddNotifications.js.map +1 -0
- package/dist/modules/api/api.constants.d.ts +2 -0
- package/dist/modules/api/api.constants.js +3 -1
- package/dist/modules/api/api.constants.js.map +1 -1
- package/dist/modules/api/api.module.d.ts +8 -1
- package/dist/modules/api/api.module.js +40 -2
- package/dist/modules/api/api.module.js.map +1 -1
- package/dist/modules/api/api.openapi.d.ts +2 -1
- package/dist/modules/api/api.openapi.js +3 -0
- package/dist/modules/api/api.openapi.js.map +1 -1
- package/dist/modules/api/interceptors/location-replace.interceptor.js +2 -2
- package/dist/modules/api/interceptors/location-replace.interceptor.js.map +1 -1
- package/dist/modules/api/models/bulk.model.d.ts +8 -0
- package/dist/modules/api/models/bulk.model.js +65 -0
- package/dist/modules/api/models/bulk.model.js.map +1 -0
- package/dist/modules/api/services/client-address.service.d.ts +29 -0
- package/dist/modules/api/services/client-address.service.js +146 -0
- package/dist/modules/api/services/client-address.service.js.map +1 -0
- package/dist/modules/api/services/trusted-proxy-registry.service.d.ts +10 -0
- package/dist/modules/api/services/trusted-proxy-registry.service.js +40 -0
- package/dist/modules/api/services/trusted-proxy-registry.service.js.map +1 -0
- package/dist/modules/api/utils/bulk.utils.d.ts +10 -0
- package/dist/modules/api/utils/bulk.utils.js +74 -0
- package/dist/modules/api/utils/bulk.utils.js.map +1 -0
- package/dist/modules/api/utils/ip-match.utils.d.ts +3 -0
- package/dist/modules/api/utils/ip-match.utils.js +115 -0
- package/dist/modules/api/utils/ip-match.utils.js.map +1 -0
- package/dist/modules/auth/auth.constants.d.ts +2 -1
- package/dist/modules/auth/auth.constants.js +1 -0
- package/dist/modules/auth/auth.constants.js.map +1 -1
- package/dist/modules/auth/auth.module.js +3 -1
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/auth.openapi.d.ts +2 -1
- package/dist/modules/auth/auth.openapi.js +4 -0
- package/dist/modules/auth/auth.openapi.js.map +1 -1
- package/dist/modules/auth/commands/reset-password.command.d.ts +3 -1
- package/dist/modules/auth/commands/reset-password.command.js +30 -14
- package/dist/modules/auth/commands/reset-password.command.js.map +1 -1
- package/dist/modules/auth/controllers/auth.controller.d.ts +5 -2
- package/dist/modules/auth/controllers/auth.controller.js +10 -5
- package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
- package/dist/modules/auth/controllers/tokens.controller.js +7 -0
- package/dist/modules/auth/controllers/tokens.controller.js.map +1 -1
- package/dist/modules/auth/guards/auth.guard.d.ts +11 -1
- package/dist/modules/auth/guards/auth.guard.js +76 -7
- package/dist/modules/auth/guards/auth.guard.js.map +1 -1
- package/dist/modules/auth/guards/display-aware-throttler.guard.d.ts +4 -1
- package/dist/modules/auth/guards/display-aware-throttler.guard.js +8 -2
- package/dist/modules/auth/guards/display-aware-throttler.guard.js.map +1 -1
- package/dist/modules/auth/services/auth.service.d.ts +11 -2
- package/dist/modules/auth/services/auth.service.js +60 -9
- package/dist/modules/auth/services/auth.service.js.map +1 -1
- package/dist/modules/auth/services/tokens.service.d.ts +12 -2
- package/dist/modules/auth/services/tokens.service.js +25 -3
- package/dist/modules/auth/services/tokens.service.js.map +1 -1
- package/dist/modules/buddy/buddy.constants.d.ts +8 -0
- package/dist/modules/buddy/buddy.constants.js +10 -1
- package/dist/modules/buddy/buddy.constants.js.map +1 -1
- package/dist/modules/buddy/buddy.module.d.ts +7 -1
- package/dist/modules/buddy/buddy.module.js +20 -2
- package/dist/modules/buddy/buddy.module.js.map +1 -1
- package/dist/modules/buddy/buddy.openapi.d.ts +2 -1
- package/dist/modules/buddy/buddy.openapi.js +2 -0
- package/dist/modules/buddy/buddy.openapi.js.map +1 -1
- package/dist/modules/buddy/models/context-plan.model.d.ts +47 -0
- package/dist/modules/{extensions/services/managed-plugin-service.interface.js → buddy/models/context-plan.model.js} +1 -1
- package/dist/modules/buddy/models/context-plan.model.js.map +1 -0
- package/dist/modules/buddy/platforms/anthropic-sdk.utils.d.ts +3 -2
- package/dist/modules/buddy/platforms/anthropic-sdk.utils.js +55 -12
- package/dist/modules/buddy/platforms/anthropic-sdk.utils.js.map +1 -1
- package/dist/modules/buddy/platforms/llm-conversation-bounds.utils.d.ts +20 -0
- package/dist/modules/buddy/platforms/llm-conversation-bounds.utils.js +155 -0
- package/dist/modules/buddy/platforms/llm-conversation-bounds.utils.js.map +1 -0
- package/dist/modules/buddy/platforms/llm-conversation.utils.d.ts +8 -0
- package/dist/modules/buddy/platforms/llm-conversation.utils.js +90 -0
- package/dist/modules/buddy/platforms/llm-conversation.utils.js.map +1 -0
- package/dist/modules/buddy/platforms/llm-provider.platform.d.ts +115 -1
- package/dist/modules/buddy/platforms/openai-sdk.utils.d.ts +3 -2
- package/dist/modules/buddy/platforms/openai-sdk.utils.js +48 -14
- package/dist/modules/buddy/platforms/openai-sdk.utils.js.map +1 -1
- package/dist/modules/buddy/services/buddy-context-planner.service.d.ts +4 -0
- package/dist/modules/buddy/services/buddy-context-planner.service.js +21 -0
- package/dist/modules/buddy/services/buddy-context-planner.service.js.map +1 -0
- package/dist/modules/buddy/services/buddy-conversation.service.d.ts +7 -1
- package/dist/modules/buddy/services/buddy-conversation.service.js +251 -42
- package/dist/modules/buddy/services/buddy-conversation.service.js.map +1 -1
- package/dist/modules/buddy/services/buddy-tool-selection.service.d.ts +16 -0
- package/dist/modules/buddy/services/buddy-tool-selection.service.js +711 -0
- package/dist/modules/buddy/services/buddy-tool-selection.service.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-action-policy.d.ts +22 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-action-policy.js +451 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-action-policy.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-language.d.ts +51 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-language.js +559 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-language.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-message-analysis.d.ts +42 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-message-analysis.js +673 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-message-analysis.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-plan-policy.d.ts +11 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-plan-policy.js +39 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-plan-policy.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-planner-grammar.d.ts +128 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-planner-grammar.js +220 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-planner-grammar.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-planning-pipeline.d.ts +2 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-planning-pipeline.js +304 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-planning-pipeline.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-query-builder.d.ts +12 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-query-builder.js +35 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-query-builder.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-retrieval-planner.d.ts +31 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-retrieval-planner.js +97 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-retrieval-planner.js.map +1 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-scope-resolver.d.ts +8 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-scope-resolver.js +186 -0
- package/dist/modules/buddy/services/context-planner/buddy-context-scope-resolver.js.map +1 -0
- package/dist/modules/buddy/services/heartbeat.service.d.ts +17 -4
- package/dist/modules/buddy/services/heartbeat.service.js +85 -15
- package/dist/modules/buddy/services/heartbeat.service.js.map +1 -1
- package/dist/modules/buddy/services/home-context-tool-provider.service.d.ts +165 -0
- package/dist/modules/buddy/services/home-context-tool-provider.service.js +257 -0
- package/dist/modules/buddy/services/home-context-tool-provider.service.js.map +1 -0
- package/dist/modules/buddy/services/llm-provider.service.d.ts +4 -3
- package/dist/modules/buddy/services/llm-provider.service.js +20 -1
- package/dist/modules/buddy/services/llm-provider.service.js.map +1 -1
- package/dist/modules/buddy/services/module-reset.service.d.ts +3 -1
- package/dist/modules/buddy/services/module-reset.service.js +6 -2
- package/dist/modules/buddy/services/module-reset.service.js.map +1 -1
- package/dist/modules/buddy/testing/buddy-context-evaluation.fixtures.d.ts +13 -0
- package/dist/modules/buddy/testing/buddy-context-evaluation.fixtures.js +119 -0
- package/dist/modules/buddy/testing/buddy-context-evaluation.fixtures.js.map +1 -0
- package/dist/modules/buddy/testing/buddy-context-evaluation.matrix.d.ts +36 -0
- package/dist/modules/buddy/testing/buddy-context-evaluation.matrix.js +230 -0
- package/dist/modules/buddy/testing/buddy-context-evaluation.matrix.js.map +1 -0
- package/dist/modules/buddy/testing/llm-request-measurement.helper.d.ts +33 -0
- package/dist/modules/buddy/testing/llm-request-measurement.helper.js +144 -0
- package/dist/modules/buddy/testing/llm-request-measurement.helper.js.map +1 -0
- package/dist/modules/config/config.module.js +18 -2
- package/dist/modules/config/config.module.js.map +1 -1
- package/dist/modules/config/controllers/config.controller.d.ts +3 -1
- package/dist/modules/config/controllers/config.controller.js +43 -18
- package/dist/modules/config/controllers/config.controller.js.map +1 -1
- package/dist/modules/config/interfaces/config-secret.interface.d.ts +5 -0
- package/dist/modules/config/interfaces/config-secret.interface.js +3 -0
- package/dist/modules/config/interfaces/config-secret.interface.js.map +1 -0
- package/dist/modules/config/services/config-secrets.service.d.ts +18 -0
- package/dist/modules/config/services/config-secrets.service.js +167 -0
- package/dist/modules/config/services/config-secrets.service.js.map +1 -0
- package/dist/modules/config/services/config.service.d.ts +19 -3
- package/dist/modules/config/services/config.service.js +105 -39
- package/dist/modules/config/services/config.service.js.map +1 -1
- package/dist/modules/config/services/module-config-mutation-registry.service.d.ts +8 -0
- package/dist/modules/config/services/module-config-mutation-registry.service.js +35 -0
- package/dist/modules/config/services/module-config-mutation-registry.service.js.map +1 -0
- package/dist/modules/config/services/modules-type-mapper.service.d.ts +2 -0
- package/dist/modules/config/services/modules-type-mapper.service.js.map +1 -1
- package/dist/modules/config/services/plugin-config-mutation-registry.service.d.ts +9 -0
- package/dist/modules/config/services/plugin-config-mutation-registry.service.js +50 -0
- package/dist/modules/config/services/plugin-config-mutation-registry.service.js.map +1 -0
- package/dist/modules/config/services/plugin-config-validator.service.d.ts +1 -0
- package/dist/modules/config/services/plugin-config-validator.service.js +4 -4
- package/dist/modules/config/services/plugin-config-validator.service.js.map +1 -1
- package/dist/modules/config/services/plugins-type-mapper.service.d.ts +2 -0
- package/dist/modules/config/services/plugins-type-mapper.service.js.map +1 -1
- package/dist/modules/dashboard/controllers/pages.controller.d.ts +6 -2
- package/dist/modules/dashboard/controllers/pages.controller.js +29 -2
- package/dist/modules/dashboard/controllers/pages.controller.js.map +1 -1
- package/dist/modules/dashboard/dashboard.module.js +2 -0
- package/dist/modules/dashboard/dashboard.module.js.map +1 -1
- package/dist/modules/dashboard/dashboard.openapi.d.ts +2 -2
- package/dist/modules/dashboard/dashboard.openapi.js +5 -0
- package/dist/modules/dashboard/dashboard.openapi.js.map +1 -1
- package/dist/modules/dashboard/dto/bulk-pages.dto.d.ts +7 -0
- package/dist/modules/dashboard/dto/bulk-pages.dto.js +53 -0
- package/dist/modules/dashboard/dto/bulk-pages.dto.js.map +1 -0
- package/dist/modules/dashboard/models/dashboard-response.model.d.ts +4 -0
- package/dist/modules/dashboard/models/dashboard-response.model.js +16 -1
- package/dist/modules/dashboard/models/dashboard-response.model.js.map +1 -1
- package/dist/modules/dashboard/services/pages-bulk.service.d.ts +8 -0
- package/dist/modules/dashboard/services/pages-bulk.service.js +35 -0
- package/dist/modules/dashboard/services/pages-bulk.service.js.map +1 -0
- package/dist/modules/devices/controllers/channels.properties.controller.js +9 -2
- package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js +9 -2
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.controller.d.ts +9 -3
- package/dist/modules/devices/controllers/devices.controller.js +86 -8
- package/dist/modules/devices/controllers/devices.controller.js.map +1 -1
- package/dist/modules/devices/devices.constants.d.ts +10 -0
- package/dist/modules/devices/devices.constants.js +13 -1
- package/dist/modules/devices/devices.constants.js.map +1 -1
- package/dist/modules/devices/devices.module.js +20 -0
- package/dist/modules/devices/devices.module.js.map +1 -1
- package/dist/modules/devices/devices.openapi.d.ts +3 -2
- package/dist/modules/devices/devices.openapi.js +5 -0
- package/dist/modules/devices/devices.openapi.js.map +1 -1
- package/dist/modules/devices/dto/bulk-devices.dto.d.ts +14 -0
- package/dist/modules/devices/dto/bulk-devices.dto.js +99 -0
- package/dist/modules/devices/dto/bulk-devices.dto.js.map +1 -0
- package/dist/modules/devices/dto/create-device.dto.d.ts +3 -1
- package/dist/modules/devices/dto/create-device.dto.js +25 -0
- package/dist/modules/devices/dto/create-device.dto.js.map +1 -1
- package/dist/modules/devices/dto/list-devices-query.dto.d.ts +4 -0
- package/dist/modules/devices/dto/list-devices-query.dto.js +31 -0
- package/dist/modules/devices/dto/list-devices-query.dto.js.map +1 -0
- package/dist/modules/devices/dto/update-device.dto.d.ts +3 -1
- package/dist/modules/devices/dto/update-device.dto.js +25 -0
- package/dist/modules/devices/dto/update-device.dto.js.map +1 -1
- package/dist/modules/devices/entities/devices.entity.d.ts +3 -1
- package/dist/modules/devices/entities/devices.entity.js +30 -0
- package/dist/modules/devices/entities/devices.entity.js.map +1 -1
- package/dist/modules/devices/entities/property-value-lock.entity.d.ts +5 -0
- package/dist/modules/devices/entities/property-value-lock.entity.js +32 -0
- package/dist/modules/devices/entities/property-value-lock.entity.js.map +1 -0
- package/dist/modules/devices/models/devices-response.model.d.ts +4 -0
- package/dist/modules/devices/models/devices-response.model.js +16 -1
- package/dist/modules/devices/models/devices-response.model.js.map +1 -1
- package/dist/modules/devices/platforms/device.platform.d.ts +3 -0
- package/dist/modules/devices/services/channels-type-mapper.service.d.ts +1 -0
- package/dist/modules/devices/services/channels-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/channels.properties-type-mapper.service.d.ts +2 -0
- package/dist/modules/devices/services/channels.properties-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/channels.properties.service.d.ts +86 -2
- package/dist/modules/devices/services/channels.properties.service.js +377 -41
- package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
- package/dist/modules/devices/services/channels.service.d.ts +14 -1
- package/dist/modules/devices/services/channels.service.js +125 -25
- package/dist/modules/devices/services/channels.service.js.map +1 -1
- package/dist/modules/devices/services/device-connection-state.service.d.ts +14 -5
- package/dist/modules/devices/services/device-connection-state.service.js +101 -20
- package/dist/modules/devices/services/device-connection-state.service.js.map +1 -1
- package/dist/modules/devices/services/device-connectivity.service.d.ts +5 -0
- package/dist/modules/devices/services/device-connectivity.service.js +9 -5
- package/dist/modules/devices/services/device-connectivity.service.js.map +1 -1
- package/dist/modules/devices/services/device-control-tool.service.d.ts +5 -13
- package/dist/modules/devices/services/device-control-tool.service.js +71 -115
- package/dist/modules/devices/services/device-control-tool.service.js.map +1 -1
- package/dist/modules/devices/services/device-structure-lock.service.d.ts +5 -0
- package/dist/modules/devices/services/device-structure-lock.service.js +30 -0
- package/dist/modules/devices/services/device-structure-lock.service.js.map +1 -0
- package/dist/modules/devices/services/device-zones.service.d.ts +4 -1
- package/dist/modules/devices/services/device-zones.service.js +63 -25
- package/dist/modules/devices/services/device-zones.service.js.map +1 -1
- package/dist/modules/devices/services/devices-bulk.service.d.ts +12 -0
- package/dist/modules/devices/services/devices-bulk.service.js +74 -0
- package/dist/modules/devices/services/devices-bulk.service.js.map +1 -0
- package/dist/modules/devices/services/devices-type-mapper.service.d.ts +1 -0
- package/dist/modules/devices/services/devices-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.d.ts +58 -2
- package/dist/modules/devices/services/devices.service.js +359 -20
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/devices/services/platform.registry.service.d.ts +7 -1
- package/dist/modules/devices/services/platform.registry.service.js +19 -0
- package/dist/modules/devices/services/platform.registry.service.js.map +1 -1
- package/dist/modules/devices/services/property-command.service.d.ts +23 -1
- package/dist/modules/devices/services/property-command.service.js +124 -50
- package/dist/modules/devices/services/property-command.service.js.map +1 -1
- package/dist/modules/devices/services/property-timeseries.service.d.ts +4 -1
- package/dist/modules/devices/services/property-timeseries.service.js +25 -13
- package/dist/modules/devices/services/property-timeseries.service.js.map +1 -1
- package/dist/modules/devices/services/property-value-lock.service.d.ts +20 -0
- package/dist/modules/devices/services/property-value-lock.service.js +147 -0
- package/dist/modules/devices/services/property-value-lock.service.js.map +1 -0
- package/dist/modules/devices/services/property-value-source.registry.service.d.ts +13 -0
- package/dist/modules/devices/services/property-value-source.registry.service.js +42 -0
- package/dist/modules/devices/services/property-value-source.registry.service.js.map +1 -0
- package/dist/modules/devices/services/property-value.service.d.ts +86 -3
- package/dist/modules/devices/services/property-value.service.js +527 -76
- package/dist/modules/devices/services/property-value.service.js.map +1 -1
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.d.ts +0 -1
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.js +2 -19
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.js.map +1 -1
- package/dist/modules/devices/utils/property-command-value.utils.d.ts +13 -0
- package/dist/modules/devices/utils/property-command-value.utils.js +147 -0
- package/dist/modules/devices/utils/property-command-value.utils.js.map +1 -0
- package/dist/modules/devices/utils/property-metadata.utils.d.ts +2 -0
- package/dist/modules/devices/utils/property-metadata.utils.js +22 -0
- package/dist/modules/devices/utils/property-metadata.utils.js.map +1 -0
- package/dist/modules/devices/utils/schema.utils.js +25 -151
- package/dist/modules/devices/utils/schema.utils.js.map +1 -1
- package/dist/modules/devices/utils/unique-constraint.utils.d.ts +1 -0
- package/dist/modules/devices/utils/unique-constraint.utils.js +27 -0
- package/dist/modules/devices/utils/unique-constraint.utils.js.map +1 -0
- package/dist/modules/devices/validators/channel-exists-constraint.validator.js +1 -1
- package/dist/modules/devices/validators/channel-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/device-exists-constraint.validator.js +1 -1
- package/dist/modules/devices/validators/device-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/device-not-hidden-constraint.validator.d.ts +9 -0
- package/dist/modules/devices/validators/device-not-hidden-constraint.validator.js +47 -0
- package/dist/modules/devices/validators/device-not-hidden-constraint.validator.js.map +1 -0
- package/dist/modules/displays/controllers/displays.controller.d.ts +6 -2
- package/dist/modules/displays/controllers/displays.controller.js +30 -1
- package/dist/modules/displays/controllers/displays.controller.js.map +1 -1
- package/dist/modules/displays/controllers/registration.controller.d.ts +6 -4
- package/dist/modules/displays/controllers/registration.controller.js +8 -5
- package/dist/modules/displays/controllers/registration.controller.js.map +1 -1
- package/dist/modules/displays/displays.module.js +5 -0
- package/dist/modules/displays/displays.module.js.map +1 -1
- package/dist/modules/displays/displays.openapi.d.ts +4 -2
- package/dist/modules/displays/displays.openapi.js +5 -0
- package/dist/modules/displays/displays.openapi.js.map +1 -1
- package/dist/modules/displays/dto/bulk-displays.dto.d.ts +7 -0
- package/dist/modules/displays/dto/bulk-displays.dto.js +53 -0
- package/dist/modules/displays/dto/bulk-displays.dto.js.map +1 -0
- package/dist/modules/displays/guards/registration.guard.d.ts +4 -1
- package/dist/modules/displays/guards/registration.guard.js +18 -5
- package/dist/modules/displays/guards/registration.guard.js.map +1 -1
- package/dist/modules/displays/models/displays-response.model.d.ts +4 -0
- package/dist/modules/displays/models/displays-response.model.js +16 -1
- package/dist/modules/displays/models/displays-response.model.js.map +1 -1
- package/dist/modules/displays/services/displays-bulk.service.d.ts +8 -0
- package/dist/modules/displays/services/displays-bulk.service.js +39 -0
- package/dist/modules/displays/services/displays-bulk.service.js.map +1 -0
- package/dist/modules/displays/utils/ip.utils.d.ts +0 -2
- package/dist/modules/displays/utils/ip.utils.js +0 -25
- package/dist/modules/displays/utils/ip.utils.js.map +1 -1
- package/dist/modules/energy/energy.module.js +6 -2
- package/dist/modules/energy/energy.module.js.map +1 -1
- package/dist/modules/energy/energy.openapi.d.ts +3 -1
- package/dist/modules/energy/energy.openapi.js +4 -0
- package/dist/modules/energy/energy.openapi.js.map +1 -1
- package/dist/modules/energy/listeners/energy-ingestion.listener.d.ts +8 -1
- package/dist/modules/energy/listeners/energy-ingestion.listener.js +72 -28
- package/dist/modules/energy/listeners/energy-ingestion.listener.js.map +1 -1
- package/dist/modules/energy/services/energy-claim.registry.service.d.ts +16 -0
- package/dist/modules/energy/services/energy-claim.registry.service.js +41 -0
- package/dist/modules/energy/services/energy-claim.registry.service.js.map +1 -0
- package/dist/modules/energy/services/energy-data.service.d.ts +2 -0
- package/dist/modules/energy/services/energy-data.service.js +22 -6
- package/dist/modules/energy/services/energy-data.service.js.map +1 -1
- package/dist/modules/energy/utils/energy-source-type.utils.d.ts +8 -0
- package/dist/modules/energy/utils/energy-source-type.utils.js +30 -0
- package/dist/modules/energy/utils/energy-source-type.utils.js.map +1 -0
- package/dist/modules/extensions/commands/services.command.d.ts +9 -9
- package/dist/modules/extensions/commands/services.command.js +73 -60
- package/dist/modules/extensions/commands/services.command.js.map +1 -1
- package/dist/modules/extensions/controllers/extensions.controller.d.ts +7 -3
- package/dist/modules/extensions/controllers/extensions.controller.js +31 -5
- package/dist/modules/extensions/controllers/extensions.controller.js.map +1 -1
- package/dist/modules/extensions/controllers/services.controller.d.ts +8 -7
- package/dist/modules/extensions/controllers/services.controller.js +79 -59
- package/dist/modules/extensions/controllers/services.controller.js.map +1 -1
- package/dist/modules/extensions/dto/bulk-extensions.dto.d.ts +8 -0
- package/dist/modules/extensions/dto/bulk-extensions.dto.js +63 -0
- package/dist/modules/extensions/dto/bulk-extensions.dto.js.map +1 -0
- package/dist/modules/extensions/dto/update-config.dto.js +1 -1
- package/dist/modules/extensions/dto/update-config.dto.js.map +1 -1
- package/dist/modules/extensions/extensions.constants.js +2 -2
- package/dist/modules/extensions/extensions.constants.js.map +1 -1
- package/dist/modules/extensions/extensions.exceptions.d.ts +3 -0
- package/dist/modules/extensions/extensions.exceptions.js +7 -1
- package/dist/modules/extensions/extensions.exceptions.js.map +1 -1
- package/dist/modules/extensions/extensions.module.js +13 -11
- package/dist/modules/extensions/extensions.module.js.map +1 -1
- package/dist/modules/extensions/extensions.openapi.d.ts +3 -2
- package/dist/modules/extensions/extensions.openapi.js +5 -0
- package/dist/modules/extensions/extensions.openapi.js.map +1 -1
- package/dist/modules/extensions/models/extensions-response.model.d.ts +4 -0
- package/dist/modules/extensions/models/extensions-response.model.js +16 -1
- package/dist/modules/extensions/models/extensions-response.model.js.map +1 -1
- package/dist/modules/extensions/models/service-status.model.d.ts +5 -2
- package/dist/modules/extensions/models/service-status.model.js +36 -6
- package/dist/modules/extensions/models/service-status.model.js.map +1 -1
- package/dist/modules/extensions/providers/extensions-stats.provider.d.ts +3 -3
- package/dist/modules/extensions/providers/extensions-stats.provider.js +6 -6
- package/dist/modules/extensions/providers/extensions-stats.provider.js.map +1 -1
- package/dist/modules/extensions/services/{base-managed-plugin.service.d.ts → base-managed-extension.service.d.ts} +3 -3
- package/dist/modules/extensions/services/{base-managed-plugin.service.js → base-managed-extension.service.js} +4 -4
- package/dist/modules/extensions/services/base-managed-extension.service.js.map +1 -0
- package/dist/modules/extensions/services/extensions-bulk.service.d.ts +8 -0
- package/dist/modules/extensions/services/extensions-bulk.service.js +41 -0
- package/dist/modules/extensions/services/extensions-bulk.service.js.map +1 -0
- package/dist/modules/extensions/services/extensions.service.d.ts +1 -1
- package/dist/modules/extensions/services/extensions.service.js +14 -5
- package/dist/modules/extensions/services/extensions.service.js.map +1 -1
- package/dist/modules/extensions/services/{managed-plugin-service.interface.d.ts → managed-extension-service.interface.d.ts} +16 -5
- package/dist/modules/extensions/services/managed-extension-service.interface.js +3 -0
- package/dist/modules/extensions/services/managed-extension-service.interface.js.map +1 -0
- package/dist/modules/extensions/services/managed-service-manager.service.d.ts +57 -0
- package/dist/modules/extensions/services/{plugin-service-manager.service.js → managed-service-manager.service.js} +260 -73
- package/dist/modules/extensions/services/managed-service-manager.service.js.map +1 -0
- package/dist/modules/home-context/home-context-pagination.errors.d.ts +5 -0
- package/dist/modules/home-context/home-context-pagination.errors.js +13 -0
- package/dist/modules/home-context/home-context-pagination.errors.js.map +1 -0
- package/dist/modules/home-context/home-context.constants.d.ts +66 -0
- package/dist/modules/home-context/home-context.constants.js +81 -0
- package/dist/modules/home-context/home-context.constants.js.map +1 -0
- package/dist/modules/home-context/home-context.errors.d.ts +5 -0
- package/dist/modules/home-context/home-context.errors.js +13 -0
- package/dist/modules/home-context/home-context.errors.js.map +1 -0
- package/dist/modules/home-context/home-context.module.d.ts +2 -0
- package/dist/modules/home-context/home-context.module.js +44 -0
- package/dist/modules/home-context/home-context.module.js.map +1 -0
- package/dist/modules/home-context/home-current-state.errors.d.ts +5 -0
- package/dist/modules/home-context/home-current-state.errors.js +13 -0
- package/dist/modules/home-context/home-current-state.errors.js.map +1 -0
- package/dist/modules/home-context/home-search.errors.d.ts +11 -0
- package/dist/modules/home-context/home-search.errors.js +25 -0
- package/dist/modules/home-context/home-search.errors.js.map +1 -0
- package/dist/modules/home-context/home-state.errors.d.ts +24 -0
- package/dist/modules/home-context/home-state.errors.js +44 -0
- package/dist/modules/home-context/home-state.errors.js.map +1 -0
- package/dist/modules/home-context/models/home-context-query.model.d.ts +10 -0
- package/dist/modules/home-context/models/home-context-query.model.js +3 -0
- package/dist/modules/home-context/models/home-context-query.model.js.map +1 -0
- package/dist/modules/home-context/models/home-context-result.model.d.ts +124 -0
- package/dist/modules/home-context/models/home-context-result.model.js +3 -0
- package/dist/modules/home-context/models/home-context-result.model.js.map +1 -0
- package/dist/modules/home-context/models/home-current-state-query.model.d.ts +33 -0
- package/dist/modules/home-context/models/home-current-state-query.model.js +3 -0
- package/dist/modules/home-context/models/home-current-state-query.model.js.map +1 -0
- package/dist/modules/home-context/models/home-current-state-result.model.d.ts +70 -0
- package/dist/modules/home-context/models/home-current-state-result.model.js +3 -0
- package/dist/modules/home-context/models/home-current-state-result.model.js.map +1 -0
- package/dist/modules/home-context/models/home-search-query.model.d.ts +11 -0
- package/dist/modules/home-context/models/home-search-query.model.js +3 -0
- package/dist/modules/home-context/models/home-search-query.model.js.map +1 -0
- package/dist/modules/home-context/models/home-search-result.model.d.ts +71 -0
- package/dist/modules/home-context/models/home-search-result.model.js +3 -0
- package/dist/modules/home-context/models/home-search-result.model.js.map +1 -0
- package/dist/modules/home-context/models/home-state-query.model.d.ts +26 -0
- package/dist/modules/home-context/models/home-state-query.model.js +3 -0
- package/dist/modules/home-context/models/home-state-query.model.js.map +1 -0
- package/dist/modules/home-context/models/home-state-result.model.d.ts +48 -0
- package/dist/modules/home-context/models/home-state-result.model.js +3 -0
- package/dist/modules/home-context/models/home-state-result.model.js.map +1 -0
- package/dist/modules/home-context/models/home-target-query.model.d.ts +9 -0
- package/dist/modules/home-context/models/home-target-query.model.js +3 -0
- package/dist/modules/home-context/models/home-target-query.model.js.map +1 -0
- package/dist/modules/home-context/models/home-target-result.model.d.ts +43 -0
- package/dist/modules/home-context/models/home-target-result.model.js +3 -0
- package/dist/modules/home-context/models/home-target-result.model.js.map +1 -0
- package/dist/modules/home-context/schemas/home-context-input.schemas.d.ts +9 -0
- package/dist/modules/home-context/schemas/home-context-input.schemas.js +22 -0
- package/dist/modules/home-context/schemas/home-context-input.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-context-output.schemas.d.ts +125 -0
- package/dist/modules/home-context/schemas/home-context-output.schemas.js +147 -0
- package/dist/modules/home-context/schemas/home-context-output.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-current-state-input.schemas.d.ts +150 -0
- package/dist/modules/home-context/schemas/home-current-state-input.schemas.js +59 -0
- package/dist/modules/home-context/schemas/home-current-state-input.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-current-state-output.schemas.d.ts +275 -0
- package/dist/modules/home-context/schemas/home-current-state-output.schemas.js +139 -0
- package/dist/modules/home-context/schemas/home-current-state-output.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-search-input.schemas.d.ts +20 -0
- package/dist/modules/home-context/schemas/home-search-input.schemas.js +29 -0
- package/dist/modules/home-context/schemas/home-search-input.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-search-output.schemas.d.ts +112 -0
- package/dist/modules/home-context/schemas/home-search-output.schemas.js +84 -0
- package/dist/modules/home-context/schemas/home-search-output.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-state-input.schemas.d.ts +30 -0
- package/dist/modules/home-context/schemas/home-state-input.schemas.js +37 -0
- package/dist/modules/home-context/schemas/home-state-input.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-state-output.schemas.d.ts +116 -0
- package/dist/modules/home-context/schemas/home-state-output.schemas.js +129 -0
- package/dist/modules/home-context/schemas/home-state-output.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-target-input.schemas.d.ts +9 -0
- package/dist/modules/home-context/schemas/home-target-input.schemas.js +15 -0
- package/dist/modules/home-context/schemas/home-target-input.schemas.js.map +1 -0
- package/dist/modules/home-context/schemas/home-target-output.schemas.d.ts +40 -0
- package/dist/modules/home-context/schemas/home-target-output.schemas.js +61 -0
- package/dist/modules/home-context/schemas/home-target-output.schemas.js.map +1 -0
- package/dist/modules/home-context/services/home-context-query.service.d.ts +31 -0
- package/dist/modules/home-context/services/home-context-query.service.js +264 -0
- package/dist/modules/home-context/services/home-context-query.service.js.map +1 -0
- package/dist/modules/home-context/services/home-current-state-query.service.d.ts +17 -0
- package/dist/modules/home-context/services/home-current-state-query.service.js +256 -0
- package/dist/modules/home-context/services/home-current-state-query.service.js.map +1 -0
- package/dist/modules/home-context/services/home-search-query.service.d.ts +30 -0
- package/dist/modules/home-context/services/home-search-query.service.js +443 -0
- package/dist/modules/home-context/services/home-search-query.service.js.map +1 -0
- package/dist/modules/home-context/services/home-state-query.service.d.ts +35 -0
- package/dist/modules/home-context/services/home-state-query.service.js +263 -0
- package/dist/modules/home-context/services/home-state-query.service.js.map +1 -0
- package/dist/modules/home-context/services/home-target-query.service.d.ts +21 -0
- package/dist/modules/home-context/services/home-target-query.service.js +149 -0
- package/dist/modules/home-context/services/home-target-query.service.js.map +1 -0
- package/dist/modules/mcp/controllers/mcp-clients.controller.d.ts +17 -0
- package/dist/modules/mcp/controllers/mcp-clients.controller.js +201 -0
- package/dist/modules/mcp/controllers/mcp-clients.controller.js.map +1 -0
- package/dist/modules/mcp/controllers/mcp-oauth-clients.controller.d.ts +17 -0
- package/dist/modules/mcp/controllers/mcp-oauth-clients.controller.js +162 -0
- package/dist/modules/mcp/controllers/mcp-oauth-clients.controller.js.map +1 -0
- package/dist/modules/mcp/controllers/mcp-oauth-interactions.controller.d.ts +15 -0
- package/dist/modules/mcp/controllers/mcp-oauth-interactions.controller.js +136 -0
- package/dist/modules/mcp/controllers/mcp-oauth-interactions.controller.js.map +1 -0
- package/dist/modules/mcp/controllers/mcp-oauth-management.controller.d.ts +20 -0
- package/dist/modules/mcp/controllers/mcp-oauth-management.controller.js +271 -0
- package/dist/modules/mcp/controllers/mcp-oauth-management.controller.js.map +1 -0
- package/dist/modules/mcp/controllers/mcp.controller.d.ts +17 -0
- package/dist/modules/mcp/controllers/mcp.controller.js +87 -0
- package/dist/modules/mcp/controllers/mcp.controller.js.map +1 -0
- package/dist/modules/mcp/decorators/mcp-endpoint.decorator.d.ts +1 -0
- package/dist/modules/mcp/decorators/mcp-endpoint.decorator.js +8 -0
- package/dist/modules/mcp/decorators/mcp-endpoint.decorator.js.map +1 -0
- package/dist/modules/mcp/dto/mcp-client.dto.d.ts +25 -0
- package/dist/modules/mcp/dto/mcp-client.dto.js +185 -0
- package/dist/modules/mcp/dto/mcp-client.dto.js.map +1 -0
- package/dist/modules/mcp/dto/mcp-oauth-client.dto.d.ts +18 -0
- package/dist/modules/mcp/dto/mcp-oauth-client.dto.js +135 -0
- package/dist/modules/mcp/dto/mcp-oauth-client.dto.js.map +1 -0
- package/dist/modules/mcp/dto/mcp-oauth-grant.dto.d.ts +7 -0
- package/dist/modules/mcp/dto/mcp-oauth-grant.dto.js +51 -0
- package/dist/modules/mcp/dto/mcp-oauth-grant.dto.js.map +1 -0
- package/dist/modules/mcp/dto/mcp-oauth-interaction.dto.d.ts +8 -0
- package/dist/modules/mcp/dto/mcp-oauth-interaction.dto.js +68 -0
- package/dist/modules/mcp/dto/mcp-oauth-interaction.dto.js.map +1 -0
- package/dist/modules/mcp/dto/update-config.dto.d.ts +9 -0
- package/dist/modules/mcp/dto/update-config.dto.js +102 -0
- package/dist/modules/mcp/dto/update-config.dto.js.map +1 -0
- package/dist/modules/mcp/entities/mcp-client.entity.d.ts +17 -0
- package/dist/modules/mcp/entities/mcp-client.entity.js +154 -0
- package/dist/modules/mcp/entities/mcp-client.entity.js.map +1 -0
- package/dist/modules/mcp/entities/mcp-installation.entity.d.ts +5 -0
- package/dist/modules/mcp/entities/mcp-installation.entity.js +32 -0
- package/dist/modules/mcp/entities/mcp-installation.entity.js.map +1 -0
- package/dist/modules/mcp/entities/mcp-oauth.entity.d.ts +143 -0
- package/dist/modules/mcp/entities/mcp-oauth.entity.js +602 -0
- package/dist/modules/mcp/entities/mcp-oauth.entity.js.map +1 -0
- package/dist/modules/mcp/guards/mcp-client.guard.d.ts +14 -0
- package/dist/modules/mcp/guards/mcp-client.guard.js +73 -0
- package/dist/modules/mcp/guards/mcp-client.guard.js.map +1 -0
- package/dist/modules/mcp/guards/mcp-throttle.guard.d.ts +26 -0
- package/dist/modules/mcp/guards/mcp-throttle.guard.js +161 -0
- package/dist/modules/mcp/guards/mcp-throttle.guard.js.map +1 -0
- package/dist/modules/mcp/listeners/mcp-config.listener.d.ts +22 -0
- package/dist/modules/mcp/listeners/mcp-config.listener.js +104 -0
- package/dist/modules/mcp/listeners/mcp-config.listener.js.map +1 -0
- package/dist/modules/mcp/mcp.constants.d.ts +68 -0
- package/dist/modules/mcp/mcp.constants.js +77 -0
- package/dist/modules/mcp/mcp.constants.js.map +1 -0
- package/dist/modules/mcp/mcp.exceptions.d.ts +4 -0
- package/dist/modules/mcp/mcp.exceptions.js +11 -0
- package/dist/modules/mcp/mcp.exceptions.js.map +1 -0
- package/dist/modules/mcp/mcp.module.d.ts +23 -0
- package/dist/modules/mcp/mcp.module.js +272 -0
- package/dist/modules/mcp/mcp.module.js.map +1 -0
- package/dist/modules/mcp/mcp.openapi.d.ts +13 -0
- package/dist/modules/mcp/mcp.openapi.js +60 -0
- package/dist/modules/mcp/mcp.openapi.js.map +1 -0
- package/dist/modules/mcp/models/config.model.d.ts +10 -0
- package/dist/modules/mcp/models/config.model.js +106 -0
- package/dist/modules/mcp/models/config.model.js.map +1 -0
- package/dist/modules/mcp/models/mcp-client-response.model.d.ts +12 -0
- package/dist/modules/mcp/models/mcp-client-response.model.js +51 -0
- package/dist/modules/mcp/models/mcp-client-response.model.js.map +1 -0
- package/dist/modules/mcp/models/mcp-client.model.d.ts +5 -0
- package/dist/modules/mcp/models/mcp-client.model.js +35 -0
- package/dist/modules/mcp/models/mcp-client.model.js.map +1 -0
- package/dist/modules/mcp/models/mcp-oauth-client-response.model.d.ts +8 -0
- package/dist/modules/mcp/models/mcp-oauth-client-response.model.js +39 -0
- package/dist/modules/mcp/models/mcp-oauth-client-response.model.js.map +1 -0
- package/dist/modules/mcp/models/mcp-oauth-client.model.d.ts +13 -0
- package/dist/modules/mcp/models/mcp-oauth-client.model.js +85 -0
- package/dist/modules/mcp/models/mcp-oauth-client.model.js.map +1 -0
- package/dist/modules/mcp/models/mcp-oauth-interaction-response.model.d.ts +8 -0
- package/dist/modules/mcp/models/mcp-oauth-interaction-response.model.js +39 -0
- package/dist/modules/mcp/models/mcp-oauth-interaction-response.model.js.map +1 -0
- package/dist/modules/mcp/models/mcp-oauth-interaction.model.d.ts +23 -0
- package/dist/modules/mcp/models/mcp-oauth-interaction.model.js +111 -0
- package/dist/modules/mcp/models/mcp-oauth-interaction.model.js.map +1 -0
- package/dist/modules/mcp/models/mcp-oauth-management-response.model.d.ts +23 -0
- package/dist/modules/mcp/models/mcp-oauth-management-response.model.js +94 -0
- package/dist/modules/mcp/models/mcp-oauth-management-response.model.js.map +1 -0
- package/dist/modules/mcp/models/mcp-oauth-management.model.d.ts +35 -0
- package/dist/modules/mcp/models/mcp-oauth-management.model.js +189 -0
- package/dist/modules/mcp/models/mcp-oauth-management.model.js.map +1 -0
- package/dist/modules/mcp/oauth/mcp-oauth-metadata.d.ts +15 -0
- package/dist/modules/mcp/oauth/mcp-oauth-metadata.js +18 -0
- package/dist/modules/mcp/oauth/mcp-oauth-metadata.js.map +1 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.adapter.d.ts +21 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.adapter.js +297 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.adapter.js.map +1 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.factory.d.ts +49 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.factory.js +324 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.factory.js.map +1 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.loader.d.ts +4 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.loader.js +7 -0
- package/dist/modules/mcp/oauth/mcp-oauth-provider.loader.js.map +1 -0
- package/dist/modules/mcp/oauth/mcp-oauth-redaction.d.ts +1 -0
- package/dist/modules/mcp/oauth/mcp-oauth-redaction.js +17 -0
- package/dist/modules/mcp/oauth/mcp-oauth-redaction.js.map +1 -0
- package/dist/modules/mcp/oauth/mcp-oauth-scope.utils.d.ts +3 -0
- package/dist/modules/mcp/oauth/mcp-oauth-scope.utils.js +29 -0
- package/dist/modules/mcp/oauth/mcp-oauth-scope.utils.js.map +1 -0
- package/dist/modules/mcp/oauth/mcp-oauth.types.d.ts +31 -0
- package/dist/modules/mcp/oauth/mcp-oauth.types.js +3 -0
- package/dist/modules/mcp/oauth/mcp-oauth.types.js.map +1 -0
- package/dist/modules/mcp/providers/mcp-stats.provider.d.ts +19 -0
- package/dist/modules/mcp/providers/mcp-stats.provider.js +38 -0
- package/dist/modules/mcp/providers/mcp-stats.provider.js.map +1 -0
- package/dist/modules/mcp/services/mcp-audit.service.d.ts +74 -0
- package/dist/modules/mcp/services/mcp-audit.service.js +161 -0
- package/dist/modules/mcp/services/mcp-audit.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-client.service.d.ts +34 -0
- package/dist/modules/mcp/services/mcp-client.service.js +241 -0
- package/dist/modules/mcp/services/mcp-client.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-context.service.d.ts +32 -0
- package/dist/modules/mcp/services/mcp-context.service.js +136 -0
- package/dist/modules/mcp/services/mcp-context.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-installation.service.d.ts +9 -0
- package/dist/modules/mcp/services/mcp-installation.service.js +55 -0
- package/dist/modules/mcp/services/mcp-installation.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-approver-authority.service.d.ts +20 -0
- package/dist/modules/mcp/services/mcp-oauth-approver-authority.service.js +128 -0
- package/dist/modules/mcp/services/mcp-oauth-approver-authority.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-artifact.service.d.ts +69 -0
- package/dist/modules/mcp/services/mcp-oauth-artifact.service.js +200 -0
- package/dist/modules/mcp/services/mcp-oauth-artifact.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-bootstrap.service.d.ts +22 -0
- package/dist/modules/mcp/services/mcp-oauth-bootstrap.service.js +116 -0
- package/dist/modules/mcp/services/mcp-oauth-bootstrap.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-client.service.d.ts +20 -0
- package/dist/modules/mcp/services/mcp-oauth-client.service.js +107 -0
- package/dist/modules/mcp/services/mcp-oauth-client.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-endpoint-rate-limit.service.d.ts +15 -0
- package/dist/modules/mcp/services/mcp-oauth-endpoint-rate-limit.service.js +52 -0
- package/dist/modules/mcp/services/mcp-oauth-endpoint-rate-limit.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-global-invalidation.service.d.ts +12 -0
- package/dist/modules/mcp/services/mcp-oauth-global-invalidation.service.js +82 -0
- package/dist/modules/mcp/services/mcp-oauth-global-invalidation.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-interaction.service.d.ts +36 -0
- package/dist/modules/mcp/services/mcp-oauth-interaction.service.js +312 -0
- package/dist/modules/mcp/services/mcp-oauth-interaction.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-lifecycle.service.d.ts +18 -0
- package/dist/modules/mcp/services/mcp-oauth-lifecycle.service.js +88 -0
- package/dist/modules/mcp/services/mcp-oauth-lifecycle.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-management.service.d.ts +45 -0
- package/dist/modules/mcp/services/mcp-oauth-management.service.js +381 -0
- package/dist/modules/mcp/services/mcp-oauth-management.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-module-config-mutation.service.d.ts +28 -0
- package/dist/modules/mcp/services/mcp-oauth-module-config-mutation.service.js +253 -0
- package/dist/modules/mcp/services/mcp-oauth-module-config-mutation.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-provider-material.service.d.ts +21 -0
- package/dist/modules/mcp/services/mcp-oauth-provider-material.service.js +130 -0
- package/dist/modules/mcp/services/mcp-oauth-provider-material.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-proxy-policy.service.d.ts +11 -0
- package/dist/modules/mcp/services/mcp-oauth-proxy-policy.service.js +53 -0
- package/dist/modules/mcp/services/mcp-oauth-proxy-policy.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-public-url.service.d.ts +7 -0
- package/dist/modules/mcp/services/mcp-oauth-public-url.service.js +47 -0
- package/dist/modules/mcp/services/mcp-oauth-public-url.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-readiness-registration.service.d.ts +25 -0
- package/dist/modules/mcp/services/mcp-oauth-readiness-registration.service.js +69 -0
- package/dist/modules/mcp/services/mcp-oauth-readiness-registration.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-readiness.service.d.ts +32 -0
- package/dist/modules/mcp/services/mcp-oauth-readiness.service.js +71 -0
- package/dist/modules/mcp/services/mcp-oauth-readiness.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-refresh-token.service.d.ts +13 -0
- package/dist/modules/mcp/services/mcp-oauth-refresh-token.service.js +91 -0
- package/dist/modules/mcp/services/mcp-oauth-refresh-token.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-resource-server.service.d.ts +40 -0
- package/dist/modules/mcp/services/mcp-oauth-resource-server.service.js +233 -0
- package/dist/modules/mcp/services/mcp-oauth-resource-server.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-route-gate.service.d.ts +12 -0
- package/dist/modules/mcp/services/mcp-oauth-route-gate.service.js +50 -0
- package/dist/modules/mcp/services/mcp-oauth-route-gate.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-runtime.service.d.ts +15 -0
- package/dist/modules/mcp/services/mcp-oauth-runtime.service.js +70 -0
- package/dist/modules/mcp/services/mcp-oauth-runtime.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-oauth-switch-off.service.d.ts +18 -0
- package/dist/modules/mcp/services/mcp-oauth-switch-off.service.js +74 -0
- package/dist/modules/mcp/services/mcp-oauth-switch-off.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-policy.service.d.ts +51 -0
- package/dist/modules/mcp/services/mcp-policy.service.js +162 -0
- package/dist/modules/mcp/services/mcp-policy.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-server.service.d.ts +50 -0
- package/dist/modules/mcp/services/mcp-server.service.js +513 -0
- package/dist/modules/mcp/services/mcp-server.service.js.map +1 -0
- package/dist/modules/mcp/services/mcp-subscription-registry.service.d.ts +76 -0
- package/dist/modules/mcp/services/mcp-subscription-registry.service.js +287 -0
- package/dist/modules/mcp/services/mcp-subscription-registry.service.js.map +1 -0
- package/dist/modules/mcp/tools/mcp-read-tool.service.d.ts +23 -0
- package/dist/modules/mcp/tools/mcp-read-tool.service.js +361 -0
- package/dist/modules/mcp/tools/mcp-read-tool.service.js.map +1 -0
- package/dist/modules/mcp/tools/mcp-target-discovery-tool.service.d.ts +35 -0
- package/dist/modules/mcp/tools/mcp-target-discovery-tool.service.js +374 -0
- package/dist/modules/mcp/tools/mcp-target-discovery-tool.service.js.map +1 -0
- package/dist/modules/mcp/validators/is-mcp-oauth-public-base-url.validator.d.ts +6 -0
- package/dist/modules/mcp/validators/is-mcp-oauth-public-base-url.validator.js +46 -0
- package/dist/modules/mcp/validators/is-mcp-oauth-public-base-url.validator.js.map +1 -0
- package/dist/modules/mcp/validators/is-mcp-oauth-redirect-uri.validator.d.ts +7 -0
- package/dist/modules/mcp/validators/is-mcp-oauth-redirect-uri.validator.js +65 -0
- package/dist/modules/mcp/validators/is-mcp-oauth-redirect-uri.validator.js.map +1 -0
- package/dist/modules/mcp/validators/is-mcp-origin.validator.d.ts +5 -0
- package/dist/modules/mcp/validators/is-mcp-origin.validator.js +35 -0
- package/dist/modules/mcp/validators/is-mcp-origin.validator.js.map +1 -0
- package/dist/modules/mdns/mdns.openapi.d.ts +1 -1
- package/dist/modules/mdns/services/mdns.service.d.ts +21 -4
- package/dist/modules/mdns/services/mdns.service.js +151 -69
- package/dist/modules/mdns/services/mdns.service.js.map +1 -1
- package/dist/modules/notifications/controllers/notifications.controller.d.ts +19 -0
- package/dist/modules/notifications/controllers/notifications.controller.js +312 -0
- package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -0
- package/dist/modules/notifications/dto/bulk-remove-notifications.dto.d.ts +6 -0
- package/dist/modules/notifications/dto/bulk-remove-notifications.dto.js +56 -0
- package/dist/modules/notifications/dto/bulk-remove-notifications.dto.js.map +1 -0
- package/dist/modules/notifications/dto/bulk-update-notifications.dto.d.ts +8 -0
- package/dist/modules/notifications/dto/bulk-update-notifications.dto.js +78 -0
- package/dist/modules/notifications/dto/bulk-update-notifications.dto.js.map +1 -0
- package/dist/modules/notifications/dto/update-config.dto.d.ts +7 -0
- package/dist/modules/notifications/dto/update-config.dto.js +79 -0
- package/dist/modules/notifications/dto/update-config.dto.js.map +1 -0
- package/dist/modules/notifications/dto/update-notification.dto.d.ts +7 -0
- package/dist/modules/notifications/dto/update-notification.dto.js +58 -0
- package/dist/modules/notifications/dto/update-notification.dto.js.map +1 -0
- package/dist/modules/notifications/entities/notifications.entity.d.ts +19 -0
- package/dist/modules/notifications/entities/notifications.entity.js +209 -0
- package/dist/modules/notifications/entities/notifications.entity.js.map +1 -0
- package/dist/modules/notifications/models/config.model.d.ts +7 -0
- package/dist/modules/notifications/models/config.model.js +81 -0
- package/dist/modules/notifications/models/config.model.js.map +1 -0
- package/dist/modules/notifications/models/notification-action.model.d.ts +36 -0
- package/dist/modules/notifications/models/notification-action.model.js +132 -0
- package/dist/modules/notifications/models/notification-action.model.js.map +1 -0
- package/dist/modules/notifications/models/notifications-response.model.d.ts +13 -0
- package/dist/modules/notifications/models/notifications-response.model.js +69 -0
- package/dist/modules/notifications/models/notifications-response.model.js.map +1 -0
- package/dist/modules/notifications/notifications.constants.d.ts +43 -0
- package/dist/modules/notifications/notifications.constants.js +57 -0
- package/dist/modules/notifications/notifications.constants.js.map +1 -0
- package/dist/modules/notifications/notifications.exceptions.d.ts +6 -0
- package/dist/modules/notifications/notifications.exceptions.js +18 -0
- package/dist/modules/notifications/notifications.exceptions.js.map +1 -0
- package/dist/modules/notifications/notifications.module.d.ts +11 -0
- package/dist/modules/notifications/notifications.module.js +112 -0
- package/dist/modules/notifications/notifications.module.js.map +1 -0
- package/dist/modules/notifications/notifications.openapi.d.ts +6 -0
- package/dist/modules/notifications/notifications.openapi.js +18 -0
- package/dist/modules/notifications/notifications.openapi.js.map +1 -0
- package/dist/modules/notifications/notifications.utils.d.ts +1 -0
- package/dist/modules/notifications/notifications.utils.js +28 -0
- package/dist/modules/notifications/notifications.utils.js.map +1 -0
- package/dist/modules/notifications/platforms/notification-channel.platform.d.ts +31 -0
- package/dist/modules/notifications/platforms/notification-channel.platform.js +108 -0
- package/dist/modules/notifications/platforms/notification-channel.platform.js.map +1 -0
- package/dist/modules/notifications/services/notification-channel-registry.service.d.ts +8 -0
- package/dist/modules/notifications/services/notification-channel-registry.service.js +36 -0
- package/dist/modules/notifications/services/notification-channel-registry.service.js.map +1 -0
- package/dist/modules/notifications/services/notification-dispatcher.service.d.ts +28 -0
- package/dist/modules/notifications/services/notification-dispatcher.service.js +173 -0
- package/dist/modules/notifications/services/notification-dispatcher.service.js.map +1 -0
- package/dist/modules/notifications/services/notification-input.validator.d.ts +29 -0
- package/dist/modules/notifications/services/notification-input.validator.js +148 -0
- package/dist/modules/notifications/services/notification-input.validator.js.map +1 -0
- package/dist/modules/notifications/services/notifications-retention.service.d.ts +19 -0
- package/dist/modules/notifications/services/notifications-retention.service.js +151 -0
- package/dist/modules/notifications/services/notifications-retention.service.js.map +1 -0
- package/dist/modules/notifications/services/notifications.service.d.ts +67 -0
- package/dist/modules/notifications/services/notifications.service.js +348 -0
- package/dist/modules/notifications/services/notifications.service.js.map +1 -0
- package/dist/modules/platform/services/platform.service.d.ts +7 -0
- package/dist/modules/platform/services/platform.service.js +53 -1
- package/dist/modules/platform/services/platform.service.js.map +1 -1
- package/dist/modules/remote-access/controllers/remote-access.controller.d.ts +20 -0
- package/dist/modules/remote-access/controllers/remote-access.controller.js +160 -0
- package/dist/modules/remote-access/controllers/remote-access.controller.js.map +1 -0
- package/dist/modules/remote-access/dto/update-config.dto.d.ts +8 -0
- package/dist/modules/remote-access/dto/update-config.dto.js +104 -0
- package/dist/modules/remote-access/dto/update-config.dto.js.map +1 -0
- package/dist/modules/remote-access/models/config.model.d.ts +9 -0
- package/dist/modules/remote-access/models/config.model.js +113 -0
- package/dist/modules/remote-access/models/config.model.js.map +1 -0
- package/dist/modules/remote-access/models/provider.model.d.ts +38 -0
- package/dist/modules/remote-access/models/provider.model.js +311 -0
- package/dist/modules/remote-access/models/provider.model.js.map +1 -0
- package/dist/modules/remote-access/models/status.model.d.ts +12 -0
- package/dist/modules/remote-access/models/status.model.js +83 -0
- package/dist/modules/remote-access/models/status.model.js.map +1 -0
- package/dist/modules/remote-access/models/urls.model.d.ts +11 -0
- package/dist/modules/remote-access/models/urls.model.js +84 -0
- package/dist/modules/remote-access/models/urls.model.js.map +1 -0
- package/dist/modules/remote-access/platforms/remote-access-provider.platform.d.ts +38 -0
- package/dist/modules/remote-access/platforms/remote-access-provider.platform.js +3 -0
- package/dist/modules/remote-access/platforms/remote-access-provider.platform.js.map +1 -0
- package/dist/modules/remote-access/remote-access.constants.d.ts +11 -0
- package/dist/modules/remote-access/remote-access.constants.js +16 -0
- package/dist/modules/remote-access/remote-access.constants.js.map +1 -0
- package/dist/modules/remote-access/remote-access.exceptions.d.ts +12 -0
- package/dist/modules/remote-access/remote-access.exceptions.js +32 -0
- package/dist/modules/remote-access/remote-access.exceptions.js.map +1 -0
- package/dist/modules/remote-access/remote-access.module.d.ts +11 -0
- package/dist/modules/remote-access/remote-access.module.js +108 -0
- package/dist/modules/remote-access/remote-access.module.js.map +1 -0
- package/dist/modules/remote-access/remote-access.openapi.d.ts +6 -0
- package/dist/modules/remote-access/remote-access.openapi.js +23 -0
- package/dist/modules/remote-access/remote-access.openapi.js.map +1 -0
- package/dist/modules/remote-access/services/remote-access-posture.service.d.ts +12 -0
- package/dist/modules/remote-access/services/remote-access-posture.service.js +56 -0
- package/dist/modules/remote-access/services/remote-access-posture.service.js.map +1 -0
- package/dist/modules/remote-access/services/remote-access-provider-registry.service.d.ts +7 -0
- package/dist/modules/remote-access/services/remote-access-provider-registry.service.js +33 -0
- package/dist/modules/remote-access/services/remote-access-provider-registry.service.js.map +1 -0
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.d.ts +29 -0
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js +137 -0
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js.map +1 -0
- package/dist/modules/remote-access/services/remote-access-status.service.d.ts +18 -0
- package/dist/modules/remote-access/services/remote-access-status.service.js +121 -0
- package/dist/modules/remote-access/services/remote-access-status.service.js.map +1 -0
- package/dist/modules/remote-access/services/remote-access-url.service.d.ts +41 -0
- package/dist/modules/remote-access/services/remote-access-url.service.js +201 -0
- package/dist/modules/remote-access/services/remote-access-url.service.js.map +1 -0
- package/dist/modules/remote-access/validators/is-remote-access-url.validator.d.ts +6 -0
- package/dist/modules/remote-access/validators/is-remote-access-url.validator.js +46 -0
- package/dist/modules/remote-access/validators/is-remote-access-url.validator.js.map +1 -0
- package/dist/modules/remote-access/validators/is-trusted-proxy-entry.validator.d.ts +5 -0
- package/dist/modules/remote-access/validators/is-trusted-proxy-entry.validator.js +26 -0
- package/dist/modules/remote-access/validators/is-trusted-proxy-entry.validator.js.map +1 -0
- package/dist/modules/scenes/controllers/scenes.controller.d.ts +7 -2
- package/dist/modules/scenes/controllers/scenes.controller.js +52 -2
- package/dist/modules/scenes/controllers/scenes.controller.js.map +1 -1
- package/dist/modules/scenes/dto/bulk-scenes.dto.d.ts +14 -0
- package/dist/modules/scenes/dto/bulk-scenes.dto.js +99 -0
- package/dist/modules/scenes/dto/bulk-scenes.dto.js.map +1 -0
- package/dist/modules/scenes/models/scenes-response.model.d.ts +4 -0
- package/dist/modules/scenes/models/scenes-response.model.js +16 -1
- package/dist/modules/scenes/models/scenes-response.model.js.map +1 -1
- package/dist/modules/scenes/scenes.module.js +3 -0
- package/dist/modules/scenes/scenes.module.js.map +1 -1
- package/dist/modules/scenes/scenes.openapi.d.ts +4 -2
- package/dist/modules/scenes/scenes.openapi.js +5 -0
- package/dist/modules/scenes/scenes.openapi.js.map +1 -1
- package/dist/modules/scenes/services/scene-executor.service.d.ts +4 -1
- package/dist/modules/scenes/services/scene-executor.service.js +28 -3
- package/dist/modules/scenes/services/scene-executor.service.js.map +1 -1
- package/dist/modules/scenes/services/scene-tool.service.d.ts +2 -3
- package/dist/modules/scenes/services/scene-tool.service.js +84 -25
- package/dist/modules/scenes/services/scene-tool.service.js.map +1 -1
- package/dist/modules/scenes/services/scenes-bulk.service.d.ts +9 -0
- package/dist/modules/scenes/services/scenes-bulk.service.js +42 -0
- package/dist/modules/scenes/services/scenes-bulk.service.js.map +1 -0
- package/dist/modules/scenes/services/scenes.service.d.ts +35 -0
- package/dist/modules/scenes/services/scenes.service.js +117 -0
- package/dist/modules/scenes/services/scenes.service.js.map +1 -1
- package/dist/modules/scenes/validators/scene-exists-constraint.validator.js +1 -1
- package/dist/modules/scenes/validators/scene-exists-constraint.validator.js.map +1 -1
- package/dist/modules/security/listeners/security-state.listener.d.ts +1 -0
- package/dist/modules/security/listeners/security-state.listener.js +9 -1
- package/dist/modules/security/listeners/security-state.listener.js.map +1 -1
- package/dist/modules/security/providers/security-sensors.provider.d.ts +12 -1
- package/dist/modules/security/providers/security-sensors.provider.js +132 -12
- package/dist/modules/security/providers/security-sensors.provider.js.map +1 -1
- package/dist/modules/security/security.openapi.d.ts +2 -1
- package/dist/modules/security/security.openapi.js +4 -0
- package/dist/modules/security/security.openapi.js.map +1 -1
- package/dist/modules/security/services/security-aggregator.service.d.ts +12 -2
- package/dist/modules/security/services/security-aggregator.service.js +33 -2
- package/dist/modules/security/services/security-aggregator.service.js.map +1 -1
- package/dist/modules/security/services/security-events.service.d.ts +7 -1
- package/dist/modules/security/services/security-events.service.js +38 -2
- package/dist/modules/security/services/security-events.service.js.map +1 -1
- package/dist/modules/security/services/security.service.d.ts +4 -1
- package/dist/modules/security/services/security.service.js +8 -0
- package/dist/modules/security/services/security.service.js.map +1 -1
- package/dist/modules/spaces/controllers/spaces.controller.d.ts +6 -2
- package/dist/modules/spaces/controllers/spaces.controller.js +43 -4
- package/dist/modules/spaces/controllers/spaces.controller.js.map +1 -1
- package/dist/modules/spaces/dto/bulk-assign.dto.js +1 -0
- package/dist/modules/spaces/dto/bulk-assign.dto.js.map +1 -1
- package/dist/modules/spaces/dto/bulk-spaces.dto.d.ts +7 -0
- package/dist/modules/spaces/dto/bulk-spaces.dto.js +53 -0
- package/dist/modules/spaces/dto/bulk-spaces.dto.js.map +1 -0
- package/dist/modules/spaces/dto/update-config.dto.js +1 -1
- package/dist/modules/spaces/models/config.model.js +1 -1
- package/dist/modules/spaces/models/spaces-response.model.d.ts +4 -0
- package/dist/modules/spaces/models/spaces-response.model.js +16 -1
- package/dist/modules/spaces/models/spaces-response.model.js.map +1 -1
- package/dist/modules/spaces/services/spaces-bulk.service.d.ts +8 -0
- package/dist/modules/spaces/services/spaces-bulk.service.js +35 -0
- package/dist/modules/spaces/services/spaces-bulk.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces.service.d.ts +51 -1
- package/dist/modules/spaces/services/spaces.service.js +326 -19
- package/dist/modules/spaces/services/spaces.service.js.map +1 -1
- package/dist/modules/spaces/spaces.module.js +3 -0
- package/dist/modules/spaces/spaces.module.js.map +1 -1
- package/dist/modules/spaces/spaces.openapi.d.ts +4 -2
- package/dist/modules/spaces/spaces.openapi.js +5 -0
- package/dist/modules/spaces/spaces.openapi.js.map +1 -1
- package/dist/modules/storage/interfaces/storage-plugin.interface.d.ts +1 -0
- package/dist/modules/storage/models/config.model.js +2 -0
- package/dist/modules/storage/models/config.model.js.map +1 -1
- package/dist/modules/storage/services/storage-fallback-monitor.service.d.ts +14 -0
- package/dist/modules/storage/services/storage-fallback-monitor.service.js +110 -0
- package/dist/modules/storage/services/storage-fallback-monitor.service.js.map +1 -0
- package/dist/modules/storage/services/storage.service.d.ts +15 -0
- package/dist/modules/storage/services/storage.service.js +112 -0
- package/dist/modules/storage/services/storage.service.js.map +1 -1
- package/dist/modules/storage/storage.module.js +2 -1
- package/dist/modules/storage/storage.module.js.map +1 -1
- package/dist/modules/storage/storage.types.d.ts +1 -0
- package/dist/modules/swagger/decorators/api-documentation.decorator.d.ts +1 -0
- package/dist/modules/swagger/decorators/api-documentation.decorator.js +19 -1
- package/dist/modules/swagger/decorators/api-documentation.decorator.js.map +1 -1
- package/dist/modules/system/models/config.model.js +1 -0
- package/dist/modules/system/models/config.model.js.map +1 -1
- package/dist/modules/system/privileged-worker.module.d.ts +2 -0
- package/dist/modules/system/privileged-worker.module.js +24 -0
- package/dist/modules/system/privileged-worker.module.js.map +1 -0
- package/dist/modules/system/services/privileged-worker.service.d.ts +35 -0
- package/dist/modules/system/services/privileged-worker.service.js +200 -0
- package/dist/modules/system/services/privileged-worker.service.js.map +1 -0
- package/dist/modules/system/services/system-command.service.d.ts +3 -3
- package/dist/modules/system/services/system-command.service.js +5 -5
- package/dist/modules/system/services/system-command.service.js.map +1 -1
- package/dist/modules/system/services/system-throttle-monitor.service.d.ts +11 -0
- package/dist/modules/system/services/system-throttle-monitor.service.js +107 -0
- package/dist/modules/system/services/system-throttle-monitor.service.js.map +1 -0
- package/dist/modules/system/services/update-executor.service.d.ts +10 -5
- package/dist/modules/system/services/update-executor.service.js +131 -175
- package/dist/modules/system/services/update-executor.service.js.map +1 -1
- package/dist/modules/system/services/update.service.d.ts +6 -1
- package/dist/modules/system/services/update.service.js +37 -4
- package/dist/modules/system/services/update.service.js.map +1 -1
- package/dist/modules/system/system.exceptions.d.ts +3 -0
- package/dist/modules/system/system.exceptions.js +8 -1
- package/dist/modules/system/system.exceptions.js.map +1 -1
- package/dist/modules/system/system.module.js +2 -0
- package/dist/modules/system/system.module.js.map +1 -1
- package/dist/modules/tools/platforms/tool-provider.platform.d.ts +48 -1
- package/dist/modules/tools/platforms/tool-provider.platform.js +39 -0
- package/dist/modules/tools/platforms/tool-provider.platform.js.map +1 -1
- package/dist/modules/tools/services/base-tool-provider.service.d.ts +3 -3
- package/dist/modules/tools/services/base-tool-provider.service.js +43 -10
- package/dist/modules/tools/services/base-tool-provider.service.js.map +1 -1
- package/dist/modules/tools/services/short-id-mapping.service.d.ts +24 -0
- package/dist/modules/tools/services/short-id-mapping.service.js +119 -1
- package/dist/modules/tools/services/short-id-mapping.service.js.map +1 -1
- package/dist/modules/tools/services/tool-provider-registry.service.d.ts +7 -3
- package/dist/modules/tools/services/tool-provider-registry.service.js +125 -15
- package/dist/modules/tools/services/tool-provider-registry.service.js.map +1 -1
- package/dist/modules/tools/tools.constants.d.ts +3 -0
- package/dist/modules/tools/tools.constants.js +4 -1
- package/dist/modules/tools/tools.constants.js.map +1 -1
- package/dist/modules/users/controllers/users.controller.d.ts +6 -2
- package/dist/modules/users/controllers/users.controller.js +33 -2
- package/dist/modules/users/controllers/users.controller.js.map +1 -1
- package/dist/modules/users/dto/bulk-users.dto.d.ts +7 -0
- package/dist/modules/users/dto/bulk-users.dto.js +53 -0
- package/dist/modules/users/dto/bulk-users.dto.js.map +1 -0
- package/dist/modules/users/models/users-response.model.d.ts +4 -0
- package/dist/modules/users/models/users-response.model.js +16 -1
- package/dist/modules/users/models/users-response.model.js.map +1 -1
- package/dist/modules/users/services/user-lifecycle-mutation-registry.service.d.ts +28 -0
- package/dist/modules/users/services/user-lifecycle-mutation-registry.service.js +79 -0
- package/dist/modules/users/services/user-lifecycle-mutation-registry.service.js.map +1 -0
- package/dist/modules/users/services/users-bulk.service.d.ts +8 -0
- package/dist/modules/users/services/users-bulk.service.js +44 -0
- package/dist/modules/users/services/users-bulk.service.js.map +1 -0
- package/dist/modules/users/services/users.service.d.ts +3 -1
- package/dist/modules/users/services/users.service.js +12 -5
- package/dist/modules/users/services/users.service.js.map +1 -1
- package/dist/modules/users/users.exceptions.d.ts +3 -0
- package/dist/modules/users/users.exceptions.js +8 -1
- package/dist/modules/users/users.exceptions.js.map +1 -1
- package/dist/modules/users/users.module.js +5 -1
- package/dist/modules/users/users.module.js.map +1 -1
- package/dist/modules/users/users.openapi.d.ts +3 -2
- package/dist/modules/users/users.openapi.js +5 -0
- package/dist/modules/users/users.openapi.js.map +1 -1
- package/dist/modules/users/validators/user-exists-constraint.validator.js +1 -1
- package/dist/modules/users/validators/user-exists-constraint.validator.js.map +1 -1
- package/dist/modules/weather/controllers/locations.controller.d.ts +6 -2
- package/dist/modules/weather/controllers/locations.controller.js +39 -3
- package/dist/modules/weather/controllers/locations.controller.js.map +1 -1
- package/dist/modules/weather/dto/bulk-locations.dto.d.ts +7 -0
- package/dist/modules/weather/dto/bulk-locations.dto.js +53 -0
- package/dist/modules/weather/dto/bulk-locations.dto.js.map +1 -0
- package/dist/modules/weather/models/locations-response.model.d.ts +4 -0
- package/dist/modules/weather/models/locations-response.model.js +16 -1
- package/dist/modules/weather/models/locations-response.model.js.map +1 -1
- package/dist/modules/weather/services/locations-bulk.service.d.ts +8 -0
- package/dist/modules/weather/services/locations-bulk.service.js +35 -0
- package/dist/modules/weather/services/locations-bulk.service.js.map +1 -0
- package/dist/modules/weather/services/weather.service.d.ts +13 -3
- package/dist/modules/weather/services/weather.service.js +57 -4
- package/dist/modules/weather/services/weather.service.js.map +1 -1
- package/dist/modules/weather/weather.module.d.ts +5 -1
- package/dist/modules/weather/weather.module.js +9 -1
- package/dist/modules/weather/weather.module.js.map +1 -1
- package/dist/modules/weather/weather.openapi.d.ts +4 -2
- package/dist/modules/weather/weather.openapi.js +5 -0
- package/dist/modules/weather/weather.openapi.js.map +1 -1
- package/dist/modules/websocket/gateway/websocket.gateway.d.ts +4 -1
- package/dist/modules/websocket/gateway/websocket.gateway.js +24 -7
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/modules/websocket/services/ws-auth.service.js +7 -0
- package/dist/modules/websocket/services/ws-auth.service.js.map +1 -1
- package/dist/modules/websocket/websocket.constants.d.ts +1 -0
- package/dist/modules/websocket/websocket.constants.js +2 -1
- package/dist/modules/websocket/websocket.constants.js.map +1 -1
- package/dist/modules/websocket/websocket.module.js +2 -0
- package/dist/modules/websocket/websocket.module.js.map +1 -1
- package/dist/plugins/buddy-claude/buddy-claude.plugin.js +7 -0
- package/dist/plugins/buddy-claude/buddy-claude.plugin.js.map +1 -1
- package/dist/plugins/buddy-claude/dto/update-config.dto.js +2 -3
- package/dist/plugins/buddy-claude/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/buddy-claude/models/config.model.d.ts +1 -0
- package/dist/plugins/buddy-claude/models/config.model.js +12 -1
- package/dist/plugins/buddy-claude/models/config.model.js.map +1 -1
- package/dist/plugins/buddy-claude/platforms/claude.provider.d.ts +3 -2
- package/dist/plugins/buddy-claude/platforms/claude.provider.js +3 -0
- package/dist/plugins/buddy-claude/platforms/claude.provider.js.map +1 -1
- package/dist/plugins/buddy-claude-setup-token/buddy-claude-setup-token.plugin.js +7 -0
- package/dist/plugins/buddy-claude-setup-token/buddy-claude-setup-token.plugin.js.map +1 -1
- package/dist/plugins/buddy-claude-setup-token/dto/update-config.dto.js +2 -1
- package/dist/plugins/buddy-claude-setup-token/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/buddy-claude-setup-token/models/config.model.d.ts +1 -0
- package/dist/plugins/buddy-claude-setup-token/models/config.model.js +12 -1
- package/dist/plugins/buddy-claude-setup-token/models/config.model.js.map +1 -1
- package/dist/plugins/buddy-claude-setup-token/platforms/claude-setup-token.provider.d.ts +3 -2
- package/dist/plugins/buddy-claude-setup-token/platforms/claude-setup-token.provider.js +3 -0
- package/dist/plugins/buddy-claude-setup-token/platforms/claude-setup-token.provider.js.map +1 -1
- package/dist/plugins/buddy-discord/buddy-discord.plugin.d.ts +3 -3
- package/dist/plugins/buddy-discord/buddy-discord.plugin.js +12 -5
- package/dist/plugins/buddy-discord/buddy-discord.plugin.js.map +1 -1
- package/dist/plugins/buddy-discord/dto/update-config.dto.js +2 -1
- package/dist/plugins/buddy-discord/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/buddy-discord/models/config.model.d.ts +1 -0
- package/dist/plugins/buddy-discord/models/config.model.js +12 -1
- package/dist/plugins/buddy-discord/models/config.model.js.map +1 -1
- package/dist/plugins/buddy-discord/platforms/discord-bot.provider.d.ts +7 -3
- package/dist/plugins/buddy-discord/platforms/discord-bot.provider.js +4 -1
- package/dist/plugins/buddy-discord/platforms/discord-bot.provider.js.map +1 -1
- package/dist/plugins/buddy-elevenlabs/buddy-elevenlabs.plugin.js +7 -0
- package/dist/plugins/buddy-elevenlabs/buddy-elevenlabs.plugin.js.map +1 -1
- package/dist/plugins/buddy-elevenlabs/dto/update-config.dto.js +2 -3
- package/dist/plugins/buddy-elevenlabs/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/buddy-elevenlabs/models/config.model.d.ts +1 -0
- package/dist/plugins/buddy-elevenlabs/models/config.model.js +12 -1
- package/dist/plugins/buddy-elevenlabs/models/config.model.js.map +1 -1
- package/dist/plugins/buddy-ollama/platforms/ollama.provider.d.ts +5 -3
- package/dist/plugins/buddy-ollama/platforms/ollama.provider.js +55 -24
- package/dist/plugins/buddy-ollama/platforms/ollama.provider.js.map +1 -1
- package/dist/plugins/buddy-openai/buddy-openai.plugin.js +7 -0
- package/dist/plugins/buddy-openai/buddy-openai.plugin.js.map +1 -1
- package/dist/plugins/buddy-openai/dto/update-config.dto.js +2 -3
- package/dist/plugins/buddy-openai/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/buddy-openai/models/config.model.d.ts +1 -0
- package/dist/plugins/buddy-openai/models/config.model.js +12 -1
- package/dist/plugins/buddy-openai/models/config.model.js.map +1 -1
- package/dist/plugins/buddy-openai/platforms/openai.provider.d.ts +3 -2
- package/dist/plugins/buddy-openai/platforms/openai.provider.js +3 -0
- package/dist/plugins/buddy-openai/platforms/openai.provider.js.map +1 -1
- package/dist/plugins/buddy-openai-codex/buddy-openai-codex.plugin.js +17 -0
- package/dist/plugins/buddy-openai-codex/buddy-openai-codex.plugin.js.map +1 -1
- package/dist/plugins/buddy-openai-codex/dto/update-config.dto.js +4 -3
- package/dist/plugins/buddy-openai-codex/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/buddy-openai-codex/models/config.model.d.ts +3 -0
- package/dist/plugins/buddy-openai-codex/models/config.model.js +36 -3
- package/dist/plugins/buddy-openai-codex/models/config.model.js.map +1 -1
- package/dist/plugins/buddy-openai-codex/platforms/openai-codex.provider.d.ts +5 -3
- package/dist/plugins/buddy-openai-codex/platforms/openai-codex.provider.js +429 -48
- package/dist/plugins/buddy-openai-codex/platforms/openai-codex.provider.js.map +1 -1
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.d.ts +3 -3
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.js +12 -5
- package/dist/plugins/buddy-telegram/buddy-telegram.plugin.js.map +1 -1
- package/dist/plugins/buddy-telegram/dto/update-config.dto.js +2 -1
- package/dist/plugins/buddy-telegram/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/buddy-telegram/models/config.model.d.ts +1 -0
- package/dist/plugins/buddy-telegram/models/config.model.js +12 -1
- package/dist/plugins/buddy-telegram/models/config.model.js.map +1 -1
- package/dist/plugins/buddy-telegram/platforms/telegram-bot.provider.d.ts +7 -3
- package/dist/plugins/buddy-telegram/platforms/telegram-bot.provider.js +4 -1
- package/dist/plugins/buddy-telegram/platforms/telegram-bot.provider.js.map +1 -1
- package/dist/plugins/buddy-voiceai/buddy-voiceai.plugin.js +7 -0
- package/dist/plugins/buddy-voiceai/buddy-voiceai.plugin.js.map +1 -1
- package/dist/plugins/buddy-voiceai/dto/update-config.dto.js +2 -3
- package/dist/plugins/buddy-voiceai/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/buddy-voiceai/models/config.model.d.ts +1 -0
- package/dist/plugins/buddy-voiceai/models/config.model.js +12 -1
- package/dist/plugins/buddy-voiceai/models/config.model.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.d.ts +3 -3
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.js +5 -5
- package/dist/plugins/buddy-whatsapp/buddy-whatsapp.plugin.js.map +1 -1
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.d.ts +10 -6
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.js +9 -6
- package/dist/plugins/buddy-whatsapp/platforms/whatsapp-bot.provider.js.map +1 -1
- package/dist/plugins/data-sources-device-channel/dto/create-data-source.dto.js +2 -0
- package/dist/plugins/data-sources-device-channel/dto/create-data-source.dto.js.map +1 -1
- package/dist/plugins/data-sources-device-channel/dto/update-data-source.dto.js +2 -0
- package/dist/plugins/data-sources-device-channel/dto/update-data-source.dto.js.map +1 -1
- package/dist/plugins/data-sources-device-channel/validators/device-channel-exists-constraint.validator.js +1 -1
- package/dist/plugins/data-sources-device-channel/validators/device-channel-exists-constraint.validator.js.map +1 -1
- package/dist/plugins/devices-home-assistant/controllers/home-assistant-discovery.controller.d.ts +4 -2
- package/dist/plugins/devices-home-assistant/controllers/home-assistant-discovery.controller.js +17 -5
- package/dist/plugins/devices-home-assistant/controllers/home-assistant-discovery.controller.js.map +1 -1
- package/dist/plugins/devices-home-assistant/controllers/home-assistant-wizard.controller.d.ts +12 -0
- package/dist/plugins/devices-home-assistant/controllers/home-assistant-wizard.controller.js +147 -0
- package/dist/plugins/devices-home-assistant/controllers/home-assistant-wizard.controller.js.map +1 -0
- package/dist/plugins/devices-home-assistant/devices-home-assistant.openapi.d.ts +4 -2
- package/dist/plugins/devices-home-assistant/devices-home-assistant.openapi.js +10 -0
- package/dist/plugins/devices-home-assistant/devices-home-assistant.openapi.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.d.ts +5 -3
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +19 -5
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/wizard-adopt.dto.d.ts +6 -0
- package/dist/plugins/devices-home-assistant/dto/wizard-adopt.dto.js +49 -0
- package/dist/plugins/devices-home-assistant/dto/wizard-adopt.dto.js.map +1 -0
- package/dist/plugins/devices-home-assistant/models/config.model.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/models/config.model.js +12 -1
- package/dist/plugins/devices-home-assistant/models/config.model.js.map +1 -1
- package/dist/plugins/devices-home-assistant/models/helper-mapping-preview.model.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/models/helper-mapping-preview.model.js +12 -0
- package/dist/plugins/devices-home-assistant/models/helper-mapping-preview.model.js.map +1 -1
- package/dist/plugins/devices-home-assistant/models/wizard.model.d.ts +39 -0
- package/dist/plugins/devices-home-assistant/models/wizard.model.js +221 -0
- package/dist/plugins/devices-home-assistant/models/wizard.model.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.d.ts +2 -1
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.js +5 -4
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.d.ts +15 -7
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js +69 -56
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/helper-adoption.service.d.ts +7 -2
- package/dist/plugins/devices-home-assistant/services/helper-adoption.service.js +33 -7
- package/dist/plugins/devices-home-assistant/services/helper-adoption.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/helper-mapping-preview.service.d.ts +9 -0
- package/dist/plugins/devices-home-assistant/services/helper-mapping-preview.service.js +23 -0
- package/dist/plugins/devices-home-assistant/services/helper-mapping-preview.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.d.ts +6 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.js +76 -11
- package/dist/plugins/devices-home-assistant/services/home-assistant.http.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +18 -5
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +94 -7
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.d.ts +10 -0
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js +28 -0
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/wizard.service.d.ts +34 -0
- package/dist/plugins/devices-home-assistant/services/wizard.service.js +372 -0
- package/dist/plugins/devices-home-assistant/services/wizard.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/utils/helper-structure.utils.d.ts +3 -0
- package/dist/plugins/devices-home-assistant/utils/helper-structure.utils.js +44 -0
- package/dist/plugins/devices-home-assistant/utils/helper-structure.utils.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.factory.d.ts +9 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.factory.js +3 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.factory.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.interface.d.ts +14 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.interface.js +3 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.interface.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.types.d.ts +3 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.types.js +3 -0
- package/dist/plugins/devices-homey/connectors/homey-connector.types.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-local-connector.factory.d.ts +8 -0
- package/dist/plugins/devices-homey/connectors/homey-local-connector.factory.js +36 -0
- package/dist/plugins/devices-homey/connectors/homey-local-connector.factory.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-local.connector.d.ts +36 -0
- package/dist/plugins/devices-homey/connectors/homey-local.connector.js +266 -0
- package/dist/plugins/devices-homey/connectors/homey-local.connector.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-local.error-mapper.d.ts +3 -0
- package/dist/plugins/devices-homey/connectors/homey-local.error-mapper.js +63 -0
- package/dist/plugins/devices-homey/connectors/homey-local.error-mapper.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-local.transformer.d.ts +10 -0
- package/dist/plugins/devices-homey/connectors/homey-local.transformer.js +264 -0
- package/dist/plugins/devices-homey/connectors/homey-local.transformer.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-local.transport.d.ts +6 -0
- package/dist/plugins/devices-homey/connectors/homey-local.transport.js +3 -0
- package/dist/plugins/devices-homey/connectors/homey-local.transport.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-sdk.client.d.ts +59 -0
- package/dist/plugins/devices-homey/connectors/homey-sdk.client.js +25 -0
- package/dist/plugins/devices-homey/connectors/homey-sdk.client.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-sdk.transport.d.ts +45 -0
- package/dist/plugins/devices-homey/connectors/homey-sdk.transport.js +384 -0
- package/dist/plugins/devices-homey/connectors/homey-sdk.transport.js.map +1 -0
- package/dist/plugins/devices-homey/connectors/homey-transport.interface.d.ts +18 -0
- package/dist/plugins/devices-homey/connectors/homey-transport.interface.js +3 -0
- package/dist/plugins/devices-homey/connectors/homey-transport.interface.js.map +1 -0
- package/dist/plugins/devices-homey/controllers/homey-adoption.controller.d.ts +9 -0
- package/dist/plugins/devices-homey/controllers/homey-adoption.controller.js +86 -0
- package/dist/plugins/devices-homey/controllers/homey-adoption.controller.js.map +1 -0
- package/dist/plugins/devices-homey/controllers/homey-devices.controller.d.ts +9 -0
- package/dist/plugins/devices-homey/controllers/homey-devices.controller.js +104 -0
- package/dist/plugins/devices-homey/controllers/homey-devices.controller.js.map +1 -0
- package/dist/plugins/devices-homey/controllers/homey-mapping-preview.controller.d.ts +8 -0
- package/dist/plugins/devices-homey/controllers/homey-mapping-preview.controller.js +74 -0
- package/dist/plugins/devices-homey/controllers/homey-mapping-preview.controller.js.map +1 -0
- package/dist/plugins/devices-homey/controllers/homey-status.controller.d.ts +7 -0
- package/dist/plugins/devices-homey/controllers/homey-status.controller.js +52 -0
- package/dist/plugins/devices-homey/controllers/homey-status.controller.js.map +1 -0
- package/dist/plugins/devices-homey/controllers/homey-test-connection.controller.d.ts +8 -0
- package/dist/plugins/devices-homey/controllers/homey-test-connection.controller.js +60 -0
- package/dist/plugins/devices-homey/controllers/homey-test-connection.controller.js.map +1 -0
- package/dist/plugins/devices-homey/devices-homey.constants.d.ts +29 -0
- package/dist/plugins/devices-homey/devices-homey.constants.js +34 -0
- package/dist/plugins/devices-homey/devices-homey.constants.js.map +1 -0
- package/dist/plugins/devices-homey/devices-homey.openapi.d.ts +17 -0
- package/dist/plugins/devices-homey/devices-homey.openapi.js +67 -0
- package/dist/plugins/devices-homey/devices-homey.openapi.js.map +1 -0
- package/dist/plugins/devices-homey/devices-homey.plugin.d.ts +30 -0
- package/dist/plugins/devices-homey/devices-homey.plugin.js +288 -0
- package/dist/plugins/devices-homey/devices-homey.plugin.js.map +1 -0
- package/dist/plugins/devices-homey/dto/adoption.dto.d.ts +9 -0
- package/dist/plugins/devices-homey/dto/adoption.dto.js +79 -0
- package/dist/plugins/devices-homey/dto/adoption.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/create-channel-property.dto.d.ts +3 -0
- package/dist/plugins/devices-homey/dto/create-channel-property.dto.js +18 -0
- package/dist/plugins/devices-homey/dto/create-channel-property.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/create-channel.dto.d.ts +7 -0
- package/dist/plugins/devices-homey/dto/create-channel.dto.js +45 -0
- package/dist/plugins/devices-homey/dto/create-channel.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/create-device-channel-property.dto.d.ts +7 -0
- package/dist/plugins/devices-homey/dto/create-device-channel-property.dto.js +59 -0
- package/dist/plugins/devices-homey/dto/create-device-channel-property.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/create-device-channel.dto.d.ts +7 -0
- package/dist/plugins/devices-homey/dto/create-device-channel.dto.js +45 -0
- package/dist/plugins/devices-homey/dto/create-device-channel.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/create-device.dto.d.ts +7 -0
- package/dist/plugins/devices-homey/dto/create-device.dto.js +45 -0
- package/dist/plugins/devices-homey/dto/create-device.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/list-homey-devices.dto.d.ts +24 -0
- package/dist/plugins/devices-homey/dto/list-homey-devices.dto.js +89 -0
- package/dist/plugins/devices-homey/dto/list-homey-devices.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/mapping-preview.dto.d.ts +5 -0
- package/dist/plugins/devices-homey/dto/mapping-preview.dto.js +46 -0
- package/dist/plugins/devices-homey/dto/mapping-preview.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/test-connection.dto.d.ts +18 -0
- package/dist/plugins/devices-homey/dto/test-connection.dto.js +146 -0
- package/dist/plugins/devices-homey/dto/test-connection.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/update-channel-property.dto.d.ts +9 -0
- package/dist/plugins/devices-homey/dto/update-channel-property.dto.js +77 -0
- package/dist/plugins/devices-homey/dto/update-channel-property.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/update-channel.dto.d.ts +7 -0
- package/dist/plugins/devices-homey/dto/update-channel.dto.js +51 -0
- package/dist/plugins/devices-homey/dto/update-channel.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/update-config.dto.d.ts +9 -0
- package/dist/plugins/devices-homey/dto/update-config.dto.js +103 -0
- package/dist/plugins/devices-homey/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/devices-homey/dto/update-device.dto.d.ts +5 -0
- package/dist/plugins/devices-homey/dto/update-device.dto.js +35 -0
- package/dist/plugins/devices-homey/dto/update-device.dto.js.map +1 -0
- package/dist/plugins/devices-homey/entities/devices-homey.entity.d.ts +15 -0
- package/dist/plugins/devices-homey/entities/devices-homey.entity.js +121 -0
- package/dist/plugins/devices-homey/entities/devices-homey.entity.js.map +1 -0
- package/dist/plugins/devices-homey/entities/homey-adoption-lock.entity.d.ts +5 -0
- package/dist/plugins/devices-homey/entities/homey-adoption-lock.entity.js +32 -0
- package/dist/plugins/devices-homey/entities/homey-adoption-lock.entity.js.map +1 -0
- package/dist/plugins/devices-homey/errors/homey-connector.error.d.ts +25 -0
- package/dist/plugins/devices-homey/errors/homey-connector.error.js +39 -0
- package/dist/plugins/devices-homey/errors/homey-connector.error.js.map +1 -0
- package/dist/plugins/devices-homey/errors/homey-inventory.error.d.ts +6 -0
- package/dist/plugins/devices-homey/errors/homey-inventory.error.js +18 -0
- package/dist/plugins/devices-homey/errors/homey-inventory.error.js.map +1 -0
- package/dist/plugins/devices-homey/errors/homey-mapping-preview.error.d.ts +6 -0
- package/dist/plugins/devices-homey/errors/homey-mapping-preview.error.js +18 -0
- package/dist/plugins/devices-homey/errors/homey-mapping-preview.error.js.map +1 -0
- package/dist/plugins/devices-homey/index.d.ts +26 -0
- package/dist/plugins/devices-homey/index.js +43 -0
- package/dist/plugins/devices-homey/index.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/definitions/channels.yaml +214 -0
- package/dist/plugins/devices-homey/mappings/definitions/devices.yaml +75 -0
- package/dist/plugins/devices-homey/mappings/definitions/properties.yaml +551 -0
- package/dist/plugins/devices-homey/mappings/device-support.d.ts +8 -0
- package/dist/plugins/devices-homey/mappings/device-support.js +50 -0
- package/dist/plugins/devices-homey/mappings/device-support.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/homey-mapping.error.d.ts +11 -0
- package/dist/plugins/devices-homey/mappings/homey-mapping.error.js +23 -0
- package/dist/plugins/devices-homey/mappings/homey-mapping.error.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/index.d.ts +6 -0
- package/dist/plugins/devices-homey/mappings/index.js +23 -0
- package/dist/plugins/devices-homey/mappings/index.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.d.ts +43 -0
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.js +453 -0
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/mapping-transformer.service.d.ts +17 -0
- package/dist/plugins/devices-homey/mappings/mapping-transformer.service.js +156 -0
- package/dist/plugins/devices-homey/mappings/mapping-transformer.service.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/mapping.constants.d.ts +12 -0
- package/dist/plugins/devices-homey/mappings/mapping.constants.js +16 -0
- package/dist/plugins/devices-homey/mappings/mapping.constants.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/mapping.types.d.ts +202 -0
- package/dist/plugins/devices-homey/mappings/mapping.types.js +3 -0
- package/dist/plugins/devices-homey/mappings/mapping.types.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/property-mapping-storage.service.d.ts +10 -0
- package/dist/plugins/devices-homey/mappings/property-mapping-storage.service.js +38 -0
- package/dist/plugins/devices-homey/mappings/property-mapping-storage.service.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/schema/mapping-schema.json +302 -0
- package/dist/plugins/devices-homey/models/adoption.model.d.ts +30 -0
- package/dist/plugins/devices-homey/models/adoption.model.js +122 -0
- package/dist/plugins/devices-homey/models/adoption.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/config.model.d.ts +9 -0
- package/dist/plugins/devices-homey/models/config.model.js +107 -0
- package/dist/plugins/devices-homey/models/config.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/homey-capability.model.d.ts +31 -0
- package/dist/plugins/devices-homey/models/homey-capability.model.js +24 -0
- package/dist/plugins/devices-homey/models/homey-capability.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/homey-device.model.d.ts +23 -0
- package/dist/plugins/devices-homey/models/homey-device.model.js +3 -0
- package/dist/plugins/devices-homey/models/homey-device.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/homey-event.model.d.ts +54 -0
- package/dist/plugins/devices-homey/models/homey-event.model.js +15 -0
- package/dist/plugins/devices-homey/models/homey-event.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/homey-system-info.model.d.ts +7 -0
- package/dist/plugins/devices-homey/models/homey-system-info.model.js +3 -0
- package/dist/plugins/devices-homey/models/homey-system-info.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/homey-zone.model.d.ts +7 -0
- package/dist/plugins/devices-homey/models/homey-zone.model.js +3 -0
- package/dist/plugins/devices-homey/models/homey-zone.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/inventory.model.d.ts +50 -0
- package/dist/plugins/devices-homey/models/inventory.model.js +236 -0
- package/dist/plugins/devices-homey/models/inventory.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.d.ts +123 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.js +576 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/status.model.d.ts +32 -0
- package/dist/plugins/devices-homey/models/status.model.js +242 -0
- package/dist/plugins/devices-homey/models/status.model.js.map +1 -0
- package/dist/plugins/devices-homey/models/test-connection.model.d.ts +15 -0
- package/dist/plugins/devices-homey/models/test-connection.model.js +88 -0
- package/dist/plugins/devices-homey/models/test-connection.model.js.map +1 -0
- package/dist/plugins/devices-homey/platforms/homey-command-value.d.ts +7 -0
- package/dist/plugins/devices-homey/platforms/homey-command-value.js +65 -0
- package/dist/plugins/devices-homey/platforms/homey-command-value.js.map +1 -0
- package/dist/plugins/devices-homey/platforms/homey-device.platform.d.ts +41 -0
- package/dist/plugins/devices-homey/platforms/homey-device.platform.js +427 -0
- package/dist/plugins/devices-homey/platforms/homey-device.platform.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-adoption-lock.service.d.ts +20 -0
- package/dist/plugins/devices-homey/services/homey-adoption-lock.service.js +147 -0
- package/dist/plugins/devices-homey/services/homey-adoption-lock.service.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-config-validator.service.d.ts +11 -0
- package/dist/plugins/devices-homey/services/homey-config-validator.service.js +76 -0
- package/dist/plugins/devices-homey/services/homey-config-validator.service.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-connection-test.service.d.ts +14 -0
- package/dist/plugins/devices-homey/services/homey-connection-test.service.js +134 -0
- package/dist/plugins/devices-homey/services/homey-connection-test.service.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-device-adoption.service.d.ts +52 -0
- package/dist/plugins/devices-homey/services/homey-device-adoption.service.js +711 -0
- package/dist/plugins/devices-homey/services/homey-device-adoption.service.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-device-inventory.service.d.ts +20 -0
- package/dist/plugins/devices-homey/services/homey-device-inventory.service.js +159 -0
- package/dist/plugins/devices-homey/services/homey-device-inventory.service.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-failure-log-limiter.d.ts +9 -0
- package/dist/plugins/devices-homey/services/homey-failure-log-limiter.js +23 -0
- package/dist/plugins/devices-homey/services/homey-failure-log-limiter.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.d.ts +53 -0
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js +999 -0
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-reconnect-backoff.d.ts +1 -0
- package/dist/plugins/devices-homey/services/homey-reconnect-backoff.js +16 -0
- package/dist/plugins/devices-homey/services/homey-reconnect-backoff.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.d.ts +90 -0
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.js +628 -0
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.js.map +1 -0
- package/dist/plugins/devices-homey/services/homey.service.d.ts +129 -0
- package/dist/plugins/devices-homey/services/homey.service.js +1216 -0
- package/dist/plugins/devices-homey/services/homey.service.js.map +1 -0
- package/dist/plugins/devices-homey/validators/homey-url.validator.d.ts +4 -0
- package/dist/plugins/devices-homey/validators/homey-url.validator.js +27 -0
- package/dist/plugins/devices-homey/validators/homey-url.validator.js.map +1 -0
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.d.ts +3 -3
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.js +5 -5
- package/dist/plugins/devices-reterminal/devices-reterminal.plugin.js.map +1 -1
- package/dist/plugins/devices-reterminal/services/reterminal.service.d.ts +7 -3
- package/dist/plugins/devices-reterminal/services/reterminal.service.js +4 -1
- package/dist/plugins/devices-reterminal/services/reterminal.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.d.ts +6 -2
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.js +31 -2
- package/dist/plugins/devices-shelly-ng/controllers/shelly-ng-devices.controller.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +2 -2
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.d.ts +22 -2
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js +61 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.d.ts +4 -3
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js +5 -0
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.d.ts +3 -3
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +7 -5
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/dto/adopt-devices.dto.d.ts +15 -0
- package/dist/plugins/devices-shelly-ng/dto/adopt-devices.dto.js +113 -0
- package/dist/plugins/devices-shelly-ng/dto/adopt-devices.dto.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/mappings/definitions/sensors.yaml +1 -1
- package/dist/plugins/devices-shelly-ng/mappings/definitions/switches.yaml +23 -2
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.d.ts +4 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.js +16 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng-response.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.d.ts +7 -0
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.js +57 -1
- package/dist/plugins/devices-shelly-ng/models/shelly-ng.model.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +208 -0
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-adoption.service.d.ts +19 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-adoption.service.js +114 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng-adoption.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +11 -7
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +15 -8
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.d.ts +87 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js +18 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.d.ts +6 -2
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.js +29 -2
- package/dist/plugins/devices-shelly-v1/controllers/shelly-v1-devices.controller.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.d.ts +5 -4
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.js +5 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.d.ts +3 -3
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js +7 -5
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/dto/adopt-devices.dto.d.ts +15 -0
- package/dist/plugins/devices-shelly-v1/dto/adopt-devices.dto.js +113 -0
- package/dist/plugins/devices-shelly-v1/dto/adopt-devices.dto.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.d.ts +4 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.js +16 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1-response.model.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.d.ts +7 -0
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.js +57 -1
- package/dist/plugins/devices-shelly-v1/models/shelly-v1.model.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.d.ts +1 -0
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.js +3 -0
- package/dist/plugins/devices-shelly-v1/services/shellies-adapter.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-adoption.service.d.ts +19 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-adoption.service.js +114 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-adoption.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.d.ts +8 -4
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js +6 -3
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js.map +1 -1
- package/dist/plugins/devices-virtual/controllers/virtual-devices.controller.d.ts +15 -0
- package/dist/plugins/devices-virtual/controllers/virtual-devices.controller.js +170 -0
- package/dist/plugins/devices-virtual/controllers/virtual-devices.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/devices-virtual.constants.d.ts +8 -0
- package/dist/plugins/devices-virtual/devices-virtual.constants.js +19 -0
- package/dist/plugins/devices-virtual/devices-virtual.constants.js.map +1 -0
- package/dist/plugins/devices-virtual/devices-virtual.exceptions.d.ts +33 -0
- package/dist/plugins/devices-virtual/devices-virtual.exceptions.js +81 -0
- package/dist/plugins/devices-virtual/devices-virtual.exceptions.js.map +1 -0
- package/dist/plugins/devices-virtual/devices-virtual.openapi.d.ts +13 -0
- package/dist/plugins/devices-virtual/devices-virtual.openapi.js +37 -0
- package/dist/plugins/devices-virtual/devices-virtual.openapi.js.map +1 -0
- package/dist/plugins/devices-virtual/devices-virtual.plugin.d.ts +34 -0
- package/dist/plugins/devices-virtual/devices-virtual.plugin.js +317 -0
- package/dist/plugins/devices-virtual/devices-virtual.plugin.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/compatibility-request.dto.d.ts +13 -0
- package/dist/plugins/devices-virtual/dto/compatibility-request.dto.js +109 -0
- package/dist/plugins/devices-virtual/dto/compatibility-request.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/create-channel-property.dto.d.ts +10 -0
- package/dist/plugins/devices-virtual/dto/create-channel-property.dto.js +91 -0
- package/dist/plugins/devices-virtual/dto/create-channel-property.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/create-channel.dto.d.ts +8 -0
- package/dist/plugins/devices-virtual/dto/create-channel.dto.js +65 -0
- package/dist/plugins/devices-virtual/dto/create-channel.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/create-device-channel.dto.d.ts +7 -0
- package/dist/plugins/devices-virtual/dto/create-device-channel.dto.js +50 -0
- package/dist/plugins/devices-virtual/dto/create-device-channel.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/create-device.dto.d.ts +9 -0
- package/dist/plugins/devices-virtual/dto/create-device.dto.js +64 -0
- package/dist/plugins/devices-virtual/dto/create-device.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/update-channel-property.dto.d.ts +10 -0
- package/dist/plugins/devices-virtual/dto/update-channel-property.dto.js +91 -0
- package/dist/plugins/devices-virtual/dto/update-channel-property.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/update-channel.dto.d.ts +5 -0
- package/dist/plugins/devices-virtual/dto/update-channel.dto.js +35 -0
- package/dist/plugins/devices-virtual/dto/update-channel.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/update-config.dto.d.ts +5 -0
- package/dist/plugins/devices-virtual/dto/update-config.dto.js +33 -0
- package/dist/plugins/devices-virtual/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.d.ts +7 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.js +55 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.d.ts +25 -0
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.js +153 -0
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.d.ts +20 -0
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.js +191 -0
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.js.map +1 -0
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.d.ts +55 -0
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.js +542 -0
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.js.map +1 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.d.ts +10 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js +50 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js.map +1 -0
- package/dist/plugins/devices-virtual/listeners/virtual-status.listener.d.ts +20 -0
- package/dist/plugins/devices-virtual/listeners/virtual-status.listener.js +89 -0
- package/dist/plugins/devices-virtual/listeners/virtual-status.listener.js.map +1 -0
- package/dist/plugins/devices-virtual/models/compatibility-response.model.d.ts +12 -0
- package/dist/plugins/devices-virtual/models/compatibility-response.model.js +95 -0
- package/dist/plugins/devices-virtual/models/compatibility-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/config.model.d.ts +5 -0
- package/dist/plugins/devices-virtual/models/config.model.js +47 -0
- package/dist/plugins/devices-virtual/models/config.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/virtual-response.model.d.ts +5 -0
- package/dist/plugins/devices-virtual/models/virtual-response.model.js +32 -0
- package/dist/plugins/devices-virtual/models/virtual-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.d.ts +17 -0
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js +121 -0
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-devices.service.d.ts +52 -0
- package/dist/plugins/devices-virtual/services/virtual-devices.service.js +424 -0
- package/dist/plugins/devices-virtual/services/virtual-devices.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-energy-claim.service.d.ts +7 -0
- package/dist/plugins/devices-virtual/services/virtual-energy-claim.service.js +43 -0
- package/dist/plugins/devices-virtual/services/virtual-energy-claim.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.d.ts +38 -0
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.js +203 -0
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.d.ts +6 -0
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.js +31 -0
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.js.map +1 -0
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.d.ts +10 -0
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.js +56 -0
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.js.map +1 -0
- package/dist/plugins/devices-virtual/validators/device-is-virtual-constraint.validator.d.ts +9 -0
- package/dist/plugins/devices-virtual/validators/device-is-virtual-constraint.validator.js +56 -0
- package/dist/plugins/devices-virtual/validators/device-is-virtual-constraint.validator.js.map +1 -0
- package/dist/plugins/devices-virtual/validators/owned-property-has-no-source-constraint.validator.d.ts +6 -0
- package/dist/plugins/devices-virtual/validators/owned-property-has-no-source-constraint.validator.js +38 -0
- package/dist/plugins/devices-virtual/validators/owned-property-has-no-source-constraint.validator.js.map +1 -0
- package/dist/plugins/devices-virtual/validators/owned-property-not-writable-constraint.validator.d.ts +7 -0
- package/dist/plugins/devices-virtual/validators/owned-property-not-writable-constraint.validator.js +38 -0
- package/dist/plugins/devices-virtual/validators/owned-property-not-writable-constraint.validator.js.map +1 -0
- package/dist/plugins/devices-virtual/validators/source-not-virtual-constraint.validator.d.ts +9 -0
- package/dist/plugins/devices-virtual/validators/source-not-virtual-constraint.validator.js +56 -0
- package/dist/plugins/devices-virtual/validators/source-not-virtual-constraint.validator.js.map +1 -0
- package/dist/plugins/devices-wled/controllers/wled-discovery.controller.d.ts +6 -3
- package/dist/plugins/devices-wled/controllers/wled-discovery.controller.js +78 -20
- package/dist/plugins/devices-wled/controllers/wled-discovery.controller.js.map +1 -1
- package/dist/plugins/devices-wled/devices-wled.exceptions.d.ts +3 -0
- package/dist/plugins/devices-wled/devices-wled.exceptions.js +7 -1
- package/dist/plugins/devices-wled/devices-wled.exceptions.js.map +1 -1
- package/dist/plugins/devices-wled/devices-wled.openapi.d.ts +3 -2
- package/dist/plugins/devices-wled/devices-wled.openapi.js +11 -1
- package/dist/plugins/devices-wled/devices-wled.openapi.js.map +1 -1
- package/dist/plugins/devices-wled/devices-wled.plugin.d.ts +3 -3
- package/dist/plugins/devices-wled/devices-wled.plugin.js +10 -6
- package/dist/plugins/devices-wled/devices-wled.plugin.js.map +1 -1
- package/dist/plugins/devices-wled/dto/wled-adoption.dto.d.ts +19 -0
- package/dist/plugins/devices-wled/dto/wled-adoption.dto.js +108 -0
- package/dist/plugins/devices-wled/dto/wled-adoption.dto.js.map +1 -0
- package/dist/plugins/devices-wled/entities/devices-wled.entity.d.ts +1 -0
- package/dist/plugins/devices-wled/entities/devices-wled.entity.js +14 -0
- package/dist/plugins/devices-wled/entities/devices-wled.entity.js.map +1 -1
- package/dist/plugins/devices-wled/models/config.model.js +2 -2
- package/dist/plugins/devices-wled/models/config.model.js.map +1 -1
- package/dist/plugins/devices-wled/models/wled-discovery.model.d.ts +22 -3
- package/dist/plugins/devices-wled/models/wled-discovery.model.js +104 -29
- package/dist/plugins/devices-wled/models/wled-discovery.model.js.map +1 -1
- package/dist/plugins/devices-wled/services/adoption-snapshot.service.d.ts +16 -0
- package/dist/plugins/devices-wled/services/adoption-snapshot.service.js +109 -0
- package/dist/plugins/devices-wled/services/adoption-snapshot.service.js.map +1 -0
- package/dist/plugins/devices-wled/services/device-mapper.service.d.ts +5 -2
- package/dist/plugins/devices-wled/services/device-mapper.service.js +49 -19
- package/dist/plugins/devices-wled/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/hardware-identity.service.d.ts +9 -0
- package/dist/plugins/devices-wled/services/hardware-identity.service.js +50 -0
- package/dist/plugins/devices-wled/services/hardware-identity.service.js.map +1 -0
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.d.ts +4 -2
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.js +43 -24
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.d.ts +2 -0
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js +6 -0
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled.service.d.ts +40 -7
- package/dist/plugins/devices-wled/services/wled.service.js +759 -26
- package/dist/plugins/devices-wled/services/wled.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.d.ts +3 -3
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js +15 -5
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/models/config.model.d.ts +2 -0
- package/dist/plugins/devices-zigbee2mqtt/models/config.model.js +24 -2
- package/dist/plugins/devices-zigbee2mqtt/models/config.model.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.d.ts +11 -7
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +11 -8
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/plugins/influx-v1/dto/update-config.dto.d.ts +1 -1
- package/dist/plugins/influx-v1/dto/update-config.dto.js +1 -0
- package/dist/plugins/influx-v1/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/influx-v1/influx-v1.plugin.d.ts +3 -3
- package/dist/plugins/influx-v1/influx-v1.plugin.js +11 -5
- package/dist/plugins/influx-v1/influx-v1.plugin.js.map +1 -1
- package/dist/plugins/influx-v1/models/config.model.d.ts +1 -0
- package/dist/plugins/influx-v1/models/config.model.js +12 -1
- package/dist/plugins/influx-v1/models/config.model.js.map +1 -1
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.d.ts +7 -4
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js +3 -3
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js.map +1 -1
- package/dist/plugins/influx-v1/services/influx-v1.storage.d.ts +1 -0
- package/dist/plugins/influx-v1/services/influx-v1.storage.js +15 -0
- package/dist/plugins/influx-v1/services/influx-v1.storage.js.map +1 -1
- package/dist/plugins/influx-v2/dto/update-config.dto.d.ts +1 -1
- package/dist/plugins/influx-v2/dto/update-config.dto.js +1 -0
- package/dist/plugins/influx-v2/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/influx-v2/influx-v2.plugin.d.ts +3 -3
- package/dist/plugins/influx-v2/influx-v2.plugin.js +11 -5
- package/dist/plugins/influx-v2/influx-v2.plugin.js.map +1 -1
- package/dist/plugins/influx-v2/models/config.model.d.ts +1 -0
- package/dist/plugins/influx-v2/models/config.model.js +12 -1
- package/dist/plugins/influx-v2/models/config.model.js.map +1 -1
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.d.ts +7 -4
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js +3 -3
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js.map +1 -1
- package/dist/plugins/influx-v2/services/influx-v2.storage.d.ts +4 -1
- package/dist/plugins/influx-v2/services/influx-v2.storage.js +159 -2
- package/dist/plugins/influx-v2/services/influx-v2.storage.js.map +1 -1
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.d.ts +3 -3
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.js +5 -5
- package/dist/plugins/logger-rotating-file/logger-rotating-file.plugin.js.map +1 -1
- package/dist/plugins/logger-rotating-file/services/file-logger.service.d.ts +7 -3
- package/dist/plugins/logger-rotating-file/services/file-logger.service.js +12 -1
- package/dist/plugins/logger-rotating-file/services/file-logger.service.js.map +1 -1
- package/dist/plugins/memory-storage/memory-storage.plugin.d.ts +3 -3
- package/dist/plugins/memory-storage/memory-storage.plugin.js +5 -5
- package/dist/plugins/memory-storage/memory-storage.plugin.js.map +1 -1
- package/dist/plugins/memory-storage/services/in-memory-timeseries.store.d.ts +1 -1
- package/dist/plugins/memory-storage/services/in-memory-timeseries.store.js +5 -3
- package/dist/plugins/memory-storage/services/in-memory-timeseries.store.js.map +1 -1
- package/dist/plugins/memory-storage/services/influxql-parser.js +21 -1
- package/dist/plugins/memory-storage/services/influxql-parser.js.map +1 -1
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.d.ts +6 -3
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js +3 -3
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js.map +1 -1
- package/dist/plugins/notifications-discord/dto/update-config.dto.d.ts +10 -0
- package/dist/plugins/notifications-discord/dto/update-config.dto.js +90 -0
- package/dist/plugins/notifications-discord/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/notifications-discord/models/config.model.d.ts +10 -0
- package/dist/plugins/notifications-discord/models/config.model.js +99 -0
- package/dist/plugins/notifications-discord/models/config.model.js.map +1 -0
- package/dist/plugins/notifications-discord/notifications-discord.constants.d.ts +4 -0
- package/dist/plugins/notifications-discord/notifications-discord.constants.js +8 -0
- package/dist/plugins/notifications-discord/notifications-discord.constants.js.map +1 -0
- package/dist/plugins/notifications-discord/notifications-discord.openapi.d.ts +3 -0
- package/dist/plugins/notifications-discord/notifications-discord.openapi.js +10 -0
- package/dist/plugins/notifications-discord/notifications-discord.openapi.js.map +1 -0
- package/dist/plugins/notifications-discord/notifications-discord.plugin.d.ts +15 -0
- package/dist/plugins/notifications-discord/notifications-discord.plugin.js +113 -0
- package/dist/plugins/notifications-discord/notifications-discord.plugin.js.map +1 -0
- package/dist/plugins/notifications-discord/platforms/discord-channel.platform.d.ts +9 -0
- package/dist/plugins/notifications-discord/platforms/discord-channel.platform.js +67 -0
- package/dist/plugins/notifications-discord/platforms/discord-channel.platform.js.map +1 -0
- package/dist/plugins/notifications-discord/services/discord-actions.service.d.ts +13 -0
- package/dist/plugins/notifications-discord/services/discord-actions.service.js +94 -0
- package/dist/plugins/notifications-discord/services/discord-actions.service.js.map +1 -0
- package/dist/plugins/notifications-discord/validators/discord-webhook-url.validator.d.ts +4 -0
- package/dist/plugins/notifications-discord/validators/discord-webhook-url.validator.js +38 -0
- package/dist/plugins/notifications-discord/validators/discord-webhook-url.validator.js.map +1 -0
- package/dist/plugins/notifications-slack/dto/update-config.dto.d.ts +9 -0
- package/dist/plugins/notifications-slack/dto/update-config.dto.js +79 -0
- package/dist/plugins/notifications-slack/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/notifications-slack/models/config.model.d.ts +9 -0
- package/dist/plugins/notifications-slack/models/config.model.js +87 -0
- package/dist/plugins/notifications-slack/models/config.model.js.map +1 -0
- package/dist/plugins/notifications-slack/notifications-slack.constants.d.ts +4 -0
- package/dist/plugins/notifications-slack/notifications-slack.constants.js +8 -0
- package/dist/plugins/notifications-slack/notifications-slack.constants.js.map +1 -0
- package/dist/plugins/notifications-slack/notifications-slack.openapi.d.ts +3 -0
- package/dist/plugins/notifications-slack/notifications-slack.openapi.js +10 -0
- package/dist/plugins/notifications-slack/notifications-slack.openapi.js.map +1 -0
- package/dist/plugins/notifications-slack/notifications-slack.plugin.d.ts +15 -0
- package/dist/plugins/notifications-slack/notifications-slack.plugin.js +111 -0
- package/dist/plugins/notifications-slack/notifications-slack.plugin.js.map +1 -0
- package/dist/plugins/notifications-slack/platforms/slack-channel.platform.d.ts +9 -0
- package/dist/plugins/notifications-slack/platforms/slack-channel.platform.js +63 -0
- package/dist/plugins/notifications-slack/platforms/slack-channel.platform.js.map +1 -0
- package/dist/plugins/notifications-slack/services/slack-actions.service.d.ts +13 -0
- package/dist/plugins/notifications-slack/services/slack-actions.service.js +94 -0
- package/dist/plugins/notifications-slack/services/slack-actions.service.js.map +1 -0
- package/dist/plugins/notifications-slack/validators/slack-webhook-url.validator.d.ts +4 -0
- package/dist/plugins/notifications-slack/validators/slack-webhook-url.validator.js +37 -0
- package/dist/plugins/notifications-slack/validators/slack-webhook-url.validator.js.map +1 -0
- package/dist/plugins/notifications-telegram/dto/update-config.dto.d.ts +10 -0
- package/dist/plugins/notifications-telegram/dto/update-config.dto.js +88 -0
- package/dist/plugins/notifications-telegram/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/notifications-telegram/models/config.model.d.ts +10 -0
- package/dist/plugins/notifications-telegram/models/config.model.js +98 -0
- package/dist/plugins/notifications-telegram/models/config.model.js.map +1 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.constants.d.ts +4 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.constants.js +8 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.constants.js.map +1 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.openapi.d.ts +3 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.openapi.js +10 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.openapi.js.map +1 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.plugin.d.ts +15 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.plugin.js +113 -0
- package/dist/plugins/notifications-telegram/notifications-telegram.plugin.js.map +1 -0
- package/dist/plugins/notifications-telegram/platforms/telegram-channel.platform.d.ts +12 -0
- package/dist/plugins/notifications-telegram/platforms/telegram-channel.platform.js +87 -0
- package/dist/plugins/notifications-telegram/platforms/telegram-channel.platform.js.map +1 -0
- package/dist/plugins/notifications-telegram/services/telegram-actions.service.d.ts +13 -0
- package/dist/plugins/notifications-telegram/services/telegram-actions.service.js +94 -0
- package/dist/plugins/notifications-telegram/services/telegram-actions.service.js.map +1 -0
- package/dist/plugins/notifications-webhook/dto/update-config.dto.d.ts +10 -0
- package/dist/plugins/notifications-webhook/dto/update-config.dto.js +94 -0
- package/dist/plugins/notifications-webhook/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/notifications-webhook/models/config.model.d.ts +11 -0
- package/dist/plugins/notifications-webhook/models/config.model.js +114 -0
- package/dist/plugins/notifications-webhook/models/config.model.js.map +1 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.constants.d.ts +4 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.constants.js +8 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.constants.js.map +1 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.openapi.d.ts +3 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.openapi.js +10 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.openapi.js.map +1 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.plugin.d.ts +15 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.plugin.js +134 -0
- package/dist/plugins/notifications-webhook/notifications-webhook.plugin.js.map +1 -0
- package/dist/plugins/notifications-webhook/platforms/webhook-channel.platform.d.ts +9 -0
- package/dist/plugins/notifications-webhook/platforms/webhook-channel.platform.js +63 -0
- package/dist/plugins/notifications-webhook/platforms/webhook-channel.platform.js.map +1 -0
- package/dist/plugins/notifications-webhook/services/webhook-actions.service.d.ts +13 -0
- package/dist/plugins/notifications-webhook/services/webhook-actions.service.js +94 -0
- package/dist/plugins/notifications-webhook/services/webhook-actions.service.js.map +1 -0
- package/dist/plugins/notifications-webhook/validators/webhook-headers-require-https.validator.d.ts +6 -0
- package/dist/plugins/notifications-webhook/validators/webhook-headers-require-https.validator.js +40 -0
- package/dist/plugins/notifications-webhook/validators/webhook-headers-require-https.validator.js.map +1 -0
- package/dist/plugins/notifications-webhook/validators/webhook-headers-shape.validator.d.ts +3 -0
- package/dist/plugins/notifications-webhook/validators/webhook-headers-shape.validator.js +24 -0
- package/dist/plugins/notifications-webhook/validators/webhook-headers-shape.validator.js.map +1 -0
- package/dist/plugins/notifications-webhook/validators/webhook-url.validator.d.ts +4 -0
- package/dist/plugins/notifications-webhook/validators/webhook-url.validator.js +27 -0
- package/dist/plugins/notifications-webhook/validators/webhook-url.validator.js.map +1 -0
- package/dist/plugins/pages-device-detail/dto/create-page.dto.js +2 -0
- package/dist/plugins/pages-device-detail/dto/create-page.dto.js.map +1 -1
- package/dist/plugins/pages-device-detail/dto/update-page.dto.js +2 -0
- package/dist/plugins/pages-device-detail/dto/update-page.dto.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.d.ts +21 -0
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js +211 -0
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.d.ts +13 -0
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js +88 -0
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/dto/login.dto.d.ts +3 -0
- package/dist/plugins/remote-access-tailscale/dto/login.dto.js +40 -0
- package/dist/plugins/remote-access-tailscale/dto/login.dto.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/dto/update-config.dto.d.ts +12 -0
- package/dist/plugins/remote-access-tailscale/dto/update-config.dto.js +139 -0
- package/dist/plugins/remote-access-tailscale/dto/update-config.dto.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/models/config.model.d.ts +12 -0
- package/dist/plugins/remote-access-tailscale/models/config.model.js +140 -0
- package/dist/plugins/remote-access-tailscale/models/config.model.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/models/login.model.d.ts +16 -0
- package/dist/plugins/remote-access-tailscale/models/login.model.js +112 -0
- package/dist/plugins/remote-access-tailscale/models/login.model.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/models/status.model.d.ts +25 -0
- package/dist/plugins/remote-access-tailscale/models/status.model.js +219 -0
- package/dist/plugins/remote-access-tailscale/models/status.model.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.d.ts +20 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js +24 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.d.ts +6 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js +21 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.d.ts +21 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js +132 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/scripts/tailscale-setup.sh +175 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.d.ts +75 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js +206 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.d.ts +43 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js +344 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.d.ts +65 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js +471 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.d.ts +10 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.js +37 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.d.ts +21 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js +140 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.d.ts +30 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js +130 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-status-mapper.service.d.ts +21 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-status-mapper.service.js +106 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-status-mapper.service.js.map +1 -0
- package/dist/plugins/scenes-local/dto/create-local-scene-action.dto.js +2 -0
- package/dist/plugins/scenes-local/dto/create-local-scene-action.dto.js.map +1 -1
- package/dist/plugins/scenes-local/dto/update-local-scene-action.dto.js +2 -0
- package/dist/plugins/scenes-local/dto/update-local-scene-action.dto.js.map +1 -1
- package/dist/plugins/scenes-local/platforms/local-scene.platform.d.ts +1 -0
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js +11 -0
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js.map +1 -1
- package/dist/plugins/simulator/controllers/simulator.controller.js +12 -4
- package/dist/plugins/simulator/controllers/simulator.controller.js.map +1 -1
- package/dist/plugins/simulator/models/simulator-response.model.js +1 -0
- package/dist/plugins/simulator/models/simulator-response.model.js.map +1 -1
- package/dist/plugins/simulator/services/simulation.service.d.ts +7 -3
- package/dist/plugins/simulator/services/simulation.service.js +5 -2
- package/dist/plugins/simulator/services/simulation.service.js.map +1 -1
- package/dist/plugins/simulator/simulator.plugin.d.ts +3 -3
- package/dist/plugins/simulator/simulator.plugin.js +5 -5
- package/dist/plugins/simulator/simulator.plugin.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/climate-intent.service.d.ts +3 -0
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js +84 -16
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/covers-intent.service.d.ts +1 -0
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js +7 -1
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.d.ts +4 -1
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js +41 -12
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js +2 -2
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-intent.service.d.ts +2 -1
- package/dist/plugins/spaces-home-control/services/space-intent.service.js +5 -2
- package/dist/plugins/spaces-home-control/services/space-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-lighting-tool.service.d.ts +2 -3
- package/dist/plugins/spaces-home-control/services/space-lighting-tool.service.js +99 -40
- package/dist/plugins/spaces-home-control/services/space-lighting-tool.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-suggestion-heartbeat.service.d.ts +13 -4
- package/dist/plugins/spaces-home-control/services/space-suggestion-heartbeat.service.js +63 -11
- package/dist/plugins/spaces-home-control/services/space-suggestion-heartbeat.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.d.ts +5 -1
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +10 -2
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -1
- package/dist/plugins/spaces-home-control/spec/definitions/climate-intents.yaml +94 -0
- package/dist/plugins/spaces-home-control/spec/definitions/covers-modes.yaml +83 -0
- package/dist/plugins/spaces-home-control/spec/definitions/enums.yaml +119 -0
- package/dist/plugins/spaces-home-control/spec/definitions/lighting-intents.yaml +181 -0
- package/dist/plugins/spaces-home-control/spec/definitions/lighting-modes.yaml +119 -0
- package/dist/plugins/spaces-home-control/spec/definitions/suggestions.yaml +47 -0
- package/dist/plugins/tiles-device-preview/dto/create-tile.dto.js +2 -0
- package/dist/plugins/tiles-device-preview/dto/create-tile.dto.js.map +1 -1
- package/dist/plugins/tiles-device-preview/dto/update-tile.dto.js +2 -0
- package/dist/plugins/tiles-device-preview/dto/update-tile.dto.js.map +1 -1
- package/dist/plugins/weather-openweathermap/dto/update-config.dto.js +2 -3
- package/dist/plugins/weather-openweathermap/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/weather-openweathermap/models/config.model.d.ts +1 -0
- package/dist/plugins/weather-openweathermap/models/config.model.js +12 -1
- package/dist/plugins/weather-openweathermap/models/config.model.js.map +1 -1
- package/dist/plugins/weather-openweathermap/weather-openweathermap.plugin.js +7 -0
- package/dist/plugins/weather-openweathermap/weather-openweathermap.plugin.js.map +1 -1
- package/dist/plugins/weather-openweathermap-onecall/dto/update-config.dto.js +2 -3
- package/dist/plugins/weather-openweathermap-onecall/dto/update-config.dto.js.map +1 -1
- package/dist/plugins/weather-openweathermap-onecall/models/config.model.d.ts +1 -0
- package/dist/plugins/weather-openweathermap-onecall/models/config.model.js +12 -1
- package/dist/plugins/weather-openweathermap-onecall/models/config.model.js.map +1 -1
- package/dist/plugins/weather-openweathermap-onecall/weather-openweathermap-onecall.plugin.js +7 -0
- package/dist/plugins/weather-openweathermap-onecall/weather-openweathermap-onecall.plugin.js.map +1 -1
- package/dist/spec/channels.d.ts +2 -2
- package/dist/spec/channels.js +2 -2
- package/dist/spec/channels.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +32 -3
- package/dist/modules/extensions/services/base-managed-plugin.service.js.map +0 -1
- package/dist/modules/extensions/services/managed-plugin-service.interface.js.map +0 -1
- package/dist/modules/extensions/services/plugin-service-manager.service.d.ts +0 -43
- package/dist/modules/extensions/services/plugin-service-manager.service.js.map +0 -1
- package/dist/modules/websocket/utils/ip.utils.d.ts +0 -2
- package/dist/modules/websocket/utils/ip.utils.js +0 -35
- package/dist/modules/websocket/utils/ip.utils.js.map +0 -1
|
@@ -0,0 +1,1216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.HomeyService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
18
|
+
const logger_1 = require("../../../common/logger");
|
|
19
|
+
const config_service_1 = require("../../../modules/config/services/config.service");
|
|
20
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
21
|
+
const devices_entity_1 = require("../../../modules/devices/entities/devices.entity");
|
|
22
|
+
const base_managed_extension_service_1 = require("../../../modules/extensions/services/base-managed-extension.service");
|
|
23
|
+
const devices_homey_constants_1 = require("../devices-homey.constants");
|
|
24
|
+
const homey_connector_error_1 = require("../errors/homey-connector.error");
|
|
25
|
+
const homey_inventory_error_1 = require("../errors/homey-inventory.error");
|
|
26
|
+
const config_model_1 = require("../models/config.model");
|
|
27
|
+
const homey_event_model_1 = require("../models/homey-event.model");
|
|
28
|
+
const status_model_1 = require("../models/status.model");
|
|
29
|
+
const homey_command_value_1 = require("../platforms/homey-command-value");
|
|
30
|
+
const homey_failure_log_limiter_1 = require("./homey-failure-log-limiter");
|
|
31
|
+
const homey_reconnect_backoff_1 = require("./homey-reconnect-backoff");
|
|
32
|
+
const homey_synchronizer_service_1 = require("./homey-synchronizer.service");
|
|
33
|
+
const HOMEY_EVENT_OBSERVATION_REVISION = Symbol('homeyEventObservationRevision');
|
|
34
|
+
let HomeyService = class HomeyService extends base_managed_extension_service_1.BaseManagedExtensionService {
|
|
35
|
+
constructor(configService, synchronizer, connectorFactory = null) {
|
|
36
|
+
super();
|
|
37
|
+
this.configService = configService;
|
|
38
|
+
this.synchronizer = synchronizer;
|
|
39
|
+
this.connectorFactory = connectorFactory;
|
|
40
|
+
this.logger = (0, logger_1.createExtensionLogger)(devices_homey_constants_1.DEVICES_HOMEY_PLUGIN_NAME, 'HomeyService');
|
|
41
|
+
this.failureLogLimiter = new homey_failure_log_limiter_1.HomeyFailureLogLimiter();
|
|
42
|
+
this.owner = { kind: 'plugin', type: devices_homey_constants_1.DEVICES_HOMEY_PLUGIN_NAME };
|
|
43
|
+
this.serviceId = devices_homey_constants_1.DEVICES_HOMEY_CONNECTOR_SERVICE_ID;
|
|
44
|
+
this.pluginConfig = null;
|
|
45
|
+
this.lastError = null;
|
|
46
|
+
this.connectionState = devices_homey_constants_1.HomeyConnectionState.STOPPED;
|
|
47
|
+
this.healthy = false;
|
|
48
|
+
this.connector = null;
|
|
49
|
+
this.unsubscribe = null;
|
|
50
|
+
this.systemInfo = null;
|
|
51
|
+
this.lastSystemInfo = null;
|
|
52
|
+
this.zones = [];
|
|
53
|
+
this.devices = new Map();
|
|
54
|
+
this.startupEvents = null;
|
|
55
|
+
this.generation = 0;
|
|
56
|
+
this.synchronizationTail = Promise.resolve();
|
|
57
|
+
this.reconciliationTimer = null;
|
|
58
|
+
this.reconnectTimer = null;
|
|
59
|
+
this.reconnectAttempt = 0;
|
|
60
|
+
this.reconnectCount = 0;
|
|
61
|
+
this.liveEvents = [];
|
|
62
|
+
this.liveEventFlush = null;
|
|
63
|
+
this.lastConnectedAt = null;
|
|
64
|
+
this.lastInventorySyncAt = null;
|
|
65
|
+
this.lastEventAt = null;
|
|
66
|
+
this.lastErrorCategory = null;
|
|
67
|
+
this.reconciliationCount = 0;
|
|
68
|
+
this.reconciliationFailureCount = 0;
|
|
69
|
+
this.lastReconciliationDurationMs = null;
|
|
70
|
+
this.operationalDiagnostics = {
|
|
71
|
+
adopted: 0,
|
|
72
|
+
adoptedDevices: [],
|
|
73
|
+
missing: 0,
|
|
74
|
+
unsupported: 0,
|
|
75
|
+
unavailable: 0,
|
|
76
|
+
};
|
|
77
|
+
this.operationalInventoryDeviceIds = new Set();
|
|
78
|
+
this.operationalAdoptedDeviceOverrides = new Map();
|
|
79
|
+
this.commandTails = new Map();
|
|
80
|
+
this.pendingCommandConfirmations = new Map();
|
|
81
|
+
this.commandCancellationListeners = new Set();
|
|
82
|
+
this.capabilityCommandRevisions = new Map();
|
|
83
|
+
this.capabilityObservationRevisions = new Map();
|
|
84
|
+
this.deviceInventoryRevisions = new Map();
|
|
85
|
+
this.acceptedCapabilityStates = new Map();
|
|
86
|
+
this.capabilityObservationRevision = 0;
|
|
87
|
+
this.capabilityCommandRevision = 0;
|
|
88
|
+
this.deviceInventoryRevision = 0;
|
|
89
|
+
this.acceptedCapabilityRevision = 0;
|
|
90
|
+
}
|
|
91
|
+
async start() {
|
|
92
|
+
await this.withLock(async () => {
|
|
93
|
+
if (this.state === 'started') {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
await this.cleanupPreviousGeneration();
|
|
97
|
+
this.state = 'starting';
|
|
98
|
+
this.pluginConfig = null;
|
|
99
|
+
this.resetReconnectState();
|
|
100
|
+
this.resetRuntimeHealth();
|
|
101
|
+
this.lastError = null;
|
|
102
|
+
this.healthy = false;
|
|
103
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.CONNECTING, 'service_start');
|
|
104
|
+
const generation = ++this.generation;
|
|
105
|
+
try {
|
|
106
|
+
const config = this.getPluginConfig();
|
|
107
|
+
const connector = this.createConnector(config);
|
|
108
|
+
this.connector = connector;
|
|
109
|
+
await connector.connect();
|
|
110
|
+
this.recordSuccessfulConnection();
|
|
111
|
+
const subscriptionFailure = await this.synchronizeStartup(connector, generation, 'startup');
|
|
112
|
+
this.state = 'started';
|
|
113
|
+
if (subscriptionFailure) {
|
|
114
|
+
this.markRuntimeDegraded(subscriptionFailure, generation);
|
|
115
|
+
this.logger.warn('Homey inventory synchronized with event delivery unavailable');
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.markRuntimeHealthy(connector, generation);
|
|
119
|
+
this.logger.log('Homey connector started and initial inventory synchronized');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
this.applyFailureState(error, 'Homey service failed to start');
|
|
124
|
+
const retryable = this.isRetryableFailure(error);
|
|
125
|
+
const retryGeneration = ++this.generation;
|
|
126
|
+
await this.cleanupRuntime();
|
|
127
|
+
if (retryable) {
|
|
128
|
+
this.state = 'started';
|
|
129
|
+
this.scheduleReconnect(retryGeneration);
|
|
130
|
+
this.logger.warn('Homey service startup is unavailable; reconnect scheduled');
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.state = 'error';
|
|
134
|
+
this.healthy = false;
|
|
135
|
+
this.logger.error(this.lastError ?? 'Homey service failed to start');
|
|
136
|
+
throw new Error(this.lastError ?? 'Homey service failed to start');
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
async stop() {
|
|
141
|
+
await this.withLock(async () => {
|
|
142
|
+
if (this.state === 'stopped' && !this.hasRuntimeResources()) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this.state = 'stopping';
|
|
146
|
+
this.generation += 1;
|
|
147
|
+
this.healthy = false;
|
|
148
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.STOPPED, 'service_stop');
|
|
149
|
+
const cleaned = await this.cleanupRuntime();
|
|
150
|
+
this.pluginConfig = null;
|
|
151
|
+
this.resetReconnectState();
|
|
152
|
+
if (!cleaned) {
|
|
153
|
+
this.state = 'error';
|
|
154
|
+
this.lastError = 'Homey service failed to stop';
|
|
155
|
+
this.lastErrorCategory = null;
|
|
156
|
+
this.logger.error(this.lastError);
|
|
157
|
+
throw new Error(this.lastError);
|
|
158
|
+
}
|
|
159
|
+
this.state = 'stopped';
|
|
160
|
+
this.lastError = null;
|
|
161
|
+
this.lastErrorCategory = null;
|
|
162
|
+
this.logger.log('Homey connector stopped');
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
onConfigChanged() {
|
|
166
|
+
if (this.state === 'started' && this.pluginConfig) {
|
|
167
|
+
const previous = this.pluginConfig;
|
|
168
|
+
const next = this.configService.getPluginConfig(devices_homey_constants_1.DEVICES_HOMEY_PLUGIN_NAME);
|
|
169
|
+
const restartRequired = previous.url !== next.url ||
|
|
170
|
+
previous.apiKey !== next.apiKey ||
|
|
171
|
+
previous.connectionTimeout !== next.connectionTimeout ||
|
|
172
|
+
previous.reconciliationInterval !== next.reconciliationInterval;
|
|
173
|
+
return Promise.resolve({ restartRequired });
|
|
174
|
+
}
|
|
175
|
+
this.pluginConfig = null;
|
|
176
|
+
return Promise.resolve({ restartRequired: false });
|
|
177
|
+
}
|
|
178
|
+
isHealthy() {
|
|
179
|
+
return Promise.resolve(this.healthy && this.state === 'started');
|
|
180
|
+
}
|
|
181
|
+
getStatus() {
|
|
182
|
+
const config = this.getCurrentPluginConfigOrDefault();
|
|
183
|
+
const status = new status_model_1.HomeyStatusModel();
|
|
184
|
+
status.serviceState = this.getState();
|
|
185
|
+
status.connectionState = this.connectionState;
|
|
186
|
+
status.enabled = config.enabled;
|
|
187
|
+
status.configured = this.isConfigured(config);
|
|
188
|
+
status.healthy = this.healthy;
|
|
189
|
+
status.degraded = this.connectionState === devices_homey_constants_1.HomeyConnectionState.DEGRADED_POLLING;
|
|
190
|
+
status.homeyId = this.lastSystemInfo?.id ?? null;
|
|
191
|
+
status.homeyName = this.lastSystemInfo?.name ?? null;
|
|
192
|
+
status.homeyVersion = this.lastSystemInfo?.version ?? null;
|
|
193
|
+
status.lastConnectedAt = this.lastConnectedAt;
|
|
194
|
+
status.lastInventorySyncAt = this.lastInventorySyncAt;
|
|
195
|
+
status.lastEventAt = this.lastEventAt;
|
|
196
|
+
status.lastEventAgeMs = this.calculateLastEventAgeMs();
|
|
197
|
+
status.adoptedDeviceCount = this.operationalDiagnostics.adopted;
|
|
198
|
+
status.missingDeviceCount = this.operationalDiagnostics.missing;
|
|
199
|
+
status.unsupportedDeviceCount = this.operationalDiagnostics.unsupported;
|
|
200
|
+
status.unavailableDeviceCount = this.operationalDiagnostics.unavailable;
|
|
201
|
+
status.reconnectCount = this.reconnectCount;
|
|
202
|
+
status.reconciliationCount = this.reconciliationCount;
|
|
203
|
+
status.reconciliationFailureCount = this.reconciliationFailureCount;
|
|
204
|
+
status.lastReconciliationDurationMs = this.lastReconciliationDurationMs;
|
|
205
|
+
status.lastErrorCategory = this.lastErrorCategory;
|
|
206
|
+
status.lastError = this.lastError;
|
|
207
|
+
return status;
|
|
208
|
+
}
|
|
209
|
+
getInventorySnapshot() {
|
|
210
|
+
if (this.state !== 'started' ||
|
|
211
|
+
this.lastInventorySyncAt === null ||
|
|
212
|
+
(this.connectionState !== devices_homey_constants_1.HomeyConnectionState.CONNECTED &&
|
|
213
|
+
this.connectionState !== devices_homey_constants_1.HomeyConnectionState.DEGRADED_POLLING)) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
return structuredClone([...this.devices.values()]);
|
|
217
|
+
}
|
|
218
|
+
onAdoptedDeviceUpserted(device) {
|
|
219
|
+
if (device.type !== devices_homey_constants_1.DEVICES_HOMEY_TYPE) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
this.synchronizer.invalidateIndex();
|
|
223
|
+
const adoptedDevices = new Map(this.operationalDiagnostics.adoptedDevices.map((adopted) => [adopted.panelDeviceId, adopted.homeyDeviceId]));
|
|
224
|
+
if (device.enabled && typeof device.identifier === 'string') {
|
|
225
|
+
adoptedDevices.set(device.id, device.identifier);
|
|
226
|
+
this.operationalAdoptedDeviceOverrides.set(device.id, device.identifier);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
adoptedDevices.delete(device.id);
|
|
230
|
+
this.operationalAdoptedDeviceOverrides.set(device.id, null);
|
|
231
|
+
}
|
|
232
|
+
this.recordLocalAdoptedDiagnostics(adoptedDevices);
|
|
233
|
+
}
|
|
234
|
+
onAdoptedDeviceDeleted(device) {
|
|
235
|
+
if (device.type !== devices_homey_constants_1.DEVICES_HOMEY_TYPE) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
this.synchronizer.invalidateIndex();
|
|
239
|
+
const adoptedDevices = new Map(this.operationalDiagnostics.adoptedDevices.map((adopted) => [adopted.panelDeviceId, adopted.homeyDeviceId]));
|
|
240
|
+
adoptedDevices.delete(device.id);
|
|
241
|
+
this.operationalAdoptedDeviceOverrides.set(device.id, null);
|
|
242
|
+
this.recordLocalAdoptedDiagnostics(adoptedDevices);
|
|
243
|
+
}
|
|
244
|
+
async executeCapabilityCommand(deviceId, capabilityId, value) {
|
|
245
|
+
const key = this.commandKey(deviceId, capabilityId);
|
|
246
|
+
const generation = this.generation;
|
|
247
|
+
const successful = await this.enqueueCapabilityCommand(key, (retainWrite) => this.executeSerializedCapabilityCommand(key, deviceId, capabilityId, value, generation, retainWrite));
|
|
248
|
+
if (!successful) {
|
|
249
|
+
this.logRateLimitedFailure('command', 'warn', 'Homey capability command failed or could not be confirmed', {
|
|
250
|
+
outcome: 'rejected_or_unconfirmed',
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
return successful;
|
|
254
|
+
}
|
|
255
|
+
async executeDerivedCapabilityCommand(deviceId, capabilityId, deriveValue) {
|
|
256
|
+
const key = this.commandKey(deviceId, capabilityId);
|
|
257
|
+
const generation = this.generation;
|
|
258
|
+
const successful = await this.enqueueCapabilityCommand(key, (retainWrite) => {
|
|
259
|
+
const device = this.devices.get(deviceId);
|
|
260
|
+
const capability = device?.capabilities.find((candidate) => candidate.id === capabilityId);
|
|
261
|
+
if (device === undefined || !device.available || capability === undefined || capability.available === false) {
|
|
262
|
+
return Promise.resolve(false);
|
|
263
|
+
}
|
|
264
|
+
const value = deriveValue(capability);
|
|
265
|
+
if (value === undefined) {
|
|
266
|
+
return Promise.resolve(false);
|
|
267
|
+
}
|
|
268
|
+
return this.executeSerializedCapabilityCommand(key, deviceId, capabilityId, value, generation, retainWrite);
|
|
269
|
+
});
|
|
270
|
+
if (!successful) {
|
|
271
|
+
this.logRateLimitedFailure('command', 'warn', 'Homey capability command failed or could not be confirmed', {
|
|
272
|
+
outcome: 'rejected_or_unconfirmed',
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
return successful;
|
|
276
|
+
}
|
|
277
|
+
async waitForCapabilityCommandIdle(deviceId, capabilityId) {
|
|
278
|
+
const key = this.commandKey(deviceId, capabilityId);
|
|
279
|
+
while (true) {
|
|
280
|
+
const tail = this.commandTails.get(key);
|
|
281
|
+
if (tail === undefined) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
await tail;
|
|
285
|
+
if (this.commandTails.get(key) === tail) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
async getFreshDevice(deviceId) {
|
|
291
|
+
const connector = this.connector;
|
|
292
|
+
if (this.state !== 'started' ||
|
|
293
|
+
connector === null ||
|
|
294
|
+
(this.connectionState !== devices_homey_constants_1.HomeyConnectionState.CONNECTED &&
|
|
295
|
+
this.connectionState !== devices_homey_constants_1.HomeyConnectionState.DEGRADED_POLLING)) {
|
|
296
|
+
throw new homey_inventory_error_1.HomeyInventoryUnavailableError();
|
|
297
|
+
}
|
|
298
|
+
const device = await connector.getDevice(deviceId);
|
|
299
|
+
return device === null ? null : structuredClone(device);
|
|
300
|
+
}
|
|
301
|
+
getPluginConfig() {
|
|
302
|
+
if (!this.pluginConfig) {
|
|
303
|
+
this.pluginConfig = this.configService.getPluginConfig(devices_homey_constants_1.DEVICES_HOMEY_PLUGIN_NAME);
|
|
304
|
+
}
|
|
305
|
+
return this.pluginConfig;
|
|
306
|
+
}
|
|
307
|
+
createConnector(config) {
|
|
308
|
+
if (!this.isConfigured(config)) {
|
|
309
|
+
throw new homey_connector_error_1.HomeyConnectorError(homey_connector_error_1.HomeyConnectorErrorCategory.VALIDATION, homey_connector_error_1.HomeyConnectorOperation.CONNECT);
|
|
310
|
+
}
|
|
311
|
+
if (!this.connectorFactory) {
|
|
312
|
+
throw new homey_connector_error_1.HomeyConnectorError(homey_connector_error_1.HomeyConnectorErrorCategory.UNSUPPORTED, homey_connector_error_1.HomeyConnectorOperation.CONNECT);
|
|
313
|
+
}
|
|
314
|
+
return this.connectorFactory.create({
|
|
315
|
+
url: config.url,
|
|
316
|
+
apiKey: config.apiKey,
|
|
317
|
+
connectionTimeout: config.connectionTimeout,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
async synchronizeStartup(connector, generation, source) {
|
|
321
|
+
let subscriptionFailure = null;
|
|
322
|
+
await this.runInventoryReconciliation(source, async () => {
|
|
323
|
+
this.systemInfo = await connector.getSystemInfo();
|
|
324
|
+
this.lastSystemInfo = this.systemInfo;
|
|
325
|
+
this.zones = await connector.getZones();
|
|
326
|
+
this.startupEvents = [];
|
|
327
|
+
try {
|
|
328
|
+
this.unsubscribe = await connector.subscribe((event) => this.onConnectorEvent(connector, generation, event));
|
|
329
|
+
}
|
|
330
|
+
catch (error) {
|
|
331
|
+
this.startupEvents = null;
|
|
332
|
+
if (!this.isDegradableSubscriptionFailure(error)) {
|
|
333
|
+
throw error;
|
|
334
|
+
}
|
|
335
|
+
subscriptionFailure = error;
|
|
336
|
+
}
|
|
337
|
+
await this.enqueueSynchronization(async () => {
|
|
338
|
+
this.replaceDevices(await connector.getDevices());
|
|
339
|
+
const result = await this.synchronizer.synchronizeSnapshot([...this.devices.values()]);
|
|
340
|
+
this.recordSynchronizationResult(result);
|
|
341
|
+
this.recordCapabilityEvidence(result.acceptedCapabilityValues ?? []);
|
|
342
|
+
await this.refreshOperationalDiagnostics([...this.devices.values()]);
|
|
343
|
+
if (this.startupEvents) {
|
|
344
|
+
await this.reconcileStartupEvents(connector, generation);
|
|
345
|
+
}
|
|
346
|
+
this.recordSuccessfulInventorySync(connector, generation);
|
|
347
|
+
});
|
|
348
|
+
});
|
|
349
|
+
return subscriptionFailure;
|
|
350
|
+
}
|
|
351
|
+
async reconcileStartupEvents(connector, generation) {
|
|
352
|
+
let cursor = 0;
|
|
353
|
+
let pass = 0;
|
|
354
|
+
while (this.startupEvents && cursor < this.startupEvents.length && pass < 10) {
|
|
355
|
+
const events = this.startupEvents.slice(cursor);
|
|
356
|
+
cursor += events.length;
|
|
357
|
+
pass += 1;
|
|
358
|
+
await this.reconcileEvents(connector, generation, events, true);
|
|
359
|
+
}
|
|
360
|
+
const remainingEvents = this.startupEvents?.slice(cursor) ?? [];
|
|
361
|
+
this.startupEvents = null;
|
|
362
|
+
if (remainingEvents.length > 0) {
|
|
363
|
+
await this.reconcileEvents(connector, generation, remainingEvents, true);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
onConnectorEvent(connector, generation, event) {
|
|
367
|
+
if (!this.isCurrentGeneration(connector, generation)) {
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
let observedEvent = event;
|
|
371
|
+
if (event.type === homey_event_model_1.HomeyEventType.CAPABILITY_VALUE_CHANGED) {
|
|
372
|
+
const observationRevision = ++this.capabilityObservationRevision;
|
|
373
|
+
this.capabilityObservationRevisions.set(this.commandKey(event.deviceId, event.capabilityId), observationRevision);
|
|
374
|
+
observedEvent = { ...event, [HOMEY_EVENT_OBSERVATION_REVISION]: observationRevision };
|
|
375
|
+
}
|
|
376
|
+
if (this.startupEvents) {
|
|
377
|
+
this.startupEvents.push(observedEvent);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
this.liveEvents.push(observedEvent);
|
|
381
|
+
if (this.liveEventFlush !== null) {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
this.liveEventFlush = setImmediate(() => {
|
|
385
|
+
this.liveEventFlush = null;
|
|
386
|
+
const events = this.liveEvents;
|
|
387
|
+
this.liveEvents = [];
|
|
388
|
+
void this.flushLiveEvents(connector, generation, events);
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
flushLiveEvents(connector, generation, events) {
|
|
392
|
+
return this.enqueueSynchronization(async () => {
|
|
393
|
+
try {
|
|
394
|
+
const authoritativeTraffic = await this.reconcileEvents(connector, generation, events);
|
|
395
|
+
if (authoritativeTraffic) {
|
|
396
|
+
this.markRuntimeHealthy(connector, generation);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
catch (error) {
|
|
400
|
+
if (this.isCurrentGeneration(connector, generation)) {
|
|
401
|
+
this.handleRuntimeFailure(error, 'Homey event synchronization failed', generation);
|
|
402
|
+
this.logRateLimitedFailure('event-synchronization', 'error', this.lastError ?? 'Homey event synchronization failed', { category: this.lastErrorCategory });
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
async reconcileEvents(connector, generation, events, authoritativeReadback = false) {
|
|
408
|
+
if (!this.isCurrentGeneration(connector, generation)) {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
const containsZoneEvent = events.some((event) => this.isZoneEvent(event));
|
|
412
|
+
let inventoryReplaced = false;
|
|
413
|
+
let authoritativeTraffic = false;
|
|
414
|
+
if (containsZoneEvent) {
|
|
415
|
+
const zones = await connector.getZones();
|
|
416
|
+
const devices = await connector.getDevices();
|
|
417
|
+
if (!this.isCurrentGeneration(connector, generation)) {
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
420
|
+
this.zones = zones;
|
|
421
|
+
this.replaceDevices(devices);
|
|
422
|
+
inventoryReplaced = true;
|
|
423
|
+
authoritativeTraffic = true;
|
|
424
|
+
}
|
|
425
|
+
const deviceIds = [...new Set(events.flatMap((event) => ('deviceId' in event ? [event.deviceId] : [])))];
|
|
426
|
+
const refreshedDevices = [];
|
|
427
|
+
const missingDeviceIds = [];
|
|
428
|
+
const selectedEvents = inventoryReplaced || authoritativeReadback ? events : this.synchronizer.filterEvents(events);
|
|
429
|
+
const targetedDeviceIds = new Set(authoritativeReadback
|
|
430
|
+
? deviceIds
|
|
431
|
+
: selectedEvents.flatMap((event) => event.type === homey_event_model_1.HomeyEventType.DEVICE_ADDED || event.type === homey_event_model_1.HomeyEventType.DEVICE_UPDATED
|
|
432
|
+
? [event.deviceId]
|
|
433
|
+
: []));
|
|
434
|
+
if (!inventoryReplaced) {
|
|
435
|
+
for (const deviceId of targetedDeviceIds) {
|
|
436
|
+
const device = await connector.getDevice(deviceId);
|
|
437
|
+
if (!this.isCurrentGeneration(connector, generation)) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
authoritativeTraffic = true;
|
|
441
|
+
if (device) {
|
|
442
|
+
this.setDevice(device);
|
|
443
|
+
refreshedDevices.push(device);
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
this.deleteDevice(deviceId);
|
|
447
|
+
missingDeviceIds.push(deviceId);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
for (const event of selectedEvents) {
|
|
451
|
+
if ('deviceId' in event && targetedDeviceIds.has(event.deviceId)) {
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
authoritativeTraffic =
|
|
455
|
+
(await this.updateInventoryFromEvent(connector, generation, event)) || authoritativeTraffic;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
if (events.length > 0 && this.isCurrentGeneration(connector, generation)) {
|
|
459
|
+
this.logger.debug('Processing normalized Homey event batch', { eventCount: events.length });
|
|
460
|
+
const confirmationEvents = [];
|
|
461
|
+
if (inventoryReplaced) {
|
|
462
|
+
const result = await this.synchronizer.synchronizeSnapshot([...this.devices.values()], events);
|
|
463
|
+
this.recordSynchronizationResult(result);
|
|
464
|
+
this.recordCapabilityEvidence(result.acceptedCapabilityValues ?? []);
|
|
465
|
+
confirmationEvents.push(...result.acceptedEvents);
|
|
466
|
+
}
|
|
467
|
+
else if (targetedDeviceIds.size > 0) {
|
|
468
|
+
const readbackEvents = selectedEvents.filter((event) => 'deviceId' in event && targetedDeviceIds.has(event.deviceId));
|
|
469
|
+
const result = await this.synchronizer.synchronizeDevices(refreshedDevices, missingDeviceIds, readbackEvents);
|
|
470
|
+
this.recordSynchronizationResult(result);
|
|
471
|
+
this.recordCapabilityEvidence(result.acceptedCapabilityValues ?? []);
|
|
472
|
+
confirmationEvents.push(...result.acceptedEvents);
|
|
473
|
+
const remainingEvents = selectedEvents.filter((event) => !('deviceId' in event) || !targetedDeviceIds.has(event.deviceId));
|
|
474
|
+
if (remainingEvents.length > 0) {
|
|
475
|
+
const result = await this.synchronizer.synchronizeEvents(remainingEvents, this.devices);
|
|
476
|
+
this.recordSynchronizationResult(result);
|
|
477
|
+
confirmationEvents.push(...result.acceptedEvents);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
else if (selectedEvents.length > 0) {
|
|
481
|
+
const result = await this.synchronizer.synchronizeEvents(selectedEvents, this.devices);
|
|
482
|
+
this.recordSynchronizationResult(result);
|
|
483
|
+
confirmationEvents.push(...result.acceptedEvents);
|
|
484
|
+
}
|
|
485
|
+
this.lastEventAt = this.now();
|
|
486
|
+
this.recordAcceptedCapabilityEvents(confirmationEvents, generation);
|
|
487
|
+
if (events.some((event) => event.type !== homey_event_model_1.HomeyEventType.CAPABILITY_VALUE_CHANGED)) {
|
|
488
|
+
await this.refreshOperationalDiagnostics([...this.devices.values()]);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
return authoritativeTraffic;
|
|
492
|
+
}
|
|
493
|
+
async updateInventoryFromEvent(connector, generation, event) {
|
|
494
|
+
switch (event.type) {
|
|
495
|
+
case homey_event_model_1.HomeyEventType.DEVICE_ADDED:
|
|
496
|
+
case homey_event_model_1.HomeyEventType.DEVICE_UPDATED: {
|
|
497
|
+
const device = await connector.getDevice(event.deviceId);
|
|
498
|
+
if (!this.isCurrentGeneration(connector, generation)) {
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
if (device === null) {
|
|
502
|
+
this.deleteDevice(event.deviceId);
|
|
503
|
+
}
|
|
504
|
+
else {
|
|
505
|
+
this.setDevice(device);
|
|
506
|
+
}
|
|
507
|
+
return true;
|
|
508
|
+
}
|
|
509
|
+
case homey_event_model_1.HomeyEventType.DEVICE_REMOVED:
|
|
510
|
+
this.deleteDevice(event.deviceId);
|
|
511
|
+
return false;
|
|
512
|
+
case homey_event_model_1.HomeyEventType.DEVICE_AVAILABILITY_CHANGED: {
|
|
513
|
+
const device = this.devices.get(event.deviceId);
|
|
514
|
+
if (device !== undefined) {
|
|
515
|
+
this.setDevice({
|
|
516
|
+
...device,
|
|
517
|
+
available: event.available,
|
|
518
|
+
availabilityMessage: event.availabilityMessage,
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
return false;
|
|
522
|
+
}
|
|
523
|
+
case homey_event_model_1.HomeyEventType.CAPABILITY_VALUE_CHANGED: {
|
|
524
|
+
return false;
|
|
525
|
+
}
|
|
526
|
+
case homey_event_model_1.HomeyEventType.ZONE_ADDED:
|
|
527
|
+
case homey_event_model_1.HomeyEventType.ZONE_UPDATED:
|
|
528
|
+
case homey_event_model_1.HomeyEventType.ZONE_REMOVED:
|
|
529
|
+
return false;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
isZoneEvent(event) {
|
|
533
|
+
return (event.type === homey_event_model_1.HomeyEventType.ZONE_ADDED ||
|
|
534
|
+
event.type === homey_event_model_1.HomeyEventType.ZONE_UPDATED ||
|
|
535
|
+
event.type === homey_event_model_1.HomeyEventType.ZONE_REMOVED);
|
|
536
|
+
}
|
|
537
|
+
replaceDevices(devices) {
|
|
538
|
+
for (const deviceId of new Set([...this.devices.keys(), ...devices.map((device) => device.id)])) {
|
|
539
|
+
this.deviceInventoryRevisions.set(deviceId, ++this.deviceInventoryRevision);
|
|
540
|
+
}
|
|
541
|
+
this.devices = new Map(devices.map((device) => [device.id, device]));
|
|
542
|
+
}
|
|
543
|
+
setDevice(device) {
|
|
544
|
+
this.devices.set(device.id, device);
|
|
545
|
+
this.deviceInventoryRevisions.set(device.id, ++this.deviceInventoryRevision);
|
|
546
|
+
}
|
|
547
|
+
deleteDevice(deviceId) {
|
|
548
|
+
if (this.devices.delete(deviceId)) {
|
|
549
|
+
this.deviceInventoryRevisions.set(deviceId, ++this.deviceInventoryRevision);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
scheduleReconciliation(generation) {
|
|
553
|
+
this.clearReconciliationTimer();
|
|
554
|
+
const interval = this.pluginConfig?.reconciliationInterval;
|
|
555
|
+
if (!interval || (this.reconnectTimer !== null && this.connectionState !== devices_homey_constants_1.HomeyConnectionState.DEGRADED_POLLING)) {
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
this.reconciliationTimer = setTimeout(() => {
|
|
559
|
+
this.reconciliationTimer = null;
|
|
560
|
+
void this.runPeriodicReconciliation(generation);
|
|
561
|
+
}, interval);
|
|
562
|
+
}
|
|
563
|
+
async runPeriodicReconciliation(generation) {
|
|
564
|
+
const connector = this.connector;
|
|
565
|
+
if (!connector || !this.isCurrentGeneration(connector, generation) || this.state !== 'started') {
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
await this.enqueueSynchronization(async () => {
|
|
569
|
+
try {
|
|
570
|
+
await this.runInventoryReconciliation('periodic', async () => {
|
|
571
|
+
const [zonesResult, devicesResult] = await Promise.allSettled([connector.getZones(), connector.getDevices()]);
|
|
572
|
+
if (zonesResult.status === 'rejected') {
|
|
573
|
+
throw zonesResult.reason;
|
|
574
|
+
}
|
|
575
|
+
if (devicesResult.status === 'rejected') {
|
|
576
|
+
throw devicesResult.reason;
|
|
577
|
+
}
|
|
578
|
+
if (!this.isCurrentGeneration(connector, generation)) {
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
this.zones = zonesResult.value;
|
|
582
|
+
this.replaceDevices(devicesResult.value);
|
|
583
|
+
const result = await this.synchronizer.synchronizeSnapshot(devicesResult.value);
|
|
584
|
+
this.recordSynchronizationResult(result);
|
|
585
|
+
this.recordCapabilityEvidence(result.acceptedCapabilityValues ?? []);
|
|
586
|
+
await this.refreshOperationalDiagnostics(devicesResult.value);
|
|
587
|
+
this.recordSuccessfulInventorySync(connector, generation);
|
|
588
|
+
if (this.unsubscribe) {
|
|
589
|
+
this.markRuntimeHealthy(connector, generation);
|
|
590
|
+
}
|
|
591
|
+
else {
|
|
592
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.DEGRADED_POLLING, 'subscription_unavailable');
|
|
593
|
+
this.healthy = false;
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
catch (error) {
|
|
598
|
+
if (this.isCurrentGeneration(connector, generation)) {
|
|
599
|
+
this.handleRuntimeFailure(error, 'Homey inventory reconciliation failed', generation);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
if (this.isCurrentGeneration(connector, generation) &&
|
|
604
|
+
this.state === 'started' &&
|
|
605
|
+
(this.reconnectTimer === null || this.connectionState === devices_homey_constants_1.HomeyConnectionState.DEGRADED_POLLING)) {
|
|
606
|
+
this.scheduleReconciliation(generation);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
scheduleReconnect(generation, preserveDegradedPolling = false) {
|
|
610
|
+
if (this.reconnectTimer || this.state !== 'started' || this.generation !== generation) {
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
if (!preserveDegradedPolling) {
|
|
614
|
+
this.clearReconciliationTimer();
|
|
615
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.RECONNECTING, 'reconnect_scheduled');
|
|
616
|
+
}
|
|
617
|
+
this.healthy = false;
|
|
618
|
+
const delay = (0, homey_reconnect_backoff_1.calculateHomeyReconnectDelay)(this.reconnectAttempt);
|
|
619
|
+
this.reconnectAttempt += 1;
|
|
620
|
+
this.reconnectTimer = setTimeout(() => {
|
|
621
|
+
this.reconnectTimer = null;
|
|
622
|
+
void this.runReconnect(generation);
|
|
623
|
+
}, delay);
|
|
624
|
+
}
|
|
625
|
+
async runReconnect(expectedGeneration) {
|
|
626
|
+
await this.withLock(async () => {
|
|
627
|
+
if (this.state !== 'started' || this.generation !== expectedGeneration) {
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.RECONNECTING, 'reconnect_started');
|
|
631
|
+
this.healthy = false;
|
|
632
|
+
this.reconnectCount += 1;
|
|
633
|
+
const generation = ++this.generation;
|
|
634
|
+
if (!(await this.cleanupRuntime())) {
|
|
635
|
+
this.lastError = 'Homey connector cleanup failed before reconnect';
|
|
636
|
+
this.lastErrorCategory = null;
|
|
637
|
+
this.scheduleReconnect(generation);
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
try {
|
|
641
|
+
const connector = this.createConnector(this.getPluginConfig());
|
|
642
|
+
this.connector = connector;
|
|
643
|
+
await connector.connect();
|
|
644
|
+
this.recordSuccessfulConnection();
|
|
645
|
+
const subscriptionFailure = await this.synchronizeStartup(connector, generation, 'reconnect');
|
|
646
|
+
if (subscriptionFailure) {
|
|
647
|
+
this.markRuntimeDegraded(subscriptionFailure, generation);
|
|
648
|
+
this.logger.warn('Homey reconnected in degraded polling mode');
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
this.markRuntimeHealthy(connector, generation);
|
|
652
|
+
this.logger.log('Homey connector reconnected and inventory synchronized');
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
catch (error) {
|
|
656
|
+
this.applyFailureState(error, 'Homey service failed to reconnect', devices_homey_constants_1.HomeyConnectionState.RECONNECTING);
|
|
657
|
+
const retryGeneration = ++this.generation;
|
|
658
|
+
await this.cleanupRuntime();
|
|
659
|
+
if (this.isRetryableFailure(error)) {
|
|
660
|
+
this.scheduleReconnect(retryGeneration);
|
|
661
|
+
}
|
|
662
|
+
this.logRateLimitedFailure('reconnect', 'error', this.lastError ?? 'Homey service failed to reconnect', {
|
|
663
|
+
category: this.lastErrorCategory,
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
enqueueSynchronization(operation) {
|
|
669
|
+
const result = this.synchronizationTail.then(async () => {
|
|
670
|
+
await operation();
|
|
671
|
+
});
|
|
672
|
+
this.synchronizationTail = this.settleSynchronization(result);
|
|
673
|
+
return result;
|
|
674
|
+
}
|
|
675
|
+
enqueueCapabilityCommand(key, operation) {
|
|
676
|
+
const previous = this.commandTails.get(key) ?? Promise.resolve();
|
|
677
|
+
let retainedWrite = Promise.resolve();
|
|
678
|
+
const result = this.waitForCommandTail(previous, devices_homey_constants_1.HOMEY_COMMAND_WRITE_TIMEOUT_MS).then((ready) => {
|
|
679
|
+
if (!ready) {
|
|
680
|
+
return false;
|
|
681
|
+
}
|
|
682
|
+
return operation((write) => {
|
|
683
|
+
retainedWrite = write.then(() => undefined, () => undefined);
|
|
684
|
+
});
|
|
685
|
+
});
|
|
686
|
+
const retainBarrier = () => result.then(() => retainedWrite, () => retainedWrite);
|
|
687
|
+
const tail = previous.then(retainBarrier, retainBarrier);
|
|
688
|
+
this.commandTails.set(key, tail);
|
|
689
|
+
void tail.then(() => {
|
|
690
|
+
if (this.commandTails.get(key) === tail) {
|
|
691
|
+
this.commandTails.delete(key);
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
return result;
|
|
695
|
+
}
|
|
696
|
+
waitForCommandTail(tail, timeoutMs) {
|
|
697
|
+
return new Promise((resolve) => {
|
|
698
|
+
let settled = false;
|
|
699
|
+
const complete = (ready) => {
|
|
700
|
+
if (settled) {
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
settled = true;
|
|
704
|
+
clearTimeout(timer);
|
|
705
|
+
this.commandCancellationListeners.delete(cancel);
|
|
706
|
+
resolve(ready);
|
|
707
|
+
};
|
|
708
|
+
const cancel = () => complete(false);
|
|
709
|
+
const timer = setTimeout(() => complete(false), timeoutMs);
|
|
710
|
+
this.commandCancellationListeners.add(cancel);
|
|
711
|
+
void tail.then(() => complete(true), () => complete(true));
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
async executeSerializedCapabilityCommand(key, deviceId, capabilityId, value, expectedGeneration, retainWrite) {
|
|
715
|
+
if (this.generation !== expectedGeneration) {
|
|
716
|
+
return false;
|
|
717
|
+
}
|
|
718
|
+
const connector = this.connector;
|
|
719
|
+
const generation = expectedGeneration;
|
|
720
|
+
if (connector === null ||
|
|
721
|
+
this.state !== 'started' ||
|
|
722
|
+
(this.connectionState !== devices_homey_constants_1.HomeyConnectionState.CONNECTED &&
|
|
723
|
+
this.connectionState !== devices_homey_constants_1.HomeyConnectionState.DEGRADED_POLLING)) {
|
|
724
|
+
return false;
|
|
725
|
+
}
|
|
726
|
+
const commandRevision = ++this.capabilityCommandRevision;
|
|
727
|
+
this.capabilityCommandRevisions.set(key, commandRevision);
|
|
728
|
+
let resolveConfirmation = (_confirmed) => undefined;
|
|
729
|
+
const confirmation = new Promise((resolve) => {
|
|
730
|
+
resolveConfirmation = resolve;
|
|
731
|
+
});
|
|
732
|
+
const pending = {
|
|
733
|
+
generation,
|
|
734
|
+
observationRevision: this.capabilityObservationRevisions.get(key) ?? 0,
|
|
735
|
+
value,
|
|
736
|
+
resolve: resolveConfirmation,
|
|
737
|
+
};
|
|
738
|
+
this.pendingCommandConfirmations.set(key, pending);
|
|
739
|
+
try {
|
|
740
|
+
const writeOperation = connector.setCapabilityValue(deviceId, capabilityId, value);
|
|
741
|
+
retainWrite(writeOperation);
|
|
742
|
+
const write = await this.settleWithin(writeOperation, devices_homey_constants_1.HOMEY_COMMAND_WRITE_TIMEOUT_MS);
|
|
743
|
+
if (write.status !== 'fulfilled' || !this.isCurrentGeneration(connector, generation)) {
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
const confirmed = await this.settleWithin(confirmation, devices_homey_constants_1.HOMEY_COMMAND_CONFIRMATION_TIMEOUT_MS);
|
|
747
|
+
if (confirmed.status === 'fulfilled') {
|
|
748
|
+
return confirmed.value;
|
|
749
|
+
}
|
|
750
|
+
if (confirmed.status === 'cancelled' || !this.isCurrentGeneration(connector, generation)) {
|
|
751
|
+
return false;
|
|
752
|
+
}
|
|
753
|
+
this.removePendingCommandConfirmation(key, pending);
|
|
754
|
+
const observedRevision = this.capabilityObservationRevisions.get(key) ?? 0;
|
|
755
|
+
const inventoryRevision = this.deviceInventoryRevisions.get(deviceId) ?? 0;
|
|
756
|
+
const acceptedRevision = this.acceptedCapabilityStates.get(key)?.revision ?? 0;
|
|
757
|
+
const readback = await this.settleWithin(connector.getDevice(deviceId), devices_homey_constants_1.HOMEY_COMMAND_WRITE_TIMEOUT_MS);
|
|
758
|
+
if (readback.status !== 'fulfilled' ||
|
|
759
|
+
readback.value === null ||
|
|
760
|
+
!readback.value.available ||
|
|
761
|
+
!this.isCurrentGeneration(connector, generation)) {
|
|
762
|
+
return false;
|
|
763
|
+
}
|
|
764
|
+
const capability = readback.value.capabilities.find((candidate) => candidate.id === capabilityId);
|
|
765
|
+
if (capability === undefined || !(0, homey_command_value_1.homeyCapabilityValuesEqual)(capability.value, value)) {
|
|
766
|
+
return false;
|
|
767
|
+
}
|
|
768
|
+
const confirmedDevice = readback.value;
|
|
769
|
+
const readbackEvent = {
|
|
770
|
+
type: homey_event_model_1.HomeyEventType.CAPABILITY_VALUE_CHANGED,
|
|
771
|
+
deviceId,
|
|
772
|
+
capabilityId,
|
|
773
|
+
value: capability.value,
|
|
774
|
+
lastUpdatedAt: capability.lastUpdatedAt,
|
|
775
|
+
occurredAt: null,
|
|
776
|
+
sequence: null,
|
|
777
|
+
};
|
|
778
|
+
let readbackAccepted = false;
|
|
779
|
+
const synchronization = this.enqueueSynchronization(async () => {
|
|
780
|
+
if (!this.isCurrentGeneration(connector, generation) ||
|
|
781
|
+
this.capabilityCommandRevisions.get(key) !== commandRevision) {
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
const currentDevice = this.devices.get(deviceId);
|
|
785
|
+
if (currentDevice === undefined || !currentDevice.available) {
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
const hasReadableCapabilityBinding = await this.synchronizer.hasReadableCapabilityBinding(deviceId, capabilityId);
|
|
789
|
+
if (!hasReadableCapabilityBinding && (this.deviceInventoryRevisions.get(deviceId) ?? 0) !== inventoryRevision) {
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
const currentAcceptedState = this.acceptedCapabilityStates.get(key);
|
|
793
|
+
const observationChanged = (this.capabilityObservationRevisions.get(key) ?? 0) !== observedRevision;
|
|
794
|
+
const acceptanceChanged = (currentAcceptedState?.revision ?? 0) !== acceptedRevision;
|
|
795
|
+
if (observationChanged || acceptanceChanged) {
|
|
796
|
+
readbackAccepted =
|
|
797
|
+
acceptanceChanged &&
|
|
798
|
+
currentAcceptedState !== undefined &&
|
|
799
|
+
(0, homey_command_value_1.homeyCapabilityValuesEqual)(currentAcceptedState.value, value);
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
if (currentAcceptedState !== undefined && (0, homey_command_value_1.homeyCapabilityValuesEqual)(currentAcceptedState.value, value)) {
|
|
803
|
+
readbackAccepted = true;
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
if (!hasReadableCapabilityBinding) {
|
|
807
|
+
readbackAccepted = true;
|
|
808
|
+
this.recordAcceptedCapabilityEvents([readbackEvent], generation);
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
const result = await this.synchronizer.synchronizeEvents([readbackEvent], new Map([[confirmedDevice.id, confirmedDevice]]));
|
|
812
|
+
this.recordSynchronizationResult(result);
|
|
813
|
+
readbackAccepted = result.acceptedEvents.includes(readbackEvent);
|
|
814
|
+
if (readbackAccepted) {
|
|
815
|
+
this.recordAcceptedCapabilityEvents(result.acceptedEvents, generation);
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
const synchronized = await this.settleWithin(synchronization, devices_homey_constants_1.HOMEY_COMMAND_WRITE_TIMEOUT_MS);
|
|
819
|
+
if (synchronized.status !== 'fulfilled') {
|
|
820
|
+
return false;
|
|
821
|
+
}
|
|
822
|
+
return readbackAccepted && this.isCurrentGeneration(connector, generation);
|
|
823
|
+
}
|
|
824
|
+
finally {
|
|
825
|
+
this.removePendingCommandConfirmation(key, pending);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
settleWithin(operation, timeoutMs) {
|
|
829
|
+
return new Promise((resolve) => {
|
|
830
|
+
let settled = false;
|
|
831
|
+
const complete = (result) => {
|
|
832
|
+
if (settled) {
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
settled = true;
|
|
836
|
+
clearTimeout(timer);
|
|
837
|
+
this.commandCancellationListeners.delete(cancel);
|
|
838
|
+
resolve(result);
|
|
839
|
+
};
|
|
840
|
+
const cancel = () => complete({ status: 'cancelled' });
|
|
841
|
+
const timer = setTimeout(() => complete({ status: 'timed_out' }), timeoutMs);
|
|
842
|
+
this.commandCancellationListeners.add(cancel);
|
|
843
|
+
void operation.then((value) => complete({ status: 'fulfilled', value }), () => complete({ status: 'rejected' }));
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
recordAcceptedCapabilityEvents(events, generation) {
|
|
847
|
+
for (const event of events) {
|
|
848
|
+
if (event.type !== homey_event_model_1.HomeyEventType.CAPABILITY_VALUE_CHANGED) {
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
const key = this.commandKey(event.deviceId, event.capabilityId);
|
|
852
|
+
const device = this.devices.get(event.deviceId);
|
|
853
|
+
if (device !== undefined) {
|
|
854
|
+
this.setDevice({
|
|
855
|
+
...device,
|
|
856
|
+
capabilities: device.capabilities.map((capability) => capability.id === event.capabilityId
|
|
857
|
+
? { ...capability, value: event.value, lastUpdatedAt: event.lastUpdatedAt }
|
|
858
|
+
: capability),
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
this.acceptedCapabilityStates.set(key, {
|
|
862
|
+
revision: ++this.acceptedCapabilityRevision,
|
|
863
|
+
value: event.value,
|
|
864
|
+
});
|
|
865
|
+
const pending = this.pendingCommandConfirmations.get(key);
|
|
866
|
+
const observationRevision = event[HOMEY_EVENT_OBSERVATION_REVISION] ?? 0;
|
|
867
|
+
if (pending !== undefined &&
|
|
868
|
+
pending.generation === generation &&
|
|
869
|
+
observationRevision > pending.observationRevision &&
|
|
870
|
+
(0, homey_command_value_1.homeyCapabilityValuesEqual)(pending.value, event.value)) {
|
|
871
|
+
this.pendingCommandConfirmations.delete(key);
|
|
872
|
+
pending.resolve(true);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
recordCapabilityEvidence(values) {
|
|
877
|
+
for (const value of values) {
|
|
878
|
+
this.acceptedCapabilityStates.set(this.commandKey(value.deviceId, value.capabilityId), {
|
|
879
|
+
revision: ++this.acceptedCapabilityRevision,
|
|
880
|
+
value: value.value,
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
removePendingCommandConfirmation(key, pending) {
|
|
885
|
+
if (this.pendingCommandConfirmations.get(key) === pending) {
|
|
886
|
+
this.pendingCommandConfirmations.delete(key);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
cancelCommandOperations() {
|
|
890
|
+
for (const pending of this.pendingCommandConfirmations.values()) {
|
|
891
|
+
pending.resolve(false);
|
|
892
|
+
}
|
|
893
|
+
this.pendingCommandConfirmations.clear();
|
|
894
|
+
for (const cancel of [...this.commandCancellationListeners]) {
|
|
895
|
+
cancel();
|
|
896
|
+
}
|
|
897
|
+
this.commandCancellationListeners.clear();
|
|
898
|
+
}
|
|
899
|
+
commandKey(deviceId, capabilityId) {
|
|
900
|
+
return `${deviceId}\u0000${capabilityId}`;
|
|
901
|
+
}
|
|
902
|
+
async settleSynchronization(operation) {
|
|
903
|
+
try {
|
|
904
|
+
await operation;
|
|
905
|
+
}
|
|
906
|
+
catch {
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
async cleanupPreviousGeneration() {
|
|
910
|
+
if (!this.hasRuntimeResources()) {
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
this.generation += 1;
|
|
914
|
+
if (!(await this.cleanupRuntime())) {
|
|
915
|
+
throw new Error('Homey service could not clean up its previous connector');
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
async cleanupRuntime() {
|
|
919
|
+
this.clearReconciliationTimer();
|
|
920
|
+
this.clearReconnectTimer();
|
|
921
|
+
this.clearLiveEventFlush();
|
|
922
|
+
this.startupEvents = null;
|
|
923
|
+
this.cancelCommandOperations();
|
|
924
|
+
const unsubscribe = this.unsubscribe;
|
|
925
|
+
const connector = this.connector;
|
|
926
|
+
let unsubscribeSucceeded = true;
|
|
927
|
+
let disconnectSucceeded = connector === null;
|
|
928
|
+
if (unsubscribe) {
|
|
929
|
+
try {
|
|
930
|
+
await unsubscribe();
|
|
931
|
+
this.unsubscribe = null;
|
|
932
|
+
}
|
|
933
|
+
catch {
|
|
934
|
+
unsubscribeSucceeded = false;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
await this.synchronizationTail;
|
|
938
|
+
this.synchronizer.reset();
|
|
939
|
+
this.capabilityCommandRevisions.clear();
|
|
940
|
+
this.capabilityObservationRevisions.clear();
|
|
941
|
+
this.deviceInventoryRevisions.clear();
|
|
942
|
+
this.acceptedCapabilityStates.clear();
|
|
943
|
+
if (connector) {
|
|
944
|
+
try {
|
|
945
|
+
await connector.disconnect();
|
|
946
|
+
disconnectSucceeded = true;
|
|
947
|
+
}
|
|
948
|
+
catch {
|
|
949
|
+
disconnectSucceeded = false;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
if (disconnectSucceeded && (unsubscribeSucceeded || connector !== null)) {
|
|
953
|
+
this.unsubscribe = null;
|
|
954
|
+
this.connector = null;
|
|
955
|
+
this.systemInfo = null;
|
|
956
|
+
this.zones = [];
|
|
957
|
+
this.devices.clear();
|
|
958
|
+
}
|
|
959
|
+
return disconnectSucceeded && (unsubscribeSucceeded || connector !== null);
|
|
960
|
+
}
|
|
961
|
+
clearReconciliationTimer() {
|
|
962
|
+
if (this.reconciliationTimer) {
|
|
963
|
+
clearTimeout(this.reconciliationTimer);
|
|
964
|
+
this.reconciliationTimer = null;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
clearReconnectTimer() {
|
|
968
|
+
if (this.reconnectTimer) {
|
|
969
|
+
clearTimeout(this.reconnectTimer);
|
|
970
|
+
this.reconnectTimer = null;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
clearLiveEventFlush() {
|
|
974
|
+
if (this.liveEventFlush !== null) {
|
|
975
|
+
clearImmediate(this.liveEventFlush);
|
|
976
|
+
this.liveEventFlush = null;
|
|
977
|
+
}
|
|
978
|
+
this.liveEvents = [];
|
|
979
|
+
}
|
|
980
|
+
hasRuntimeResources() {
|
|
981
|
+
return (this.connector !== null ||
|
|
982
|
+
this.unsubscribe !== null ||
|
|
983
|
+
this.reconciliationTimer !== null ||
|
|
984
|
+
this.reconnectTimer !== null ||
|
|
985
|
+
this.liveEventFlush !== null);
|
|
986
|
+
}
|
|
987
|
+
recordSynchronizationResult(result) {
|
|
988
|
+
if (result.failed > 0) {
|
|
989
|
+
this.logRateLimitedFailure('synchronization-result', 'warn', 'Homey synchronization completed with isolated property failures', {
|
|
990
|
+
failed: result.failed,
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
recordOperationalDiagnostics(diagnostics) {
|
|
995
|
+
this.operationalDiagnostics = diagnostics;
|
|
996
|
+
}
|
|
997
|
+
async refreshOperationalDiagnostics(devices) {
|
|
998
|
+
const diagnostics = await this.synchronizer.getOperationalDiagnostics(devices);
|
|
999
|
+
const upstreamIds = new Set(devices.map((device) => device.id));
|
|
1000
|
+
this.operationalInventoryDeviceIds = upstreamIds;
|
|
1001
|
+
const adoptedDevices = new Map(diagnostics.adoptedDevices.map((adopted) => [adopted.panelDeviceId, adopted.homeyDeviceId]));
|
|
1002
|
+
for (const [panelDeviceId, homeyDeviceId] of this.operationalAdoptedDeviceOverrides) {
|
|
1003
|
+
if (homeyDeviceId === null) {
|
|
1004
|
+
adoptedDevices.delete(panelDeviceId);
|
|
1005
|
+
}
|
|
1006
|
+
else {
|
|
1007
|
+
adoptedDevices.set(panelDeviceId, homeyDeviceId);
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
const adopted = [...adoptedDevices].map(([panelDeviceId, homeyDeviceId]) => ({ panelDeviceId, homeyDeviceId }));
|
|
1011
|
+
this.recordOperationalDiagnostics({
|
|
1012
|
+
...diagnostics,
|
|
1013
|
+
adopted: adopted.length,
|
|
1014
|
+
adoptedDevices: adopted,
|
|
1015
|
+
missing: adopted.filter((device) => !upstreamIds.has(device.homeyDeviceId)).length,
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
recordLocalAdoptedDiagnostics(adoptedDevices) {
|
|
1019
|
+
const adopted = [...adoptedDevices].map(([panelDeviceId, homeyDeviceId]) => ({ panelDeviceId, homeyDeviceId }));
|
|
1020
|
+
this.operationalDiagnostics = {
|
|
1021
|
+
...this.operationalDiagnostics,
|
|
1022
|
+
adopted: adopted.length,
|
|
1023
|
+
adoptedDevices: adopted,
|
|
1024
|
+
missing: adopted.filter((device) => !this.operationalInventoryDeviceIds.has(device.homeyDeviceId)).length,
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
async runInventoryReconciliation(source, operation) {
|
|
1028
|
+
const startedAt = Date.now();
|
|
1029
|
+
this.reconciliationCount += 1;
|
|
1030
|
+
try {
|
|
1031
|
+
await operation();
|
|
1032
|
+
this.lastReconciliationDurationMs = Math.max(0, Date.now() - startedAt);
|
|
1033
|
+
this.logger.log('Homey inventory reconciliation completed', {
|
|
1034
|
+
adopted: this.operationalDiagnostics.adopted,
|
|
1035
|
+
count: this.reconciliationCount,
|
|
1036
|
+
deviceCount: this.devices.size,
|
|
1037
|
+
durationMs: this.lastReconciliationDurationMs,
|
|
1038
|
+
failureCount: this.reconciliationFailureCount,
|
|
1039
|
+
missing: this.operationalDiagnostics.missing,
|
|
1040
|
+
source,
|
|
1041
|
+
unavailable: this.operationalDiagnostics.unavailable,
|
|
1042
|
+
unsupported: this.operationalDiagnostics.unsupported,
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
catch (error) {
|
|
1046
|
+
this.reconciliationFailureCount += 1;
|
|
1047
|
+
this.lastReconciliationDurationMs = Math.max(0, Date.now() - startedAt);
|
|
1048
|
+
this.logRateLimitedFailure('reconciliation', 'warn', 'Homey inventory reconciliation attempt failed', {
|
|
1049
|
+
count: this.reconciliationCount,
|
|
1050
|
+
durationMs: this.lastReconciliationDurationMs,
|
|
1051
|
+
failureCount: this.reconciliationFailureCount,
|
|
1052
|
+
source,
|
|
1053
|
+
});
|
|
1054
|
+
throw error;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
isCurrentGeneration(connector, generation) {
|
|
1058
|
+
return this.connector === connector && this.generation === generation;
|
|
1059
|
+
}
|
|
1060
|
+
applyFailureState(error, fallback, transientState = devices_homey_constants_1.HomeyConnectionState.ERROR) {
|
|
1061
|
+
this.healthy = false;
|
|
1062
|
+
this.lastErrorCategory = error instanceof homey_connector_error_1.HomeyConnectorError ? error.category : null;
|
|
1063
|
+
if (error instanceof homey_connector_error_1.HomeyConnectorError) {
|
|
1064
|
+
switch (error.category) {
|
|
1065
|
+
case homey_connector_error_1.HomeyConnectorErrorCategory.AUTHENTICATION:
|
|
1066
|
+
case homey_connector_error_1.HomeyConnectorErrorCategory.AUTHORIZATION:
|
|
1067
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.AUTHENTICATION_FAILED, 'authentication_failed');
|
|
1068
|
+
this.lastError = 'Homey authentication or authorization failed';
|
|
1069
|
+
this.logRateLimitedFailure('authentication', 'warn', 'Homey reconnect retries suspended until configuration changes', { category: error.category });
|
|
1070
|
+
return;
|
|
1071
|
+
case homey_connector_error_1.HomeyConnectorErrorCategory.TIMEOUT:
|
|
1072
|
+
case homey_connector_error_1.HomeyConnectorErrorCategory.UNAVAILABLE:
|
|
1073
|
+
this.transitionConnectionState(transientState, 'transient_failure');
|
|
1074
|
+
this.lastError = 'Homey connection is temporarily unavailable';
|
|
1075
|
+
return;
|
|
1076
|
+
default:
|
|
1077
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.ERROR, 'connector_failure');
|
|
1078
|
+
this.lastError = fallback;
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.ERROR, 'unexpected_failure');
|
|
1083
|
+
this.lastError = fallback;
|
|
1084
|
+
}
|
|
1085
|
+
markRuntimeHealthy(connector, generation) {
|
|
1086
|
+
if (!this.isCurrentGeneration(connector, generation)) {
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
const recovered = this.connectionState !== devices_homey_constants_1.HomeyConnectionState.CONNECTED;
|
|
1090
|
+
this.clearReconnectTimer();
|
|
1091
|
+
this.reconnectAttempt = 0;
|
|
1092
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.CONNECTED, 'runtime_healthy');
|
|
1093
|
+
this.healthy = true;
|
|
1094
|
+
this.lastError = null;
|
|
1095
|
+
this.lastErrorCategory = null;
|
|
1096
|
+
if (recovered && this.state === 'started') {
|
|
1097
|
+
this.scheduleReconciliation(generation);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
isRetryableFailure(error) {
|
|
1101
|
+
return error instanceof homey_connector_error_1.HomeyConnectorError && error.retryable;
|
|
1102
|
+
}
|
|
1103
|
+
isDegradableSubscriptionFailure(error) {
|
|
1104
|
+
return (error instanceof homey_connector_error_1.HomeyConnectorError &&
|
|
1105
|
+
error.category !== homey_connector_error_1.HomeyConnectorErrorCategory.AUTHENTICATION &&
|
|
1106
|
+
error.category !== homey_connector_error_1.HomeyConnectorErrorCategory.AUTHORIZATION &&
|
|
1107
|
+
error.category !== homey_connector_error_1.HomeyConnectorErrorCategory.VALIDATION);
|
|
1108
|
+
}
|
|
1109
|
+
markRuntimeDegraded(error, generation) {
|
|
1110
|
+
this.transitionConnectionState(devices_homey_constants_1.HomeyConnectionState.DEGRADED_POLLING, 'subscription_unavailable');
|
|
1111
|
+
this.healthy = false;
|
|
1112
|
+
this.lastErrorCategory = error.category;
|
|
1113
|
+
this.lastError = error.retryable
|
|
1114
|
+
? 'Homey event subscription is temporarily unavailable; polling is active'
|
|
1115
|
+
: 'Homey event subscription is unavailable; polling is active';
|
|
1116
|
+
this.scheduleReconciliation(generation);
|
|
1117
|
+
if (error.retryable) {
|
|
1118
|
+
this.scheduleReconnect(generation, true);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
handleRuntimeFailure(error, fallback, generation) {
|
|
1122
|
+
this.applyFailureState(error, fallback, devices_homey_constants_1.HomeyConnectionState.RECONNECTING);
|
|
1123
|
+
if (this.isRetryableFailure(error)) {
|
|
1124
|
+
this.scheduleReconnect(generation);
|
|
1125
|
+
}
|
|
1126
|
+
else {
|
|
1127
|
+
this.clearReconciliationTimer();
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
resetReconnectState() {
|
|
1131
|
+
this.clearReconnectTimer();
|
|
1132
|
+
this.reconnectAttempt = 0;
|
|
1133
|
+
}
|
|
1134
|
+
resetRuntimeHealth() {
|
|
1135
|
+
this.failureLogLimiter.reset();
|
|
1136
|
+
this.lastSystemInfo = null;
|
|
1137
|
+
this.lastConnectedAt = null;
|
|
1138
|
+
this.lastInventorySyncAt = null;
|
|
1139
|
+
this.lastEventAt = null;
|
|
1140
|
+
this.lastErrorCategory = null;
|
|
1141
|
+
this.reconnectCount = 0;
|
|
1142
|
+
this.reconciliationCount = 0;
|
|
1143
|
+
this.reconciliationFailureCount = 0;
|
|
1144
|
+
this.lastReconciliationDurationMs = null;
|
|
1145
|
+
this.operationalDiagnostics = { adopted: 0, adoptedDevices: [], missing: 0, unsupported: 0, unavailable: 0 };
|
|
1146
|
+
this.operationalInventoryDeviceIds.clear();
|
|
1147
|
+
this.operationalAdoptedDeviceOverrides.clear();
|
|
1148
|
+
}
|
|
1149
|
+
recordSuccessfulConnection() {
|
|
1150
|
+
this.lastConnectedAt = this.now();
|
|
1151
|
+
}
|
|
1152
|
+
recordSuccessfulInventorySync(connector, generation) {
|
|
1153
|
+
if (this.isCurrentGeneration(connector, generation)) {
|
|
1154
|
+
this.lastInventorySyncAt = this.now();
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
now() {
|
|
1158
|
+
return new Date().toISOString();
|
|
1159
|
+
}
|
|
1160
|
+
calculateLastEventAgeMs() {
|
|
1161
|
+
if (this.lastEventAt === null) {
|
|
1162
|
+
return null;
|
|
1163
|
+
}
|
|
1164
|
+
return Math.max(0, Date.now() - new Date(this.lastEventAt).getTime());
|
|
1165
|
+
}
|
|
1166
|
+
transitionConnectionState(next, reason) {
|
|
1167
|
+
const previous = this.connectionState;
|
|
1168
|
+
if (previous === next) {
|
|
1169
|
+
return;
|
|
1170
|
+
}
|
|
1171
|
+
this.connectionState = next;
|
|
1172
|
+
this.logger.log('Homey connection state changed', { from: previous, reason, to: next });
|
|
1173
|
+
}
|
|
1174
|
+
logRateLimitedFailure(key, level, message, context) {
|
|
1175
|
+
const decision = this.failureLogLimiter.consume(key);
|
|
1176
|
+
if (decision.log) {
|
|
1177
|
+
this.logger[level](message, { ...context, suppressed: decision.suppressed });
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
getCurrentPluginConfigOrDefault() {
|
|
1181
|
+
try {
|
|
1182
|
+
return this.configService.getPluginConfig(devices_homey_constants_1.DEVICES_HOMEY_PLUGIN_NAME);
|
|
1183
|
+
}
|
|
1184
|
+
catch {
|
|
1185
|
+
return new config_model_1.HomeyConfigModel();
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
isConfigured(config) {
|
|
1189
|
+
return (typeof config.url === 'string' &&
|
|
1190
|
+
config.url.trim().length > 0 &&
|
|
1191
|
+
typeof config.apiKey === 'string' &&
|
|
1192
|
+
config.apiKey.trim().length > 0);
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
exports.HomeyService = HomeyService;
|
|
1196
|
+
__decorate([
|
|
1197
|
+
(0, event_emitter_1.OnEvent)(devices_constants_1.EventType.DEVICE_CREATED),
|
|
1198
|
+
(0, event_emitter_1.OnEvent)(devices_constants_1.EventType.DEVICE_UPDATED),
|
|
1199
|
+
__metadata("design:type", Function),
|
|
1200
|
+
__metadata("design:paramtypes", [devices_entity_1.DeviceEntity]),
|
|
1201
|
+
__metadata("design:returntype", void 0)
|
|
1202
|
+
], HomeyService.prototype, "onAdoptedDeviceUpserted", null);
|
|
1203
|
+
__decorate([
|
|
1204
|
+
(0, event_emitter_1.OnEvent)(devices_constants_1.EventType.DEVICE_DELETED),
|
|
1205
|
+
__metadata("design:type", Function),
|
|
1206
|
+
__metadata("design:paramtypes", [devices_entity_1.DeviceEntity]),
|
|
1207
|
+
__metadata("design:returntype", void 0)
|
|
1208
|
+
], HomeyService.prototype, "onAdoptedDeviceDeleted", null);
|
|
1209
|
+
exports.HomeyService = HomeyService = __decorate([
|
|
1210
|
+
(0, common_1.Injectable)(),
|
|
1211
|
+
__param(2, (0, common_1.Optional)()),
|
|
1212
|
+
__param(2, (0, common_1.Inject)(devices_homey_constants_1.HOMEY_CONNECTOR_FACTORY)),
|
|
1213
|
+
__metadata("design:paramtypes", [config_service_1.ConfigService,
|
|
1214
|
+
homey_synchronizer_service_1.HomeySynchronizerService, Object])
|
|
1215
|
+
], HomeyService);
|
|
1216
|
+
//# sourceMappingURL=homey.service.js.map
|