@camstack/addon-advanced-notifier 1.1.7 → 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.
package/dist/addon.js CHANGED
@@ -8975,18 +8975,47 @@ object({
8975
8975
  lastUpdated: number().nullable()
8976
8976
  });
8977
8977
  DeviceType.Image;
8978
+ /**
8979
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8980
+ * with a mowing lifecycle plus a dock action.
8981
+ *
8982
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8983
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8984
+ * nullable — some mowers don't report a battery percentage.
8985
+ *
8986
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8987
+ * `dock` sends the mower back to its charging station.
8988
+ */
8989
+ var LawnMowerActivitySchema = _enum([
8990
+ "idle",
8991
+ "mowing",
8992
+ "paused",
8993
+ "docked",
8994
+ "error"
8995
+ ]);
8996
+ /** Severity of the current device/error code — info (status), warning, error. */
8997
+ var DeviceCodeSeveritySchema = _enum([
8998
+ "info",
8999
+ "warning",
9000
+ "error"
9001
+ ]);
8978
9002
  object({
8979
9003
  /** Lifecycle activity of the mower. */
8980
- activity: _enum([
8981
- "idle",
8982
- "mowing",
8983
- "paused",
8984
- "docked",
8985
- "error"
8986
- ]),
9004
+ activity: LawnMowerActivitySchema,
8987
9005
  /** 0..100 battery percentage. Null when the device has no battery
8988
9006
  * reading. */
8989
9007
  batteryLevel: number().min(0).max(100).nullable(),
9008
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9009
+ * task is active / progress is unavailable. */
9010
+ progressPercent: number().min(0).max(100).nullable(),
9011
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9012
+ * or null when unknown. */
9013
+ currentCode: number().nullable(),
9014
+ /** Human label for {@link currentCode}, or null when undecodable. */
9015
+ currentCodeLabel: string().nullable(),
9016
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9017
+ * attention; `info` is normal status. */
9018
+ severity: DeviceCodeSeveritySchema,
8990
9019
  /** Ms epoch when the slice was last updated. */
8991
9020
  lastChangedAt: number()
8992
9021
  });
@@ -10561,6 +10590,7 @@ var VacuumStateSchema = _enum([
10561
10590
  "paused",
10562
10591
  "returning",
10563
10592
  "docked",
10593
+ "drying",
10564
10594
  "error"
10565
10595
  ]);
10566
10596
  /**
@@ -10599,6 +10629,12 @@ object({
10599
10629
  detergent: TankStatusSchema.nullable(),
10600
10630
  /** Dust bin. Null when the hardware has no dust bin. */
10601
10631
  dustBin: TankStatusSchema.nullable(),
10632
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10633
+ progressPercent: number().min(0).max(100).nullable(),
10634
+ /** Current error code (0 / null = no error). */
10635
+ errorCode: number().nullable(),
10636
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10637
+ errorLabel: string().nullable(),
10602
10638
  /** Ms epoch when the slice was last updated. */
10603
10639
  lastChangedAt: number()
10604
10640
  });
@@ -12040,17 +12076,32 @@ var ReleaseInputSchema = object({
12040
12076
  * the parent cascades into every accessory. */
12041
12077
  camDeviceId: number().int().nonnegative()
12042
12078
  });
12043
- var ResyncInputSchema = object({
12044
- /** Parent CamStack device id of an adopted device. The provider resolves its
12045
- * source (integration/broker + native id) and re-aligns the device's
12046
- * structural spec (type/role/capabilities/units) with the live mapping,
12047
- * rebuilding any child whose class changed while preserving operator edits. */
12048
- camDeviceId: number().int().nonnegative() });
12079
+ var ResyncInputSchema = object({
12080
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12081
+ * source (integration/broker + native id) and re-aligns the device's
12082
+ * structural spec (type/role/capabilities/units) with the live mapping,
12083
+ * rebuilding any child whose class changed while preserving operator edits. */
12084
+ camDeviceId: number().int().nonnegative(),
12085
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12086
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12087
+ * children are rebuilt fresh from source — correct names, coords, and units —
12088
+ * instead of being preserved by the incremental reconcile. Use to recover from
12089
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12090
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12091
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12092
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12093
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12094
+ * re-sync that preserves children. */
12095
+ resetToSource: boolean().optional()
12096
+ });
12049
12097
  var ResyncResultSchema = object({
12050
12098
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12051
12099
  changed: boolean(),
12052
12100
  /** Number of child devices rebuilt into a new class by this re-sync. */
12053
- rebuiltChildren: number().int().nonnegative()
12101
+ rebuiltChildren: number().int().nonnegative(),
12102
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12103
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12104
+ removedChildren: number().int().nonnegative().optional()
12054
12105
  });
