@camstack/addon-static-turn 1.1.6 → 1.1.8

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.
@@ -4628,7 +4628,7 @@ function _instanceof(cls, params = {}) {
4628
4628
  return inst;
4629
4629
  }
4630
4630
  //#endregion
4631
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4631
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4632
4632
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4633
4633
  EventCategory["SystemBoot"] = "system.boot";
4634
4634
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6428,6 +6428,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6428
6428
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6429
6429
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6430
6430
  DeviceRole["PressureSensor"] = "pressure-sensor";
6431
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6432
+ DeviceRole["WindSensor"] = "wind-sensor";
6433
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6434
+ DeviceRole["RainSensor"] = "rain-sensor";
6435
+ /** UV index (weather-station `uv-sensor` cap). */
6436
+ DeviceRole["UvSensor"] = "uv-sensor";
6437
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6438
+ * Distinct from AmbientLightSensor (lux). */
6439
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6440
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6441
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6431
6442
  DeviceRole["PowerSensor"] = "power-sensor";
6432
6443
  DeviceRole["EnergySensor"] = "energy-sensor";
6433
6444
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8946,18 +8957,47 @@ object({
8946
8957
  lastUpdated: number().nullable()
8947
8958
  });
8948
8959
  DeviceType.Image;
8960
+ /**
8961
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8962
+ * with a mowing lifecycle plus a dock action.
8963
+ *
8964
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8965
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8966
+ * nullable — some mowers don't report a battery percentage.
8967
+ *
8968
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8969
+ * `dock` sends the mower back to its charging station.
8970
+ */
8971
+ var LawnMowerActivitySchema = _enum([
8972
+ "idle",
8973
+ "mowing",
8974
+ "paused",
8975
+ "docked",
8976
+ "error"
8977
+ ]);
8978
+ /** Severity of the current device/error code — info (status), warning, error. */
8979
+ var DeviceCodeSeveritySchema = _enum([
8980
+ "info",
8981
+ "warning",
8982
+ "error"
8983
+ ]);
8949
8984
  object({
8950
8985
  /** Lifecycle activity of the mower. */
8951
- activity: _enum([
8952
- "idle",
8953
- "mowing",
8954
- "paused",
8955
- "docked",
8956
- "error"
8957
- ]),
8986
+ activity: LawnMowerActivitySchema,
8958
8987
  /** 0..100 battery percentage. Null when the device has no battery
8959
8988
  * reading. */
8960
8989
  batteryLevel: number().min(0).max(100).nullable(),
8990
+ /** 0..100 mowing-completion percentage of the current task, or null when no
8991
+ * task is active / progress is unavailable. */
8992
+ progressPercent: number().min(0).max(100).nullable(),
8993
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
8994
+ * or null when unknown. */
8995
+ currentCode: number().nullable(),
8996
+ /** Human label for {@link currentCode}, or null when undecodable. */
8997
+ currentCodeLabel: string().nullable(),
8998
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
8999
+ * attention; `info` is normal status. */
9000
+ severity: DeviceCodeSeveritySchema,
8961
9001
  /** Ms epoch when the slice was last updated. */
8962
9002
  lastChangedAt: number()
8963
9003
  });
@@ -10532,6 +10572,7 @@ var VacuumStateSchema = _enum([
10532
10572
  "paused",
10533
10573
  "returning",
10534
10574
  "docked",
10575
+ "drying",
10535
10576
  "error"
10536
10577
  ]);
10537
10578
  /**
@@ -10570,6 +10611,12 @@ object({
10570
10611
  detergent: TankStatusSchema.nullable(),
10571
10612
  /** Dust bin. Null when the hardware has no dust bin. */
10572
10613
  dustBin: TankStatusSchema.nullable(),
10614
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10615
+ progressPercent: number().min(0).max(100).nullable(),
10616
+ /** Current error code (0 / null = no error). */
10617
+ errorCode: number().nullable(),
10618
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10619
+ errorLabel: string().nullable(),
10573
10620
  /** Ms epoch when the slice was last updated. */
10574
10621
  lastChangedAt: number()
10575
10622
  });
@@ -12011,17 +12058,32 @@ var ReleaseInputSchema = object({
12011
12058
  * the parent cascades into every accessory. */
12012
12059
  camDeviceId: number().int().nonnegative()
12013
12060
  });
