@camstack/addon-remote-storage 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/s3.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-EHXZloKG.js");
5
+ const require_shared = require("./shared-Dy0MrVpA.js");
6
6
  let node_stream = require("node:stream");
7
7
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
8
8
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
package/dist/s3.addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-BFcg9bB0.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-DYllOkhk.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
4
4
  import { Upload } from "@aws-sdk/lib-storage";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-EHXZloKG.js");
5
+ const require_shared = require("./shared-Dy0MrVpA.js");
6
6
  let ssh2 = require("ssh2");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-BFcg9bB0.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-DYllOkhk.mjs";
2
2
  import { Client } from "ssh2";
3
3
  import * as path from "node:path";
4
4
  //#region src/providers/sftp/sftp-config-schema.ts
@@ -8958,18 +8958,47 @@ object({
8958
8958
  lastUpdated: number().nullable()
8959
8959
  });
8960
8960
  DeviceType.Image;
8961
+ /**
8962
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8963
+ * with a mowing lifecycle plus a dock action.
8964
+ *
8965
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8966
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8967
+ * nullable — some mowers don't report a battery percentage.
8968
+ *
8969
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8970
+ * `dock` sends the mower back to its charging station.
8971
+ */
8972
+ var LawnMowerActivitySchema = _enum([
8973
+ "idle",
8974
+ "mowing",
8975
+ "paused",
8976
+ "docked",
8977
+ "error"
8978
+ ]);
8979
+ /** Severity of the current device/error code — info (status), warning, error. */
8980
+ var DeviceCodeSeveritySchema = _enum([
8981
+ "info",
8982
+ "warning",
8983
+ "error"
8984
+ ]);
8961
8985
  object({
8962
8986
  /** Lifecycle activity of the mower. */
8963
- activity: _enum([
8964
- "idle",
8965
- "mowing",
8966
- "paused",
8967
- "docked",
8968
- "error"
8969
- ]),
8987
+ activity: LawnMowerActivitySchema,
8970
8988
  /** 0..100 battery percentage. Null when the device has no battery
8971
8989
  * reading. */
8972
8990
  batteryLevel: number().min(0).max(100).nullable(),
8991
+ /** 0..100 mowing-completion percentage of the current task, or null when no
8992
+ * task is active / progress is unavailable. */
8993
+ progressPercent: number().min(0).max(100).nullable(),
8994
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
8995
+ * or null when unknown. */
8996
+ currentCode: number().nullable(),
8997
+ /** Human label for {@link currentCode}, or null when undecodable. */
8998
+ currentCodeLabel: string().nullable(),
8999
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9000
+ * attention; `info` is normal status. */
9001
+ severity: DeviceCodeSeveritySchema,
8973
9002
  /** Ms epoch when the slice was last updated. */
8974
9003
  lastChangedAt: number()
8975
9004
  });
@@ -10544,6 +10573,7 @@ var VacuumStateSchema = _enum([
10544
10573
  "paused",
10545
10574
  "returning",
10546
10575
  "docked",
10576
+ "drying",
10547
10577
  "error"
10548
10578
  ]);
10549
10579
  /**
@@ -10582,6 +10612,12 @@ object({
10582
10612
  detergent: TankStatusSchema.nullable(),
10583
10613
  /** Dust bin. Null when the hardware has no dust bin. */
10584
10614
  dustBin: TankStatusSchema.nullable(),
10615
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10616
+ progressPercent: number().min(0).max(100).nullable(),
10617
+ /** Current error code (0 / null = no error). */
10618
+ errorCode: number().nullable(),
10619
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10620
+ errorLabel: string().nullable(),
10585
10621
  /** Ms epoch when the slice was last updated. */
10586
10622
  lastChangedAt: number()
10587
10623
  });
@@ -12068,17 +12104,32 @@ var ReleaseInputSchema = object({
12068
12104
  * the parent cascades into every accessory. */
12069
12105
  camDeviceId: number().int().nonnegative()
12070
12106
  });
