@camstack/addon-export-hap 1.2.117 → 1.2.119

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.
@@ -14099,6 +14099,107 @@ var deviceExportCapability = {
14099
14099
  unexposeDevice: method(UnexposeInputSchema, _void(), { kind: "mutation" })
14100
14100
  }
14101
14101
  };
14102
+ /** Wire/storage schema for one icon id. */
14103
+ var LocationIconIdSchema = _enum([
14104
+ "map-pin",
14105
+ "house",
14106
+ "door-open",
14107
+ "sofa",
14108
+ "utensils",
14109
+ "bed-double",
14110
+ "bath",
14111
+ "briefcase",
14112
+ "car",
14113
+ "circle-parking",
14114
+ "route",
14115
+ "trees",
14116
+ "umbrella",
14117
+ "waves-ladder",
14118
+ "fence",
14119
+ "package",
14120
+ "warehouse",
14121
+ "store",
14122
+ "sun",
14123
+ "radar"
14124
+ ]);
14125
+ /**
14126
+ * One (location, icon) assignment as it travels.
14127
+ *
14128
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
14129
+ * operator's casing. The registry matches labels trimmed + case-insensitively
14130
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
14131
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
14132
+ * map keyed on the displayed casing would orphan its entry on exactly that
14133
+ * edit. Consumers join by keying their own label through `locationIconKey`.
14134
+ */
14135
+ var LocationIconAssignmentSchema = object({
14136
+ locationKey: string(),
14137
+ icon: LocationIconIdSchema
14138
+ });
14139
+ /**
14140
+ * One (location, description) assignment as it travels.
14141
+ *
14142
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
14143
+ * reason: this lived for a while in the post-analysis addon's own settings,
14144
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
14145
+ * the Locations page carried the icon and silently orphaned the description —
14146
+ * two authorities for one thing, joined by two different rules. Now both hang
14147
+ * off the location itself, on `locationIconKey`.
14148
+ */
14149
+ var LocationDescriptionAssignmentSchema = object({
14150
+ locationKey: string(),
14151
+ description: string()
14152
+ });
14153
+ /**
14154
+ * A SITE ZONE — a named part of the property that several locations belong to.
14155
+ *
14156
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
14157
+ * kitchen. A camera belongs to exactly one location, and a location to at most
14158
+ * one zone, so a camera's zone is derived and never stored on the device: the
14159
+ * whole point of this entity is that grouping rooms touches no device row.
14160
+ *
14161
+ * ## Why not `zone`
14162
+ *
14163
+ * Because `zone` is already the most loaded word in this product: 612 source
14164
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
14165
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
14166
+ * set of rooms — and a reader who confuses them will look for a camera's
14167
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
14168
+ * word by calling the drawn one what it actually is: a detection zone.
14169
+ *
14170
+ * ## The key
14171
+ *
14172
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
14173
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
14174
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
14175
+ * silently-dropped location description.
14176
+ *
14177
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
14178
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
14179
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
14180
+ */
14181
+ /**
14182
+ * One zone as it travels: its key, the label the operator typed, its icon and
14183
+ * the locations inside it.
14184
+ *
14185
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
14186
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
14187
+ * here, rather than left to a second call, because every consumer wants both
14188
+ * at once and a viewer that asked twice could render a zone whose membership
14189
+ * it has not fetched yet.
14190
+ *
14191
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
14192
+ * of those two is a choice, and a picker has to draw them differently.
14193
+ */
14194
+ var SiteZoneSchema = object({
14195
+ zoneKey: string(),
14196
+ label: string(),
14197
+ icon: LocationIconIdSchema.nullable(),
14198
+ /** Folded location keys, sorted. A location listed here need not be
14199
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
14200
+ * the ones that most want grouping. */
14201
+ locationKeys: array(string())
14202
+ });
14102
14203
  var ProviderStatusSchema = object({
14103
14204
  connected: boolean(),
14104
14205
  deviceCount: number(),
@@ -14610,6 +14711,39 @@ method(object({
14610
14711
  }), object({ moved: number() }), {
14611
14712
  kind: "mutation",
14612
14713
  auth: "admin"
14714
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14715
+ location: string(),
14716
+ icon: LocationIconIdSchema.nullable()
14717
+ }), _void(), {
14718
+ kind: "mutation",
14719
+ auth: "admin"
14720
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14721
+ location: string(),
14722
+ description: string().max(400).nullable()
14723
+ }), _void(), {
14724
+ kind: "mutation",
14725
+ auth: "admin"
14726
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14727
+ name: string(),
14728
+ icon: LocationIconIdSchema.nullable().optional()
14729
+ }), _void(), {
14730
+ kind: "mutation",
14731
+ auth: "admin"
14732
+ }), method(object({ name: string() }), _void(), {
14733
+ kind: "mutation",
14734
+ auth: "admin"
14735
+ }), method(object({
14736
+ from: string(),
14737
+ to: string()
14738
+ }), _void(), {
14739
+ kind: "mutation",
14740
+ auth: "admin"
14741
+ }), method(object({
14742
+ location: string(),
14743
+ zone: string().nullable()
14744
+ }), _void(), {
14745
+ kind: "mutation",
14746
+ auth: "admin"
14613
14747
  }), method(object({
14614
14748
  deviceId: number(),
14615
14749
  disabled: boolean()
@@ -33494,6 +33628,18 @@ Object.freeze({
33494
33628
  addonId: null,
33495
33629
  access: "view"
33496
33630
  },
33631
+ "deviceManager.listLocationDescriptions": {
33632
+ capName: "device-manager",
33633
+ capScope: "system",
33634
+ addonId: null,
33635
+ access: "view"
33636
+ },
33637
+ "deviceManager.listLocationIcons": {
33638
+ capName: "device-manager",
33639
+ capScope: "system",
33640
+ addonId: null,
33641
+ access: "view"
33642
+ },
33497
33643
  "deviceManager.listLocations": {
33498
33644
  capName: "device-manager",
33499
33645
  capScope: "system",
@@ -33506,6 +33652,12 @@ Object.freeze({
33506
33652
  addonId: null,
33507
33653
  access: "view"
33508
33654
  },
33655
+ "deviceManager.listSiteZones": {
33656
+ capName: "device-manager",
33657
+ capScope: "system",
33658
+ addonId: null,
33659
+ access: "view"
33660
+ },
33509
33661
  "deviceManager.listWrappersForCap": {
33510
33662
  capName: "device-manager",
33511
33663
  capScope: "system",
@@ -33590,12 +33742,24 @@ Object.freeze({
33590
33742
  addonId: null,
33591
33743
  access: "delete"
33592
33744
  },
33745
+ "deviceManager.removeSiteZone": {
33746
+ capName: "device-manager",
33747
+ capScope: "system",
33748
+ addonId: null,
33749
+ access: "delete"
33750
+ },
33593
33751
  "deviceManager.renameLocation": {
33594
33752
  capName: "device-manager",
33595
33753
  capScope: "system",
33596
33754
  addonId: null,
33597
33755
  access: "create"
33598
33756
  },
33757
+ "deviceManager.renameSiteZone": {
33758
+ capName: "device-manager",
33759
+ capScope: "system",
33760
+ addonId: null,
33761
+ access: "create"
33762
+ },
33599
33763
  "deviceManager.runDeviceAction": {
33600
33764
  capName: "device-manager",
33601
33765
  capScope: "system",
@@ -33638,6 +33802,24 @@ Object.freeze({
33638
33802
  addonId: null,
33639
33803
  access: "create"
33640
33804
  },
33805
+ "deviceManager.setLocationDescription": {
33806
+ capName: "device-manager",
33807
+ capScope: "system",
33808
+ addonId: null,
33809
+ access: "create"
33810
+ },
33811
+ "deviceManager.setLocationIcon": {
33812
+ capName: "device-manager",
33813
+ capScope: "system",
33814
+ addonId: null,
33815
+ access: "create"
33816
+ },
33817
+ "deviceManager.setLocationZone": {
33818
+ capName: "device-manager",
33819
+ capScope: "system",
33820
+ addonId: null,
33821
+ access: "create"
33822
+ },
33641
33823
  "deviceManager.setMetadata": {
33642
33824
  capName: "device-manager",
33643
33825
  capScope: "system",
@@ -33668,6 +33850,12 @@ Object.freeze({
33668
33850
  addonId: null,
33669
33851
  access: "create"
33670
33852
  },
33853
+ "deviceManager.setSiteZone": {
33854
+ capName: "device-manager",
33855
+ capScope: "system",
33856
+ addonId: null,
33857
+ access: "create"
33858
+ },
33671
33859
  "deviceManager.setStreamProfileMap": {
33672
33860
  capName: "device-manager",
33673
33861
  capScope: "system",
@@ -14087,6 +14087,107 @@ var deviceExportCapability = {
14087
14087
  unexposeDevice: method(UnexposeInputSchema, _void(), { kind: "mutation" })
14088
14088
  }
14089
14089
  };
14090
+ /** Wire/storage schema for one icon id. */
14091
+ var LocationIconIdSchema = _enum([
14092
+ "map-pin",
14093
+ "house",
14094
+ "door-open",
14095
+ "sofa",
14096
+ "utensils",
14097
+ "bed-double",
14098
+ "bath",
14099
+ "briefcase",
14100
+ "car",
14101
+ "circle-parking",
14102
+ "route",
14103
+ "trees",
14104
+ "umbrella",
14105
+ "waves-ladder",
14106
+ "fence",
14107
+ "package",
14108
+ "warehouse",
14109
+ "store",
14110
+ "sun",
14111
+ "radar"
14112
+ ]);
14113
+ /**
14114
+ * One (location, icon) assignment as it travels.
14115
+ *
14116
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
14117
+ * operator's casing. The registry matches labels trimmed + case-insensitively
14118
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
14119
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
14120
+ * map keyed on the displayed casing would orphan its entry on exactly that
14121
+ * edit. Consumers join by keying their own label through `locationIconKey`.
14122
+ */
14123
+ var LocationIconAssignmentSchema = object({
14124
+ locationKey: string(),
14125
+ icon: LocationIconIdSchema
14126
+ });
14127
+ /**
14128
+ * One (location, description) assignment as it travels.
14129
+ *
14130
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
14131
+ * reason: this lived for a while in the post-analysis addon's own settings,
14132
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
14133
+ * the Locations page carried the icon and silently orphaned the description —
14134
+ * two authorities for one thing, joined by two different rules. Now both hang
14135
+ * off the location itself, on `locationIconKey`.
14136
+ */
14137
+ var LocationDescriptionAssignmentSchema = object({
14138
+ locationKey: string(),
14139
+ description: string()
14140
+ });
14141
+ /**
14142
+ * A SITE ZONE — a named part of the property that several locations belong to.
14143
+ *
14144
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
14145
+ * kitchen. A camera belongs to exactly one location, and a location to at most
14146
+ * one zone, so a camera's zone is derived and never stored on the device: the
14147
+ * whole point of this entity is that grouping rooms touches no device row.
14148
+ *
14149
+ * ## Why not `zone`
14150
+ *
14151
+ * Because `zone` is already the most loaded word in this product: 612 source
14152
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
14153
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
14154
+ * set of rooms — and a reader who confuses them will look for a camera's
14155
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
14156
+ * word by calling the drawn one what it actually is: a detection zone.
14157
+ *
14158
+ * ## The key
14159
+ *
14160
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
14161
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
14162
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
14163
+ * silently-dropped location description.
14164
+ *
14165
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
14166
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
14167
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
14168
+ */
14169
+ /**
14170
+ * One zone as it travels: its key, the label the operator typed, its icon and
14171
+ * the locations inside it.
14172
+ *
14173
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
14174
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
14175
+ * here, rather than left to a second call, because every consumer wants both
14176
+ * at once and a viewer that asked twice could render a zone whose membership
14177
+ * it has not fetched yet.
14178
+ *
14179
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
14180
+ * of those two is a choice, and a picker has to draw them differently.
14181
+ */
14182
+ var SiteZoneSchema = object({
14183
+ zoneKey: string(),
14184
+ label: string(),
14185
+ icon: LocationIconIdSchema.nullable(),
14186
+ /** Folded location keys, sorted. A location listed here need not be
14187
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
14188
+ * the ones that most want grouping. */
14189
+ locationKeys: array(string())
14190
+ });
14090
14191
  var ProviderStatusSchema = object({
14091
14192
  connected: boolean(),
14092
14193
  deviceCount: number(),
@@ -14598,6 +14699,39 @@ method(object({
14598
14699
  }), object({ moved: number() }), {
14599
14700
  kind: "mutation",
14600
14701
  auth: "admin"
14702
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14703
+ location: string(),
14704
+ icon: LocationIconIdSchema.nullable()
14705
+ }), _void(), {
14706
+ kind: "mutation",
14707
+ auth: "admin"
14708
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14709
+ location: string(),
14710
+ description: string().max(400).nullable()
14711
+ }), _void(), {
14712
+ kind: "mutation",
14713
+ auth: "admin"
14714
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14715
+ name: string(),
14716
+ icon: LocationIconIdSchema.nullable().optional()
14717
+ }), _void(), {
14718
+ kind: "mutation",
14719
+ auth: "admin"
14720
+ }), method(object({ name: string() }), _void(), {
14721
+ kind: "mutation",
14722
+ auth: "admin"
14723
+ }), method(object({
14724
+ from: string(),
14725
+ to: string()
14726
+ }), _void(), {
14727
+ kind: "mutation",
14728
+ auth: "admin"
14729
+ }), method(object({
14730
+ location: string(),
14731
+ zone: string().nullable()
14732
+ }), _void(), {
14733
+ kind: "mutation",
14734
+ auth: "admin"
14601
14735
  }), method(object({
14602
14736
  deviceId: number(),
14603
14737
  disabled: boolean()
@@ -33482,6 +33616,18 @@ Object.freeze({
33482
33616
  addonId: null,
33483
33617
  access: "view"
33484
33618
  },
33619
+ "deviceManager.listLocationDescriptions": {
33620
+ capName: "device-manager",
33621
+ capScope: "system",
33622
+ addonId: null,
33623
+ access: "view"
33624
+ },
33625
+ "deviceManager.listLocationIcons": {
33626
+ capName: "device-manager",
33627
+ capScope: "system",
33628
+ addonId: null,
33629
+ access: "view"
33630
+ },
33485
33631
  "deviceManager.listLocations": {
33486
33632
  capName: "device-manager",
33487
33633
  capScope: "system",
@@ -33494,6 +33640,12 @@ Object.freeze({
33494
33640
  addonId: null,
33495
33641
  access: "view"
33496
33642
  },
33643
+ "deviceManager.listSiteZones": {
33644
+ capName: "device-manager",
33645
+ capScope: "system",
33646
+ addonId: null,
33647
+ access: "view"
33648
+ },
33497
33649
  "deviceManager.listWrappersForCap": {
33498
33650
  capName: "device-manager",
33499
33651
  capScope: "system",
@@ -33578,12 +33730,24 @@ Object.freeze({
33578
33730
  addonId: null,
33579
33731
  access: "delete"
33580
33732
  },
33733
+ "deviceManager.removeSiteZone": {
33734
+ capName: "device-manager",
33735
+ capScope: "system",
33736
+ addonId: null,
33737
+ access: "delete"
33738
+ },
33581
33739
  "deviceManager.renameLocation": {
33582
33740
  capName: "device-manager",
33583
33741
  capScope: "system",
33584
33742
  addonId: null,
33585
33743
  access: "create"
33586
33744
  },
33745
+ "deviceManager.renameSiteZone": {
33746
+ capName: "device-manager",
33747
+ capScope: "system",
33748
+ addonId: null,
33749
+ access: "create"
33750
+ },
33587
33751
  "deviceManager.runDeviceAction": {
33588
33752
  capName: "device-manager",
33589
33753
  capScope: "system",
@@ -33626,6 +33790,24 @@ Object.freeze({
33626
33790
  addonId: null,
33627
33791
  access: "create"
33628
33792
  },
33793
+ "deviceManager.setLocationDescription": {
33794
+ capName: "device-manager",
33795
+ capScope: "system",
33796
+ addonId: null,
33797
+ access: "create"
33798
+ },
33799
+ "deviceManager.setLocationIcon": {
33800
+ capName: "device-manager",
33801
+ capScope: "system",
33802
+ addonId: null,
33803
+ access: "create"
33804
+ },
33805
+ "deviceManager.setLocationZone": {
33806
+ capName: "device-manager",
33807
+ capScope: "system",
33808
+ addonId: null,
33809
+ access: "create"
33810
+ },
33629
33811
  "deviceManager.setMetadata": {
33630
33812
  capName: "device-manager",
33631
33813
  capScope: "system",
@@ -33656,6 +33838,12 @@ Object.freeze({
33656
33838
  addonId: null,
33657
33839
  access: "create"
33658
33840
  },
33841
+ "deviceManager.setSiteZone": {
33842
+ capName: "device-manager",
33843
+ capScope: "system",
33844
+ addonId: null,
33845
+ access: "create"
33846
+ },
33659
33847
  "deviceManager.setStreamProfileMap": {
33660
33848
  capName: "device-manager",
33661
33849
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.117",
3
+ "version": "1.2.119",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",