@camstack/addon-export-alexa 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.
@@ -4655,7 +4655,7 @@ function _instanceof(cls, params = {}) {
4655
4655
  return inst;
4656
4656
  }
4657
4657
  //#endregion
4658
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4658
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4659
4659
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4660
4660
  EventCategory["SystemBoot"] = "system.boot";
4661
4661
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6466,6 +6466,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6466
6466
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6467
6467
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6468
6468
  DeviceRole["PressureSensor"] = "pressure-sensor";
6469
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6470
+ DeviceRole["WindSensor"] = "wind-sensor";
6471
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6472
+ DeviceRole["RainSensor"] = "rain-sensor";
6473
+ /** UV index (weather-station `uv-sensor` cap). */
6474
+ DeviceRole["UvSensor"] = "uv-sensor";
6475
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6476
+ * Distinct from AmbientLightSensor (lux). */
6477
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6478
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6479
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6469
6480
  DeviceRole["PowerSensor"] = "power-sensor";
6470
6481
  DeviceRole["EnergySensor"] = "energy-sensor";
6471
6482
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -9167,18 +9178,47 @@ object({
9167
9178
  lastUpdated: number().nullable()
9168
9179
  });
9169
9180
  DeviceType.Image;
9181
+ /**
9182
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9183
+ * with a mowing lifecycle plus a dock action.
9184
+ *
9185
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9186
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9187
+ * nullable — some mowers don't report a battery percentage.
9188
+ *
9189
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9190
+ * `dock` sends the mower back to its charging station.
9191
+ */
9192
+ var LawnMowerActivitySchema = _enum([
9193
+ "idle",
9194
+ "mowing",
9195
+ "paused",
9196
+ "docked",
9197
+ "error"
9198
+ ]);
9199
+ /** Severity of the current device/error code — info (status), warning, error. */
9200
+ var DeviceCodeSeveritySchema = _enum([
9201
+ "info",
9202
+ "warning",
9203
+ "error"
9204
+ ]);
9170
9205
  object({
9171
9206
  /** Lifecycle activity of the mower. */
9172
- activity: _enum([
9173
- "idle",
9174
- "mowing",
9175
- "paused",
9176
- "docked",
9177
- "error"
9178
- ]),
9207
+ activity: LawnMowerActivitySchema,
9179
9208
  /** 0..100 battery percentage. Null when the device has no battery
9180
9209
  * reading. */
9181
9210
  batteryLevel: number().min(0).max(100).nullable(),
9211
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9212
+ * task is active / progress is unavailable. */
9213
+ progressPercent: number().min(0).max(100).nullable(),
9214
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9215
+ * or null when unknown. */
9216
+ currentCode: number().nullable(),
9217
+ /** Human label for {@link currentCode}, or null when undecodable. */
9218
+ currentCodeLabel: string().nullable(),
9219
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9220
+ * attention; `info` is normal status. */
9221
+ severity: DeviceCodeSeveritySchema,
9182
9222
  /** Ms epoch when the slice was last updated. */
9183
9223
  lastChangedAt: number()
9184
9224
  });
@@ -10753,6 +10793,7 @@ var VacuumStateSchema = _enum([
10753
10793
  "paused",
10754
10794
  "returning",
10755
10795
  "docked",
10796
+ "drying",
10756
10797
  "error"
10757
10798
  ]);
10758
10799
  /**
@@ -10791,6 +10832,12 @@ object({
10791
10832
  detergent: TankStatusSchema.nullable(),
10792
10833
  /** Dust bin. Null when the hardware has no dust bin. */
10793
10834
  dustBin: TankStatusSchema.nullable(),
10835
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10836
+ progressPercent: number().min(0).max(100).nullable(),
10837
+ /** Current error code (0 / null = no error). */
10838
+ errorCode: number().nullable(),
10839
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10840
+ errorLabel: string().nullable(),
10794
10841
  /** Ms epoch when the slice was last updated. */
10795
10842
  lastChangedAt: number()
10796
10843
  });
@@ -12259,17 +12306,32 @@ var ReleaseInputSchema = object({
12259
12306
  * the parent cascades into every accessory. */
12260
12307
  camDeviceId: number().int().nonnegative()
12261
12308
  });
