@camstack/addon-provider-gree 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
@@ -12295,7 +12295,23 @@ var PickStreamRequirementsSchema = object({
12295
12295
  * This is what lets one picker serve both the bypass and the full source
12296
12296
  * choice, instead of a consumer scoring privately when the bypass misses.
12297
12297
  */
12298
- allowTranscode: boolean().optional()
12298
+ allowTranscode: boolean().optional(),
12299
+ /**
12300
+ * Consider ONLY streams the broker has bound to a profile slot.
12301
+ *
12302
+ * A consumer that dials the broker — which is every exporter, since none
12303
+ * of them may open the camera's own URL — can do nothing with a source
12304
+ * that has no slot: there is no restream to dial. Without this the picker
12305
+ * can name such a stream, and each consumer discovers the dead end for
12306
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12307
+ * falls back, and HomeKit would have had to grow the same function again.
12308
+ *
12309
+ * Default `false`, and deliberately so: the BROKER itself picks through
12310
+ * here when it decides which source to BIND to a slot
12311
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12312
+ * could never bind them.
12313
+ */
12314
+ requireProfileBound: boolean().optional()
12299
12315
  }).readonly();
12300
12316
  var PickStreamPreferencesSchema = object({
12301
12317
  /**
@@ -12336,7 +12352,43 @@ var PickedCamStreamSchema = object({
12336
12352
  */
12337
12353
  transcodes: boolean(),
12338
12354
  /** One-line explanation of why this stream won — for logs / debug UI. */
12339
- reason: string()
12355
+ reason: string(),
12356
+ /**
12357
+ * The broker profile slot this source is bound to, when it is bound.
12358
+ *
12359
+ * Answered HERE because every consumer needs it and none of them can get it
12360
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12361
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12362
+ * the same function a second time.
12363
+ *
12364
+ * Absent when the source has no slot, which a caller passing
12365
+ * `requireProfileBound` can never see.
12366
+ */
12367
+ profile: CamProfileSchema.optional(),
12368
+ /** The broker id of that slot, for logs that must name what was dialled. */
12369
+ brokerId: string().optional(),
12370
+ /**
12371
+ * The broker restream URL to dial for this stream.
12372
+ *
12373
+ * An exporter must never open the camera's own URL — the broker is the one
12374
+ * that dials the camera, and every consumer goes through its restream. So
12375
+ * the picker answers with the thing a consumer may actually use, instead of
12376
+ * naming a source and leaving each caller to look the URL up.
12377
+ */
12378
+ url: string().optional(),
12379
+ /**
12380
+ * Frames per second this stream really delivers, and where the number came
12381
+ * from.
12382
+ *
12383
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12384
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12385
+ * and the controller rendered nothing at all. The source is carried with the
12386
+ * value for the same reason the bitrate evidence is: `published` is what the
12387
+ * publisher declares and `measured` is what the broker observed, and they
12388
+ * are not interchangeable.
12389
+ */
12390
+ fps: number().positive().optional(),
12391
+ fpsSource: _enum(["published", "measured"]).optional()
12340
12392
  });