12071
- var ResyncInputSchema = object({
12072
- /** Parent CamStack device id of an adopted device. The provider resolves its
12073
- * source (integration/broker + native id) and re-aligns the device's
12074
- * structural spec (type/role/capabilities/units) with the live mapping,
12075
- * rebuilding any child whose class changed while preserving operator edits. */
12076
- camDeviceId: number().int().nonnegative() });
12107
+ var ResyncInputSchema = object({
12108
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12109
+ * source (integration/broker + native id) and re-aligns the device's
12110
+ * structural spec (type/role/capabilities/units) with the live mapping,
12111
+ * rebuilding any child whose class changed while preserving operator edits. */
12112
+ camDeviceId: number().int().nonnegative(),
12113
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12114
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12115
+ * children are rebuilt fresh from source — correct names, coords, and units —
12116
+ * instead of being preserved by the incremental reconcile. Use to recover from
12117
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12118
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12119
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12120
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12121
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12122
+ * re-sync that preserves children. */
12123
+ resetToSource: boolean().optional()
12124
+ });
12077
12125
  var ResyncResultSchema = object({
12078
12126
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12079
12127
  changed: boolean(),
12080
12128
  /** Number of child devices rebuilt into a new class by this re-sync. */
12081
- rebuiltChildren: number().int().nonnegative()
12129
+ rebuiltChildren: number().int().nonnegative(),
12130
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12131
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12132
+ removedChildren: number().int().nonnegative().optional()
12082
12133
  });