12262
- var ResyncInputSchema = object({
12263
- /** Parent CamStack device id of an adopted device. The provider resolves its
12264
- * source (integration/broker + native id) and re-aligns the device's
12265
- * structural spec (type/role/capabilities/units) with the live mapping,
12266
- * rebuilding any child whose class changed while preserving operator edits. */
12267
- camDeviceId: number().int().nonnegative() });
12309
+ var ResyncInputSchema = object({
12310
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12311
+ * source (integration/broker + native id) and re-aligns the device's
12312
+ * structural spec (type/role/capabilities/units) with the live mapping,
12313
+ * rebuilding any child whose class changed while preserving operator edits. */
12314
+ camDeviceId: number().int().nonnegative(),
12315
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12316
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12317
+ * children are rebuilt fresh from source — correct names, coords, and units —
12318
+ * instead of being preserved by the incremental reconcile. Use to recover from
12319
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12320
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12321
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12322
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12323
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12324
+ * re-sync that preserves children. */
12325
+ resetToSource: boolean().optional()
12326
+ });
12268
12327
  var ResyncResultSchema = object({
12269
12328
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12270
12329
  changed: boolean(),
12271
12330
  /** Number of child devices rebuilt into a new class by this re-sync. */
12272
- rebuiltChildren: number().int().nonnegative()
12331
+ rebuiltChildren: number().int().nonnegative(),
12332
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12333
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12334
+ removedChildren: number().int().nonnegative().optional()
12273
12335
  });
