@camstack/addon-provider-hikvision 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.
Files changed (3) hide show
  1. package/dist/addon.js +124 -25
  2. package/dist/addon.mjs +124 -25
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -4631,7 +4631,7 @@ function _instanceof(cls, params = {}) {
4631
4631
  return inst;
4632
4632
  }
4633
4633
  //#endregion
4634
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4634
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4635
4635
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4636
4636
  EventCategory["SystemBoot"] = "system.boot";
4637
4637
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6431,6 +6431,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6431
6431
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6432
6432
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6433
6433
  DeviceRole["PressureSensor"] = "pressure-sensor";
6434
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6435
+ DeviceRole["WindSensor"] = "wind-sensor";
6436
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6437
+ DeviceRole["RainSensor"] = "rain-sensor";
6438
+ /** UV index (weather-station `uv-sensor` cap). */
6439
+ DeviceRole["UvSensor"] = "uv-sensor";
6440
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6441
+ * Distinct from AmbientLightSensor (lux). */
6442
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6443
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6444
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6434
6445
  DeviceRole["PowerSensor"] = "power-sensor";
6435
6446
  DeviceRole["EnergySensor"] = "energy-sensor";
6436
6447
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -10257,15 +10268,18 @@ var humiditySensorCapability = {
10257
10268
  runtimeState: HumiditySensorStatusSchema
10258
10269
  };
10259
10270
  /**
10260
- * Image display cap. Models HA `image.*` entities a single still image
10261
- * exposed by an integration (a snapshot, a chart, a generated picture).
10271
+ * Image display cap. Models a single still image exposed by an integration
10272
+ * a snapshot, a chart, a generated picture, or a robot's cleaning-map render.
10262
10273
  *
10263
- * Read-only: there are no setters. The provider resolves the HA
10264
- * `entity_picture` (a relative, signed-token path) into an ABSOLUTE URL
10265
- * the browser loads directly the token stays in the query string so no
10266
- * auth header is required. The slice carries that URL plus the upstream
10267
- * last-updated timestamp; the image changes when the entity state (a
10268
- * timestamp) changes.
10274
+ * Read-only: there are no setters. The provider resolves whatever upstream
10275
+ * source it has into an ABSOLUTE URL the browser loads directly:
10276
+ * - HA `image.*` entities the `entity_picture` signed-token path
10277
+ * (token stays in the query string, so no auth header is needed);
10278
+ * - a Dreame/robot map the cloud/OSS map-image URL (or an addon
10279
+ * data-plane URL serving the rendered map bytes), exposed as its own
10280
+ * Image child device grouped under the robot's container.
10281
+ * The slice carries that URL plus the upstream last-updated timestamp; the
10282
+ * image changes when the source's last-updated marker changes.
10269
10283
  */
10270
10284
  var ImageStatusSchema = object({
10271
10285
  /** Absolute signed URL the browser loads directly. Null when the
@@ -10291,18 +10305,47 @@ var imageCapability = {
10291
10305
  */
10292
10306
  runtimeState: ImageStatusSchema
10293
10307
  };
10308
+ /**
10309
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
10310
+ * with a mowing lifecycle plus a dock action.
10311
+ *
10312
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
10313
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
10314
+ * nullable — some mowers don't report a battery percentage.
10315
+ *
10316
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
10317
+ * `dock` sends the mower back to its charging station.
10318
+ */
10319
+ var LawnMowerActivitySchema = _enum([
10320
+ "idle",
10321
+ "mowing",
10322
+ "paused",
10323
+ "docked",
10324
+ "error"
10325
+ ]);
10326
+ /** Severity of the current device/error code — info (status), warning, error. */
10327
+ var DeviceCodeSeveritySchema = _enum([
10328
+ "info",
10329
+ "warning",
10330
+ "error"
10331
+ ]);
10294
10332
  var LawnMowerControlStatusSchema = object({
10295
10333
  /** Lifecycle activity of the mower. */
10296
- activity: _enum([
10297
- "idle",
10298
- "mowing",
10299
- "paused",
10300
- "docked",
10301
- "error"
10302
- ]),
10334
+ activity: LawnMowerActivitySchema,
10303
10335
  /** 0..100 battery percentage. Null when the device has no battery
10304
10336
  * reading. */
10305
10337
  batteryLevel: number().min(0).max(100).nullable(),
10338
+ /** 0..100 mowing-completion percentage of the current task, or null when no
10339
+ * task is active / progress is unavailable. */
10340
+ progressPercent: number().min(0).max(100).nullable(),
10341
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
10342
+ * or null when unknown. */
10343
+ currentCode: number().nullable(),
10344
+ /** Human label for {@link currentCode}, or null when undecodable. */
10345
+ currentCodeLabel: string().nullable(),
10346
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
10347
+ * attention; `info` is normal status. */
10348
+ severity: DeviceCodeSeveritySchema,
10306
10349
  /** Ms epoch when the slice was last updated. */
10307
10350
  lastChangedAt: number()
10308
10351
  });
@@ -12528,6 +12571,7 @@ var VacuumStateSchema = _enum([
12528
12571
  "paused",
12529
12572
  "returning",
12530
12573
  "docked",
12574
+ "drying",
12531
12575
  "error"
12532
12576
  ]);
12533
12577
  /**
@@ -12566,6 +12610,12 @@ var VacuumControlStatusSchema = object({
12566
12610
  detergent: TankStatusSchema.nullable(),
12567
12611
  /** Dust bin. Null when the hardware has no dust bin. */
12568
12612
  dustBin: TankStatusSchema.nullable(),
12613
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
12614
+ progressPercent: number().min(0).max(100).nullable(),
12615
+ /** Current error code (0 / null = no error). */
12616
+ errorCode: number().nullable(),
12617
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
12618
+ errorLabel: string().nullable(),
12569
12619
  /** Ms epoch when the slice was last updated. */
12570
12620
  lastChangedAt: number()
12571
12621
  });
