@camstack/addon-provider-petkit 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
@@ -14635,6 +14635,70 @@ var LocationIconAssignmentSchema = object({
14635
14635
  locationKey: string(),
14636
14636
  icon: LocationIconIdSchema
14637
14637
  });
14638
+ /**
14639
+ * One (location, description) assignment as it travels.
14640
+ *
14641
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
14642
+ * reason: this lived for a while in the post-analysis addon's own settings,
14643
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
14644
+ * the Locations page carried the icon and silently orphaned the description —
14645
+ * two authorities for one thing, joined by two different rules. Now both hang
14646
+ * off the location itself, on `locationIconKey`.
14647
+ */
14648
+ var LocationDescriptionAssignmentSchema = object({
14649
+ locationKey: string(),
14650
+ description: string()
14651
+ });
14652
+ /**
14653
+ * A SITE ZONE — a named part of the property that several locations belong to.
14654
+ *
14655
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
14656
+ * kitchen. A camera belongs to exactly one location, and a location to at most
14657
+ * one zone, so a camera's zone is derived and never stored on the device: the
14658
+ * whole point of this entity is that grouping rooms touches no device row.
14659
+ *
14660
+ * ## Why not `zone`
14661
+ *
14662
+ * Because `zone` is already the most loaded word in this product: 612 source
14663
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
14664
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
14665
+ * set of rooms — and a reader who confuses them will look for a camera's
14666
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
14667
+ * word by calling the drawn one what it actually is: a detection zone.
14668
+ *
14669
+ * ## The key
14670
+ *
14671
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
14672
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
14673
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
14674
+ * silently-dropped location description.
14675
+ *
14676
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
14677
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
14678
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
14679
+ */
14680
+ /**
14681
+ * One zone as it travels: its key, the label the operator typed, its icon and
14682
+ * the locations inside it.
14683
+ *
14684
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
14685
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
14686
+ * here, rather than left to a second call, because every consumer wants both
14687
+ * at once and a viewer that asked twice could render a zone whose membership
14688
+ * it has not fetched yet.
14689
+ *
14690
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
14691
+ * of those two is a choice, and a picker has to draw them differently.
14692
+ */
14693
+ var SiteZoneSchema = object({
14694
+ zoneKey: string(),
14695
+ label: string(),
14696
+ icon: LocationIconIdSchema.nullable(),
14697
+ /** Folded location keys, sorted. A location listed here need not be
14698
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
14699
+ * the ones that most want grouping. */
14700
+ locationKeys: array(string())
14701
+ });
14638
14702
  var ProviderStatusSchema = object({
14639
14703
  connected: boolean(),
14640
14704
  deviceCount: number(),
@@ -15233,6 +15297,33 @@ method(object({
15233
15297
  }), _void(), {
15234
15298
  kind: "mutation",
15235
15299
  auth: "admin"
15300
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
15301
+ location: string(),
15302
+ description: string().max(400).nullable()
15303
+ }), _void(), {
15304
+ kind: "mutation",
15305
+ auth: "admin"
15306
+ }), method(_void(), array(SiteZoneSchema)), method(object({
15307
+ name: string(),
15308
+ icon: LocationIconIdSchema.nullable().optional()
15309
+ }), _void(), {
15310
+ kind: "mutation",
15311
+ auth: "admin"
15312
+ }), method(object({ name: string() }), _void(), {
15313
+ kind: "mutation",
15314
+ auth: "admin"
15315
+ }), method(object({
15316
+ from: string(),
15317
+ to: string()
15318
+ }), _void(), {
15319
+ kind: "mutation",
15320
+ auth: "admin"
15321
+ }), method(object({
15322
+ location: string(),
15323
+ zone: string().nullable()
15324
+ }), _void(), {
15325
+ kind: "mutation",
15326
+ auth: "admin"
15236
15327
  }), method(object({
15237
15328
  deviceId: number(),
15238
15329
  disabled: boolean()
@@ -38151,6 +38242,12 @@ Object.freeze({
38151
38242
  addonId: null,
38152
38243
  access: "view"
38153
38244
  },
38245
+ "deviceManager.listLocationDescriptions": {
38246
+ capName: "device-manager",
38247
+ capScope: "system",
38248
+ addonId: null,
38249
+ access: "view"
38250
+ },
38154
38251
  "deviceManager.listLocationIcons": {
38155
38252
  capName: "device-manager",
38156
38253
  capScope: "system",
@@ -38169,6 +38266,12 @@ Object.freeze({
38169
38266
  addonId: null,
38170
38267
  access: "view"
38171
38268
  },
38269
+ "deviceManager.listSiteZones": {
38270
+ capName: "device-manager",
38271
+ capScope: "system",
38272
+ addonId: null,
38273
+ access: "view"
38274
+ },
38172
38275
  "deviceManager.listWrappersForCap": {
38173
38276
  capName: "device-manager",
38174
38277
  capScope: "system",
@@ -38253,12 +38356,24 @@ Object.freeze({
38253
38356
  addonId: null,
38254
38357
  access: "delete"
38255
38358
  },
38359
+ "deviceManager.removeSiteZone": {
38360
+ capName: "device-manager",
38361
+ capScope: "system",
38362
+ addonId: null,
38363
+ access: "delete"
38364
+ },
38256
38365
  "deviceManager.renameLocation": {
38257
38366
  capName: "device-manager",
38258
38367
  capScope: "system",
38259
38368
  addonId: null,
38260
38369
  access: "create"
38261
38370
  },
38371
+ "deviceManager.renameSiteZone": {
38372
+ capName: "device-manager",
38373
+ capScope: "system",
38374
+ addonId: null,
38375
+ access: "create"
38376
+ },
38262
38377
  "deviceManager.runDeviceAction": {
38263
38378
  capName: "device-manager",
38264
38379
  capScope: "system",
@@ -38301,12 +38416,24 @@ Object.freeze({
38301
38416
  addonId: null,
38302
38417
  access: "create"
38303
38418
  },
38419
+ "deviceManager.setLocationDescription": {
38420
+ capName: "device-manager",
38421
+ capScope: "system",
38422
+ addonId: null,
38423
+ access: "create"
38424
+ },
38304
38425
  "deviceManager.setLocationIcon": {
38305
38426
  capName: "device-manager",
38306
38427
  capScope: "system",
38307
38428
  addonId: null,
38308
38429
  access: "create"
38309
38430
  },
38431
+ "deviceManager.setLocationZone": {
38432
+ capName: "device-manager",
38433
+ capScope: "system",
38434
+ addonId: null,
38435
+ access: "create"
38436
+ },
38310
38437
  "deviceManager.setMetadata": {
38311
38438
  capName: "device-manager",
38312
38439
  capScope: "system",
@@ -38337,6 +38464,12 @@ Object.freeze({
38337
38464
  addonId: null,
38338
38465
  access: "create"
38339
38466
  },
38467
+ "deviceManager.setSiteZone": {
38468
+ capName: "device-manager",
38469
+ capScope: "system",
38470
+ addonId: null,
38471
+ access: "create"
38472
+ },
38340
38473
  "deviceManager.setStreamProfileMap": {
38341
38474
  capName: "device-manager",
38342
38475
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -14634,6 +14634,70 @@ var LocationIconAssignmentSchema = object({
14634
14634
  locationKey: string(),
14635
14635
  icon: LocationIconIdSchema
14636
14636
  });
14637
+ /**
14638
+ * One (location, description) assignment as it travels.
14639
+ *
14640
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
14641
+ * reason: this lived for a while in the post-analysis addon's own settings,
14642
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
14643
+ * the Locations page carried the icon and silently orphaned the description —
14644
+ * two authorities for one thing, joined by two different rules. Now both hang
14645
+ * off the location itself, on `locationIconKey`.
14646
+ */
14647
+ var LocationDescriptionAssignmentSchema = object({
14648
+ locationKey: string(),
14649
+ description: string()
14650
+ });
14651
+ /**
14652
+ * A SITE ZONE — a named part of the property that several locations belong to.
14653
+ *
14654
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
14655
+ * kitchen. A camera belongs to exactly one location, and a location to at most
14656
+ * one zone, so a camera's zone is derived and never stored on the device: the
14657
+ * whole point of this entity is that grouping rooms touches no device row.
14658
+ *
14659
+ * ## Why not `zone`
14660
+ *
14661
+ * Because `zone` is already the most loaded word in this product: 612 source
14662
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
14663
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
14664
+ * set of rooms — and a reader who confuses them will look for a camera's
14665
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
14666
+ * word by calling the drawn one what it actually is: a detection zone.
14667
+ *
14668
+ * ## The key
14669
+ *
14670
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
14671
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
14672
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
14673
+ * silently-dropped location description.
14674
+ *
14675
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
14676
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
14677
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
14678
+ */
14679
+ /**
14680
+ * One zone as it travels: its key, the label the operator typed, its icon and
14681
+ * the locations inside it.
14682
+ *
14683
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
14684
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
14685
+ * here, rather than left to a second call, because every consumer wants both
14686
+ * at once and a viewer that asked twice could render a zone whose membership
14687
+ * it has not fetched yet.
14688
+ *
14689
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
14690
+ * of those two is a choice, and a picker has to draw them differently.
14691
+ */
14692
+ var SiteZoneSchema = object({
14693
+ zoneKey: string(),
14694
+ label: string(),
14695
+ icon: LocationIconIdSchema.nullable(),
14696
+ /** Folded location keys, sorted. A location listed here need not be
14697
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
14698
+ * the ones that most want grouping. */
14699
+ locationKeys: array(string())
14700
+ });
14637
14701
  var ProviderStatusSchema = object({
14638
14702
  connected: boolean(),
14639
14703
  deviceCount: number(),
@@ -15232,6 +15296,33 @@ method(object({
15232
15296
  }), _void(), {
15233
15297
  kind: "mutation",
15234
15298
  auth: "admin"
15299
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
15300
+ location: string(),
15301
+ description: string().max(400).nullable()
15302
+ }), _void(), {
15303
+ kind: "mutation",
15304
+ auth: "admin"
15305
+ }), method(_void(), array(SiteZoneSchema)), method(object({
15306
+ name: string(),
15307
+ icon: LocationIconIdSchema.nullable().optional()
15308
+ }), _void(), {
15309
+ kind: "mutation",
15310
+ auth: "admin"
15311
+ }), method(object({ name: string() }), _void(), {
15312
+ kind: "mutation",
15313
+ auth: "admin"
15314
+ }), method(object({
15315
+ from: string(),
15316
+ to: string()
15317
+ }), _void(), {
15318
+ kind: "mutation",
15319
+ auth: "admin"
15320
+ }), method(object({
15321
+ location: string(),
15322
+ zone: string().nullable()
15323
+ }), _void(), {
15324
+ kind: "mutation",
15325
+ auth: "admin"
15235
15326
  }), method(object({
15236
15327
  deviceId: number(),
15237
15328
  disabled: boolean()
@@ -38150,6 +38241,12 @@ Object.freeze({
38150
38241
  addonId: null,
38151
38242
  access: "view"
38152
38243
  },
38244
+ "deviceManager.listLocationDescriptions": {
38245
+ capName: "device-manager",
38246
+ capScope: "system",
38247
+ addonId: null,
38248
+ access: "view"
38249
+ },
38153
38250
  "deviceManager.listLocationIcons": {
38154
38251
  capName: "device-manager",
38155
38252
  capScope: "system",
@@ -38168,6 +38265,12 @@ Object.freeze({
38168
38265
  addonId: null,
38169
38266
  access: "view"
38170
38267
  },
38268
+ "deviceManager.listSiteZones": {
38269
+ capName: "device-manager",
38270
+ capScope: "system",
38271
+ addonId: null,
38272
+ access: "view"
38273
+ },
38171
38274
  "deviceManager.listWrappersForCap": {
38172
38275
  capName: "device-manager",
38173
38276
  capScope: "system",
@@ -38252,12 +38355,24 @@ Object.freeze({
38252
38355
  addonId: null,
38253
38356
  access: "delete"
38254
38357
  },
38358
+ "deviceManager.removeSiteZone": {
38359
+ capName: "device-manager",
38360
+ capScope: "system",
38361
+ addonId: null,
38362
+ access: "delete"
38363
+ },
38255
38364
  "deviceManager.renameLocation": {
38256
38365
  capName: "device-manager",
38257
38366
  capScope: "system",
38258
38367
  addonId: null,
38259
38368
  access: "create"
38260
38369
  },
38370
+ "deviceManager.renameSiteZone": {
38371
+ capName: "device-manager",
38372
+ capScope: "system",
38373
+ addonId: null,
38374
+ access: "create"
38375
+ },
38261
38376
  "deviceManager.runDeviceAction": {
38262
38377
  capName: "device-manager",
38263
38378
  capScope: "system",
@@ -38300,12 +38415,24 @@ Object.freeze({
38300
38415
  addonId: null,
38301
38416
  access: "create"
38302
38417
  },
38418
+ "deviceManager.setLocationDescription": {
38419
+ capName: "device-manager",
38420
+ capScope: "system",
38421
+ addonId: null,
38422
+ access: "create"
38423
+ },
38303
38424
  "deviceManager.setLocationIcon": {
38304
38425
  capName: "device-manager",
38305
38426
  capScope: "system",
38306
38427
  addonId: null,
38307
38428
  access: "create"
38308
38429
  },
38430
+ "deviceManager.setLocationZone": {
38431
+ capName: "device-manager",
38432
+ capScope: "system",
38433
+ addonId: null,
38434
+ access: "create"
38435
+ },
38309
38436
  "deviceManager.setMetadata": {
38310
38437
  capName: "device-manager",
38311
38438
  capScope: "system",
@@ -38336,6 +38463,12 @@ Object.freeze({
38336
38463
  addonId: null,
38337
38464
  access: "create"
38338
38465
  },
38466
+ "deviceManager.setSiteZone": {
38467
+ capName: "device-manager",
38468
+ capScope: "system",
38469
+ addonId: null,
38470
+ access: "create"
38471
+ },
38339
38472
  "deviceManager.setStreamProfileMap": {
38340
38473
  capName: "device-manager",
38341
38474
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.106",
3
+ "version": "0.2.107",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",