@camstack/addon-provider-unifi 0.2.106 → 0.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.
package/dist/addon.js CHANGED
@@ -13516,6 +13516,70 @@ var LocationIconAssignmentSchema = object({
13516
13516
  locationKey: string(),
13517
13517
  icon: LocationIconIdSchema
13518
13518
  });
13519
+ /**
13520
+ * One (location, description) assignment as it travels.
13521
+ *
13522
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13523
+ * reason: this lived for a while in the post-analysis addon's own settings,
13524
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13525
+ * the Locations page carried the icon and silently orphaned the description —
13526
+ * two authorities for one thing, joined by two different rules. Now both hang
13527
+ * off the location itself, on `locationIconKey`.
13528
+ */
13529
+ var LocationDescriptionAssignmentSchema = object({
13530
+ locationKey: string(),
13531
+ description: string()
13532
+ });
13533
+ /**
13534
+ * A SITE ZONE — a named part of the property that several locations belong to.
13535
+ *
13536
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13537
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13538
+ * one zone, so a camera's zone is derived and never stored on the device: the
13539
+ * whole point of this entity is that grouping rooms touches no device row.
13540
+ *
13541
+ * ## Why not `zone`
13542
+ *
13543
+ * Because `zone` is already the most loaded word in this product: 612 source
13544
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13545
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13546
+ * set of rooms — and a reader who confuses them will look for a camera's
13547
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13548
+ * word by calling the drawn one what it actually is: a detection zone.
13549
+ *
13550
+ * ## The key
13551
+ *
13552
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13553
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13554
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13555
+ * silently-dropped location description.
13556
+ *
13557
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13558
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13559
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13560
+ */
13561
+ /**
13562
+ * One zone as it travels: its key, the label the operator typed, its icon and
13563
+ * the locations inside it.
13564
+ *
13565
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13566
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13567
+ * here, rather than left to a second call, because every consumer wants both
13568
+ * at once and a viewer that asked twice could render a zone whose membership
13569
+ * it has not fetched yet.
13570
+ *
13571
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13572
+ * of those two is a choice, and a picker has to draw them differently.
13573
+ */
13574
+ var SiteZoneSchema = object({
13575
+ zoneKey: string(),
13576
+ label: string(),
13577
+ icon: LocationIconIdSchema.nullable(),
13578
+ /** Folded location keys, sorted. A location listed here need not be
13579
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13580
+ * the ones that most want grouping. */
13581
+ locationKeys: array(string())
13582
+ });
13519
13583
  var ProviderStatusSchema = object({
13520
13584
  connected: boolean(),
13521
13585
  deviceCount: number(),
@@ -14114,6 +14178,33 @@ method(object({
14114
14178
  }), _void(), {
14115
14179
  kind: "mutation",
14116
14180
  auth: "admin"
14181
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14182
+ location: string(),
14183
+ description: string().max(400).nullable()
14184
+ }), _void(), {
14185
+ kind: "mutation",
14186
+ auth: "admin"
14187
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14188
+ name: string(),
14189
+ icon: LocationIconIdSchema.nullable().optional()
14190
+ }), _void(), {
14191
+ kind: "mutation",
14192
+ auth: "admin"
14193
+ }), method(object({ name: string() }), _void(), {
14194
+ kind: "mutation",
14195
+ auth: "admin"
14196
+ }), method(object({
14197
+ from: string(),
14198
+ to: string()
14199
+ }), _void(), {
14200
+ kind: "mutation",
14201
+ auth: "admin"
14202
+ }), method(object({
14203
+ location: string(),
14204
+ zone: string().nullable()
14205
+ }), _void(), {
14206
+ kind: "mutation",
14207
+ auth: "admin"
14117
14208
  }), method(object({
14118
14209
  deviceId: number(),
14119
14210
  disabled: boolean()
@@ -37041,6 +37132,12 @@ Object.freeze({
37041
37132
  addonId: null,
37042
37133
  access: "view"
37043
37134
  },
37135
+ "deviceManager.listLocationDescriptions": {
37136
+ capName: "device-manager",
37137
+ capScope: "system",
37138
+ addonId: null,
37139
+ access: "view"
37140
+ },
37044
37141
  "deviceManager.listLocationIcons": {
37045
37142
  capName: "device-manager",
37046
37143
  capScope: "system",
@@ -37059,6 +37156,12 @@ Object.freeze({
37059
37156
  addonId: null,
37060
37157
  access: "view"
37061
37158
  },
37159
+ "deviceManager.listSiteZones": {
37160
+ capName: "device-manager",
37161
+ capScope: "system",
37162
+ addonId: null,
37163
+ access: "view"
37164
+ },
37062
37165
  "deviceManager.listWrappersForCap": {
37063
37166
  capName: "device-manager",
37064
37167
  capScope: "system",
@@ -37143,12 +37246,24 @@ Object.freeze({
37143
37246
  addonId: null,
37144
37247
  access: "delete"
37145
37248
  },
37249
+ "deviceManager.removeSiteZone": {
37250
+ capName: "device-manager",
37251
+ capScope: "system",
37252
+ addonId: null,
37253
+ access: "delete"
37254
+ },
37146
37255
  "deviceManager.renameLocation": {
37147
37256
  capName: "device-manager",
37148
37257
  capScope: "system",
37149
37258
  addonId: null,
37150
37259
  access: "create"
37151
37260
  },
37261
+ "deviceManager.renameSiteZone": {
37262
+ capName: "device-manager",
37263
+ capScope: "system",
37264
+ addonId: null,
37265
+ access: "create"
37266
+ },
37152
37267
  "deviceManager.runDeviceAction": {
37153
37268
  capName: "device-manager",
37154
37269
  capScope: "system",
@@ -37191,12 +37306,24 @@ Object.freeze({
37191
37306
  addonId: null,
37192
37307
  access: "create"
37193
37308
  },
37309
+ "deviceManager.setLocationDescription": {
37310
+ capName: "device-manager",
37311
+ capScope: "system",
37312
+ addonId: null,
37313
+ access: "create"
37314
+ },
37194
37315
  "deviceManager.setLocationIcon": {
37195
37316
  capName: "device-manager",
37196
37317
  capScope: "system",
37197
37318
  addonId: null,
37198
37319
  access: "create"
37199
37320
  },
37321
+ "deviceManager.setLocationZone": {
37322
+ capName: "device-manager",
37323
+ capScope: "system",
37324
+ addonId: null,
37325
+ access: "create"
37326
+ },
37200
37327
  "deviceManager.setMetadata": {
37201
37328
  capName: "device-manager",
37202
37329
  capScope: "system",
@@ -37227,6 +37354,12 @@ Object.freeze({
37227
37354
  addonId: null,
37228
37355
  access: "create"
37229
37356
  },
37357
+ "deviceManager.setSiteZone": {
37358
+ capName: "device-manager",
37359
+ capScope: "system",
37360
+ addonId: null,
37361
+ access: "create"
37362
+ },
37230
37363
  "deviceManager.setStreamProfileMap": {
37231
37364
  capName: "device-manager",
37232
37365
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13515,6 +13515,70 @@ var LocationIconAssignmentSchema = object({
13515
13515
  locationKey: string(),
13516
13516
  icon: LocationIconIdSchema
13517
13517
  });
13518
+ /**
13519
+ * One (location, description) assignment as it travels.
13520
+ *
13521
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13522
+ * reason: this lived for a while in the post-analysis addon's own settings,
13523
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13524
+ * the Locations page carried the icon and silently orphaned the description —
13525
+ * two authorities for one thing, joined by two different rules. Now both hang
13526
+ * off the location itself, on `locationIconKey`.
13527
+ */
13528
+ var LocationDescriptionAssignmentSchema = object({
13529
+ locationKey: string(),
13530
+ description: string()
13531
+ });
13532
+ /**
13533
+ * A SITE ZONE — a named part of the property that several locations belong to.
13534
+ *
13535
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13536
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13537
+ * one zone, so a camera's zone is derived and never stored on the device: the
13538
+ * whole point of this entity is that grouping rooms touches no device row.
13539
+ *
13540
+ * ## Why not `zone`
13541
+ *
13542
+ * Because `zone` is already the most loaded word in this product: 612 source
13543
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13544
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13545
+ * set of rooms — and a reader who confuses them will look for a camera's
13546
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13547
+ * word by calling the drawn one what it actually is: a detection zone.
13548
+ *
13549
+ * ## The key
13550
+ *
13551
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13552
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13553
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13554
+ * silently-dropped location description.
13555
+ *
13556
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13557
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13558
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13559
+ */
13560
+ /**
13561
+ * One zone as it travels: its key, the label the operator typed, its icon and
13562
+ * the locations inside it.
13563
+ *
13564
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13565
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13566
+ * here, rather than left to a second call, because every consumer wants both
13567
+ * at once and a viewer that asked twice could render a zone whose membership
13568
+ * it has not fetched yet.
13569
+ *
13570
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13571
+ * of those two is a choice, and a picker has to draw them differently.
13572
+ */
13573
+ var SiteZoneSchema = object({
13574
+ zoneKey: string(),
13575
+ label: string(),
13576
+ icon: LocationIconIdSchema.nullable(),
13577
+ /** Folded location keys, sorted. A location listed here need not be
13578
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13579
+ * the ones that most want grouping. */
13580
+ locationKeys: array(string())
13581
+ });
13518
13582
  var ProviderStatusSchema = object({
13519
13583
  connected: boolean(),
13520
13584
  deviceCount: number(),
@@ -14113,6 +14177,33 @@ method(object({
14113
14177
  }), _void(), {
14114
14178
  kind: "mutation",
14115
14179
  auth: "admin"
14180
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14181
+ location: string(),
14182
+ description: string().max(400).nullable()
14183
+ }), _void(), {
14184
+ kind: "mutation",
14185
+ auth: "admin"
14186
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14187
+ name: string(),
14188
+ icon: LocationIconIdSchema.nullable().optional()
14189
+ }), _void(), {
14190
+ kind: "mutation",
14191
+ auth: "admin"
14192
+ }), method(object({ name: string() }), _void(), {
14193
+ kind: "mutation",
14194
+ auth: "admin"
14195
+ }), method(object({
14196
+ from: string(),
14197
+ to: string()
14198
+ }), _void(), {
14199
+ kind: "mutation",
14200
+ auth: "admin"
14201
+ }), method(object({
14202
+ location: string(),
14203
+ zone: string().nullable()
14204
+ }), _void(), {
14205
+ kind: "mutation",
14206
+ auth: "admin"
14116
14207
  }), method(object({
14117
14208
  deviceId: number(),
14118
14209
  disabled: boolean()
@@ -37040,6 +37131,12 @@ Object.freeze({
37040
37131
  addonId: null,
37041
37132
  access: "view"
37042
37133
  },
37134
+ "deviceManager.listLocationDescriptions": {
37135
+ capName: "device-manager",
37136
+ capScope: "system",
37137
+ addonId: null,
37138
+ access: "view"
37139
+ },
37043
37140
  "deviceManager.listLocationIcons": {
37044
37141
  capName: "device-manager",
37045
37142
  capScope: "system",
@@ -37058,6 +37155,12 @@ Object.freeze({
37058
37155
  addonId: null,
37059
37156
  access: "view"
37060
37157
  },
37158
+ "deviceManager.listSiteZones": {
37159
+ capName: "device-manager",
37160
+ capScope: "system",
37161
+ addonId: null,
37162
+ access: "view"
37163
+ },
37061
37164
  "deviceManager.listWrappersForCap": {
37062
37165
  capName: "device-manager",
37063
37166
  capScope: "system",
@@ -37142,12 +37245,24 @@ Object.freeze({
37142
37245
  addonId: null,
37143
37246
  access: "delete"
37144
37247
  },
37248
+ "deviceManager.removeSiteZone": {
37249
+ capName: "device-manager",
37250
+ capScope: "system",
37251
+ addonId: null,
37252
+ access: "delete"
37253
+ },
37145
37254
  "deviceManager.renameLocation": {
37146
37255
  capName: "device-manager",
37147
37256
  capScope: "system",
37148
37257
  addonId: null,
37149
37258
  access: "create"
37150
37259
  },
37260
+ "deviceManager.renameSiteZone": {
37261
+ capName: "device-manager",
37262
+ capScope: "system",
37263
+ addonId: null,
37264
+ access: "create"
37265
+ },
37151
37266
  "deviceManager.runDeviceAction": {
37152
37267
  capName: "device-manager",
37153
37268
  capScope: "system",
@@ -37190,12 +37305,24 @@ Object.freeze({
37190
37305
  addonId: null,
37191
37306
  access: "create"
37192
37307
  },
37308
+ "deviceManager.setLocationDescription": {
37309
+ capName: "device-manager",
37310
+ capScope: "system",
37311
+ addonId: null,
37312
+ access: "create"
37313
+ },
37193
37314
  "deviceManager.setLocationIcon": {
37194
37315
  capName: "device-manager",
37195
37316
  capScope: "system",
37196
37317
  addonId: null,
37197
37318
  access: "create"
37198
37319
  },
37320
+ "deviceManager.setLocationZone": {
37321
+ capName: "device-manager",
37322
+ capScope: "system",
37323
+ addonId: null,
37324
+ access: "create"
37325
+ },
37199
37326
  "deviceManager.setMetadata": {
37200
37327
  capName: "device-manager",
37201
37328
  capScope: "system",
@@ -37226,6 +37353,12 @@ Object.freeze({
37226
37353
  addonId: null,
37227
37354
  access: "create"
37228
37355
  },
37356
+ "deviceManager.setSiteZone": {
37357
+ capName: "device-manager",
37358
+ capScope: "system",
37359
+ addonId: null,
37360
+ access: "create"
37361
+ },
37229
37362
  "deviceManager.setStreamProfileMap": {
37230
37363
  capName: "device-manager",
37231
37364
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.106",
3
+ "version": "0.2.107",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",