12014
- var ResyncInputSchema = object({
12015
- /** Parent CamStack device id of an adopted device. The provider resolves its
12016
- * source (integration/broker + native id) and re-aligns the device's
12017
- * structural spec (type/role/capabilities/units) with the live mapping,
12018
- * rebuilding any child whose class changed while preserving operator edits. */
12019
- camDeviceId: number().int().nonnegative() });
12061
+ var ResyncInputSchema = object({
12062
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12063
+ * source (integration/broker + native id) and re-aligns the device's
12064
+ * structural spec (type/role/capabilities/units) with the live mapping,
12065
+ * rebuilding any child whose class changed while preserving operator edits. */
12066
+ camDeviceId: number().int().nonnegative(),
12067
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12068
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12069
+ * children are rebuilt fresh from source — correct names, coords, and units —
12070
+ * instead of being preserved by the incremental reconcile. Use to recover from
12071
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12072
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12073
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12074
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12075
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12076
+ * re-sync that preserves children. */
12077
+ resetToSource: boolean().optional()
12078
+ });
12020
12079
  var ResyncResultSchema = object({
12021
12080
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12022
12081
  changed: boolean(),
12023
12082
  /** Number of child devices rebuilt into a new class by this re-sync. */
12024
- rebuiltChildren: number().int().nonnegative()
12083
+ rebuiltChildren: number().int().nonnegative(),
12084
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12085
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12086
+ removedChildren: number().int().nonnegative().optional()
12025
12087
  });
12026
12088
  method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
12027
12089
  kind: "mutation",
