@camstack/addon-cloudflare 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.
@@ -8956,18 +8956,47 @@ object({
8956
8956
  lastUpdated: number().nullable()
8957
8957
  });
8958
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
+ ]);
8959
8983
  object({
8960
8984
  /** Lifecycle activity of the mower. */
8961
- activity: _enum([
8962
- "idle",
8963
- "mowing",
8964
- "paused",
8965
- "docked",
8966
- "error"
8967
- ]),
8985
+ activity: LawnMowerActivitySchema,
8968
8986
  /** 0..100 battery percentage. Null when the device has no battery
8969
8987
  * reading. */
8970
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,
8971
9000
  /** Ms epoch when the slice was last updated. */
8972
9001
  lastChangedAt: number()
8973
9002
  });
@@ -10542,6 +10571,7 @@ var VacuumStateSchema = _enum([
10542
10571
  "paused",
10543
10572
  "returning",
10544
10573
  "docked",
10574
+ "drying",
10545
10575
  "error"
10546
10576
  ]);
10547
10577
  /**
@@ -10580,6 +10610,12 @@ object({
10580
10610
  detergent: TankStatusSchema.nullable(),
10581
10611
  /** Dust bin. Null when the hardware has no dust bin. */
10582
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(),
10583
10619
  /** Ms epoch when the slice was last updated. */
10584
10620
  lastChangedAt: number()
10585
10621
  });
@@ -12042,17 +12078,32 @@ var ReleaseInputSchema = object({
12042
12078
  * the parent cascades into every accessory. */
12043
12079
  camDeviceId: number().int().nonnegative()
12044
12080
  });
12045
- var ResyncInputSchema = object({
12046
- /** Parent CamStack device id of an adopted device. The provider resolves its
12047
- * source (integration/broker + native id) and re-aligns the device's
12048
- * structural spec (type/role/capabilities/units) with the live mapping,
12049
- * rebuilding any child whose class changed while preserving operator edits. */
12050
- camDeviceId: number().int().nonnegative() });
12081
+ var ResyncInputSchema = object({
12082
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12083
+ * source (integration/broker + native id) and re-aligns the device's
12084
+ * structural spec (type/role/capabilities/units) with the live mapping,
12085
+ * rebuilding any child whose class changed while preserving operator edits. */
12086
+ camDeviceId: number().int().nonnegative(),
12087
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12088
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12089
+ * children are rebuilt fresh from source — correct names, coords, and units —
12090
+ * instead of being preserved by the incremental reconcile. Use to recover from
12091
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12092
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12093
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12094
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12095
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12096
+ * re-sync that preserves children. */
12097
+ resetToSource: boolean().optional()
12098
+ });
12051
12099
  var ResyncResultSchema = object({
12052
12100
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12053
12101
  changed: boolean(),
12054
12102
  /** Number of child devices rebuilt into a new class by this re-sync. */
12055
- rebuiltChildren: number().int().nonnegative()
12103
+ rebuiltChildren: number().int().nonnegative(),
12104
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12105
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12106
+ removedChildren: number().int().nonnegative().optional()
12056
12107
  });
