@camstack/addon-matter-broker 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
@@ -13559,6 +13559,107 @@ var ExposeInputSchema = object({
13559
13559
  });
13560
13560
  var UnexposeInputSchema = object({ deviceId: string$2() });
13561
13561
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13562
+ /** Wire/storage schema for one icon id. */
13563
+ var LocationIconIdSchema = _enum([
13564
+ "map-pin",
13565
+ "house",
13566
+ "door-open",
13567
+ "sofa",
13568
+ "utensils",
13569
+ "bed-double",
13570
+ "bath",
13571
+ "briefcase",
13572
+ "car",
13573
+ "circle-parking",
13574
+ "route",
13575
+ "trees",
13576
+ "umbrella",
13577
+ "waves-ladder",
13578
+ "fence",
13579
+ "package",
13580
+ "warehouse",
13581
+ "store",
13582
+ "sun",
13583
+ "radar"
13584
+ ]);
13585
+ /**
13586
+ * One (location, icon) assignment as it travels.
13587
+ *
13588
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13589
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13590
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13591
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13592
+ * map keyed on the displayed casing would orphan its entry on exactly that
13593
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13594
+ */
13595
+ var LocationIconAssignmentSchema = object({
13596
+ locationKey: string$2(),
13597
+ icon: LocationIconIdSchema
13598
+ });
13599
+ /**
13600
+ * One (location, description) assignment as it travels.
13601
+ *
13602
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13603
+ * reason: this lived for a while in the post-analysis addon's own settings,
13604
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13605
+ * the Locations page carried the icon and silently orphaned the description —
13606
+ * two authorities for one thing, joined by two different rules. Now both hang
13607
+ * off the location itself, on `locationIconKey`.
13608
+ */
13609
+ var LocationDescriptionAssignmentSchema = object({
13610
+ locationKey: string$2(),
13611
+ description: string$2()
13612
+ });
13613
+ /**
13614
+ * A SITE ZONE — a named part of the property that several locations belong to.
13615
+ *
13616
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13617
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13618
+ * one zone, so a camera's zone is derived and never stored on the device: the
13619
+ * whole point of this entity is that grouping rooms touches no device row.
13620
+ *
13621
+ * ## Why not `zone`
13622
+ *
13623
+ * Because `zone` is already the most loaded word in this product: 612 source
13624
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13625
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13626
+ * set of rooms — and a reader who confuses them will look for a camera's
13627
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13628
+ * word by calling the drawn one what it actually is: a detection zone.
13629
+ *
13630
+ * ## The key
13631
+ *
13632
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13633
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13634
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13635
+ * silently-dropped location description.
13636
+ *
13637
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13638
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13639
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13640
+ */
13641
+ /**
13642
+ * One zone as it travels: its key, the label the operator typed, its icon and
13643
+ * the locations inside it.
13644
+ *
13645
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13646
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13647
+ * here, rather than left to a second call, because every consumer wants both
13648
+ * at once and a viewer that asked twice could render a zone whose membership
13649
+ * it has not fetched yet.
13650
+ *
13651
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13652
+ * of those two is a choice, and a picker has to draw them differently.
13653
+ */
13654
+ var SiteZoneSchema = object({
13655
+ zoneKey: string$2(),
13656
+ label: string$2(),
13657
+ icon: LocationIconIdSchema.nullable(),
13658
+ /** Folded location keys, sorted. A location listed here need not be
13659
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13660
+ * the ones that most want grouping. */
13661
+ locationKeys: array(string$2())
13662
+ });
13562
13663
  var ProviderStatusSchema = object({
13563
13664
  connected: boolean(),
13564
13665
  deviceCount: number(),
@@ -14151,6 +14252,39 @@ method(object({
14151
14252
  }), object({ moved: number() }), {
14152
14253
  kind: "mutation",
14153
14254
  auth: "admin"
14255
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14256
+ location: string$2(),
14257
+ icon: LocationIconIdSchema.nullable()
14258
+ }), _void(), {
14259
+ kind: "mutation",
14260
+ auth: "admin"
14261
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14262
+ location: string$2(),
14263
+ description: string$2().max(400).nullable()
14264
+ }), _void(), {
14265
+ kind: "mutation",
14266
+ auth: "admin"
14267
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14268
+ name: string$2(),
14269
+ icon: LocationIconIdSchema.nullable().optional()
14270
+ }), _void(), {
14271
+ kind: "mutation",
14272
+ auth: "admin"
14273
+ }), method(object({ name: string$2() }), _void(), {
14274
+ kind: "mutation",
14275
+ auth: "admin"
14276
+ }), method(object({
14277
+ from: string$2(),
14278
+ to: string$2()
14279
+ }), _void(), {
14280
+ kind: "mutation",
14281
+ auth: "admin"
14282
+ }), method(object({
14283
+ location: string$2(),
14284
+ zone: string$2().nullable()
14285
+ }), _void(), {
14286
+ kind: "mutation",
14287
+ auth: "admin"
14154
14288
  }), method(object({
14155
14289
  deviceId: number(),
14156
14290
  disabled: boolean()
@@ -37078,6 +37212,18 @@ Object.freeze({
37078
37212
  addonId: null,
37079
37213
  access: "view"
37080
37214
  },
37215
+ "deviceManager.listLocationDescriptions": {
37216
+ capName: "device-manager",
37217
+ capScope: "system",
37218
+ addonId: null,
37219
+ access: "view"
37220
+ },
37221
+ "deviceManager.listLocationIcons": {
37222
+ capName: "device-manager",
37223
+ capScope: "system",
37224
+ addonId: null,
37225
+ access: "view"
37226
+ },
37081
37227
  "deviceManager.listLocations": {
37082
37228
  capName: "device-manager",
37083
37229
  capScope: "system",
@@ -37090,6 +37236,12 @@ Object.freeze({
37090
37236
  addonId: null,
37091
37237
  access: "view"
37092
37238
  },
37239
+ "deviceManager.listSiteZones": {
37240
+ capName: "device-manager",
37241
+ capScope: "system",
37242
+ addonId: null,
37243
+ access: "view"
37244
+ },
37093
37245
  "deviceManager.listWrappersForCap": {
37094
37246
  capName: "device-manager",
37095
37247
  capScope: "system",
@@ -37174,12 +37326,24 @@ Object.freeze({
37174
37326
  addonId: null,
37175
37327
  access: "delete"
37176
37328
  },
37329
+ "deviceManager.removeSiteZone": {
37330
+ capName: "device-manager",
37331
+ capScope: "system",
37332
+ addonId: null,
37333
+ access: "delete"
37334
+ },
37177
37335
  "deviceManager.renameLocation": {
37178
37336
  capName: "device-manager",
37179
37337
  capScope: "system",
37180
37338
  addonId: null,
37181
37339
  access: "create"
37182
37340
  },
37341
+ "deviceManager.renameSiteZone": {
37342
+ capName: "device-manager",
37343
+ capScope: "system",
37344
+ addonId: null,
37345
+ access: "create"
37346
+ },
37183
37347
  "deviceManager.runDeviceAction": {
37184
37348
  capName: "device-manager",
37185
37349
  capScope: "system",
@@ -37222,6 +37386,24 @@ Object.freeze({
37222
37386
  addonId: null,
37223
37387
  access: "create"
37224
37388
  },
37389
+ "deviceManager.setLocationDescription": {
37390
+ capName: "device-manager",
37391
+ capScope: "system",
37392
+ addonId: null,
37393
+ access: "create"
37394
+ },
37395
+ "deviceManager.setLocationIcon": {
37396
+ capName: "device-manager",
37397
+ capScope: "system",
37398
+ addonId: null,
37399
+ access: "create"
37400
+ },
37401
+ "deviceManager.setLocationZone": {
37402
+ capName: "device-manager",
37403
+ capScope: "system",
37404
+ addonId: null,
37405
+ access: "create"
37406
+ },
37225
37407
  "deviceManager.setMetadata": {
37226
37408
  capName: "device-manager",
37227
37409
  capScope: "system",
@@ -37252,6 +37434,12 @@ Object.freeze({
37252
37434
  addonId: null,
37253
37435
  access: "create"
37254
37436
  },
37437
+ "deviceManager.setSiteZone": {
37438
+ capName: "device-manager",
37439
+ capScope: "system",
37440
+ addonId: null,
37441
+ access: "create"
37442
+ },
37255
37443
  "deviceManager.setStreamProfileMap": {
37256
37444
  capName: "device-manager",
37257
37445
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13557,6 +13557,107 @@ var ExposeInputSchema = object({
13557
13557
  });
13558
13558
  var UnexposeInputSchema = object({ deviceId: string$2() });
13559
13559
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13560
+ /** Wire/storage schema for one icon id. */
13561
+ var LocationIconIdSchema = _enum([
13562
+ "map-pin",
13563
+ "house",
13564
+ "door-open",
13565
+ "sofa",
13566
+ "utensils",
13567
+ "bed-double",
13568
+ "bath",
13569
+ "briefcase",
13570
+ "car",
13571
+ "circle-parking",
13572
+ "route",
13573
+ "trees",
13574
+ "umbrella",
13575
+ "waves-ladder",
13576
+ "fence",
13577
+ "package",
13578
+ "warehouse",
13579
+ "store",
13580
+ "sun",
13581
+ "radar"
13582
+ ]);
13583
+ /**
13584
+ * One (location, icon) assignment as it travels.
13585
+ *
13586
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13587
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13588
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13589
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13590
+ * map keyed on the displayed casing would orphan its entry on exactly that
13591
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13592
+ */
13593
+ var LocationIconAssignmentSchema = object({
13594
+ locationKey: string$2(),
13595
+ icon: LocationIconIdSchema
13596
+ });
13597
+ /**
13598
+ * One (location, description) assignment as it travels.
13599
+ *
13600
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13601
+ * reason: this lived for a while in the post-analysis addon's own settings,
13602
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13603
+ * the Locations page carried the icon and silently orphaned the description —
13604
+ * two authorities for one thing, joined by two different rules. Now both hang
13605
+ * off the location itself, on `locationIconKey`.
13606
+ */
13607
+ var LocationDescriptionAssignmentSchema = object({
13608
+ locationKey: string$2(),
13609
+ description: string$2()
13610
+ });
13611
+ /**
13612
+ * A SITE ZONE — a named part of the property that several locations belong to.
13613
+ *
13614
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13615
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13616
+ * one zone, so a camera's zone is derived and never stored on the device: the
13617
+ * whole point of this entity is that grouping rooms touches no device row.
13618
+ *
13619
+ * ## Why not `zone`
13620
+ *
13621
+ * Because `zone` is already the most loaded word in this product: 612 source
13622
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13623
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13624
+ * set of rooms — and a reader who confuses them will look for a camera's
13625
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13626
+ * word by calling the drawn one what it actually is: a detection zone.
13627
+ *
13628
+ * ## The key
13629
+ *
13630
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13631
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13632
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13633
+ * silently-dropped location description.
13634
+ *
13635
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13636
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13637
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13638
+ */
13639
+ /**
13640
+ * One zone as it travels: its key, the label the operator typed, its icon and
13641
+ * the locations inside it.
13642
+ *
13643
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13644
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13645
+ * here, rather than left to a second call, because every consumer wants both
13646
+ * at once and a viewer that asked twice could render a zone whose membership
13647
+ * it has not fetched yet.
13648
+ *
13649
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13650
+ * of those two is a choice, and a picker has to draw them differently.
13651
+ */
13652
+ var SiteZoneSchema = object({
13653
+ zoneKey: string$2(),
13654
+ label: string$2(),
13655
+ icon: LocationIconIdSchema.nullable(),
13656
+ /** Folded location keys, sorted. A location listed here need not be
13657
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13658
+ * the ones that most want grouping. */
13659
+ locationKeys: array(string$2())
13660
+ });
13560
13661
  var ProviderStatusSchema = object({
13561
13662
  connected: boolean(),
13562
13663
  deviceCount: number(),
@@ -14149,6 +14250,39 @@ method(object({
14149
14250
  }), object({ moved: number() }), {
14150
14251
  kind: "mutation",
14151
14252
  auth: "admin"
14253
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14254
+ location: string$2(),
14255
+ icon: LocationIconIdSchema.nullable()
14256
+ }), _void(), {
14257
+ kind: "mutation",
14258
+ auth: "admin"
14259
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14260
+ location: string$2(),
14261
+ description: string$2().max(400).nullable()
14262
+ }), _void(), {
14263
+ kind: "mutation",
14264
+ auth: "admin"
14265
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14266
+ name: string$2(),
14267
+ icon: LocationIconIdSchema.nullable().optional()
14268
+ }), _void(), {
14269
+ kind: "mutation",
14270
+ auth: "admin"
14271
+ }), method(object({ name: string$2() }), _void(), {
14272
+ kind: "mutation",
14273
+ auth: "admin"
14274
+ }), method(object({
14275
+ from: string$2(),
14276
+ to: string$2()
14277
+ }), _void(), {
14278
+ kind: "mutation",
14279
+ auth: "admin"
14280
+ }), method(object({
14281
+ location: string$2(),
14282
+ zone: string$2().nullable()
14283
+ }), _void(), {
14284
+ kind: "mutation",
14285
+ auth: "admin"
14152
14286
  }), method(object({
14153
14287
  deviceId: number(),
14154
14288
  disabled: boolean()
@@ -37076,6 +37210,18 @@ Object.freeze({
37076
37210
  addonId: null,
37077
37211
  access: "view"
37078
37212
  },
37213
+ "deviceManager.listLocationDescriptions": {
37214
+ capName: "device-manager",
37215
+ capScope: "system",
37216
+ addonId: null,
37217
+ access: "view"
37218
+ },
37219
+ "deviceManager.listLocationIcons": {
37220
+ capName: "device-manager",
37221
+ capScope: "system",
37222
+ addonId: null,
37223
+ access: "view"
37224
+ },
37079
37225
  "deviceManager.listLocations": {
37080
37226
  capName: "device-manager",
37081
37227
  capScope: "system",
@@ -37088,6 +37234,12 @@ Object.freeze({
37088
37234
  addonId: null,
37089
37235
  access: "view"
37090
37236
  },
37237
+ "deviceManager.listSiteZones": {
37238
+ capName: "device-manager",
37239
+ capScope: "system",
37240
+ addonId: null,
37241
+ access: "view"
37242
+ },
37091
37243
  "deviceManager.listWrappersForCap": {
37092
37244
  capName: "device-manager",
37093
37245
  capScope: "system",
@@ -37172,12 +37324,24 @@ Object.freeze({
37172
37324
  addonId: null,
37173
37325
  access: "delete"
37174
37326
  },
37327
+ "deviceManager.removeSiteZone": {
37328
+ capName: "device-manager",
37329
+ capScope: "system",
37330
+ addonId: null,
37331
+ access: "delete"
37332
+ },
37175
37333
  "deviceManager.renameLocation": {
37176
37334
  capName: "device-manager",
37177
37335
  capScope: "system",
37178
37336
  addonId: null,
37179
37337
  access: "create"
37180
37338
  },
37339
+ "deviceManager.renameSiteZone": {
37340
+ capName: "device-manager",
37341
+ capScope: "system",
37342
+ addonId: null,
37343
+ access: "create"
37344
+ },
37181
37345
  "deviceManager.runDeviceAction": {
37182
37346
  capName: "device-manager",
37183
37347
  capScope: "system",
@@ -37220,6 +37384,24 @@ Object.freeze({
37220
37384
  addonId: null,
37221
37385
  access: "create"
37222
37386
  },
37387
+ "deviceManager.setLocationDescription": {
37388
+ capName: "device-manager",
37389
+ capScope: "system",
37390
+ addonId: null,
37391
+ access: "create"
37392
+ },
37393
+ "deviceManager.setLocationIcon": {
37394
+ capName: "device-manager",
37395
+ capScope: "system",
37396
+ addonId: null,
37397
+ access: "create"
37398
+ },
37399
+ "deviceManager.setLocationZone": {
37400
+ capName: "device-manager",
37401
+ capScope: "system",
37402
+ addonId: null,
37403
+ access: "create"
37404
+ },
37223
37405
  "deviceManager.setMetadata": {
37224
37406
  capName: "device-manager",
37225
37407
  capScope: "system",
@@ -37250,6 +37432,12 @@ Object.freeze({
37250
37432
  addonId: null,
37251
37433
  access: "create"
37252
37434
  },
37435
+ "deviceManager.setSiteZone": {
37436
+ capName: "device-manager",
37437
+ capScope: "system",
37438
+ addonId: null,
37439
+ access: "create"
37440
+ },
37253
37441
  "deviceManager.setStreamProfileMap": {
37254
37442
  capName: "device-manager",
37255
37443
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.104",
3
+ "version": "0.2.106",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",