@camstack/addon-mqtt-broker 1.2.105 → 1.2.107

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.
@@ -13319,6 +13319,107 @@ var ExposeInputSchema = object({
13319
13319
  });
13320
13320
  var UnexposeInputSchema = object({ deviceId: string() });
13321
13321
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13322
+ /** Wire/storage schema for one icon id. */
13323
+ var LocationIconIdSchema = _enum([
13324
+ "map-pin",
13325
+ "house",
13326
+ "door-open",
13327
+ "sofa",
13328
+ "utensils",
13329
+ "bed-double",
13330
+ "bath",
13331
+ "briefcase",
13332
+ "car",
13333
+ "circle-parking",
13334
+ "route",
13335
+ "trees",
13336
+ "umbrella",
13337
+ "waves-ladder",
13338
+ "fence",
13339
+ "package",
13340
+ "warehouse",
13341
+ "store",
13342
+ "sun",
13343
+ "radar"
13344
+ ]);
13345
+ /**
13346
+ * One (location, icon) assignment as it travels.
13347
+ *
13348
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13349
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13350
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13351
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13352
+ * map keyed on the displayed casing would orphan its entry on exactly that
13353
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13354
+ */
13355
+ var LocationIconAssignmentSchema = object({
13356
+ locationKey: string(),
13357
+ icon: LocationIconIdSchema
13358
+ });
13359
+ /**
13360
+ * One (location, description) assignment as it travels.
13361
+ *
13362
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13363
+ * reason: this lived for a while in the post-analysis addon's own settings,
13364
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13365
+ * the Locations page carried the icon and silently orphaned the description —
13366
+ * two authorities for one thing, joined by two different rules. Now both hang
13367
+ * off the location itself, on `locationIconKey`.
13368
+ */
13369
+ var LocationDescriptionAssignmentSchema = object({
13370
+ locationKey: string(),
13371
+ description: string()
13372
+ });
13373
+ /**
13374
+ * A SITE ZONE — a named part of the property that several locations belong to.
13375
+ *
13376
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13377
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13378
+ * one zone, so a camera's zone is derived and never stored on the device: the
13379
+ * whole point of this entity is that grouping rooms touches no device row.
13380
+ *
13381
+ * ## Why not `zone`
13382
+ *
13383
+ * Because `zone` is already the most loaded word in this product: 612 source
13384
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13385
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13386
+ * set of rooms — and a reader who confuses them will look for a camera's
13387
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13388
+ * word by calling the drawn one what it actually is: a detection zone.
13389
+ *
13390
+ * ## The key
13391
+ *
13392
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13393
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13394
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13395
+ * silently-dropped location description.
13396
+ *
13397
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13398
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13399
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13400
+ */
13401
+ /**
13402
+ * One zone as it travels: its key, the label the operator typed, its icon and
13403
+ * the locations inside it.
13404
+ *
13405
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13406
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13407
+ * here, rather than left to a second call, because every consumer wants both
13408
+ * at once and a viewer that asked twice could render a zone whose membership
13409
+ * it has not fetched yet.
13410
+ *
13411
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13412
+ * of those two is a choice, and a picker has to draw them differently.
13413
+ */
13414
+ var SiteZoneSchema = object({
13415
+ zoneKey: string(),
13416
+ label: string(),
13417
+ icon: LocationIconIdSchema.nullable(),
13418
+ /** Folded location keys, sorted. A location listed here need not be
13419
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13420
+ * the ones that most want grouping. */
13421
+ locationKeys: array(string())
13422
+ });
13322
13423
  var ProviderStatusSchema = object({
13323
13424
  connected: boolean(),
13324
13425
  deviceCount: number(),
@@ -13830,6 +13931,39 @@ method(object({
13830
13931
  }), object({ moved: number() }), {
13831
13932
  kind: "mutation",
13832
13933
  auth: "admin"
13934
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
13935
+ location: string(),
13936
+ icon: LocationIconIdSchema.nullable()
13937
+ }), _void(), {
13938
+ kind: "mutation",
13939
+ auth: "admin"
13940
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
13941
+ location: string(),
13942
+ description: string().max(400).nullable()
13943
+ }), _void(), {
13944
+ kind: "mutation",
13945
+ auth: "admin"
13946
+ }), method(_void(), array(SiteZoneSchema)), method(object({
13947
+ name: string(),
13948
+ icon: LocationIconIdSchema.nullable().optional()
13949
+ }), _void(), {
13950
+ kind: "mutation",
13951
+ auth: "admin"
13952
+ }), method(object({ name: string() }), _void(), {
13953
+ kind: "mutation",
13954
+ auth: "admin"
13955
+ }), method(object({
13956
+ from: string(),
13957
+ to: string()
13958
+ }), _void(), {
13959
+ kind: "mutation",
13960
+ auth: "admin"
13961
+ }), method(object({
13962
+ location: string(),
13963
+ zone: string().nullable()
13964
+ }), _void(), {
13965
+ kind: "mutation",
13966
+ auth: "admin"
13833
13967
  }), method(object({
13834
13968
  deviceId: number(),
13835
13969
  disabled: boolean()
@@ -32672,6 +32806,18 @@ Object.freeze({
32672
32806
  addonId: null,
32673
32807
  access: "view"
32674
32808
  },
32809
+ "deviceManager.listLocationDescriptions": {
32810
+ capName: "device-manager",
32811
+ capScope: "system",
32812
+ addonId: null,
32813
+ access: "view"
32814
+ },
32815
+ "deviceManager.listLocationIcons": {
32816
+ capName: "device-manager",
32817
+ capScope: "system",
32818
+ addonId: null,
32819
+ access: "view"
32820
+ },
32675
32821
  "deviceManager.listLocations": {
32676
32822
  capName: "device-manager",
32677
32823
  capScope: "system",
@@ -32684,6 +32830,12 @@ Object.freeze({
32684
32830
  addonId: null,
32685
32831
  access: "view"
32686
32832
  },
32833
+ "deviceManager.listSiteZones": {
32834
+ capName: "device-manager",
32835
+ capScope: "system",
32836
+ addonId: null,
32837
+ access: "view"
32838
+ },
32687
32839
  "deviceManager.listWrappersForCap": {
32688
32840
  capName: "device-manager",
32689
32841
  capScope: "system",
@@ -32768,12 +32920,24 @@ Object.freeze({
32768
32920
  addonId: null,
32769
32921
  access: "delete"
32770
32922
  },
32923
+ "deviceManager.removeSiteZone": {
32924
+ capName: "device-manager",
32925
+ capScope: "system",
32926
+ addonId: null,
32927
+ access: "delete"
32928
+ },
32771
32929
  "deviceManager.renameLocation": {
32772
32930
  capName: "device-manager",
32773
32931
  capScope: "system",
32774
32932
  addonId: null,
32775
32933
  access: "create"
32776
32934
  },
32935
+ "deviceManager.renameSiteZone": {
32936
+ capName: "device-manager",
32937
+ capScope: "system",
32938
+ addonId: null,
32939
+ access: "create"
32940
+ },
32777
32941
  "deviceManager.runDeviceAction": {
32778
32942
  capName: "device-manager",
32779
32943
  capScope: "system",
@@ -32816,6 +32980,24 @@ Object.freeze({
32816
32980
  addonId: null,
32817
32981
  access: "create"
32818
32982
  },
32983
+ "deviceManager.setLocationDescription": {
32984
+ capName: "device-manager",
32985
+ capScope: "system",
32986
+ addonId: null,
32987
+ access: "create"
32988
+ },
32989
+ "deviceManager.setLocationIcon": {
32990
+ capName: "device-manager",
32991
+ capScope: "system",
32992
+ addonId: null,
32993
+ access: "create"
32994
+ },
32995
+ "deviceManager.setLocationZone": {
32996
+ capName: "device-manager",
32997
+ capScope: "system",
32998
+ addonId: null,
32999
+ access: "create"
33000
+ },
32819
33001
  "deviceManager.setMetadata": {
32820
33002
  capName: "device-manager",
32821
33003
  capScope: "system",
@@ -32846,6 +33028,12 @@ Object.freeze({
32846
33028
  addonId: null,
32847
33029
  access: "create"
32848
33030
  },
33031
+ "deviceManager.setSiteZone": {
33032
+ capName: "device-manager",
33033
+ capScope: "system",
33034
+ addonId: null,
33035
+ access: "create"
33036
+ },
32849
33037
  "deviceManager.setStreamProfileMap": {
32850
33038
  capName: "device-manager",
32851
33039
  capScope: "system",
@@ -13314,6 +13314,107 @@ var ExposeInputSchema = object({
13314
13314
  });
13315
13315
  var UnexposeInputSchema = object({ deviceId: string() });
13316
13316
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13317
+ /** Wire/storage schema for one icon id. */
13318
+ var LocationIconIdSchema = _enum([
13319
+ "map-pin",
13320
+ "house",
13321
+ "door-open",
13322
+ "sofa",
13323
+ "utensils",
13324
+ "bed-double",
13325
+ "bath",
13326
+ "briefcase",
13327
+ "car",
13328
+ "circle-parking",
13329
+ "route",
13330
+ "trees",
13331
+ "umbrella",
13332
+ "waves-ladder",
13333
+ "fence",
13334
+ "package",
13335
+ "warehouse",
13336
+ "store",
13337
+ "sun",
13338
+ "radar"
13339
+ ]);
13340
+ /**
13341
+ * One (location, icon) assignment as it travels.
13342
+ *
13343
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13344
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13345
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13346
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13347
+ * map keyed on the displayed casing would orphan its entry on exactly that
13348
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13349
+ */
13350
+ var LocationIconAssignmentSchema = object({
13351
+ locationKey: string(),
13352
+ icon: LocationIconIdSchema
13353
+ });
13354
+ /**
13355
+ * One (location, description) assignment as it travels.
13356
+ *
13357
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13358
+ * reason: this lived for a while in the post-analysis addon's own settings,
13359
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13360
+ * the Locations page carried the icon and silently orphaned the description —
13361
+ * two authorities for one thing, joined by two different rules. Now both hang
13362
+ * off the location itself, on `locationIconKey`.
13363
+ */
13364
+ var LocationDescriptionAssignmentSchema = object({
13365
+ locationKey: string(),
13366
+ description: string()
13367
+ });
13368
+ /**
13369
+ * A SITE ZONE — a named part of the property that several locations belong to.
13370
+ *
13371
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13372
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13373
+ * one zone, so a camera's zone is derived and never stored on the device: the
13374
+ * whole point of this entity is that grouping rooms touches no device row.
13375
+ *
13376
+ * ## Why not `zone`
13377
+ *
13378
+ * Because `zone` is already the most loaded word in this product: 612 source
13379
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13380
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13381
+ * set of rooms — and a reader who confuses them will look for a camera's
13382
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13383
+ * word by calling the drawn one what it actually is: a detection zone.
13384
+ *
13385
+ * ## The key
13386
+ *
13387
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13388
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13389
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13390
+ * silently-dropped location description.
13391
+ *
13392
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13393
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13394
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13395
+ */
13396
+ /**
13397
+ * One zone as it travels: its key, the label the operator typed, its icon and
13398
+ * the locations inside it.
13399
+ *
13400
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13401
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13402
+ * here, rather than left to a second call, because every consumer wants both
13403
+ * at once and a viewer that asked twice could render a zone whose membership
13404
+ * it has not fetched yet.
13405
+ *
13406
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13407
+ * of those two is a choice, and a picker has to draw them differently.
13408
+ */
13409
+ var SiteZoneSchema = object({
13410
+ zoneKey: string(),
13411
+ label: string(),
13412
+ icon: LocationIconIdSchema.nullable(),
13413
+ /** Folded location keys, sorted. A location listed here need not be
13414
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13415
+ * the ones that most want grouping. */
13416
+ locationKeys: array(string())
13417
+ });
13317
13418
  var ProviderStatusSchema = object({
13318
13419
  connected: boolean(),
13319
13420
  deviceCount: number(),
@@ -13825,6 +13926,39 @@ method(object({
13825
13926
  }), object({ moved: number() }), {
13826
13927
  kind: "mutation",
13827
13928
  auth: "admin"
13929
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
13930
+ location: string(),
13931
+ icon: LocationIconIdSchema.nullable()
13932
+ }), _void(), {
13933
+ kind: "mutation",
13934
+ auth: "admin"
13935
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
13936
+ location: string(),
13937
+ description: string().max(400).nullable()
13938
+ }), _void(), {
13939
+ kind: "mutation",
13940
+ auth: "admin"
13941
+ }), method(_void(), array(SiteZoneSchema)), method(object({
13942
+ name: string(),
13943
+ icon: LocationIconIdSchema.nullable().optional()
13944
+ }), _void(), {
13945
+ kind: "mutation",
13946
+ auth: "admin"
13947
+ }), method(object({ name: string() }), _void(), {
13948
+ kind: "mutation",
13949
+ auth: "admin"
13950
+ }), method(object({
13951
+ from: string(),
13952
+ to: string()
13953
+ }), _void(), {
13954
+ kind: "mutation",
13955
+ auth: "admin"
13956
+ }), method(object({
13957
+ location: string(),
13958
+ zone: string().nullable()
13959
+ }), _void(), {
13960
+ kind: "mutation",
13961
+ auth: "admin"
13828
13962
  }), method(object({
13829
13963
  deviceId: number(),
13830
13964
  disabled: boolean()
@@ -32667,6 +32801,18 @@ Object.freeze({
32667
32801
  addonId: null,
32668
32802
  access: "view"
32669
32803
  },
32804
+ "deviceManager.listLocationDescriptions": {
32805
+ capName: "device-manager",
32806
+ capScope: "system",
32807
+ addonId: null,
32808
+ access: "view"
32809
+ },
32810
+ "deviceManager.listLocationIcons": {
32811
+ capName: "device-manager",
32812
+ capScope: "system",
32813
+ addonId: null,
32814
+ access: "view"
32815
+ },
32670
32816
  "deviceManager.listLocations": {
32671
32817
  capName: "device-manager",
32672
32818
  capScope: "system",
@@ -32679,6 +32825,12 @@ Object.freeze({
32679
32825
  addonId: null,
32680
32826
  access: "view"
32681
32827
  },
32828
+ "deviceManager.listSiteZones": {
32829
+ capName: "device-manager",
32830
+ capScope: "system",
32831
+ addonId: null,
32832
+ access: "view"
32833
+ },
32682
32834
  "deviceManager.listWrappersForCap": {
32683
32835
  capName: "device-manager",
32684
32836
  capScope: "system",
@@ -32763,12 +32915,24 @@ Object.freeze({
32763
32915
  addonId: null,
32764
32916
  access: "delete"
32765
32917
  },
32918
+ "deviceManager.removeSiteZone": {
32919
+ capName: "device-manager",
32920
+ capScope: "system",
32921
+ addonId: null,
32922
+ access: "delete"
32923
+ },
32766
32924
  "deviceManager.renameLocation": {
32767
32925
  capName: "device-manager",
32768
32926
  capScope: "system",
32769
32927
  addonId: null,
32770
32928
  access: "create"
32771
32929
  },
32930
+ "deviceManager.renameSiteZone": {
32931
+ capName: "device-manager",
32932
+ capScope: "system",
32933
+ addonId: null,
32934
+ access: "create"
32935
+ },
32772
32936
  "deviceManager.runDeviceAction": {
32773
32937
  capName: "device-manager",
32774
32938
  capScope: "system",
@@ -32811,6 +32975,24 @@ Object.freeze({
32811
32975
  addonId: null,
32812
32976
  access: "create"
32813
32977
  },
32978
+ "deviceManager.setLocationDescription": {
32979
+ capName: "device-manager",
32980
+ capScope: "system",
32981
+ addonId: null,
32982
+ access: "create"
32983
+ },
32984
+ "deviceManager.setLocationIcon": {
32985
+ capName: "device-manager",
32986
+ capScope: "system",
32987
+ addonId: null,
32988
+ access: "create"
32989
+ },
32990
+ "deviceManager.setLocationZone": {
32991
+ capName: "device-manager",
32992
+ capScope: "system",
32993
+ addonId: null,
32994
+ access: "create"
32995
+ },
32814
32996
  "deviceManager.setMetadata": {
32815
32997
  capName: "device-manager",
32816
32998
  capScope: "system",
@@ -32841,6 +33023,12 @@ Object.freeze({
32841
33023
  addonId: null,
32842
33024
  access: "create"
32843
33025
  },
33026
+ "deviceManager.setSiteZone": {
33027
+ capName: "device-manager",
33028
+ capScope: "system",
33029
+ addonId: null,
33030
+ access: "create"
33031
+ },
32844
33032
  "deviceManager.setStreamProfileMap": {
32845
33033
  capName: "device-manager",
32846
33034
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.2.105",
3
+ "version": "1.2.107",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",