12341
12393
  /**
12342
12394
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13519,6 +13571,70 @@ var LocationIconAssignmentSchema = object({
13519
13571
  locationKey: string(),
13520
13572
  icon: LocationIconIdSchema
13521
13573
  });
13574
+ /**
13575
+ * One (location, description) assignment as it travels.
13576
+ *
13577
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13578
+ * reason: this lived for a while in the post-analysis addon's own settings,
13579
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13580
+ * the Locations page carried the icon and silently orphaned the description —
13581
+ * two authorities for one thing, joined by two different rules. Now both hang
13582
+ * off the location itself, on `locationIconKey`.
13583
+ */
13584
+ var LocationDescriptionAssignmentSchema = object({
13585
+ locationKey: string(),
13586
+ description: string()
13587
+ });
13588
+ /**
13589
+ * A SITE ZONE — a named part of the property that several locations belong to.
13590
+ *
13591
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13592
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13593
+ * one zone, so a camera's zone is derived and never stored on the device: the
13594
+ * whole point of this entity is that grouping rooms touches no device row.
13595
+ *
13596
+ * ## Why not `zone`
13597
+ *
13598
+ * Because `zone` is already the most loaded word in this product: 612 source
13599
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13600
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13601
+ * set of rooms — and a reader who confuses them will look for a camera's
13602
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13603
+ * word by calling the drawn one what it actually is: a detection zone.
13604
+ *
13605
+ * ## The key
13606
+ *
13607
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13608
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13609
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13610
+ * silently-dropped location description.
13611
+ *
13612
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13613
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13614
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13615
+ */
13616
+ /**
13617
+ * One zone as it travels: its key, the label the operator typed, its icon and
13618
+ * the locations inside it.
13619
+ *
13620
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13621
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13622
+ * here, rather than left to a second call, because every consumer wants both
13623
+ * at once and a viewer that asked twice could render a zone whose membership
13624
+ * it has not fetched yet.
13625
+ *
13626
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13627
+ * of those two is a choice, and a picker has to draw them differently.
13628
+ */
13629
+ var SiteZoneSchema = object({
13630
+ zoneKey: string(),
13631
+ label: string(),
13632
+ icon: LocationIconIdSchema.nullable(),
13633
+ /** Folded location keys, sorted. A location listed here need not be
13634
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13635
+ * the ones that most want grouping. */
13636
+ locationKeys: array(string())
13637
+ });
13522
13638
  var ProviderStatusSchema = object({
13523
13639
  connected: boolean(),
13524
13640
  deviceCount: number(),
@@ -14117,6 +14233,33 @@ method(object({
14117
14233
  }), _void(), {
14118
14234
  kind: "mutation",
14119
14235
  auth: "admin"
14236
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14237
+ location: string(),
14238
+ description: string().max(400).nullable()
14239
+ }), _void(), {
14240
+ kind: "mutation",
14241
+ auth: "admin"
14242
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14243
+ name: string(),
14244
+ icon: LocationIconIdSchema.nullable().optional()
14245
+ }), _void(), {
14246
+ kind: "mutation",
14247
+ auth: "admin"
14248
+ }), method(object({ name: string() }), _void(), {
14249
+ kind: "mutation",
14250
+ auth: "admin"
14251
+ }), method(object({
14252
+ from: string(),
14253
+ to: string()
14254
+ }), _void(), {
14255
+ kind: "mutation",
14256
+ auth: "admin"
14257
+ }), method(object({
14258
+ location: string(),
14259
+ zone: string().nullable()
14260
+ }), _void(), {
14261
+ kind: "mutation",
14262
+ auth: "admin"
14120
14263
  }), method(object({
14121
14264
  deviceId: number(),
14122
14265
  disabled: boolean()
@@ -37027,6 +37170,12 @@ Object.freeze({
37027
37170
  addonId: null,
37028
37171
  access: "view"
37029
37172
  },
37173
+ "deviceManager.listLocationDescriptions": {
37174
+ capName: "device-manager",
37175
+ capScope: "system",
37176
+ addonId: null,
37177
+ access: "view"
37178
+ },
37030
37179
  "deviceManager.listLocationIcons": {
37031
37180
  capName: "device-manager",
37032
37181
  capScope: "system",
@@ -37045,6 +37194,12 @@ Object.freeze({
37045
37194
  addonId: null,
37046
37195
  access: "view"
37047
37196
  },
37197
+ "deviceManager.listSiteZones": {
37198
+ capName: "device-manager",
37199
+ capScope: "system",
37200
+ addonId: null,
37201
+ access: "view"
37202
+ },
37048
37203
  "deviceManager.listWrappersForCap": {
37049
37204
  capName: "device-manager",
37050
37205
  capScope: "system",
@@ -37129,12 +37284,24 @@ Object.freeze({
37129
37284
  addonId: null,
37130
37285
  access: "delete"
37131
37286
  },
37287
+ "deviceManager.removeSiteZone": {
37288
+ capName: "device-manager",
37289
+ capScope: "system",
37290
+ addonId: null,
37291
+ access: "delete"
37292
+ },
37132
37293
  "deviceManager.renameLocation": {
37133
37294
  capName: "device-manager",
37134
37295
  capScope: "system",
37135
37296
  addonId: null,
37136
37297
  access: "create"
37137
37298
  },
37299
+ "deviceManager.renameSiteZone": {
37300
+ capName: "device-manager",
37301
+ capScope: "system",
37302
+ addonId: null,
37303
+ access: "create"
37304
+ },
37138
37305
  "deviceManager.runDeviceAction": {
37139
37306
  capName: "device-manager",
37140
37307
  capScope: "system",
@@ -37177,12 +37344,24 @@ Object.freeze({
37177
37344
  addonId: null,
37178
37345
  access: "create"
37179
37346
  },
37347
+ "deviceManager.setLocationDescription": {
37348
+ capName: "device-manager",
37349
+ capScope: "system",
37350
+ addonId: null,
37351
+ access: "create"
37352
+ },
37180
37353
  "deviceManager.setLocationIcon": {
37181
37354
  capName: "device-manager",
37182
37355
  capScope: "system",
37183
37356
  addonId: null,
37184
37357
  access: "create"
37185
37358
  },
37359
+ "deviceManager.setLocationZone": {
37360
+ capName: "device-manager",
37361
+ capScope: "system",
37362
+ addonId: null,
37363
+ access: "create"
37364
+ },
37186
37365
  "deviceManager.setMetadata": {
37187
37366
  capName: "device-manager",
37188
37367
  capScope: "system",
@@ -37213,6 +37392,12 @@ Object.freeze({
37213
37392
  addonId: null,
37214
37393
  access: "create"
37215
37394
  },
37395
+ "deviceManager.setSiteZone": {
37396
+ capName: "device-manager",
37397
+ capScope: "system",
37398
+ addonId: null,
37399
+ access: "create"
37400
+ },
37216
37401
  "deviceManager.setStreamProfileMap": {
37217
37402
  capName: "device-manager",
37218
37403
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -12294,7 +12294,23 @@ var PickStreamRequirementsSchema = object({
12294
12294
  * This is what lets one picker serve both the bypass and the full source
12295
12295
  * choice, instead of a consumer scoring privately when the bypass misses.
12296
12296
  */
12297
- allowTranscode: boolean().optional()
12297
+ allowTranscode: boolean().optional(),
12298
+ /**
12299
+ * Consider ONLY streams the broker has bound to a profile slot.
12300
+ *
12301
+ * A consumer that dials the broker — which is every exporter, since none
12302
+ * of them may open the camera's own URL — can do nothing with a source
12303
+ * that has no slot: there is no restream to dial. Without this the picker
12304
+ * can name such a stream, and each consumer discovers the dead end for
12305
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12306
+ * falls back, and HomeKit would have had to grow the same function again.
12307
+ *
12308
+ * Default `false`, and deliberately so: the BROKER itself picks through
12309
+ * here when it decides which source to BIND to a slot
12310
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12311
+ * could never bind them.
12312
+ */
12313
+ requireProfileBound: boolean().optional()
12298
12314
  }).readonly();
12299
12315
  var PickStreamPreferencesSchema = object({
12300
12316
  /**
@@ -12335,7 +12351,43 @@ var PickedCamStreamSchema = object({
12335
12351
  */
12336
12352
  transcodes: boolean(),
12337
12353
  /** One-line explanation of why this stream won — for logs / debug UI. */
12338
- reason: string()
12354
+ reason: string(),
12355
+ /**
12356
+ * The broker profile slot this source is bound to, when it is bound.
12357
+ *
12358
+ * Answered HERE because every consumer needs it and none of them can get it
12359
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12360
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12361
+ * the same function a second time.
12362
+ *
12363
+ * Absent when the source has no slot, which a caller passing
12364
+ * `requireProfileBound` can never see.
12365
+ */
12366
+ profile: CamProfileSchema.optional(),
12367
+ /** The broker id of that slot, for logs that must name what was dialled. */
12368
+ brokerId: string().optional(),
12369
+ /**
12370
+ * The broker restream URL to dial for this stream.
12371
+ *
12372
+ * An exporter must never open the camera's own URL — the broker is the one
12373
+ * that dials the camera, and every consumer goes through its restream. So
12374
+ * the picker answers with the thing a consumer may actually use, instead of
12375
+ * naming a source and leaving each caller to look the URL up.
12376
+ */
12377
+ url: string().optional(),
12378
+ /**
12379
+ * Frames per second this stream really delivers, and where the number came
12380
+ * from.
12381
+ *
12382
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12383
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12384
+ * and the controller rendered nothing at all. The source is carried with the
12385
+ * value for the same reason the bitrate evidence is: `published` is what the
12386
+ * publisher declares and `measured` is what the broker observed, and they
12387
+ * are not interchangeable.
12388
+ */
12389
+ fps: number().positive().optional(),
12390
+ fpsSource: _enum(["published", "measured"]).optional()
12339
12391
  });
12340
12392
  /**
12341
12393
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13518,6 +13570,70 @@ var LocationIconAssignmentSchema = object({
13518
13570
  locationKey: string(),
13519
13571
  icon: LocationIconIdSchema
13520
13572
  });
13573
+ /**
13574
+ * One (location, description) assignment as it travels.
13575
+ *
13576
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13577
+ * reason: this lived for a while in the post-analysis addon's own settings,
13578
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13579
+ * the Locations page carried the icon and silently orphaned the description —
13580
+ * two authorities for one thing, joined by two different rules. Now both hang
13581
+ * off the location itself, on `locationIconKey`.
13582
+ */
13583
+ var LocationDescriptionAssignmentSchema = object({
13584
+ locationKey: string(),
13585
+ description: string()
13586
+ });
13587
+ /**
13588
+ * A SITE ZONE — a named part of the property that several locations belong to.
13589
+ *
13590
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13591
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13592
+ * one zone, so a camera's zone is derived and never stored on the device: the
13593
+ * whole point of this entity is that grouping rooms touches no device row.
13594
+ *
13595
+ * ## Why not `zone`
13596
+ *
13597
+ * Because `zone` is already the most loaded word in this product: 612 source
13598
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13599
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13600
+ * set of rooms — and a reader who confuses them will look for a camera's
13601
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13602
+ * word by calling the drawn one what it actually is: a detection zone.
13603
+ *
13604
+ * ## The key
13605
+ *
13606
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13607
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13608
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13609
+ * silently-dropped location description.
13610
+ *
13611
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13612
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13613
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13614
+ */
13615
+ /**
13616
+ * One zone as it travels: its key, the label the operator typed, its icon and
13617
+ * the locations inside it.
13618
+ *
13619
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13620
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13621
+ * here, rather than left to a second call, because every consumer wants both
13622
+ * at once and a viewer that asked twice could render a zone whose membership
13623
+ * it has not fetched yet.
13624
+ *
13625
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13626
+ * of those two is a choice, and a picker has to draw them differently.
13627
+ */
13628
+ var SiteZoneSchema = object({
13629
+ zoneKey: string(),
13630
+ label: string(),
13631
+ icon: LocationIconIdSchema.nullable(),
13632
+ /** Folded location keys, sorted. A location listed here need not be
13633
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13634
+ * the ones that most want grouping. */
13635
+ locationKeys: array(string())
13636
+ });
13521
13637
  var ProviderStatusSchema = object({
13522
13638
  connected: boolean(),
13523
13639
  deviceCount: number(),
@@ -14116,6 +14232,33 @@ method(object({
14116
14232
  }), _void(), {
14117
14233
  kind: "mutation",
14118
14234
  auth: "admin"
14235
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14236
+ location: string(),
14237
+ description: string().max(400).nullable()
14238
+ }), _void(), {
14239
+ kind: "mutation",
14240
+ auth: "admin"
14241
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14242
+ name: string(),
14243
+ icon: LocationIconIdSchema.nullable().optional()
14244
+ }), _void(), {
14245
+ kind: "mutation",
14246
+ auth: "admin"
14247
+ }), method(object({ name: string() }), _void(), {
14248
+ kind: "mutation",
14249
+ auth: "admin"
14250
+ }), method(object({
14251
+ from: string(),
14252
+ to: string()
14253
+ }), _void(), {
14254
+ kind: "mutation",
14255
+ auth: "admin"
14256
+ }), method(object({
14257
+ location: string(),
14258
+ zone: string().nullable()
14259
+ }), _void(), {
14260
+ kind: "mutation",
14261
+ auth: "admin"
14119
14262
  }), method(object({
14120
14263
  deviceId: number(),
14121
14264
  disabled: boolean()
@@ -37026,6 +37169,12 @@ Object.freeze({
37026
37169
  addonId: null,
37027
37170
  access: "view"
37028
37171
  },
37172
+ "deviceManager.listLocationDescriptions": {
37173
+ capName: "device-manager",
37174
+ capScope: "system",
37175
+ addonId: null,
37176
+ access: "view"
37177
+ },
37029
37178
  "deviceManager.listLocationIcons": {
37030
37179
  capName: "device-manager",
37031
37180
  capScope: "system",
@@ -37044,6 +37193,12 @@ Object.freeze({
37044
37193
  addonId: null,
37045
37194
  access: "view"
37046
37195
  },
37196
+ "deviceManager.listSiteZones": {
37197
+ capName: "device-manager",
37198
+ capScope: "system",
37199
+ addonId: null,
37200
+ access: "view"
37201
+ },
37047
37202
  "deviceManager.listWrappersForCap": {
37048
37203
  capName: "device-manager",
37049
37204
  capScope: "system",
@@ -37128,12 +37283,24 @@ Object.freeze({
37128
37283
  addonId: null,
37129
37284
  access: "delete"
37130
37285
  },
37286
+ "deviceManager.removeSiteZone": {
37287
+ capName: "device-manager",
37288
+ capScope: "system",
37289
+ addonId: null,
37290
+ access: "delete"
37291
+ },
37131
37292
  "deviceManager.renameLocation": {
37132
37293
  capName: "device-manager",
37133
37294
  capScope: "system",
37134
37295
  addonId: null,
37135
37296
  access: "create"
37136
37297
  },
37298
+ "deviceManager.renameSiteZone": {
37299
+ capName: "device-manager",
37300
+ capScope: "system",
37301
+ addonId: null,
37302
+ access: "create"
37303
+ },
37137
37304
  "deviceManager.runDeviceAction": {
37138
37305
  capName: "device-manager",
37139
37306
  capScope: "system",
@@ -37176,12 +37343,24 @@ Object.freeze({
37176
37343
  addonId: null,
37177
37344
  access: "create"
37178
37345
  },
37346
+ "deviceManager.setLocationDescription": {
37347
+ capName: "device-manager",
37348
+ capScope: "system",
37349
+ addonId: null,
37350
+ access: "create"
37351
+ },
37179
37352
  "deviceManager.setLocationIcon": {
37180
37353
  capName: "device-manager",
37181
37354
  capScope: "system",
37182
37355
  addonId: null,
37183
37356
  access: "create"
37184
37357
  },
37358
+ "deviceManager.setLocationZone": {
37359
+ capName: "device-manager",
37360
+ capScope: "system",
37361
+ addonId: null,
37362
+ access: "create"
37363
+ },
37185
37364
  "deviceManager.setMetadata": {
37186
37365
  capName: "device-manager",
37187
37366
  capScope: "system",
@@ -37212,6 +37391,12 @@ Object.freeze({
37212
37391
  addonId: null,
37213
37392
  access: "create"
37214
37393
  },
37394
+ "deviceManager.setSiteZone": {
37395
+ capName: "device-manager",
37396
+ capScope: "system",
37397
+ addonId: null,
37398
+ access: "create"
37399
+ },
37215
37400
  "deviceManager.setStreamProfileMap": {
37216
37401
  capName: "device-manager",
37217
37402
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.105",
3
+ "version": "0.2.107",
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",