12055
12106
  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, {
12056
12107
  kind: "mutation",
@@ -13749,6 +13800,11 @@ var DeviceMetaSchema = object({
13749
13800
  addonId: string(),
13750
13801
  type: string(),
13751
13802
  name: string(),
13803
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13804
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13805
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13806
+ * `DeviceMeta.userNamed`. */
13807
+ userNamed: boolean().optional(),
13752
13808
  location: string().nullable(),
13753
13809
  disabled: boolean(),
13754
13810
  parentDeviceId: number().nullable(),
@@ -14059,6 +14115,9 @@ method(object({
14059
14115
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14060
14116
  kind: "mutation",
14061
14117
  auth: "admin"
14118
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14119
+ kind: "mutation",
14120
+ auth: "admin"
14062
14121
  }), method(object({
14063
14122
  deviceId: number(),
14064
14123
  key: string(),
@@ -17841,6 +17900,12 @@ Object.freeze({
17841
17900
  addonId: null,
17842
17901
  access: "create"
17843
17902
  },
17903
+ "deviceManager.adoptionResync": {
17904
+ capName: "device-manager",
17905
+ capScope: "system",
17906
+ addonId: null,
17907
+ access: "create"
17908
+ },
17844
17909
  "deviceManager.allocateDeviceId": {
17845
17910
  capName: "device-manager",
17846
17911
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -8971,18 +8971,47 @@ object({
8971
8971
  lastUpdated: number().nullable()
8972
8972
  });
8973
8973
  DeviceType.Image;
8974
+ /**
8975
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8976
+ * with a mowing lifecycle plus a dock action.
8977
+ *
8978
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8979
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8980
+ * nullable — some mowers don't report a battery percentage.
8981
+ *
8982
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8983
+ * `dock` sends the mower back to its charging station.
8984
+ */
8985
+ var LawnMowerActivitySchema = _enum([
8986
+ "idle",
8987
+ "mowing",
8988
+ "paused",
8989
+ "docked",
8990
+ "error"
8991
+ ]);
8992
+ /** Severity of the current device/error code — info (status), warning, error. */
8993
+ var DeviceCodeSeveritySchema = _enum([
8994
+ "info",
8995
+ "warning",
8996
+ "error"
8997
+ ]);
8974
8998
  object({
8975
8999
  /** Lifecycle activity of the mower. */
8976
- activity: _enum([
8977
- "idle",
8978
- "mowing",
8979
- "paused",
8980
- "docked",
8981
- "error"
8982
- ]),
9000
+ activity: LawnMowerActivitySchema,
8983
9001
  /** 0..100 battery percentage. Null when the device has no battery
8984
9002
  * reading. */
8985
9003
  batteryLevel: number().min(0).max(100).nullable(),
9004
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9005
+ * task is active / progress is unavailable. */
9006
+ progressPercent: number().min(0).max(100).nullable(),
9007
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9008
+ * or null when unknown. */
9009
+ currentCode: number().nullable(),
9010
+ /** Human label for {@link currentCode}, or null when undecodable. */
9011
+ currentCodeLabel: string().nullable(),
9012
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9013
+ * attention; `info` is normal status. */
9014
+ severity: DeviceCodeSeveritySchema,
8986
9015
  /** Ms epoch when the slice was last updated. */
8987
9016
  lastChangedAt: number()
8988
9017
  });
@@ -10557,6 +10586,7 @@ var VacuumStateSchema = _enum([
10557
10586
  "paused",
10558
10587
  "returning",
10559
10588
  "docked",
10589
+ "drying",
10560
10590
  "error"
10561
10591
  ]);
10562
10592
  /**
@@ -10595,6 +10625,12 @@ object({
10595
10625
  detergent: TankStatusSchema.nullable(),
10596
10626
  /** Dust bin. Null when the hardware has no dust bin. */
10597
10627
  dustBin: TankStatusSchema.nullable(),
10628
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10629
+ progressPercent: number().min(0).max(100).nullable(),
10630
+ /** Current error code (0 / null = no error). */
10631
+ errorCode: number().nullable(),
10632
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10633
+ errorLabel: string().nullable(),
10598
10634
  /** Ms epoch when the slice was last updated. */
10599
10635
  lastChangedAt: number()
10600
10636
  });
@@ -12036,17 +12072,32 @@ var ReleaseInputSchema = object({
12036
12072
  * the parent cascades into every accessory. */
12037
12073
  camDeviceId: number().int().nonnegative()
12038
12074
  });
12039
- var ResyncInputSchema = object({
12040
- /** Parent CamStack device id of an adopted device. The provider resolves its
12041
- * source (integration/broker + native id) and re-aligns the device's
12042
- * structural spec (type/role/capabilities/units) with the live mapping,
12043
- * rebuilding any child whose class changed while preserving operator edits. */
12044
- camDeviceId: number().int().nonnegative() });
12075
+ var ResyncInputSchema = object({
12076
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12077
+ * source (integration/broker + native id) and re-aligns the device's
12078
+ * structural spec (type/role/capabilities/units) with the live mapping,
12079
+ * rebuilding any child whose class changed while preserving operator edits. */
12080
+ camDeviceId: number().int().nonnegative(),
12081
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12082
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12083
+ * children are rebuilt fresh from source — correct names, coords, and units —
12084
+ * instead of being preserved by the incremental reconcile. Use to recover from
12085
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12086
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12087
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12088
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12089
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12090
+ * re-sync that preserves children. */
12091
+ resetToSource: boolean().optional()
12092
+ });
12045
12093
  var ResyncResultSchema = object({
12046
12094
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12047
12095
  changed: boolean(),
12048
12096
  /** Number of child devices rebuilt into a new class by this re-sync. */
12049
- rebuiltChildren: number().int().nonnegative()
12097
+ rebuiltChildren: number().int().nonnegative(),
12098
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12099
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12100
+ removedChildren: number().int().nonnegative().optional()
12050
12101
  });
12051
12102
  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, {
12052
12103
  kind: "mutation",
@@ -13745,6 +13796,11 @@ var DeviceMetaSchema = object({
13745
13796
  addonId: string(),
13746
13797
  type: string(),
13747
13798
  name: string(),
13799
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13800
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13801
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13802
+ * `DeviceMeta.userNamed`. */
13803
+ userNamed: boolean().optional(),
13748
13804
  location: string().nullable(),
13749
13805
  disabled: boolean(),
13750
13806
  parentDeviceId: number().nullable(),
@@ -14055,6 +14111,9 @@ method(object({
14055
14111
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14056
14112
  kind: "mutation",
14057
14113
  auth: "admin"
14114
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14115
+ kind: "mutation",
14116
+ auth: "admin"
14058
14117
  }), method(object({
14059
14118
  deviceId: number(),
14060
14119
  key: string(),
@@ -17837,6 +17896,12 @@ Object.freeze({
17837
17896
  addonId: null,
17838
17897
  access: "create"
17839
17898
  },
17899
+ "deviceManager.adoptionResync": {
17900
+ capName: "device-manager",
17901
+ capScope: "system",
17902
+ addonId: null,
17903
+ access: "create"
17904
+ },
17840
17905
  "deviceManager.allocateDeviceId": {
17841
17906
  capName: "device-manager",
17842
17907
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-advanced-notifier",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Rules-based notification engine for CamStack",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",