@camstack/addon-export-alexa 1.2.112 → 1.2.114

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.
@@ -13594,6 +13594,107 @@ var deviceExportCapability = {
13594
13594
  unexposeDevice: method(UnexposeInputSchema, _void(), { kind: "mutation" })
13595
13595
  }
13596
13596
  };
13597
+ /** Wire/storage schema for one icon id. */
13598
+ var LocationIconIdSchema = _enum([
13599
+ "map-pin",
13600
+ "house",
13601
+ "door-open",
13602
+ "sofa",
13603
+ "utensils",
13604
+ "bed-double",
13605
+ "bath",
13606
+ "briefcase",
13607
+ "car",
13608
+ "circle-parking",
13609
+ "route",
13610
+ "trees",
13611
+ "umbrella",
13612
+ "waves-ladder",
13613
+ "fence",
13614
+ "package",
13615
+ "warehouse",
13616
+ "store",
13617
+ "sun",
13618
+ "radar"
13619
+ ]);
13620
+ /**
13621
+ * One (location, icon) assignment as it travels.
13622
+ *
13623
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13624
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13625
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13626
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13627
+ * map keyed on the displayed casing would orphan its entry on exactly that
13628
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13629
+ */
13630
+ var LocationIconAssignmentSchema = object({
13631
+ locationKey: string(),
13632
+ icon: LocationIconIdSchema
13633
+ });
13634
+ /**
13635
+ * One (location, description) assignment as it travels.
13636
+ *
13637
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13638
+ * reason: this lived for a while in the post-analysis addon's own settings,
13639
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13640
+ * the Locations page carried the icon and silently orphaned the description —
13641
+ * two authorities for one thing, joined by two different rules. Now both hang
13642
+ * off the location itself, on `locationIconKey`.
13643
+ */
13644
+ var LocationDescriptionAssignmentSchema = object({
13645
+ locationKey: string(),
13646
+ description: string()
13647
+ });
13648
+ /**
13649
+ * A SITE ZONE — a named part of the property that several locations belong to.
13650
+ *
13651
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13652
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13653
+ * one zone, so a camera's zone is derived and never stored on the device: the
13654
+ * whole point of this entity is that grouping rooms touches no device row.
13655
+ *
13656
+ * ## Why not `zone`
13657
+ *
13658
+ * Because `zone` is already the most loaded word in this product: 612 source
13659
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13660
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13661
+ * set of rooms — and a reader who confuses them will look for a camera's
13662
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13663
+ * word by calling the drawn one what it actually is: a detection zone.
13664
+ *
13665
+ * ## The key
13666
+ *
13667
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13668
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13669
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13670
+ * silently-dropped location description.
13671
+ *
13672
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13673
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13674
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13675
+ */
13676
+ /**
13677
+ * One zone as it travels: its key, the label the operator typed, its icon and
13678
+ * the locations inside it.
13679
+ *
13680
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13681
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13682
+ * here, rather than left to a second call, because every consumer wants both
13683
+ * at once and a viewer that asked twice could render a zone whose membership
13684
+ * it has not fetched yet.
13685
+ *
13686
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13687
+ * of those two is a choice, and a picker has to draw them differently.
13688
+ */
13689
+ var SiteZoneSchema = object({
13690
+ zoneKey: string(),
13691
+ label: string(),
13692
+ icon: LocationIconIdSchema.nullable(),
13693
+ /** Folded location keys, sorted. A location listed here need not be
13694
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13695
+ * the ones that most want grouping. */
13696
+ locationKeys: array(string())
13697
+ });
13597
13698
  var ProviderStatusSchema = object({
13598
13699
  connected: boolean(),
13599
13700
  deviceCount: number(),
@@ -14105,6 +14206,39 @@ method(object({
14105
14206
  }), object({ moved: number() }), {
14106
14207
  kind: "mutation",
14107
14208
  auth: "admin"
14209
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14210
+ location: string(),
14211
+ icon: LocationIconIdSchema.nullable()
14212
+ }), _void(), {
14213
+ kind: "mutation",
14214
+ auth: "admin"
14215
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14216
+ location: string(),
14217
+ description: string().max(400).nullable()
14218
+ }), _void(), {
14219
+ kind: "mutation",
14220
+ auth: "admin"
14221
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14222
+ name: string(),
14223
+ icon: LocationIconIdSchema.nullable().optional()
14224
+ }), _void(), {
14225
+ kind: "mutation",
14226
+ auth: "admin"
14227
+ }), method(object({ name: string() }), _void(), {
14228
+ kind: "mutation",
14229
+ auth: "admin"
14230
+ }), method(object({
14231
+ from: string(),
14232
+ to: string()
14233
+ }), _void(), {
14234
+ kind: "mutation",
14235
+ auth: "admin"
14236
+ }), method(object({
14237
+ location: string(),
14238
+ zone: string().nullable()
14239
+ }), _void(), {
14240
+ kind: "mutation",
14241
+ auth: "admin"
14108
14242
  }), method(object({
14109
14243
  deviceId: number(),
14110
14244
  disabled: boolean()
@@ -32944,6 +33078,18 @@ Object.freeze({
32944
33078
  addonId: null,
32945
33079
  access: "view"
32946
33080
  },
33081
+ "deviceManager.listLocationDescriptions": {
33082
+ capName: "device-manager",
33083
+ capScope: "system",
33084
+ addonId: null,
33085
+ access: "view"
33086
+ },
33087
+ "deviceManager.listLocationIcons": {
33088
+ capName: "device-manager",
33089
+ capScope: "system",
33090
+ addonId: null,
33091
+ access: "view"
33092
+ },
32947
33093
  "deviceManager.listLocations": {
32948
33094
  capName: "device-manager",
32949
33095
  capScope: "system",
@@ -32956,6 +33102,12 @@ Object.freeze({
32956
33102
  addonId: null,
32957
33103
  access: "view"
32958
33104
  },
33105
+ "deviceManager.listSiteZones": {
33106
+ capName: "device-manager",
33107
+ capScope: "system",
33108
+ addonId: null,
33109
+ access: "view"
33110
+ },
32959
33111
  "deviceManager.listWrappersForCap": {
32960
33112
  capName: "device-manager",
32961
33113
  capScope: "system",
@@ -33040,12 +33192,24 @@ Object.freeze({
33040
33192
  addonId: null,
33041
33193
  access: "delete"
33042
33194
  },
33195
+ "deviceManager.removeSiteZone": {
33196
+ capName: "device-manager",
33197
+ capScope: "system",
33198
+ addonId: null,
33199
+ access: "delete"
33200
+ },
33043
33201
  "deviceManager.renameLocation": {
33044
33202
  capName: "device-manager",
33045
33203
  capScope: "system",
33046
33204
  addonId: null,
33047
33205
  access: "create"
33048
33206
  },
33207
+ "deviceManager.renameSiteZone": {
33208
+ capName: "device-manager",
33209
+ capScope: "system",
33210
+ addonId: null,
33211
+ access: "create"
33212
+ },
33049
33213
  "deviceManager.runDeviceAction": {
33050
33214
  capName: "device-manager",
33051
33215
  capScope: "system",
@@ -33088,6 +33252,24 @@ Object.freeze({
33088
33252
  addonId: null,
33089
33253
  access: "create"
33090
33254
  },
33255
+ "deviceManager.setLocationDescription": {
33256
+ capName: "device-manager",
33257
+ capScope: "system",
33258
+ addonId: null,
33259
+ access: "create"
33260
+ },
33261
+ "deviceManager.setLocationIcon": {
33262
+ capName: "device-manager",
33263
+ capScope: "system",
33264
+ addonId: null,
33265
+ access: "create"
33266
+ },
33267
+ "deviceManager.setLocationZone": {
33268
+ capName: "device-manager",
33269
+ capScope: "system",
33270
+ addonId: null,
33271
+ access: "create"
33272
+ },
33091
33273
  "deviceManager.setMetadata": {
33092
33274
  capName: "device-manager",
33093
33275
  capScope: "system",
@@ -33118,6 +33300,12 @@ Object.freeze({
33118
33300
  addonId: null,
33119
33301
  access: "create"
33120
33302
  },
33303
+ "deviceManager.setSiteZone": {
33304
+ capName: "device-manager",
33305
+ capScope: "system",
33306
+ addonId: null,
33307
+ access: "create"
33308
+ },
33121
33309
  "deviceManager.setStreamProfileMap": {
33122
33310
  capName: "device-manager",
33123
33311
  capScope: "system",
@@ -13567,6 +13567,107 @@ var deviceExportCapability = {
13567
13567
  unexposeDevice: method(UnexposeInputSchema, _void(), { kind: "mutation" })
13568
13568
  }
13569
13569
  };
13570
+ /** Wire/storage schema for one icon id. */
13571
+ var LocationIconIdSchema = _enum([
13572
+ "map-pin",
13573
+ "house",
13574
+ "door-open",
13575
+ "sofa",
13576
+ "utensils",
13577
+ "bed-double",
13578
+ "bath",
13579
+ "briefcase",
13580
+ "car",
13581
+ "circle-parking",
13582
+ "route",
13583
+ "trees",
13584
+ "umbrella",
13585
+ "waves-ladder",
13586
+ "fence",
13587
+ "package",
13588
+ "warehouse",
13589
+ "store",
13590
+ "sun",
13591
+ "radar"
13592
+ ]);
13593
+ /**
13594
+ * One (location, icon) assignment as it travels.
13595
+ *
13596
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13597
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13598
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13599
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13600
+ * map keyed on the displayed casing would orphan its entry on exactly that
13601
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13602
+ */
13603
+ var LocationIconAssignmentSchema = object({
13604
+ locationKey: string(),
13605
+ icon: LocationIconIdSchema
13606
+ });
13607
+ /**
13608
+ * One (location, description) assignment as it travels.
13609
+ *
13610
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13611
+ * reason: this lived for a while in the post-analysis addon's own settings,
13612
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13613
+ * the Locations page carried the icon and silently orphaned the description —
13614
+ * two authorities for one thing, joined by two different rules. Now both hang
13615
+ * off the location itself, on `locationIconKey`.
13616
+ */
13617
+ var LocationDescriptionAssignmentSchema = object({
13618
+ locationKey: string(),
13619
+ description: string()
13620
+ });
13621
+ /**
13622
+ * A SITE ZONE — a named part of the property that several locations belong to.
13623
+ *
13624
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13625
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13626
+ * one zone, so a camera's zone is derived and never stored on the device: the
13627
+ * whole point of this entity is that grouping rooms touches no device row.
13628
+ *
13629
+ * ## Why not `zone`
13630
+ *
13631
+ * Because `zone` is already the most loaded word in this product: 612 source
13632
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13633
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13634
+ * set of rooms — and a reader who confuses them will look for a camera's
13635
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13636
+ * word by calling the drawn one what it actually is: a detection zone.
13637
+ *
13638
+ * ## The key
13639
+ *
13640
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13641
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13642
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13643
+ * silently-dropped location description.
13644
+ *
13645
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13646
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13647
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13648
+ */
13649
+ /**
13650
+ * One zone as it travels: its key, the label the operator typed, its icon and
13651
+ * the locations inside it.
13652
+ *
13653
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13654
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13655
+ * here, rather than left to a second call, because every consumer wants both
13656
+ * at once and a viewer that asked twice could render a zone whose membership
13657
+ * it has not fetched yet.
13658
+ *
13659
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13660
+ * of those two is a choice, and a picker has to draw them differently.
13661
+ */
13662
+ var SiteZoneSchema = object({
13663
+ zoneKey: string(),
13664
+ label: string(),
13665
+ icon: LocationIconIdSchema.nullable(),
13666
+ /** Folded location keys, sorted. A location listed here need not be
13667
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13668
+ * the ones that most want grouping. */
13669
+ locationKeys: array(string())
13670
+ });
13570
13671
  var ProviderStatusSchema = object({
13571
13672
  connected: boolean(),
13572
13673
  deviceCount: number(),
@@ -14078,6 +14179,39 @@ method(object({
14078
14179
  }), object({ moved: number() }), {
14079
14180
  kind: "mutation",
14080
14181
  auth: "admin"
14182
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14183
+ location: string(),
14184
+ icon: LocationIconIdSchema.nullable()
14185
+ }), _void(), {
14186
+ kind: "mutation",
14187
+ auth: "admin"
14188
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14189
+ location: string(),
14190
+ description: string().max(400).nullable()
14191
+ }), _void(), {
14192
+ kind: "mutation",
14193
+ auth: "admin"
14194
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14195
+ name: string(),
14196
+ icon: LocationIconIdSchema.nullable().optional()
14197
+ }), _void(), {
14198
+ kind: "mutation",
14199
+ auth: "admin"
14200
+ }), method(object({ name: string() }), _void(), {
14201
+ kind: "mutation",
14202
+ auth: "admin"
14203
+ }), method(object({
14204
+ from: string(),
14205
+ to: string()
14206
+ }), _void(), {
14207
+ kind: "mutation",
14208
+ auth: "admin"
14209
+ }), method(object({
14210
+ location: string(),
14211
+ zone: string().nullable()
14212
+ }), _void(), {
14213
+ kind: "mutation",
14214
+ auth: "admin"
14081
14215
  }), method(object({
14082
14216
  deviceId: number(),
14083
14217
  disabled: boolean()
@@ -32917,6 +33051,18 @@ Object.freeze({
32917
33051
  addonId: null,
32918
33052
  access: "view"
32919
33053
  },
33054
+ "deviceManager.listLocationDescriptions": {
33055
+ capName: "device-manager",
33056
+ capScope: "system",
33057
+ addonId: null,
33058
+ access: "view"
33059
+ },
33060
+ "deviceManager.listLocationIcons": {
33061
+ capName: "device-manager",
33062
+ capScope: "system",
33063
+ addonId: null,
33064
+ access: "view"
33065
+ },
32920
33066
  "deviceManager.listLocations": {
32921
33067
  capName: "device-manager",
32922
33068
  capScope: "system",
@@ -32929,6 +33075,12 @@ Object.freeze({
32929
33075
  addonId: null,
32930
33076
  access: "view"
32931
33077
  },
33078
+ "deviceManager.listSiteZones": {
33079
+ capName: "device-manager",
33080
+ capScope: "system",
33081
+ addonId: null,
33082
+ access: "view"
33083
+ },
32932
33084
  "deviceManager.listWrappersForCap": {
32933
33085
  capName: "device-manager",
32934
33086
  capScope: "system",
@@ -33013,12 +33165,24 @@ Object.freeze({
33013
33165
  addonId: null,
33014
33166
  access: "delete"
33015
33167
  },
33168
+ "deviceManager.removeSiteZone": {
33169
+ capName: "device-manager",
33170
+ capScope: "system",
33171
+ addonId: null,
33172
+ access: "delete"
33173
+ },
33016
33174
  "deviceManager.renameLocation": {
33017
33175
  capName: "device-manager",
33018
33176
  capScope: "system",
33019
33177
  addonId: null,
33020
33178
  access: "create"
33021
33179
  },
33180
+ "deviceManager.renameSiteZone": {
33181
+ capName: "device-manager",
33182
+ capScope: "system",
33183
+ addonId: null,
33184
+ access: "create"
33185
+ },
33022
33186
  "deviceManager.runDeviceAction": {
33023
33187
  capName: "device-manager",
33024
33188
  capScope: "system",
@@ -33061,6 +33225,24 @@ Object.freeze({
33061
33225
  addonId: null,
33062
33226
  access: "create"
33063
33227
  },
33228
+ "deviceManager.setLocationDescription": {
33229
+ capName: "device-manager",
33230
+ capScope: "system",
33231
+ addonId: null,
33232
+ access: "create"
33233
+ },
33234
+ "deviceManager.setLocationIcon": {
33235
+ capName: "device-manager",
33236
+ capScope: "system",
33237
+ addonId: null,
33238
+ access: "create"
33239
+ },
33240
+ "deviceManager.setLocationZone": {
33241
+ capName: "device-manager",
33242
+ capScope: "system",
33243
+ addonId: null,
33244
+ access: "create"
33245
+ },
33064
33246
  "deviceManager.setMetadata": {
33065
33247
  capName: "device-manager",
33066
33248
  capScope: "system",
@@ -33091,6 +33273,12 @@ Object.freeze({
33091
33273
  addonId: null,
33092
33274
  access: "create"
33093
33275
  },
33276
+ "deviceManager.setSiteZone": {
33277
+ capName: "device-manager",
33278
+ capScope: "system",
33279
+ addonId: null,
33280
+ access: "create"
33281
+ },
33094
33282
  "deviceManager.setStreamProfileMap": {
33095
33283
  capName: "device-manager",
33096
33284
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.112",
3
+ "version": "1.2.114",
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",