@camstack/addon-provider-gree 0.2.104 → 0.2.106

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
@@ -13482,6 +13482,107 @@ var ExposeInputSchema = object({
13482
13482
  });
13483
13483
  var UnexposeInputSchema = object({ deviceId: string() });
13484
13484
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13485
+ /** Wire/storage schema for one icon id. */
13486
+ var LocationIconIdSchema = _enum([
13487
+ "map-pin",
13488
+ "house",
13489
+ "door-open",
13490
+ "sofa",
13491
+ "utensils",
13492
+ "bed-double",
13493
+ "bath",
13494
+ "briefcase",
13495
+ "car",
13496
+ "circle-parking",
13497
+ "route",
13498
+ "trees",
13499
+ "umbrella",
13500
+ "waves-ladder",
13501
+ "fence",
13502
+ "package",
13503
+ "warehouse",
13504
+ "store",
13505
+ "sun",
13506
+ "radar"
13507
+ ]);
13508
+ /**
13509
+ * One (location, icon) assignment as it travels.
13510
+ *
13511
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13512
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13513
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13514
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13515
+ * map keyed on the displayed casing would orphan its entry on exactly that
13516
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13517
+ */
13518
+ var LocationIconAssignmentSchema = object({
13519
+ locationKey: string(),
13520
+ icon: LocationIconIdSchema
13521
+ });
13522
+ /**
13523
+ * One (location, description) assignment as it travels.
13524
+ *
13525
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13526
+ * reason: this lived for a while in the post-analysis addon's own settings,
13527
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13528
+ * the Locations page carried the icon and silently orphaned the description —
13529
+ * two authorities for one thing, joined by two different rules. Now both hang
13530
+ * off the location itself, on `locationIconKey`.
13531
+ */
13532
+ var LocationDescriptionAssignmentSchema = object({
13533
+ locationKey: string(),
13534
+ description: string()
13535
+ });
13536
+ /**
13537
+ * A SITE ZONE — a named part of the property that several locations belong to.
13538
+ *
13539
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13540
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13541
+ * one zone, so a camera's zone is derived and never stored on the device: the
13542
+ * whole point of this entity is that grouping rooms touches no device row.
13543
+ *
13544
+ * ## Why not `zone`
13545
+ *
13546
+ * Because `zone` is already the most loaded word in this product: 612 source
13547
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13548
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13549
+ * set of rooms — and a reader who confuses them will look for a camera's
13550
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13551
+ * word by calling the drawn one what it actually is: a detection zone.
13552
+ *
13553
+ * ## The key
13554
+ *
13555
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13556
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13557
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13558
+ * silently-dropped location description.
13559
+ *
13560
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13561
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13562
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13563
+ */
13564
+ /**
13565
+ * One zone as it travels: its key, the label the operator typed, its icon and
13566
+ * the locations inside it.
13567
+ *
13568
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13569
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13570
+ * here, rather than left to a second call, because every consumer wants both
13571
+ * at once and a viewer that asked twice could render a zone whose membership
13572
+ * it has not fetched yet.
13573
+ *
13574
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13575
+ * of those two is a choice, and a picker has to draw them differently.
13576
+ */
13577
+ var SiteZoneSchema = object({
13578
+ zoneKey: string(),
13579
+ label: string(),
13580
+ icon: LocationIconIdSchema.nullable(),
13581
+ /** Folded location keys, sorted. A location listed here need not be
13582
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13583
+ * the ones that most want grouping. */
13584
+ locationKeys: array(string())
13585
+ });
13485
13586
  var ProviderStatusSchema = object({
13486
13587
  connected: boolean(),
13487
13588
  deviceCount: number(),
@@ -14074,6 +14175,39 @@ method(object({
14074
14175
  }), object({ moved: number() }), {
14075
14176
  kind: "mutation",
14076
14177
  auth: "admin"
14178
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14179
+ location: string(),
14180
+ icon: LocationIconIdSchema.nullable()
14181
+ }), _void(), {
14182
+ kind: "mutation",
14183
+ auth: "admin"
14184
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14185
+ location: string(),
14186
+ description: string().max(400).nullable()
14187
+ }), _void(), {
14188
+ kind: "mutation",
14189
+ auth: "admin"
14190
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14191
+ name: string(),
14192
+ icon: LocationIconIdSchema.nullable().optional()
14193
+ }), _void(), {
14194
+ kind: "mutation",
14195
+ auth: "admin"
14196
+ }), method(object({ name: string() }), _void(), {
14197
+ kind: "mutation",
14198
+ auth: "admin"
14199
+ }), method(object({
14200
+ from: string(),
14201
+ to: string()
14202
+ }), _void(), {
14203
+ kind: "mutation",
14204
+ auth: "admin"
14205
+ }), method(object({
14206
+ location: string(),
14207
+ zone: string().nullable()
14208
+ }), _void(), {
14209
+ kind: "mutation",
14210
+ auth: "admin"
14077
14211
  }), method(object({
14078
14212
  deviceId: number(),
14079
14213
  disabled: boolean()
@@ -36984,6 +37118,18 @@ Object.freeze({
36984
37118
  addonId: null,
36985
37119
  access: "view"
36986
37120
  },
37121
+ "deviceManager.listLocationDescriptions": {
37122
+ capName: "device-manager",
37123
+ capScope: "system",
37124
+ addonId: null,
37125
+ access: "view"
37126
+ },
37127
+ "deviceManager.listLocationIcons": {
37128
+ capName: "device-manager",
37129
+ capScope: "system",
37130
+ addonId: null,
37131
+ access: "view"
37132
+ },
36987
37133
  "deviceManager.listLocations": {
36988
37134
  capName: "device-manager",
36989
37135
  capScope: "system",
@@ -36996,6 +37142,12 @@ Object.freeze({
36996
37142
  addonId: null,
36997
37143
  access: "view"
36998
37144
  },
37145
+ "deviceManager.listSiteZones": {
37146
+ capName: "device-manager",
37147
+ capScope: "system",
37148
+ addonId: null,
37149
+ access: "view"
37150
+ },
36999
37151
  "deviceManager.listWrappersForCap": {
37000
37152
  capName: "device-manager",
37001
37153
  capScope: "system",
@@ -37080,12 +37232,24 @@ Object.freeze({
37080
37232
  addonId: null,
37081
37233
  access: "delete"
37082
37234
  },
37235
+ "deviceManager.removeSiteZone": {
37236
+ capName: "device-manager",
37237
+ capScope: "system",
37238
+ addonId: null,
37239
+ access: "delete"
37240
+ },
37083
37241
  "deviceManager.renameLocation": {
37084
37242
  capName: "device-manager",
37085
37243
  capScope: "system",
37086
37244
  addonId: null,
37087
37245
  access: "create"
37088
37246
  },
37247
+ "deviceManager.renameSiteZone": {
37248
+ capName: "device-manager",
37249
+ capScope: "system",
37250
+ addonId: null,
37251
+ access: "create"
37252
+ },
37089
37253
  "deviceManager.runDeviceAction": {
37090
37254
  capName: "device-manager",
37091
37255
  capScope: "system",
@@ -37128,6 +37292,24 @@ Object.freeze({
37128
37292
  addonId: null,
37129
37293
  access: "create"
37130
37294
  },
37295
+ "deviceManager.setLocationDescription": {
37296
+ capName: "device-manager",
37297
+ capScope: "system",
37298
+ addonId: null,
37299
+ access: "create"
37300
+ },
37301
+ "deviceManager.setLocationIcon": {
37302
+ capName: "device-manager",
37303
+ capScope: "system",
37304
+ addonId: null,
37305
+ access: "create"
37306
+ },
37307
+ "deviceManager.setLocationZone": {
37308
+ capName: "device-manager",
37309
+ capScope: "system",
37310
+ addonId: null,
37311
+ access: "create"
37312
+ },
37131
37313
  "deviceManager.setMetadata": {
37132
37314
  capName: "device-manager",
37133
37315
  capScope: "system",
@@ -37158,6 +37340,12 @@ Object.freeze({
37158
37340
  addonId: null,
37159
37341
  access: "create"
37160
37342
  },
37343
+ "deviceManager.setSiteZone": {
37344
+ capName: "device-manager",
37345
+ capScope: "system",
37346
+ addonId: null,
37347
+ access: "create"
37348
+ },
37161
37349
  "deviceManager.setStreamProfileMap": {
37162
37350
  capName: "device-manager",
37163
37351
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13481,6 +13481,107 @@ var ExposeInputSchema = object({
13481
13481
  });
13482
13482
  var UnexposeInputSchema = object({ deviceId: string() });
13483
13483
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13484
+ /** Wire/storage schema for one icon id. */
13485
+ var LocationIconIdSchema = _enum([
13486
+ "map-pin",
13487
+ "house",
13488
+ "door-open",
13489
+ "sofa",
13490
+ "utensils",
13491
+ "bed-double",
13492
+ "bath",
13493
+ "briefcase",
13494
+ "car",
13495
+ "circle-parking",
13496
+ "route",
13497
+ "trees",
13498
+ "umbrella",
13499
+ "waves-ladder",
13500
+ "fence",
13501
+ "package",
13502
+ "warehouse",
13503
+ "store",
13504
+ "sun",
13505
+ "radar"
13506
+ ]);
13507
+ /**
13508
+ * One (location, icon) assignment as it travels.
13509
+ *
13510
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13511
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13512
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13513
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13514
+ * map keyed on the displayed casing would orphan its entry on exactly that
13515
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13516
+ */
13517
+ var LocationIconAssignmentSchema = object({
13518
+ locationKey: string(),
13519
+ icon: LocationIconIdSchema
13520
+ });
13521
+ /**
13522
+ * One (location, description) assignment as it travels.
13523
+ *
13524
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13525
+ * reason: this lived for a while in the post-analysis addon's own settings,
13526
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13527
+ * the Locations page carried the icon and silently orphaned the description —
13528
+ * two authorities for one thing, joined by two different rules. Now both hang
13529
+ * off the location itself, on `locationIconKey`.
13530
+ */
13531
+ var LocationDescriptionAssignmentSchema = object({
13532
+ locationKey: string(),
13533
+ description: string()
13534
+ });
13535
+ /**
13536
+ * A SITE ZONE — a named part of the property that several locations belong to.
13537
+ *
13538
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13539
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13540
+ * one zone, so a camera's zone is derived and never stored on the device: the
13541
+ * whole point of this entity is that grouping rooms touches no device row.
13542
+ *
13543
+ * ## Why not `zone`
13544
+ *
13545
+ * Because `zone` is already the most loaded word in this product: 612 source
13546
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13547
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13548
+ * set of rooms — and a reader who confuses them will look for a camera's
13549
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13550
+ * word by calling the drawn one what it actually is: a detection zone.
13551
+ *
13552
+ * ## The key
13553
+ *
13554
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13555
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13556
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13557
+ * silently-dropped location description.
13558
+ *
13559
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13560
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13561
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13562
+ */
13563
+ /**
13564
+ * One zone as it travels: its key, the label the operator typed, its icon and
13565
+ * the locations inside it.
13566
+ *
13567
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13568
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13569
+ * here, rather than left to a second call, because every consumer wants both
13570
+ * at once and a viewer that asked twice could render a zone whose membership
13571
+ * it has not fetched yet.
13572
+ *
13573
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13574
+ * of those two is a choice, and a picker has to draw them differently.
13575
+ */
13576
+ var SiteZoneSchema = object({
13577
+ zoneKey: string(),
13578
+ label: string(),
13579
+ icon: LocationIconIdSchema.nullable(),
13580
+ /** Folded location keys, sorted. A location listed here need not be
13581
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13582
+ * the ones that most want grouping. */
13583
+ locationKeys: array(string())
13584
+ });
13484
13585
  var ProviderStatusSchema = object({
13485
13586
  connected: boolean(),
13486
13587
  deviceCount: number(),
@@ -14073,6 +14174,39 @@ method(object({
14073
14174
  }), object({ moved: number() }), {
14074
14175
  kind: "mutation",
14075
14176
  auth: "admin"
14177
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14178
+ location: string(),
14179
+ icon: LocationIconIdSchema.nullable()
14180
+ }), _void(), {
14181
+ kind: "mutation",
14182
+ auth: "admin"
14183
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14184
+ location: string(),
14185
+ description: string().max(400).nullable()
14186
+ }), _void(), {
14187
+ kind: "mutation",
14188
+ auth: "admin"
14189
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14190
+ name: string(),
14191
+ icon: LocationIconIdSchema.nullable().optional()
14192
+ }), _void(), {
14193
+ kind: "mutation",
14194
+ auth: "admin"
14195
+ }), method(object({ name: string() }), _void(), {
14196
+ kind: "mutation",
14197
+ auth: "admin"
14198
+ }), method(object({
14199
+ from: string(),
14200
+ to: string()
14201
+ }), _void(), {
14202
+ kind: "mutation",
14203
+ auth: "admin"
14204
+ }), method(object({
14205
+ location: string(),
14206
+ zone: string().nullable()
14207
+ }), _void(), {
14208
+ kind: "mutation",
14209
+ auth: "admin"
14076
14210
  }), method(object({
14077
14211
  deviceId: number(),
14078
14212
  disabled: boolean()
@@ -36983,6 +37117,18 @@ Object.freeze({
36983
37117
  addonId: null,
36984
37118
  access: "view"
36985
37119
  },
37120
+ "deviceManager.listLocationDescriptions": {
37121
+ capName: "device-manager",
37122
+ capScope: "system",
37123
+ addonId: null,
37124
+ access: "view"
37125
+ },
37126
+ "deviceManager.listLocationIcons": {
37127
+ capName: "device-manager",
37128
+ capScope: "system",
37129
+ addonId: null,
37130
+ access: "view"
37131
+ },
36986
37132
  "deviceManager.listLocations": {
36987
37133
  capName: "device-manager",
36988
37134
  capScope: "system",
@@ -36995,6 +37141,12 @@ Object.freeze({
36995
37141
  addonId: null,
36996
37142
  access: "view"
36997
37143
  },
37144
+ "deviceManager.listSiteZones": {
37145
+ capName: "device-manager",
37146
+ capScope: "system",
37147
+ addonId: null,
37148
+ access: "view"
37149
+ },
36998
37150
  "deviceManager.listWrappersForCap": {
36999
37151
  capName: "device-manager",
37000
37152
  capScope: "system",
@@ -37079,12 +37231,24 @@ Object.freeze({
37079
37231
  addonId: null,
37080
37232
  access: "delete"
37081
37233
  },
37234
+ "deviceManager.removeSiteZone": {
37235
+ capName: "device-manager",
37236
+ capScope: "system",
37237
+ addonId: null,
37238
+ access: "delete"
37239
+ },
37082
37240
  "deviceManager.renameLocation": {
37083
37241
  capName: "device-manager",
37084
37242
  capScope: "system",
37085
37243
  addonId: null,
37086
37244
  access: "create"
37087
37245
  },
37246
+ "deviceManager.renameSiteZone": {
37247
+ capName: "device-manager",
37248
+ capScope: "system",
37249
+ addonId: null,
37250
+ access: "create"
37251
+ },
37088
37252
  "deviceManager.runDeviceAction": {
37089
37253
  capName: "device-manager",
37090
37254
  capScope: "system",
@@ -37127,6 +37291,24 @@ Object.freeze({
37127
37291
  addonId: null,
37128
37292
  access: "create"
37129
37293
  },
37294
+ "deviceManager.setLocationDescription": {
37295
+ capName: "device-manager",
37296
+ capScope: "system",
37297
+ addonId: null,
37298
+ access: "create"
37299
+ },
37300
+ "deviceManager.setLocationIcon": {
37301
+ capName: "device-manager",
37302
+ capScope: "system",
37303
+ addonId: null,
37304
+ access: "create"
37305
+ },
37306
+ "deviceManager.setLocationZone": {
37307
+ capName: "device-manager",
37308
+ capScope: "system",
37309
+ addonId: null,
37310
+ access: "create"
37311
+ },
37130
37312
  "deviceManager.setMetadata": {
37131
37313
  capName: "device-manager",
37132
37314
  capScope: "system",
@@ -37157,6 +37339,12 @@ Object.freeze({
37157
37339
  addonId: null,
37158
37340
  access: "create"
37159
37341
  },
37342
+ "deviceManager.setSiteZone": {
37343
+ capName: "device-manager",
37344
+ capScope: "system",
37345
+ addonId: null,
37346
+ access: "create"
37347
+ },
37160
37348
  "deviceManager.setStreamProfileMap": {
37161
37349
  capName: "device-manager",
37162
37350
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.104",
3
+ "version": "0.2.106",
4
4
  "description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
5
5
  "keywords": [
6
6
  "camstack",