12057
12108
  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, {
12058
12109
  kind: "mutation",
@@ -13751,6 +13802,11 @@ var DeviceMetaSchema = object({
13751
13802
  addonId: string(),
13752
13803
  type: string(),
13753
13804
  name: string(),
13805
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13806
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13807
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13808
+ * `DeviceMeta.userNamed`. */
13809
+ userNamed: boolean().optional(),
13754
13810
  location: string().nullable(),
13755
13811
  disabled: boolean(),
13756
13812
  parentDeviceId: number().nullable(),
@@ -14061,6 +14117,9 @@ method(object({
14061
14117
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14062
14118
  kind: "mutation",
14063
14119
  auth: "admin"
14120
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14121
+ kind: "mutation",
14122
+ auth: "admin"
14064
14123
  }), method(object({
14065
14124
  deviceId: number(),
14066
14125
  key: string(),
@@ -17863,6 +17922,12 @@ Object.freeze({
17863
17922
  addonId: null,
17864
17923
  access: "create"
17865
17924
  },
17925
+ "deviceManager.adoptionResync": {
17926
+ capName: "device-manager",
17927
+ capScope: "system",
17928
+ addonId: null,
17929
+ access: "create"
17930
+ },
17866
17931
  "deviceManager.allocateDeviceId": {
17867
17932
  capName: "device-manager",
17868
17933
  capScope: "system",
@@ -8956,18 +8956,47 @@ object({
8956
8956
  lastUpdated: number().nullable()
8957
8957
  });
8958
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
+ ]);
8959
8983
  object({
8960
8984
  /** Lifecycle activity of the mower. */
8961
- activity: _enum([
8962
- "idle",
8963
- "mowing",
8964
- "paused",
8965
- "docked",
8966
- "error"
8967
- ]),
8985
+ activity: LawnMowerActivitySchema,
8968
8986
  /** 0..100 battery percentage. Null when the device has no battery
8969
8987
  * reading. */
8970
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,
8971
9000
  /** Ms epoch when the slice was last updated. */
8972
9001
  lastChangedAt: number()
8973
9002
  });
@@ -10542,6 +10571,7 @@ var VacuumStateSchema = _enum([
10542
10571
  "paused",
10543
10572
  "returning",
10544
10573
  "docked",
10574
+ "drying",
10545
10575
  "error"
10546
10576
  ]);
10547
10577
  /**
@@ -10580,6 +10610,12 @@ object({
10580
10610
  detergent: TankStatusSchema.nullable(),
10581
10611
  /** Dust bin. Null when the hardware has no dust bin. */
10582
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(),
10583
10619
  /** Ms epoch when the slice was last updated. */
10584
10620
  lastChangedAt: number()
10585
10621
  });
@@ -12042,17 +12078,32 @@ var ReleaseInputSchema = object({
12042
12078
  * the parent cascades into every accessory. */
12043
12079
  camDeviceId: number().int().nonnegative()
12044
12080
  });
12045
- var ResyncInputSchema = object({
12046
- /** Parent CamStack device id of an adopted device. The provider resolves its
12047
- * source (integration/broker + native id) and re-aligns the device's
12048
- * structural spec (type/role/capabilities/units) with the live mapping,
12049
- * rebuilding any child whose class changed while preserving operator edits. */
12050
- camDeviceId: number().int().nonnegative() });
12081
+ var ResyncInputSchema = object({
12082
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12083
+ * source (integration/broker + native id) and re-aligns the device's
12084
+ * structural spec (type/role/capabilities/units) with the live mapping,
12085
+ * rebuilding any child whose class changed while preserving operator edits. */
12086
+ camDeviceId: number().int().nonnegative(),
12087
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12088
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12089
+ * children are rebuilt fresh from source — correct names, coords, and units —
12090
+ * instead of being preserved by the incremental reconcile. Use to recover from
12091
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12092
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12093
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12094
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12095
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12096
+ * re-sync that preserves children. */
12097
+ resetToSource: boolean().optional()
12098
+ });
12051
12099
  var ResyncResultSchema = object({
12052
12100
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12053
12101
  changed: boolean(),
12054
12102
  /** Number of child devices rebuilt into a new class by this re-sync. */
12055
- rebuiltChildren: number().int().nonnegative()
12103
+ rebuiltChildren: number().int().nonnegative(),
12104
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12105
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12106
+ removedChildren: number().int().nonnegative().optional()
12056
12107
  });
12057
12108
  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, {
12058
12109
  kind: "mutation",
@@ -13751,6 +13802,11 @@ var DeviceMetaSchema = object({
13751
13802
  addonId: string(),
13752
13803
  type: string(),
13753
13804
  name: string(),
13805
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13806
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13807
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13808
+ * `DeviceMeta.userNamed`. */
13809
+ userNamed: boolean().optional(),
13754
13810
  location: string().nullable(),
13755
13811
  disabled: boolean(),
13756
13812
  parentDeviceId: number().nullable(),
@@ -14061,6 +14117,9 @@ method(object({
14061
14117
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14062
14118
  kind: "mutation",
14063
14119
  auth: "admin"
14120
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14121
+ kind: "mutation",
14122
+ auth: "admin"
14064
14123
  }), method(object({
14065
14124
  deviceId: number(),
14066
14125
  key: string(),
@@ -17863,6 +17922,12 @@ Object.freeze({
17863
17922
  addonId: null,
17864
17923
  access: "create"
17865
17924
  },
17925
+ "deviceManager.adoptionResync": {
17926
+ capName: "device-manager",
17927
+ capScope: "system",
17928
+ addonId: null,
17929
+ access: "create"
17930
+ },
17866
17931
  "deviceManager.allocateDeviceId": {
17867
17932
  capName: "device-manager",
17868
17933
  capScope: "system",
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_dist = require("../dist-DnB1j31B.js");
24
+ const require_dist = require("../dist-BljGH3jj.js");
25
25
  let node_path = require("node:path");
26
26
  node_path = __toESM(node_path);
27
27
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { a as BaseAddon, c as array, d as literal, f as number, l as boolean, m as string, n as defineCustomActions, o as EventCategory, p as object, r as networkAccessCapability, s as _enum, t as customAction } from "../dist-D3vgD4ZI.mjs";
1
+ import { a as BaseAddon, c as array, d as literal, f as number, l as boolean, m as string, n as defineCustomActions, o as EventCategory, p as object, r as networkAccessCapability, s as _enum, t as customAction } from "../dist-ClFFnQoO.mjs";
2
2
  import * as path from "node:path";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { spawn } from "node:child_process";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("../dist-DnB1j31B.js");
2
+ const require_dist = require("../dist-BljGH3jj.js");
3
3
  //#region src/turn/cloudflare-turn.ts
4
4
  /**
5
5
  * Cloudflare returns ICE servers in several flavours depending on which
@@ -1,4 +1,4 @@
1
- import { a as BaseAddon, d as literal, f as number, i as turnProviderCapability, l as boolean, m as string, n as defineCustomActions, p as object, t as customAction, u as discriminatedUnion } from "../dist-D3vgD4ZI.mjs";
1
+ import { a as BaseAddon, d as literal, f as number, i as turnProviderCapability, l as boolean, m as string, n as defineCustomActions, p as object, t as customAction, u as discriminatedUnion } from "../dist-ClFFnQoO.mjs";
2
2
  //#region src/turn/cloudflare-turn.ts
3
3
  /**
4
4
  * Cloudflare returns ICE servers in several flavours depending on which
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-cloudflare",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Cloudflare bundle — Tunnel (network-access) + TURN relay (turn-provider). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",