@@ -13720,6 +13782,11 @@ var DeviceMetaSchema = object({
13720
13782
  addonId: string(),
13721
13783
  type: string(),
13722
13784
  name: string(),
13785
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13786
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13787
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13788
+ * `DeviceMeta.userNamed`. */
13789
+ userNamed: boolean().optional(),
13723
13790
  location: string().nullable(),
13724
13791
  disabled: boolean(),
13725
13792
  parentDeviceId: number().nullable(),
@@ -14030,6 +14097,9 @@ method(object({
14030
14097
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14031
14098
  kind: "mutation",
14032
14099
  auth: "admin"
14100
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14101
+ kind: "mutation",
14102
+ auth: "admin"
14033
14103
  }), method(object({
14034
14104
  deviceId: number(),
14035
14105
  key: string(),
@@ -17815,6 +17885,12 @@ Object.freeze({
17815
17885
  addonId: null,
17816
17886
  access: "create"
17817
17887
  },
17888
+ "deviceManager.adoptionResync": {
17889
+ capName: "device-manager",
17890
+ capScope: "system",
17891
+ addonId: null,
17892
+ access: "create"
17893
+ },
17818
17894
  "deviceManager.allocateDeviceId": {
17819
17895
  capName: "device-manager",
17820
17896
  capScope: "system",
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
4627
4627
  return inst;
4628
4628
  }
4629
4629
  //#endregion
4630
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4630
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4631
4631
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4632
4632
  EventCategory["SystemBoot"] = "system.boot";
4633
4633
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6427,6 +6427,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6427
6427
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6428
6428
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6429
6429
  DeviceRole["PressureSensor"] = "pressure-sensor";
6430
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6431
+ DeviceRole["WindSensor"] = "wind-sensor";
6432
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6433
+ DeviceRole["RainSensor"] = "rain-sensor";
6434
+ /** UV index (weather-station `uv-sensor` cap). */
6435
+ DeviceRole["UvSensor"] = "uv-sensor";
6436
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6437
+ * Distinct from AmbientLightSensor (lux). */
6438
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6439
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6440
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6430
6441
  DeviceRole["PowerSensor"] = "power-sensor";
6431
6442
  DeviceRole["EnergySensor"] = "energy-sensor";
6432
6443
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8945,18 +8956,47 @@ object({
8945
8956
  lastUpdated: number().nullable()
8946
8957
  });
8947
8958
  DeviceType.Image;
8959
+ /**
8960
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8961
+ * with a mowing lifecycle plus a dock action.
8962
+ *
8963
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8964
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8965
+ * nullable — some mowers don't report a battery percentage.
8966
+ *
8967
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8968
+ * `dock` sends the mower back to its charging station.
8969
+ */
8970
+ var LawnMowerActivitySchema = _enum([
8971
+ "idle",
8972
+ "mowing",
8973
+ "paused",
8974
+ "docked",
8975
+ "error"
8976
+ ]);
8977
+ /** Severity of the current device/error code — info (status), warning, error. */
8978
+ var DeviceCodeSeveritySchema = _enum([
8979
+ "info",
8980
+ "warning",
8981
+ "error"
8982
+ ]);
8948
8983
  object({
8949
8984
  /** Lifecycle activity of the mower. */
8950
- activity: _enum([
8951
- "idle",
8952
- "mowing",
8953
- "paused",
8954
- "docked",
8955
- "error"
8956
- ]),
8985
+ activity: LawnMowerActivitySchema,
8957
8986
  /** 0..100 battery percentage. Null when the device has no battery
8958
8987
  * reading. */
8959
8988
  batteryLevel: number().min(0).max(100).nullable(),
8989
+ /** 0..100 mowing-completion percentage of the current task, or null when no
8990
+ * task is active / progress is unavailable. */
8991
+ progressPercent: number().min(0).max(100).nullable(),
8992
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
8993
+ * or null when unknown. */
8994
+ currentCode: number().nullable(),
8995
+ /** Human label for {@link currentCode}, or null when undecodable. */
8996
+ currentCodeLabel: string().nullable(),
8997
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
8998
+ * attention; `info` is normal status. */
8999
+ severity: DeviceCodeSeveritySchema,
8960
9000
  /** Ms epoch when the slice was last updated. */
8961
9001
  lastChangedAt: number()
8962
9002
  });
@@ -10531,6 +10571,7 @@ var VacuumStateSchema = _enum([
10531
10571
  "paused",
10532
10572
  "returning",
10533
10573
  "docked",
10574
+ "drying",
10534
10575
  "error"
10535
10576
  ]);
10536
10577
  /**
@@ -10569,6 +10610,12 @@ object({
10569
10610
  detergent: TankStatusSchema.nullable(),
10570
10611
  /** Dust bin. Null when the hardware has no dust bin. */
10571
10612
  dustBin: TankStatusSchema.nullable(),
10613
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10614
+ progressPercent: number().min(0).max(100).nullable(),
10615
+ /** Current error code (0 / null = no error). */
10616
+ errorCode: number().nullable(),
10617
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10618
+ errorLabel: string().nullable(),
10572
10619
  /** Ms epoch when the slice was last updated. */
10573
10620
  lastChangedAt: number()
10574
10621
  });
@@ -12010,17 +12057,32 @@ var ReleaseInputSchema = object({
12010
12057
  * the parent cascades into every accessory. */
12011
12058
  camDeviceId: number().int().nonnegative()
12012
12059
  });
12013
- var ResyncInputSchema = object({
12014
- /** Parent CamStack device id of an adopted device. The provider resolves its
12015
- * source (integration/broker + native id) and re-aligns the device's
12016
- * structural spec (type/role/capabilities/units) with the live mapping,
12017
- * rebuilding any child whose class changed while preserving operator edits. */
12018
- camDeviceId: number().int().nonnegative() });
12060
+ var ResyncInputSchema = object({
12061
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12062
+ * source (integration/broker + native id) and re-aligns the device's
12063
+ * structural spec (type/role/capabilities/units) with the live mapping,
12064
+ * rebuilding any child whose class changed while preserving operator edits. */
12065
+ camDeviceId: number().int().nonnegative(),
12066
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12067
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12068
+ * children are rebuilt fresh from source — correct names, coords, and units —
12069
+ * instead of being preserved by the incremental reconcile. Use to recover from
12070
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12071
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12072
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12073
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12074
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12075
+ * re-sync that preserves children. */
12076
+ resetToSource: boolean().optional()
12077
+ });
12019
12078
  var ResyncResultSchema = object({
12020
12079
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12021
12080
  changed: boolean(),
12022
12081
  /** Number of child devices rebuilt into a new class by this re-sync. */
12023
- rebuiltChildren: number().int().nonnegative()
12082
+ rebuiltChildren: number().int().nonnegative(),
12083
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12084
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12085
+ removedChildren: number().int().nonnegative().optional()
12024
12086
  });
12025
12087
  method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
12026
12088
  kind: "mutation",
@@ -13719,6 +13781,11 @@ var DeviceMetaSchema = object({
13719
13781
  addonId: string(),
13720
13782
  type: string(),
13721
13783
  name: string(),
13784
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13785
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13786
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13787
+ * `DeviceMeta.userNamed`. */
13788
+ userNamed: boolean().optional(),
13722
13789
  location: string().nullable(),
13723
13790
  disabled: boolean(),
13724
13791
  parentDeviceId: number().nullable(),
@@ -14029,6 +14096,9 @@ method(object({
14029
14096
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14030
14097
  kind: "mutation",
14031
14098
  auth: "admin"
14099
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14100
+ kind: "mutation",
14101
+ auth: "admin"
14032
14102
  }), method(object({
14033
14103
  deviceId: number(),
14034
14104
  key: string(),
@@ -17814,6 +17884,12 @@ Object.freeze({
17814
17884
  addonId: null,
17815
17885
  access: "create"
17816
17886
  },
17887
+ "deviceManager.adoptionResync": {
17888
+ capName: "device-manager",
17889
+ capScope: "system",
17890
+ addonId: null,
17891
+ access: "create"
17892
+ },
17817
17893
  "deviceManager.allocateDeviceId": {
17818
17894
  capName: "device-manager",
17819
17895
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-static-turn",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Static / self-hosted (coturn) TURN provider for CamStack",
5
5
  "keywords": [
6
6
  "camstack",