@@ -13532,9 +13582,29 @@ var BaseDevice = class {
13532
13582
  * is open (Reolink writes `hasPtz/hasIntercom`, Hikvision writes
13533
13583
  * `hasSupplementalLight/hasAlarmIo`, etc).
13534
13584
  *
13535
- * Default: no-op (driver had no probe to run).
13585
+ * Default: nothing to probe mark the device PROBED (set `lastProbedAt`) so
13586
+ * the kernel treats it as ready immediately. A device that derives its shape
13587
+ * from a spec (a container, or an accessory sensor) rather than from a
13588
+ * hardware probe has no probe to "complete"; without stamping `lastProbedAt`
13589
+ * it would look perpetually un-probed — logging "Initial probe did not
13590
+ * complete" on every boot and spinning a pointless retry chain. Drivers that
13591
+ * DO probe override this and write their own `feature-probe` slice (including
13592
+ * `lastProbedAt`) once their probe actually succeeds.
13536
13593
  */
13537
- async onProbe() {}
13594
+ async onProbe() {
13595
+ const base = this.runtimeState.getCapState("feature-probe") ?? {
13596
+ flags: {},
13597
+ deviceType: null,
13598
+ model: null,
13599
+ channelCount: null,
13600
+ lastProbedAt: 0,
13601
+ lastFetchedAt: 0
13602
+ };
13603
+ this.runtimeState.setCapState("feature-probe", {
13604
+ ...base,
13605
+ lastProbedAt: Date.now()
13606
+ });
13607
+ }
13538
13608
  /**
13539
13609
  * Phase 5 — fired after the device + its accessories are registered.
13540
13610
  * Drivers publish streams to the broker, kick off background tasks,
@@ -15008,17 +15078,32 @@ var ReleaseInputSchema = object({
15008
15078
  * the parent cascades into every accessory. */
15009
15079
  camDeviceId: number().int().nonnegative()
15010
15080
  });
