@camstack/addon-provider-petkit 0.2.105 → 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
@@ -14598,6 +14598,107 @@ var ExposeInputSchema = object({
14598
14598
  });
14599
14599
  var UnexposeInputSchema = object({ deviceId: string() });
14600
14600
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
14601
+ /** Wire/storage schema for one icon id. */
14602
+ var LocationIconIdSchema = _enum([
14603
+ "map-pin",
14604
+ "house",
14605
+ "door-open",
14606
+ "sofa",
14607
+ "utensils",
14608
+ "bed-double",
14609
+ "bath",
14610
+ "briefcase",
14611
+ "car",
14612
+ "circle-parking",
14613
+ "route",
14614
+ "trees",
14615
+ "umbrella",
14616
+ "waves-ladder",
14617
+ "fence",
14618
+ "package",
14619
+ "warehouse",
14620
+ "store",
14621
+ "sun",
14622
+ "radar"
14623
+ ]);
14624
+ /**
14625
+ * One (location, icon) assignment as it travels.
14626
+ *
14627
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
14628
+ * operator's casing. The registry matches labels trimmed + case-insensitively
14629
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
14630
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
14631
+ * map keyed on the displayed casing would orphan its entry on exactly that
14632
+ * edit. Consumers join by keying their own label through `locationIconKey`.
14633
+ */
14634
+ var LocationIconAssignmentSchema = object({
14635
+ locationKey: string(),
14636
+ icon: LocationIconIdSchema
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
+ });
14601
14702
  var ProviderStatusSchema = object({
14602
14703
  connected: boolean(),
14603
14704
  deviceCount: number(),
@@ -15190,6 +15291,39 @@ method(object({
15190
15291
  }), object({ moved: number() }), {
15191
15292
  kind: "mutation",
15192
15293
  auth: "admin"
15294
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
15295
+ location: string(),
15296
+ icon: LocationIconIdSchema.nullable()
15297
+ }), _void(), {
15298
+ kind: "mutation",
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"
15193
15327
  }), method(object({
15194
15328
  deviceId: number(),
15195
15329
  disabled: boolean()
@@ -38108,6 +38242,18 @@ Object.freeze({
38108
38242
  addonId: null,
38109
38243
  access: "view"
38110
38244
  },
38245
+ "deviceManager.listLocationDescriptions": {
38246
+ capName: "device-manager",
38247
+ capScope: "system",
38248
+ addonId: null,
38249
+ access: "view"
38250
+ },
38251
+ "deviceManager.listLocationIcons": {
38252
+ capName: "device-manager",
38253
+ capScope: "system",
38254
+ addonId: null,
38255
+ access: "view"
38256
+ },
38111
38257
  "deviceManager.listLocations": {
38112
38258
  capName: "device-manager",
38113
38259
  capScope: "system",
@@ -38120,6 +38266,12 @@ Object.freeze({
38120
38266
  addonId: null,
38121
38267
  access: "view"
38122
38268
  },
38269
+ "deviceManager.listSiteZones": {
38270
+ capName: "device-manager",
38271
+ capScope: "system",
38272
+ addonId: null,
38273
+ access: "view"
38274
+ },
38123
38275
  "deviceManager.listWrappersForCap": {
38124
38276
  capName: "device-manager",
38125
38277
  capScope: "system",
@@ -38204,12 +38356,24 @@ Object.freeze({
38204
38356
  addonId: null,
38205
38357
  access: "delete"
38206
38358
  },
38359
+ "deviceManager.removeSiteZone": {
38360
+ capName: "device-manager",
38361
+ capScope: "system",
38362
+ addonId: null,
38363
+ access: "delete"
38364
+ },
38207
38365
  "deviceManager.renameLocation": {
38208
38366
  capName: "device-manager",
38209
38367
  capScope: "system",
38210
38368
  addonId: null,
38211
38369
  access: "create"
38212
38370
  },
38371
+ "deviceManager.renameSiteZone": {
38372
+ capName: "device-manager",
38373
+ capScope: "system",
38374
+ addonId: null,
38375
+ access: "create"
38376
+ },
38213
38377
  "deviceManager.runDeviceAction": {
38214
38378
  capName: "device-manager",
38215
38379
  capScope: "system",
@@ -38252,6 +38416,24 @@ Object.freeze({
38252
38416
  addonId: null,
38253
38417
  access: "create"
38254
38418
  },
38419
+ "deviceManager.setLocationDescription": {
38420
+ capName: "device-manager",
38421
+ capScope: "system",
38422
+ addonId: null,
38423
+ access: "create"
38424
+ },
38425
+ "deviceManager.setLocationIcon": {
38426
+ capName: "device-manager",
38427
+ capScope: "system",
38428
+ addonId: null,
38429
+ access: "create"
38430
+ },
38431
+ "deviceManager.setLocationZone": {
38432
+ capName: "device-manager",
38433
+ capScope: "system",
38434
+ addonId: null,
38435
+ access: "create"
38436
+ },
38255
38437
  "deviceManager.setMetadata": {
38256
38438
  capName: "device-manager",
38257
38439
  capScope: "system",
@@ -38282,6 +38464,12 @@ Object.freeze({
38282
38464
  addonId: null,
38283
38465
  access: "create"
38284
38466
  },
38467
+ "deviceManager.setSiteZone": {
38468
+ capName: "device-manager",
38469
+ capScope: "system",
38470
+ addonId: null,
38471
+ access: "create"
38472
+ },
38285
38473
  "deviceManager.setStreamProfileMap": {
38286
38474
  capName: "device-manager",
38287
38475
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -14597,6 +14597,107 @@ var ExposeInputSchema = object({
14597
14597
  });
14598
14598
  var UnexposeInputSchema = object({ deviceId: string() });
14599
14599
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
14600
+ /** Wire/storage schema for one icon id. */
14601
+ var LocationIconIdSchema = _enum([
14602
+ "map-pin",
14603
+ "house",
14604
+ "door-open",
14605
+ "sofa",
14606
+ "utensils",
14607
+ "bed-double",
14608
+ "bath",
14609
+ "briefcase",
14610
+ "car",
14611
+ "circle-parking",
14612
+ "route",
14613
+ "trees",
14614
+ "umbrella",
14615
+ "waves-ladder",
14616
+ "fence",
14617
+ "package",
14618
+ "warehouse",
14619
+ "store",
14620
+ "sun",
14621
+ "radar"
14622
+ ]);
14623
+ /**
14624
+ * One (location, icon) assignment as it travels.
14625
+ *
14626
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
14627
+ * operator's casing. The registry matches labels trimmed + case-insensitively
14628
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
14629
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
14630
+ * map keyed on the displayed casing would orphan its entry on exactly that
14631
+ * edit. Consumers join by keying their own label through `locationIconKey`.
14632
+ */
14633
+ var LocationIconAssignmentSchema = object({
14634
+ locationKey: string(),
14635
+ icon: LocationIconIdSchema
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
+ });
14600
14701
  var ProviderStatusSchema = object({
14601
14702
  connected: boolean(),
14602
14703
  deviceCount: number(),
@@ -15189,6 +15290,39 @@ method(object({
15189
15290
  }), object({ moved: number() }), {
15190
15291
  kind: "mutation",
15191
15292
  auth: "admin"
15293
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
15294
+ location: string(),
15295
+ icon: LocationIconIdSchema.nullable()
15296
+ }), _void(), {
15297
+ kind: "mutation",
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"
15192
15326
  }), method(object({
15193
15327
  deviceId: number(),
15194
15328
  disabled: boolean()
@@ -38107,6 +38241,18 @@ Object.freeze({
38107
38241
  addonId: null,
38108
38242
  access: "view"
38109
38243
  },
38244
+ "deviceManager.listLocationDescriptions": {
38245
+ capName: "device-manager",
38246
+ capScope: "system",
38247
+ addonId: null,
38248
+ access: "view"
38249
+ },
38250
+ "deviceManager.listLocationIcons": {
38251
+ capName: "device-manager",
38252
+ capScope: "system",
38253
+ addonId: null,
38254
+ access: "view"
38255
+ },
38110
38256
  "deviceManager.listLocations": {
38111
38257
  capName: "device-manager",
38112
38258
  capScope: "system",
@@ -38119,6 +38265,12 @@ Object.freeze({
38119
38265
  addonId: null,
38120
38266
  access: "view"
38121
38267
  },
38268
+ "deviceManager.listSiteZones": {
38269
+ capName: "device-manager",
38270
+ capScope: "system",
38271
+ addonId: null,
38272
+ access: "view"
38273
+ },
38122
38274
  "deviceManager.listWrappersForCap": {
38123
38275
  capName: "device-manager",
38124
38276
  capScope: "system",
@@ -38203,12 +38355,24 @@ Object.freeze({
38203
38355
  addonId: null,
38204
38356
  access: "delete"
38205
38357
  },
38358
+ "deviceManager.removeSiteZone": {
38359
+ capName: "device-manager",
38360
+ capScope: "system",
38361
+ addonId: null,
38362
+ access: "delete"
38363
+ },
38206
38364
  "deviceManager.renameLocation": {
38207
38365
  capName: "device-manager",
38208
38366
  capScope: "system",
38209
38367
  addonId: null,
38210
38368
  access: "create"
38211
38369
  },
38370
+ "deviceManager.renameSiteZone": {
38371
+ capName: "device-manager",
38372
+ capScope: "system",
38373
+ addonId: null,
38374
+ access: "create"
38375
+ },
38212
38376
  "deviceManager.runDeviceAction": {
38213
38377
  capName: "device-manager",
38214
38378
  capScope: "system",
@@ -38251,6 +38415,24 @@ Object.freeze({
38251
38415
  addonId: null,
38252
38416
  access: "create"
38253
38417
  },
38418
+ "deviceManager.setLocationDescription": {
38419
+ capName: "device-manager",
38420
+ capScope: "system",
38421
+ addonId: null,
38422
+ access: "create"
38423
+ },
38424
+ "deviceManager.setLocationIcon": {
38425
+ capName: "device-manager",
38426
+ capScope: "system",
38427
+ addonId: null,
38428
+ access: "create"
38429
+ },
38430
+ "deviceManager.setLocationZone": {
38431
+ capName: "device-manager",
38432
+ capScope: "system",
38433
+ addonId: null,
38434
+ access: "create"
38435
+ },
38254
38436
  "deviceManager.setMetadata": {
38255
38437
  capName: "device-manager",
38256
38438
  capScope: "system",
@@ -38281,6 +38463,12 @@ Object.freeze({
38281
38463
  addonId: null,
38282
38464
  access: "create"
38283
38465
  },
38466
+ "deviceManager.setSiteZone": {
38467
+ capName: "device-manager",
38468
+ capScope: "system",
38469
+ addonId: null,
38470
+ access: "create"
38471
+ },
38284
38472
  "deviceManager.setStreamProfileMap": {
38285
38473
  capName: "device-manager",
38286
38474
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.105",
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",