@camstack/addon-import-alexa 0.2.104 → 0.2.106

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
@@ -13720,6 +13720,107 @@ var ExposeInputSchema = object({
13720
13720
  });
13721
13721
  var UnexposeInputSchema = object({ deviceId: string() });
13722
13722
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13723
+ /** Wire/storage schema for one icon id. */
13724
+ var LocationIconIdSchema = _enum([
13725
+ "map-pin",
13726
+ "house",
13727
+ "door-open",
13728
+ "sofa",
13729
+ "utensils",
13730
+ "bed-double",
13731
+ "bath",
13732
+ "briefcase",
13733
+ "car",
13734
+ "circle-parking",
13735
+ "route",
13736
+ "trees",
13737
+ "umbrella",
13738
+ "waves-ladder",
13739
+ "fence",
13740
+ "package",
13741
+ "warehouse",
13742
+ "store",
13743
+ "sun",
13744
+ "radar"
13745
+ ]);
13746
+ /**
13747
+ * One (location, icon) assignment as it travels.
13748
+ *
13749
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13750
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13751
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13752
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13753
+ * map keyed on the displayed casing would orphan its entry on exactly that
13754
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13755
+ */
13756
+ var LocationIconAssignmentSchema = object({
13757
+ locationKey: string(),
13758
+ icon: LocationIconIdSchema
13759
+ });
13760
+ /**
13761
+ * One (location, description) assignment as it travels.
13762
+ *
13763
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13764
+ * reason: this lived for a while in the post-analysis addon's own settings,
13765
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13766
+ * the Locations page carried the icon and silently orphaned the description —
13767
+ * two authorities for one thing, joined by two different rules. Now both hang
13768
+ * off the location itself, on `locationIconKey`.
13769
+ */
13770
+ var LocationDescriptionAssignmentSchema = object({
13771
+ locationKey: string(),
13772
+ description: string()
13773
+ });
13774
+ /**
13775
+ * A SITE ZONE — a named part of the property that several locations belong to.
13776
+ *
13777
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13778
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13779
+ * one zone, so a camera's zone is derived and never stored on the device: the
13780
+ * whole point of this entity is that grouping rooms touches no device row.
13781
+ *
13782
+ * ## Why not `zone`
13783
+ *
13784
+ * Because `zone` is already the most loaded word in this product: 612 source
13785
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13786
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13787
+ * set of rooms — and a reader who confuses them will look for a camera's
13788
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13789
+ * word by calling the drawn one what it actually is: a detection zone.
13790
+ *
13791
+ * ## The key
13792
+ *
13793
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13794
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13795
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13796
+ * silently-dropped location description.
13797
+ *
13798
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13799
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13800
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13801
+ */
13802
+ /**
13803
+ * One zone as it travels: its key, the label the operator typed, its icon and
13804
+ * the locations inside it.
13805
+ *
13806
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13807
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13808
+ * here, rather than left to a second call, because every consumer wants both
13809
+ * at once and a viewer that asked twice could render a zone whose membership
13810
+ * it has not fetched yet.
13811
+ *
13812
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13813
+ * of those two is a choice, and a picker has to draw them differently.
13814
+ */
13815
+ var SiteZoneSchema = object({
13816
+ zoneKey: string(),
13817
+ label: string(),
13818
+ icon: LocationIconIdSchema.nullable(),
13819
+ /** Folded location keys, sorted. A location listed here need not be
13820
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13821
+ * the ones that most want grouping. */
13822
+ locationKeys: array(string())
13823
+ });
13723
13824
  var ProviderStatusSchema = object({
13724
13825
  connected: boolean(),
13725
13826
  deviceCount: number(),
@@ -14312,6 +14413,39 @@ method(object({
14312
14413
  }), object({ moved: number() }), {
14313
14414
  kind: "mutation",
14314
14415
  auth: "admin"
14416
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14417
+ location: string(),
14418
+ icon: LocationIconIdSchema.nullable()
14419
+ }), _void(), {
14420
+ kind: "mutation",
14421
+ auth: "admin"
14422
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14423
+ location: string(),
14424
+ description: string().max(400).nullable()
14425
+ }), _void(), {
14426
+ kind: "mutation",
14427
+ auth: "admin"
14428
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14429
+ name: string(),
14430
+ icon: LocationIconIdSchema.nullable().optional()
14431
+ }), _void(), {
14432
+ kind: "mutation",
14433
+ auth: "admin"
14434
+ }), method(object({ name: string() }), _void(), {
14435
+ kind: "mutation",
14436
+ auth: "admin"
14437
+ }), method(object({
14438
+ from: string(),
14439
+ to: string()
14440
+ }), _void(), {
14441
+ kind: "mutation",
14442
+ auth: "admin"
14443
+ }), method(object({
14444
+ location: string(),
14445
+ zone: string().nullable()
14446
+ }), _void(), {
14447
+ kind: "mutation",
14448
+ auth: "admin"
14315
14449
  }), method(object({
14316
14450
  deviceId: number(),
14317
14451
  disabled: boolean()
@@ -37239,6 +37373,18 @@ Object.freeze({
37239
37373
  addonId: null,
37240
37374
  access: "view"
37241
37375
  },
37376
+ "deviceManager.listLocationDescriptions": {
37377
+ capName: "device-manager",
37378
+ capScope: "system",
37379
+ addonId: null,
37380
+ access: "view"
37381
+ },
37382
+ "deviceManager.listLocationIcons": {
37383
+ capName: "device-manager",
37384
+ capScope: "system",
37385
+ addonId: null,
37386
+ access: "view"
37387
+ },
37242
37388
  "deviceManager.listLocations": {
37243
37389
  capName: "device-manager",
37244
37390
  capScope: "system",
@@ -37251,6 +37397,12 @@ Object.freeze({
37251
37397
  addonId: null,
37252
37398
  access: "view"
37253
37399
  },
37400
+ "deviceManager.listSiteZones": {
37401
+ capName: "device-manager",
37402
+ capScope: "system",
37403
+ addonId: null,
37404
+ access: "view"
37405
+ },
37254
37406
  "deviceManager.listWrappersForCap": {
37255
37407
  capName: "device-manager",
37256
37408
  capScope: "system",
@@ -37335,12 +37487,24 @@ Object.freeze({
37335
37487
  addonId: null,
37336
37488
  access: "delete"
37337
37489
  },
37490
+ "deviceManager.removeSiteZone": {
37491
+ capName: "device-manager",
37492
+ capScope: "system",
37493
+ addonId: null,
37494
+ access: "delete"
37495
+ },
37338
37496
  "deviceManager.renameLocation": {
37339
37497
  capName: "device-manager",
37340
37498
  capScope: "system",
37341
37499
  addonId: null,
37342
37500
  access: "create"
37343
37501
  },
37502
+ "deviceManager.renameSiteZone": {
37503
+ capName: "device-manager",
37504
+ capScope: "system",
37505
+ addonId: null,
37506
+ access: "create"
37507
+ },
37344
37508
  "deviceManager.runDeviceAction": {
37345
37509
  capName: "device-manager",
37346
37510
  capScope: "system",
@@ -37383,6 +37547,24 @@ Object.freeze({
37383
37547
  addonId: null,
37384
37548
  access: "create"
37385
37549
  },
37550
+ "deviceManager.setLocationDescription": {
37551
+ capName: "device-manager",
37552
+ capScope: "system",
37553
+ addonId: null,
37554
+ access: "create"
37555
+ },
37556
+ "deviceManager.setLocationIcon": {
37557
+ capName: "device-manager",
37558
+ capScope: "system",
37559
+ addonId: null,
37560
+ access: "create"
37561
+ },
37562
+ "deviceManager.setLocationZone": {
37563
+ capName: "device-manager",
37564
+ capScope: "system",
37565
+ addonId: null,
37566
+ access: "create"
37567
+ },
37386
37568
  "deviceManager.setMetadata": {
37387
37569
  capName: "device-manager",
37388
37570
  capScope: "system",
@@ -37413,6 +37595,12 @@ Object.freeze({
37413
37595
  addonId: null,
37414
37596
  access: "create"
37415
37597
  },
37598
+ "deviceManager.setSiteZone": {
37599
+ capName: "device-manager",
37600
+ capScope: "system",
37601
+ addonId: null,
37602
+ access: "create"
37603
+ },
37416
37604
  "deviceManager.setStreamProfileMap": {
37417
37605
  capName: "device-manager",
37418
37606
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13720,6 +13720,107 @@ var ExposeInputSchema = object({
13720
13720
  });
13721
13721
  var UnexposeInputSchema = object({ deviceId: string() });
13722
13722
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13723
+ /** Wire/storage schema for one icon id. */
13724
+ var LocationIconIdSchema = _enum([
13725
+ "map-pin",
13726
+ "house",
13727
+ "door-open",
13728
+ "sofa",
13729
+ "utensils",
13730
+ "bed-double",
13731
+ "bath",
13732
+ "briefcase",
13733
+ "car",
13734
+ "circle-parking",
13735
+ "route",
13736
+ "trees",
13737
+ "umbrella",
13738
+ "waves-ladder",
13739
+ "fence",
13740
+ "package",
13741
+ "warehouse",
13742
+ "store",
13743
+ "sun",
13744
+ "radar"
13745
+ ]);
13746
+ /**
13747
+ * One (location, icon) assignment as it travels.
13748
+ *
13749
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13750
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13751
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13752
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13753
+ * map keyed on the displayed casing would orphan its entry on exactly that
13754
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13755
+ */
13756
+ var LocationIconAssignmentSchema = object({
13757
+ locationKey: string(),
13758
+ icon: LocationIconIdSchema
13759
+ });
13760
+ /**
13761
+ * One (location, description) assignment as it travels.
13762
+ *
13763
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13764
+ * reason: this lived for a while in the post-analysis addon's own settings,
13765
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13766
+ * the Locations page carried the icon and silently orphaned the description —
13767
+ * two authorities for one thing, joined by two different rules. Now both hang
13768
+ * off the location itself, on `locationIconKey`.
13769
+ */
13770
+ var LocationDescriptionAssignmentSchema = object({
13771
+ locationKey: string(),
13772
+ description: string()
13773
+ });
13774
+ /**
13775
+ * A SITE ZONE — a named part of the property that several locations belong to.
13776
+ *
13777
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13778
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13779
+ * one zone, so a camera's zone is derived and never stored on the device: the
13780
+ * whole point of this entity is that grouping rooms touches no device row.
13781
+ *
13782
+ * ## Why not `zone`
13783
+ *
13784
+ * Because `zone` is already the most loaded word in this product: 612 source
13785
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13786
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13787
+ * set of rooms — and a reader who confuses them will look for a camera's
13788
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13789
+ * word by calling the drawn one what it actually is: a detection zone.
13790
+ *
13791
+ * ## The key
13792
+ *
13793
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13794
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13795
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13796
+ * silently-dropped location description.
13797
+ *
13798
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13799
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13800
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13801
+ */
13802
+ /**
13803
+ * One zone as it travels: its key, the label the operator typed, its icon and
13804
+ * the locations inside it.
13805
+ *
13806
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13807
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13808
+ * here, rather than left to a second call, because every consumer wants both
13809
+ * at once and a viewer that asked twice could render a zone whose membership
13810
+ * it has not fetched yet.
13811
+ *
13812
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13813
+ * of those two is a choice, and a picker has to draw them differently.
13814
+ */
13815
+ var SiteZoneSchema = object({
13816
+ zoneKey: string(),
13817
+ label: string(),
13818
+ icon: LocationIconIdSchema.nullable(),
13819
+ /** Folded location keys, sorted. A location listed here need not be
13820
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13821
+ * the ones that most want grouping. */
13822
+ locationKeys: array(string())
13823
+ });
13723
13824
  var ProviderStatusSchema = object({
13724
13825
  connected: boolean(),
13725
13826
  deviceCount: number(),
@@ -14312,6 +14413,39 @@ method(object({
14312
14413
  }), object({ moved: number() }), {
14313
14414
  kind: "mutation",
14314
14415
  auth: "admin"
14416
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14417
+ location: string(),
14418
+ icon: LocationIconIdSchema.nullable()
14419
+ }), _void(), {
14420
+ kind: "mutation",
14421
+ auth: "admin"
14422
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14423
+ location: string(),
14424
+ description: string().max(400).nullable()
14425
+ }), _void(), {
14426
+ kind: "mutation",
14427
+ auth: "admin"
14428
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14429
+ name: string(),
14430
+ icon: LocationIconIdSchema.nullable().optional()
14431
+ }), _void(), {
14432
+ kind: "mutation",
14433
+ auth: "admin"
14434
+ }), method(object({ name: string() }), _void(), {
14435
+ kind: "mutation",
14436
+ auth: "admin"
14437
+ }), method(object({
14438
+ from: string(),
14439
+ to: string()
14440
+ }), _void(), {
14441
+ kind: "mutation",
14442
+ auth: "admin"
14443
+ }), method(object({
14444
+ location: string(),
14445
+ zone: string().nullable()
14446
+ }), _void(), {
14447
+ kind: "mutation",
14448
+ auth: "admin"
14315
14449
  }), method(object({
14316
14450
  deviceId: number(),
14317
14451
  disabled: boolean()
@@ -37239,6 +37373,18 @@ Object.freeze({
37239
37373
  addonId: null,
37240
37374
  access: "view"
37241
37375
  },
37376
+ "deviceManager.listLocationDescriptions": {
37377
+ capName: "device-manager",
37378
+ capScope: "system",
37379
+ addonId: null,
37380
+ access: "view"
37381
+ },
37382
+ "deviceManager.listLocationIcons": {
37383
+ capName: "device-manager",
37384
+ capScope: "system",
37385
+ addonId: null,
37386
+ access: "view"
37387
+ },
37242
37388
  "deviceManager.listLocations": {
37243
37389
  capName: "device-manager",
37244
37390
  capScope: "system",
@@ -37251,6 +37397,12 @@ Object.freeze({
37251
37397
  addonId: null,
37252
37398
  access: "view"
37253
37399
  },
37400
+ "deviceManager.listSiteZones": {
37401
+ capName: "device-manager",
37402
+ capScope: "system",
37403
+ addonId: null,
37404
+ access: "view"
37405
+ },
37254
37406
  "deviceManager.listWrappersForCap": {
37255
37407
  capName: "device-manager",
37256
37408
  capScope: "system",
@@ -37335,12 +37487,24 @@ Object.freeze({
37335
37487
  addonId: null,
37336
37488
  access: "delete"
37337
37489
  },
37490
+ "deviceManager.removeSiteZone": {
37491
+ capName: "device-manager",
37492
+ capScope: "system",
37493
+ addonId: null,
37494
+ access: "delete"
37495
+ },
37338
37496
  "deviceManager.renameLocation": {
37339
37497
  capName: "device-manager",
37340
37498
  capScope: "system",
37341
37499
  addonId: null,
37342
37500
  access: "create"
37343
37501
  },
37502
+ "deviceManager.renameSiteZone": {
37503
+ capName: "device-manager",
37504
+ capScope: "system",
37505
+ addonId: null,
37506
+ access: "create"
37507
+ },
37344
37508
  "deviceManager.runDeviceAction": {
37345
37509
  capName: "device-manager",
37346
37510
  capScope: "system",
@@ -37383,6 +37547,24 @@ Object.freeze({
37383
37547
  addonId: null,
37384
37548
  access: "create"
37385
37549
  },
37550
+ "deviceManager.setLocationDescription": {
37551
+ capName: "device-manager",
37552
+ capScope: "system",
37553
+ addonId: null,
37554
+ access: "create"
37555
+ },
37556
+ "deviceManager.setLocationIcon": {
37557
+ capName: "device-manager",
37558
+ capScope: "system",
37559
+ addonId: null,
37560
+ access: "create"
37561
+ },
37562
+ "deviceManager.setLocationZone": {
37563
+ capName: "device-manager",
37564
+ capScope: "system",
37565
+ addonId: null,
37566
+ access: "create"
37567
+ },
37386
37568
  "deviceManager.setMetadata": {
37387
37569
  capName: "device-manager",
37388
37570
  capScope: "system",
@@ -37413,6 +37595,12 @@ Object.freeze({
37413
37595
  addonId: null,
37414
37596
  access: "create"
37415
37597
  },
37598
+ "deviceManager.setSiteZone": {
37599
+ capName: "device-manager",
37600
+ capScope: "system",
37601
+ addonId: null,
37602
+ access: "create"
37603
+ },
37416
37604
  "deviceManager.setStreamProfileMap": {
37417
37605
  capName: "device-manager",
37418
37606
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.104",
3
+ "version": "0.2.106",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",