15011
- var ResyncInputSchema = object({
15012
- /** Parent CamStack device id of an adopted device. The provider resolves its
15013
- * source (integration/broker + native id) and re-aligns the device's
15014
- * structural spec (type/role/capabilities/units) with the live mapping,
15015
- * rebuilding any child whose class changed while preserving operator edits. */
15016
- camDeviceId: number().int().nonnegative() });
15081
+ var ResyncInputSchema = object({
15082
+ /** Parent CamStack device id of an adopted device. The provider resolves its
15083
+ * source (integration/broker + native id) and re-aligns the device's
15084
+ * structural spec (type/role/capabilities/units) with the live mapping,
15085
+ * rebuilding any child whose class changed while preserving operator edits. */
15086
+ camDeviceId: number().int().nonnegative(),
15087
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
15088
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
15089
+ * children are rebuilt fresh from source — correct names, coords, and units —
15090
+ * instead of being preserved by the incremental reconcile. Use to recover from
15091
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
15092
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
15093
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
15094
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
15095
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
15096
+ * re-sync that preserves children. */
15097
+ resetToSource: boolean().optional()
15098
+ });
15017
15099
  var ResyncResultSchema = object({
15018
15100
  /** True when the persisted spec actually changed (children may have been rebuilt). */
15019
15101
  changed: boolean(),
15020
15102
  /** Number of child devices rebuilt into a new class by this re-sync. */
15021
- rebuiltChildren: number().int().nonnegative()
15103
+ rebuiltChildren: number().int().nonnegative(),
15104
+ /** Number of accessory children torn down by a `resetToSource` purge before the
15105
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
15106
+ removedChildren: number().int().nonnegative().optional()
15022
15107
  });
15023
15108
  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, {
15024
15109
  kind: "mutation",
@@ -16717,6 +16802,11 @@ var DeviceMetaSchema = object({
16717
16802
  addonId: string(),
16718
16803
  type: string(),
16719
16804
  name: string(),
16805
+ /** True once an operator explicitly renamed the device via `setName`. Drives
16806
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
16807
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
16808
+ * `DeviceMeta.userNamed`. */
16809
+ userNamed: boolean().optional(),
16720
16810
  location: string().nullable(),
16721
16811
  disabled: boolean(),
16722
16812
  parentDeviceId: number().nullable(),
@@ -17027,6 +17117,9 @@ method(object({
17027
17117
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
17028
17118
  kind: "mutation",
17029
17119
  auth: "admin"
17120
+ }), method(ResyncInputSchema, ResyncResultSchema, {
17121
+ kind: "mutation",
17122
+ auth: "admin"
17030
17123
  }), method(object({
17031
17124
  deviceId: number(),
17032
17125
  key: string(),
@@ -21207,6 +21300,12 @@ Object.freeze({
21207
21300
  addonId: null,
21208
21301
  access: "create"
21209
21302
  },
21303
+ "deviceManager.adoptionResync": {
21304
+ capName: "device-manager",
21305
+ capScope: "system",
21306
+ addonId: null,
21307
+ access: "create"
21308
+ },
21210
21309
  "deviceManager.allocateDeviceId": {
21211
21310
  capName: "device-manager",
21212
21311
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4630,7 +4630,7 @@ function _instanceof(cls, params = {}) {
4630
4630
  return inst;
4631
4631
  }
4632
4632
  //#endregion
4633
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4633
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4634
4634
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4635
4635
  EventCategory["SystemBoot"] = "system.boot";
4636
4636
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6430,6 +6430,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6430
6430
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6431
6431
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6432
6432
  DeviceRole["PressureSensor"] = "pressure-sensor";
6433
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6434
+ DeviceRole["WindSensor"] = "wind-sensor";
6435
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6436
+ DeviceRole["RainSensor"] = "rain-sensor";
6437
+ /** UV index (weather-station `uv-sensor` cap). */
6438
+ DeviceRole["UvSensor"] = "uv-sensor";
6439
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6440
+ * Distinct from AmbientLightSensor (lux). */
6441
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6442
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6443
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6433
6444
  DeviceRole["PowerSensor"] = "power-sensor";
6434
6445
  DeviceRole["EnergySensor"] = "energy-sensor";
6435
6446
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -10256,15 +10267,18 @@ var humiditySensorCapability = {
10256
10267
  runtimeState: HumiditySensorStatusSchema
10257
10268
  };
10258
10269
  /**
10259
- * Image display cap. Models HA `image.*` entities a single still image
10260
- * exposed by an integration (a snapshot, a chart, a generated picture).
10270
+ * Image display cap. Models a single still image exposed by an integration
10271
+ * a snapshot, a chart, a generated picture, or a robot's cleaning-map render.
10261
10272
  *
10262
- * Read-only: there are no setters. The provider resolves the HA
10263
- * `entity_picture` (a relative, signed-token path) into an ABSOLUTE URL
10264
- * the browser loads directly the token stays in the query string so no
10265
- * auth header is required. The slice carries that URL plus the upstream
10266
- * last-updated timestamp; the image changes when the entity state (a
10267
- * timestamp) changes.
10273
+ * Read-only: there are no setters. The provider resolves whatever upstream
10274
+ * source it has into an ABSOLUTE URL the browser loads directly:
10275
+ * - HA `image.*` entities the `entity_picture` signed-token path
10276
+ * (token stays in the query string, so no auth header is needed);
10277
+ * - a Dreame/robot map the cloud/OSS map-image URL (or an addon
10278
+ * data-plane URL serving the rendered map bytes), exposed as its own
10279
+ * Image child device grouped under the robot's container.
10280
+ * The slice carries that URL plus the upstream last-updated timestamp; the
10281
+ * image changes when the source's last-updated marker changes.
10268
10282
  */
10269
10283
  var ImageStatusSchema = object({
10270
10284
  /** Absolute signed URL the browser loads directly. Null when the
@@ -10290,18 +10304,47 @@ var imageCapability = {
10290
10304
  */
10291
10305
  runtimeState: ImageStatusSchema
10292
10306
  };
10307
+ /**
10308
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
10309
+ * with a mowing lifecycle plus a dock action.
10310
+ *
10311
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
10312
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
10313
+ * nullable — some mowers don't report a battery percentage.
10314
+ *
10315
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
10316
+ * `dock` sends the mower back to its charging station.
10317
+ */
10318
+ var LawnMowerActivitySchema = _enum([
10319
+ "idle",
10320
+ "mowing",
10321
+ "paused",
10322
+ "docked",
10323
+ "error"
10324
+ ]);
10325
+ /** Severity of the current device/error code — info (status), warning, error. */
10326
+ var DeviceCodeSeveritySchema = _enum([
10327
+ "info",
10328
+ "warning",
10329
+ "error"
10330
+ ]);
10293
10331
  var LawnMowerControlStatusSchema = object({
10294
10332
  /** Lifecycle activity of the mower. */
10295
- activity: _enum([
10296
- "idle",
10297
- "mowing",
10298
- "paused",
10299
- "docked",
10300
- "error"
10301
- ]),
10333
+ activity: LawnMowerActivitySchema,
10302
10334
  /** 0..100 battery percentage. Null when the device has no battery
10303
10335
  * reading. */
10304
10336
  batteryLevel: number().min(0).max(100).nullable(),
10337
+ /** 0..100 mowing-completion percentage of the current task, or null when no
10338
+ * task is active / progress is unavailable. */
10339
+ progressPercent: number().min(0).max(100).nullable(),
10340
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
10341
+ * or null when unknown. */
10342
+ currentCode: number().nullable(),
10343
+ /** Human label for {@link currentCode}, or null when undecodable. */
10344
+ currentCodeLabel: string().nullable(),
10345
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
10346
+ * attention; `info` is normal status. */
10347
+ severity: DeviceCodeSeveritySchema,
10305
10348
  /** Ms epoch when the slice was last updated. */
10306
10349
  lastChangedAt: number()
10307
10350
  });
@@ -12527,6 +12570,7 @@ var VacuumStateSchema = _enum([
12527
12570
  "paused",
12528
12571
  "returning",
12529
12572
  "docked",
12573
+ "drying",
12530
12574
  "error"
12531
12575
  ]);
12532
12576
  /**
@@ -12565,6 +12609,12 @@ var VacuumControlStatusSchema = object({
12565
12609
  detergent: TankStatusSchema.nullable(),
12566
12610
  /** Dust bin. Null when the hardware has no dust bin. */
12567
12611
  dustBin: TankStatusSchema.nullable(),
12612
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
12613
+ progressPercent: number().min(0).max(100).nullable(),
12614
+ /** Current error code (0 / null = no error). */
12615
+ errorCode: number().nullable(),
12616
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
12617
+ errorLabel: string().nullable(),
12568
12618
  /** Ms epoch when the slice was last updated. */
12569
12619
  lastChangedAt: number()
12570
12620
  });
@@ -13531,9 +13581,29 @@ var BaseDevice = class {
13531
13581
  * is open (Reolink writes `hasPtz/hasIntercom`, Hikvision writes
13532
13582
  * `hasSupplementalLight/hasAlarmIo`, etc).
13533
13583
  *
13534
- * Default: no-op (driver had no probe to run).
13584
+ * Default: nothing to probe mark the device PROBED (set `lastProbedAt`) so
13585
+ * the kernel treats it as ready immediately. A device that derives its shape
13586
+ * from a spec (a container, or an accessory sensor) rather than from a
13587
+ * hardware probe has no probe to "complete"; without stamping `lastProbedAt`
13588
+ * it would look perpetually un-probed — logging "Initial probe did not
13589
+ * complete" on every boot and spinning a pointless retry chain. Drivers that
13590
+ * DO probe override this and write their own `feature-probe` slice (including
13591
+ * `lastProbedAt`) once their probe actually succeeds.
13535
13592
  */
13536
- async onProbe() {}
13593
+ async onProbe() {
13594
+ const base = this.runtimeState.getCapState("feature-probe") ?? {
13595
+ flags: {},
13596
+ deviceType: null,
13597
+ model: null,
13598
+ channelCount: null,
13599
+ lastProbedAt: 0,
13600
+ lastFetchedAt: 0
13601
+ };
13602
+ this.runtimeState.setCapState("feature-probe", {
13603
+ ...base,
13604
+ lastProbedAt: Date.now()
13605
+ });
13606
+ }
13537
13607
  /**
13538
13608
  * Phase 5 — fired after the device + its accessories are registered.
13539
13609
  * Drivers publish streams to the broker, kick off background tasks,
@@ -15007,17 +15077,32 @@ var ReleaseInputSchema = object({
15007
15077
  * the parent cascades into every accessory. */
15008
15078
  camDeviceId: number().int().nonnegative()
15009
15079
  });
15010
- var ResyncInputSchema = object({
15011
- /** Parent CamStack device id of an adopted device. The provider resolves its
15012
- * source (integration/broker + native id) and re-aligns the device's
15013
- * structural spec (type/role/capabilities/units) with the live mapping,
15014
- * rebuilding any child whose class changed while preserving operator edits. */
15015
- camDeviceId: number().int().nonnegative() });
15080
+ var ResyncInputSchema = object({
15081
+ /** Parent CamStack device id of an adopted device. The provider resolves its
15082
+ * source (integration/broker + native id) and re-aligns the device's
15083
+ * structural spec (type/role/capabilities/units) with the live mapping,
15084
+ * rebuilding any child whose class changed while preserving operator edits. */
15085
+ camDeviceId: number().int().nonnegative(),
15086
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
15087
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
15088
+ * children are rebuilt fresh from source — correct names, coords, and units —
15089
+ * instead of being preserved by the incremental reconcile. Use to recover from
15090
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
15091
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
15092
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
15093
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
15094
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
15095
+ * re-sync that preserves children. */
15096
+ resetToSource: boolean().optional()
15097
+ });
15016
15098
  var ResyncResultSchema = object({
15017
15099
  /** True when the persisted spec actually changed (children may have been rebuilt). */
15018
15100
  changed: boolean(),
15019
15101
  /** Number of child devices rebuilt into a new class by this re-sync. */
15020
- rebuiltChildren: number().int().nonnegative()
15102
+ rebuiltChildren: number().int().nonnegative(),
15103
+ /** Number of accessory children torn down by a `resetToSource` purge before the
15104
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
15105
+ removedChildren: number().int().nonnegative().optional()
15021
15106
  });
15022
15107
  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, {
15023
15108
  kind: "mutation",
@@ -16716,6 +16801,11 @@ var DeviceMetaSchema = object({
16716
16801
  addonId: string(),
16717
16802
  type: string(),
16718
16803
  name: string(),
16804
+ /** True once an operator explicitly renamed the device via `setName`. Drives
16805
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
16806
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
16807
+ * `DeviceMeta.userNamed`. */
16808
+ userNamed: boolean().optional(),
16719
16809
  location: string().nullable(),
16720
16810
  disabled: boolean(),
16721
16811
  parentDeviceId: number().nullable(),
@@ -17026,6 +17116,9 @@ method(object({
17026
17116
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
17027
17117
  kind: "mutation",
17028
17118
  auth: "admin"
17119
+ }), method(ResyncInputSchema, ResyncResultSchema, {
17120
+ kind: "mutation",
17121
+ auth: "admin"
17029
17122
  }), method(object({
17030
17123
  deviceId: number(),
17031
17124
  key: string(),
@@ -21206,6 +21299,12 @@ Object.freeze({
21206
21299
  addonId: null,
21207
21300
  access: "create"
21208
21301
  },
21302
+ "deviceManager.adoptionResync": {
21303
+ capName: "device-manager",
21304
+ capScope: "system",
21305
+ addonId: null,
21306
+ access: "create"
21307
+ },
21209
21308
  "deviceManager.allocateDeviceId": {
21210
21309
  capName: "device-manager",
21211
21310
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",