12083
12134
  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, {
12084
12135
  kind: "mutation",
@@ -13777,6 +13828,11 @@ var DeviceMetaSchema = object({
13777
13828
  addonId: string(),
13778
13829
  type: string(),
13779
13830
  name: string(),
13831
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13832
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13833
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13834
+ * `DeviceMeta.userNamed`. */
13835
+ userNamed: boolean().optional(),
13780
13836
  location: string().nullable(),
13781
13837
  disabled: boolean(),
13782
13838
  parentDeviceId: number().nullable(),
@@ -14087,6 +14143,9 @@ method(object({
14087
14143
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14088
14144
  kind: "mutation",
14089
14145
  auth: "admin"
14146
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14147
+ kind: "mutation",
14148
+ auth: "admin"
14090
14149
  }), method(object({
14091
14150
  deviceId: number(),
14092
14151
  key: string(),
@@ -17849,6 +17908,12 @@ Object.freeze({
17849
17908
  addonId: null,
17850
17909
  access: "create"
17851
17910
  },
17911
+ "deviceManager.adoptionResync": {
17912
+ capName: "device-manager",
17913
+ capScope: "system",
17914
+ addonId: null,
17915
+ access: "create"
17916
+ },
17852
17917
  "deviceManager.allocateDeviceId": {
17853
17918
  capName: "device-manager",
17854
17919
  capScope: "system",
@@ -8981,18 +8981,47 @@ object({
8981
8981
  lastUpdated: number().nullable()
8982
8982
  });
8983
8983
  DeviceType.Image;
8984
+ /**
8985
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8986
+ * with a mowing lifecycle plus a dock action.
8987
+ *
8988
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8989
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8990
+ * nullable — some mowers don't report a battery percentage.
8991
+ *
8992
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8993
+ * `dock` sends the mower back to its charging station.
8994
+ */
8995
+ var LawnMowerActivitySchema = _enum([
8996
+ "idle",
8997
+ "mowing",
8998
+ "paused",
8999
+ "docked",
9000
+ "error"
9001
+ ]);
9002
+ /** Severity of the current device/error code — info (status), warning, error. */
9003
+ var DeviceCodeSeveritySchema = _enum([
9004
+ "info",
9005
+ "warning",
9006
+ "error"
9007
+ ]);
8984
9008
  object({
8985
9009
  /** Lifecycle activity of the mower. */
8986
- activity: _enum([
8987
- "idle",
8988
- "mowing",
8989
- "paused",
8990
- "docked",
8991
- "error"
8992
- ]),
9010
+ activity: LawnMowerActivitySchema,
8993
9011
  /** 0..100 battery percentage. Null when the device has no battery
8994
9012
  * reading. */
8995
9013
  batteryLevel: number().min(0).max(100).nullable(),
9014
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9015
+ * task is active / progress is unavailable. */
9016
+ progressPercent: number().min(0).max(100).nullable(),
9017
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9018
+ * or null when unknown. */
9019
+ currentCode: number().nullable(),
9020
+ /** Human label for {@link currentCode}, or null when undecodable. */
9021
+ currentCodeLabel: string().nullable(),
9022
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9023
+ * attention; `info` is normal status. */
9024
+ severity: DeviceCodeSeveritySchema,
8996
9025
  /** Ms epoch when the slice was last updated. */
8997
9026
  lastChangedAt: number()
8998
9027
  });
@@ -10567,6 +10596,7 @@ var VacuumStateSchema = _enum([
10567
10596
  "paused",
10568
10597
  "returning",
10569
10598
  "docked",
10599
+ "drying",
10570
10600
  "error"
10571
10601
  ]);
10572
10602
  /**
@@ -10605,6 +10635,12 @@ object({
10605
10635
  detergent: TankStatusSchema.nullable(),
10606
10636
  /** Dust bin. Null when the hardware has no dust bin. */
10607
10637
  dustBin: TankStatusSchema.nullable(),
10638
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10639
+ progressPercent: number().min(0).max(100).nullable(),
10640
+ /** Current error code (0 / null = no error). */
10641
+ errorCode: number().nullable(),
10642
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10643
+ errorLabel: string().nullable(),
10608
10644
  /** Ms epoch when the slice was last updated. */
10609
10645
  lastChangedAt: number()
10610
10646
  });
@@ -12091,17 +12127,32 @@ var ReleaseInputSchema = object({
12091
12127
  * the parent cascades into every accessory. */
12092
12128
  camDeviceId: number().int().nonnegative()
12093
12129
  });
12094
- var ResyncInputSchema = object({
12095
- /** Parent CamStack device id of an adopted device. The provider resolves its
12096
- * source (integration/broker + native id) and re-aligns the device's
12097
- * structural spec (type/role/capabilities/units) with the live mapping,
12098
- * rebuilding any child whose class changed while preserving operator edits. */
12099
- camDeviceId: number().int().nonnegative() });
12130
+ var ResyncInputSchema = object({
12131
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12132
+ * source (integration/broker + native id) and re-aligns the device's
12133
+ * structural spec (type/role/capabilities/units) with the live mapping,
12134
+ * rebuilding any child whose class changed while preserving operator edits. */
12135
+ camDeviceId: number().int().nonnegative(),
12136
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12137
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12138
+ * children are rebuilt fresh from source — correct names, coords, and units —
12139
+ * instead of being preserved by the incremental reconcile. Use to recover from
12140
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12141
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12142
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12143
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12144
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12145
+ * re-sync that preserves children. */
12146
+ resetToSource: boolean().optional()
12147
+ });
12100
12148
  var ResyncResultSchema = object({
12101
12149
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12102
12150
  changed: boolean(),
12103
12151
  /** Number of child devices rebuilt into a new class by this re-sync. */
12104
- rebuiltChildren: number().int().nonnegative()
12152
+ rebuiltChildren: number().int().nonnegative(),
12153
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12154
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12155
+ removedChildren: number().int().nonnegative().optional()
12105
12156
  });
12106
12157
  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, {
12107
12158
  kind: "mutation",
@@ -13800,6 +13851,11 @@ var DeviceMetaSchema = object({
13800
13851
  addonId: string(),
13801
13852
  type: string(),
13802
13853
  name: string(),
13854
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13855
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13856
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13857
+ * `DeviceMeta.userNamed`. */
13858
+ userNamed: boolean().optional(),
13803
13859
  location: string().nullable(),
13804
13860
  disabled: boolean(),
13805
13861
  parentDeviceId: number().nullable(),
@@ -14110,6 +14166,9 @@ method(object({
14110
14166
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14111
14167
  kind: "mutation",
14112
14168
  auth: "admin"
14169
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14170
+ kind: "mutation",
14171
+ auth: "admin"
14113
14172
  }), method(object({
14114
14173
  deviceId: number(),
14115
14174
  key: string(),
@@ -17872,6 +17931,12 @@ Object.freeze({
17872
17931
  addonId: null,
17873
17932
  access: "create"
17874
17933
  },
17934
+ "deviceManager.adoptionResync": {
17935
+ capName: "device-manager",
17936
+ capScope: "system",
17937
+ addonId: null,
17938
+ access: "create"
17939
+ },
17875
17940
  "deviceManager.allocateDeviceId": {
17876
17941
  capName: "device-manager",
17877
17942
  capScope: "system",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-EHXZloKG.js");
5
+ const require_shared = require("./shared-Dy0MrVpA.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-BFcg9bB0.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-DYllOkhk.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { AuthType, createClient } from "webdav";
4
4
  //#region src/providers/webdav/webdav-config-schema.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-remote-storage",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",