12274
12336
  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, {
12275
12337
  kind: "mutation",
@@ -14010,6 +14072,11 @@ var DeviceMetaSchema = object({
14010
14072
  addonId: string(),
14011
14073
  type: string(),
14012
14074
  name: string(),
14075
+ /** True once an operator explicitly renamed the device via `setName`. Drives
14076
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
14077
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
14078
+ * `DeviceMeta.userNamed`. */
14079
+ userNamed: boolean().optional(),
14013
14080
  location: string().nullable(),
14014
14081
  disabled: boolean(),
14015
14082
  parentDeviceId: number().nullable(),
@@ -14320,6 +14387,9 @@ method(object({
14320
14387
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14321
14388
  kind: "mutation",
14322
14389
  auth: "admin"
14390
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14391
+ kind: "mutation",
14392
+ auth: "admin"
14323
14393
  }), method(object({
14324
14394
  deviceId: number(),
14325
14395
  key: string(),
@@ -18082,6 +18152,12 @@ Object.freeze({
18082
18152
  addonId: null,
18083
18153
  access: "create"
18084
18154
  },
18155
+ "deviceManager.adoptionResync": {
18156
+ capName: "device-manager",
18157
+ capScope: "system",
18158
+ addonId: null,
18159
+ access: "create"
18160
+ },
18085
18161
  "deviceManager.allocateDeviceId": {
18086
18162
  capName: "device-manager",
18087
18163
  capScope: "system",
@@ -4629,7 +4629,7 @@ function _instanceof(cls, params = {}) {
4629
4629
  return inst;
4630
4630
  }
4631
4631
  //#endregion
4632
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4632
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4633
4633
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4634
4634
  EventCategory["SystemBoot"] = "system.boot";
4635
4635
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6440,6 +6440,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6440
6440
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6441
6441
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6442
6442
  DeviceRole["PressureSensor"] = "pressure-sensor";
6443
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6444
+ DeviceRole["WindSensor"] = "wind-sensor";
6445
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6446
+ DeviceRole["RainSensor"] = "rain-sensor";
6447
+ /** UV index (weather-station `uv-sensor` cap). */
6448
+ DeviceRole["UvSensor"] = "uv-sensor";
6449
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6450
+ * Distinct from AmbientLightSensor (lux). */
6451
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6452
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6453
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6443
6454
  DeviceRole["PowerSensor"] = "power-sensor";
6444
6455
  DeviceRole["EnergySensor"] = "energy-sensor";
6445
6456
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -9141,18 +9152,47 @@ object({
9141
9152
  lastUpdated: number().nullable()
9142
9153
  });
9143
9154
  DeviceType.Image;
9155
+ /**
9156
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9157
+ * with a mowing lifecycle plus a dock action.
9158
+ *
9159
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9160
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9161
+ * nullable — some mowers don't report a battery percentage.
9162
+ *
9163
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9164
+ * `dock` sends the mower back to its charging station.
9165
+ */
9166
+ var LawnMowerActivitySchema = _enum([
9167
+ "idle",
9168
+ "mowing",
9169
+ "paused",
9170
+ "docked",
9171
+ "error"
9172
+ ]);
9173
+ /** Severity of the current device/error code — info (status), warning, error. */
9174
+ var DeviceCodeSeveritySchema = _enum([
9175
+ "info",
9176
+ "warning",
9177
+ "error"
9178
+ ]);
9144
9179
  object({
9145
9180
  /** Lifecycle activity of the mower. */
9146
- activity: _enum([
9147
- "idle",
9148
- "mowing",
9149
- "paused",
9150
- "docked",
9151
- "error"
9152
- ]),
9181
+ activity: LawnMowerActivitySchema,
9153
9182
  /** 0..100 battery percentage. Null when the device has no battery
9154
9183
  * reading. */
9155
9184
  batteryLevel: number().min(0).max(100).nullable(),
9185
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9186
+ * task is active / progress is unavailable. */
9187
+ progressPercent: number().min(0).max(100).nullable(),
9188
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9189
+ * or null when unknown. */
9190
+ currentCode: number().nullable(),
9191
+ /** Human label for {@link currentCode}, or null when undecodable. */
9192
+ currentCodeLabel: string().nullable(),
9193
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9194
+ * attention; `info` is normal status. */
9195
+ severity: DeviceCodeSeveritySchema,
9156
9196
  /** Ms epoch when the slice was last updated. */
9157
9197
  lastChangedAt: number()
9158
9198
  });
@@ -10727,6 +10767,7 @@ var VacuumStateSchema = _enum([
10727
10767
  "paused",
10728
10768
  "returning",
10729
10769
  "docked",
10770
+ "drying",
10730
10771
  "error"
10731
10772
  ]);
10732
10773
  /**
@@ -10765,6 +10806,12 @@ object({
10765
10806
  detergent: TankStatusSchema.nullable(),
10766
10807
  /** Dust bin. Null when the hardware has no dust bin. */
10767
10808
  dustBin: TankStatusSchema.nullable(),
10809
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10810
+ progressPercent: number().min(0).max(100).nullable(),
10811
+ /** Current error code (0 / null = no error). */
10812
+ errorCode: number().nullable(),
10813
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10814
+ errorLabel: string().nullable(),
10768
10815
  /** Ms epoch when the slice was last updated. */
10769
10816
  lastChangedAt: number()
10770
10817
  });
@@ -12233,17 +12280,32 @@ var ReleaseInputSchema = object({
12233
12280
  * the parent cascades into every accessory. */
12234
12281
  camDeviceId: number().int().nonnegative()
12235
12282
  });
12236
- var ResyncInputSchema = object({
12237
- /** Parent CamStack device id of an adopted device. The provider resolves its
12238
- * source (integration/broker + native id) and re-aligns the device's
12239
- * structural spec (type/role/capabilities/units) with the live mapping,
12240
- * rebuilding any child whose class changed while preserving operator edits. */
12241
- camDeviceId: number().int().nonnegative() });
12283
+ var ResyncInputSchema = object({
12284
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12285
+ * source (integration/broker + native id) and re-aligns the device's
12286
+ * structural spec (type/role/capabilities/units) with the live mapping,
12287
+ * rebuilding any child whose class changed while preserving operator edits. */
12288
+ camDeviceId: number().int().nonnegative(),
12289
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12290
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12291
+ * children are rebuilt fresh from source — correct names, coords, and units —
12292
+ * instead of being preserved by the incremental reconcile. Use to recover from
12293
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12294
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12295
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12296
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12297
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12298
+ * re-sync that preserves children. */
12299
+ resetToSource: boolean().optional()
12300
+ });
12242
12301
  var ResyncResultSchema = object({
12243
12302
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12244
12303
  changed: boolean(),
12245
12304
  /** Number of child devices rebuilt into a new class by this re-sync. */
12246
- rebuiltChildren: number().int().nonnegative()
12305
+ rebuiltChildren: number().int().nonnegative(),
12306
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12307
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12308
+ removedChildren: number().int().nonnegative().optional()
12247
12309
  });
12248
12310
  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, {
12249
12311
  kind: "mutation",
@@ -13984,6 +14046,11 @@ var DeviceMetaSchema = object({
13984
14046
  addonId: string(),
13985
14047
  type: string(),
13986
14048
  name: string(),
14049
+ /** True once an operator explicitly renamed the device via `setName`. Drives
14050
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
14051
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
14052
+ * `DeviceMeta.userNamed`. */
14053
+ userNamed: boolean().optional(),
13987
14054
  location: string().nullable(),
13988
14055
  disabled: boolean(),
13989
14056
  parentDeviceId: number().nullable(),
@@ -14294,6 +14361,9 @@ method(object({
14294
14361
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14295
14362
  kind: "mutation",
14296
14363
  auth: "admin"
14364
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14365
+ kind: "mutation",
14366
+ auth: "admin"
14297
14367
  }), method(object({
14298
14368
  deviceId: number(),
14299
14369
  key: string(),
@@ -18056,6 +18126,12 @@ Object.freeze({
18056
18126
  addonId: null,
18057
18127
  access: "create"
18058
18128
  },
18129
+ "deviceManager.adoptionResync": {
18130
+ capName: "device-manager",
18131
+ capScope: "system",
18132
+ addonId: null,
18133
+ access: "create"
18134
+ },
18059
18135
  "deviceManager.allocateDeviceId": {
18060
18136
  capName: "device-manager",
18061
18137
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",