@camstack/addon-export-google 0.1.69 → 0.1.71

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.
@@ -13505,6 +13505,107 @@ var deviceExportCapability = {
13505
13505
  unexposeDevice: method(UnexposeInputSchema, _void(), { kind: "mutation" })
13506
13506
  }
13507
13507
  };
13508
+ /** Wire/storage schema for one icon id. */
13509
+ var LocationIconIdSchema = _enum([
13510
+ "map-pin",
13511
+ "house",
13512
+ "door-open",
13513
+ "sofa",
13514
+ "utensils",
13515
+ "bed-double",
13516
+ "bath",
13517
+ "briefcase",
13518
+ "car",
13519
+ "circle-parking",
13520
+ "route",
13521
+ "trees",
13522
+ "umbrella",
13523
+ "waves-ladder",
13524
+ "fence",
13525
+ "package",
13526
+ "warehouse",
13527
+ "store",
13528
+ "sun",
13529
+ "radar"
13530
+ ]);
13531
+ /**
13532
+ * One (location, icon) assignment as it travels.
13533
+ *
13534
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13535
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13536
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13537
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13538
+ * map keyed on the displayed casing would orphan its entry on exactly that
13539
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13540
+ */
13541
+ var LocationIconAssignmentSchema = object({
13542
+ locationKey: string(),
13543
+ icon: LocationIconIdSchema
13544
+ });
13545
+ /**
13546
+ * One (location, description) assignment as it travels.
13547
+ *
13548
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13549
+ * reason: this lived for a while in the post-analysis addon's own settings,
13550
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13551
+ * the Locations page carried the icon and silently orphaned the description —
13552
+ * two authorities for one thing, joined by two different rules. Now both hang
13553
+ * off the location itself, on `locationIconKey`.
13554
+ */
13555
+ var LocationDescriptionAssignmentSchema = object({
13556
+ locationKey: string(),
13557
+ description: string()
13558
+ });
13559
+ /**
13560
+ * A SITE ZONE — a named part of the property that several locations belong to.
13561
+ *
13562
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13563
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13564
+ * one zone, so a camera's zone is derived and never stored on the device: the
13565
+ * whole point of this entity is that grouping rooms touches no device row.
13566
+ *
13567
+ * ## Why not `zone`
13568
+ *
13569
+ * Because `zone` is already the most loaded word in this product: 612 source
13570
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13571
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13572
+ * set of rooms — and a reader who confuses them will look for a camera's
13573
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13574
+ * word by calling the drawn one what it actually is: a detection zone.
13575
+ *
13576
+ * ## The key
13577
+ *
13578
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13579
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13580
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13581
+ * silently-dropped location description.
13582
+ *
13583
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13584
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13585
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13586
+ */
13587
+ /**
13588
+ * One zone as it travels: its key, the label the operator typed, its icon and
13589
+ * the locations inside it.
13590
+ *
13591
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13592
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13593
+ * here, rather than left to a second call, because every consumer wants both
13594
+ * at once and a viewer that asked twice could render a zone whose membership
13595
+ * it has not fetched yet.
13596
+ *
13597
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13598
+ * of those two is a choice, and a picker has to draw them differently.
13599
+ */
13600
+ var SiteZoneSchema = object({
13601
+ zoneKey: string(),
13602
+ label: string(),
13603
+ icon: LocationIconIdSchema.nullable(),
13604
+ /** Folded location keys, sorted. A location listed here need not be
13605
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13606
+ * the ones that most want grouping. */
13607
+ locationKeys: array(string())
13608
+ });
13508
13609
  var ProviderStatusSchema = object({
13509
13610
  connected: boolean(),
13510
13611
  deviceCount: number(),
@@ -14016,6 +14117,39 @@ method(object({
14016
14117
  }), object({ moved: number() }), {
14017
14118
  kind: "mutation",
14018
14119
  auth: "admin"
14120
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14121
+ location: string(),
14122
+ icon: LocationIconIdSchema.nullable()
14123
+ }), _void(), {
14124
+ kind: "mutation",
14125
+ auth: "admin"
14126
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14127
+ location: string(),
14128
+ description: string().max(400).nullable()
14129
+ }), _void(), {
14130
+ kind: "mutation",
14131
+ auth: "admin"
14132
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14133
+ name: string(),
14134
+ icon: LocationIconIdSchema.nullable().optional()
14135
+ }), _void(), {
14136
+ kind: "mutation",
14137
+ auth: "admin"
14138
+ }), method(object({ name: string() }), _void(), {
14139
+ kind: "mutation",
14140
+ auth: "admin"
14141
+ }), method(object({
14142
+ from: string(),
14143
+ to: string()
14144
+ }), _void(), {
14145
+ kind: "mutation",
14146
+ auth: "admin"
14147
+ }), method(object({
14148
+ location: string(),
14149
+ zone: string().nullable()
14150
+ }), _void(), {
14151
+ kind: "mutation",
14152
+ auth: "admin"
14019
14153
  }), method(object({
14020
14154
  deviceId: number(),
14021
14155
  disabled: boolean()
@@ -32874,6 +33008,18 @@ Object.freeze({
32874
33008
  addonId: null,
32875
33009
  access: "view"
32876
33010
  },
33011
+ "deviceManager.listLocationDescriptions": {
33012
+ capName: "device-manager",
33013
+ capScope: "system",
33014
+ addonId: null,
33015
+ access: "view"
33016
+ },
33017
+ "deviceManager.listLocationIcons": {
33018
+ capName: "device-manager",
33019
+ capScope: "system",
33020
+ addonId: null,
33021
+ access: "view"
33022
+ },
32877
33023
  "deviceManager.listLocations": {
32878
33024
  capName: "device-manager",
32879
33025
  capScope: "system",
@@ -32886,6 +33032,12 @@ Object.freeze({
32886
33032
  addonId: null,
32887
33033
  access: "view"
32888
33034
  },
33035
+ "deviceManager.listSiteZones": {
33036
+ capName: "device-manager",
33037
+ capScope: "system",
33038
+ addonId: null,
33039
+ access: "view"
33040
+ },
32889
33041
  "deviceManager.listWrappersForCap": {
32890
33042
  capName: "device-manager",
32891
33043
  capScope: "system",
@@ -32970,12 +33122,24 @@ Object.freeze({
32970
33122
  addonId: null,
32971
33123
  access: "delete"
32972
33124
  },
33125
+ "deviceManager.removeSiteZone": {
33126
+ capName: "device-manager",
33127
+ capScope: "system",
33128
+ addonId: null,
33129
+ access: "delete"
33130
+ },
32973
33131
  "deviceManager.renameLocation": {
32974
33132
  capName: "device-manager",
32975
33133
  capScope: "system",
32976
33134
  addonId: null,
32977
33135
  access: "create"
32978
33136
  },
33137
+ "deviceManager.renameSiteZone": {
33138
+ capName: "device-manager",
33139
+ capScope: "system",
33140
+ addonId: null,
33141
+ access: "create"
33142
+ },
32979
33143
  "deviceManager.runDeviceAction": {
32980
33144
  capName: "device-manager",
32981
33145
  capScope: "system",
@@ -33018,6 +33182,24 @@ Object.freeze({
33018
33182
  addonId: null,
33019
33183
  access: "create"
33020
33184
  },
33185
+ "deviceManager.setLocationDescription": {
33186
+ capName: "device-manager",
33187
+ capScope: "system",
33188
+ addonId: null,
33189
+ access: "create"
33190
+ },
33191
+ "deviceManager.setLocationIcon": {
33192
+ capName: "device-manager",
33193
+ capScope: "system",
33194
+ addonId: null,
33195
+ access: "create"
33196
+ },
33197
+ "deviceManager.setLocationZone": {
33198
+ capName: "device-manager",
33199
+ capScope: "system",
33200
+ addonId: null,
33201
+ access: "create"
33202
+ },
33021
33203
  "deviceManager.setMetadata": {
33022
33204
  capName: "device-manager",
33023
33205
  capScope: "system",
@@ -33048,6 +33230,12 @@ Object.freeze({
33048
33230
  addonId: null,
33049
33231
  access: "create"
33050
33232
  },
33233
+ "deviceManager.setSiteZone": {
33234
+ capName: "device-manager",
33235
+ capScope: "system",
33236
+ addonId: null,
33237
+ access: "create"
33238
+ },
33051
33239
  "deviceManager.setStreamProfileMap": {
33052
33240
  capName: "device-manager",
33053
33241
  capScope: "system",
@@ -13501,6 +13501,107 @@ var deviceExportCapability = {
13501
13501
  unexposeDevice: method(UnexposeInputSchema, _void(), { kind: "mutation" })
13502
13502
  }
13503
13503
  };
13504
+ /** Wire/storage schema for one icon id. */
13505
+ var LocationIconIdSchema = _enum([
13506
+ "map-pin",
13507
+ "house",
13508
+ "door-open",
13509
+ "sofa",
13510
+ "utensils",
13511
+ "bed-double",
13512
+ "bath",
13513
+ "briefcase",
13514
+ "car",
13515
+ "circle-parking",
13516
+ "route",
13517
+ "trees",
13518
+ "umbrella",
13519
+ "waves-ladder",
13520
+ "fence",
13521
+ "package",
13522
+ "warehouse",
13523
+ "store",
13524
+ "sun",
13525
+ "radar"
13526
+ ]);
13527
+ /**
13528
+ * One (location, icon) assignment as it travels.
13529
+ *
13530
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13531
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13532
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13533
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13534
+ * map keyed on the displayed casing would orphan its entry on exactly that
13535
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13536
+ */
13537
+ var LocationIconAssignmentSchema = object({
13538
+ locationKey: string(),
13539
+ icon: LocationIconIdSchema
13540
+ });
13541
+ /**
13542
+ * One (location, description) assignment as it travels.
13543
+ *
13544
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13545
+ * reason: this lived for a while in the post-analysis addon's own settings,
13546
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13547
+ * the Locations page carried the icon and silently orphaned the description —
13548
+ * two authorities for one thing, joined by two different rules. Now both hang
13549
+ * off the location itself, on `locationIconKey`.
13550
+ */
13551
+ var LocationDescriptionAssignmentSchema = object({
13552
+ locationKey: string(),
13553
+ description: string()
13554
+ });
13555
+ /**
13556
+ * A SITE ZONE — a named part of the property that several locations belong to.
13557
+ *
13558
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13559
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13560
+ * one zone, so a camera's zone is derived and never stored on the device: the
13561
+ * whole point of this entity is that grouping rooms touches no device row.
13562
+ *
13563
+ * ## Why not `zone`
13564
+ *
13565
+ * Because `zone` is already the most loaded word in this product: 612 source
13566
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13567
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13568
+ * set of rooms — and a reader who confuses them will look for a camera's
13569
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13570
+ * word by calling the drawn one what it actually is: a detection zone.
13571
+ *
13572
+ * ## The key
13573
+ *
13574
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13575
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13576
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13577
+ * silently-dropped location description.
13578
+ *
13579
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13580
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13581
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13582
+ */
13583
+ /**
13584
+ * One zone as it travels: its key, the label the operator typed, its icon and
13585
+ * the locations inside it.
13586
+ *
13587
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13588
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13589
+ * here, rather than left to a second call, because every consumer wants both
13590
+ * at once and a viewer that asked twice could render a zone whose membership
13591
+ * it has not fetched yet.
13592
+ *
13593
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13594
+ * of those two is a choice, and a picker has to draw them differently.
13595
+ */
13596
+ var SiteZoneSchema = object({
13597
+ zoneKey: string(),
13598
+ label: string(),
13599
+ icon: LocationIconIdSchema.nullable(),
13600
+ /** Folded location keys, sorted. A location listed here need not be
13601
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13602
+ * the ones that most want grouping. */
13603
+ locationKeys: array(string())
13604
+ });
13504
13605
  var ProviderStatusSchema = object({
13505
13606
  connected: boolean(),
13506
13607
  deviceCount: number(),
@@ -14012,6 +14113,39 @@ method(object({
14012
14113
  }), object({ moved: number() }), {
14013
14114
  kind: "mutation",
14014
14115
  auth: "admin"
14116
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14117
+ location: string(),
14118
+ icon: LocationIconIdSchema.nullable()
14119
+ }), _void(), {
14120
+ kind: "mutation",
14121
+ auth: "admin"
14122
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14123
+ location: string(),
14124
+ description: string().max(400).nullable()
14125
+ }), _void(), {
14126
+ kind: "mutation",
14127
+ auth: "admin"
14128
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14129
+ name: string(),
14130
+ icon: LocationIconIdSchema.nullable().optional()
14131
+ }), _void(), {
14132
+ kind: "mutation",
14133
+ auth: "admin"
14134
+ }), method(object({ name: string() }), _void(), {
14135
+ kind: "mutation",
14136
+ auth: "admin"
14137
+ }), method(object({
14138
+ from: string(),
14139
+ to: string()
14140
+ }), _void(), {
14141
+ kind: "mutation",
14142
+ auth: "admin"
14143
+ }), method(object({
14144
+ location: string(),
14145
+ zone: string().nullable()
14146
+ }), _void(), {
14147
+ kind: "mutation",
14148
+ auth: "admin"
14015
14149
  }), method(object({
14016
14150
  deviceId: number(),
14017
14151
  disabled: boolean()
@@ -32870,6 +33004,18 @@ Object.freeze({
32870
33004
  addonId: null,
32871
33005
  access: "view"
32872
33006
  },
33007
+ "deviceManager.listLocationDescriptions": {
33008
+ capName: "device-manager",
33009
+ capScope: "system",
33010
+ addonId: null,
33011
+ access: "view"
33012
+ },
33013
+ "deviceManager.listLocationIcons": {
33014
+ capName: "device-manager",
33015
+ capScope: "system",
33016
+ addonId: null,
33017
+ access: "view"
33018
+ },
32873
33019
  "deviceManager.listLocations": {
32874
33020
  capName: "device-manager",
32875
33021
  capScope: "system",
@@ -32882,6 +33028,12 @@ Object.freeze({
32882
33028
  addonId: null,
32883
33029
  access: "view"
32884
33030
  },
33031
+ "deviceManager.listSiteZones": {
33032
+ capName: "device-manager",
33033
+ capScope: "system",
33034
+ addonId: null,
33035
+ access: "view"
33036
+ },
32885
33037
  "deviceManager.listWrappersForCap": {
32886
33038
  capName: "device-manager",
32887
33039
  capScope: "system",
@@ -32966,12 +33118,24 @@ Object.freeze({
32966
33118
  addonId: null,
32967
33119
  access: "delete"
32968
33120
  },
33121
+ "deviceManager.removeSiteZone": {
33122
+ capName: "device-manager",
33123
+ capScope: "system",
33124
+ addonId: null,
33125
+ access: "delete"
33126
+ },
32969
33127
  "deviceManager.renameLocation": {
32970
33128
  capName: "device-manager",
32971
33129
  capScope: "system",
32972
33130
  addonId: null,
32973
33131
  access: "create"
32974
33132
  },
33133
+ "deviceManager.renameSiteZone": {
33134
+ capName: "device-manager",
33135
+ capScope: "system",
33136
+ addonId: null,
33137
+ access: "create"
33138
+ },
32975
33139
  "deviceManager.runDeviceAction": {
32976
33140
  capName: "device-manager",
32977
33141
  capScope: "system",
@@ -33014,6 +33178,24 @@ Object.freeze({
33014
33178
  addonId: null,
33015
33179
  access: "create"
33016
33180
  },
33181
+ "deviceManager.setLocationDescription": {
33182
+ capName: "device-manager",
33183
+ capScope: "system",
33184
+ addonId: null,
33185
+ access: "create"
33186
+ },
33187
+ "deviceManager.setLocationIcon": {
33188
+ capName: "device-manager",
33189
+ capScope: "system",
33190
+ addonId: null,
33191
+ access: "create"
33192
+ },
33193
+ "deviceManager.setLocationZone": {
33194
+ capName: "device-manager",
33195
+ capScope: "system",
33196
+ addonId: null,
33197
+ access: "create"
33198
+ },
33017
33199
  "deviceManager.setMetadata": {
33018
33200
  capName: "device-manager",
33019
33201
  capScope: "system",
@@ -33044,6 +33226,12 @@ Object.freeze({
33044
33226
  addonId: null,
33045
33227
  access: "create"
33046
33228
  },
33229
+ "deviceManager.setSiteZone": {
33230
+ capName: "device-manager",
33231
+ capScope: "system",
33232
+ addonId: null,
33233
+ access: "create"
33234
+ },
33047
33235
  "deviceManager.setStreamProfileMap": {
33048
33236
  capName: "device-manager",
33049
33237
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-google",
3
- "version": "0.1.69",
3
+ "version": "0.1.71",
4
4
  "description": "Google Home export — hub-side smart-home fulfillment (SYNC / QUERY / EXECUTE / DISCONNECT) for the non-camera fleet, served over the hub's own OAuth account link. No Google credential is stored, sent or required.",
5
5
  "keywords": [
6
6
  "camstack",