@camstack/addon-provider-dreo 0.2.106 → 0.2.108

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
@@ -12328,7 +12328,23 @@ var PickStreamRequirementsSchema = object({
12328
12328
  * This is what lets one picker serve both the bypass and the full source
12329
12329
  * choice, instead of a consumer scoring privately when the bypass misses.
12330
12330
  */
12331
- allowTranscode: boolean().optional()
12331
+ allowTranscode: boolean().optional(),
12332
+ /**
12333
+ * Consider ONLY streams the broker has bound to a profile slot.
12334
+ *
12335
+ * A consumer that dials the broker — which is every exporter, since none
12336
+ * of them may open the camera's own URL — can do nothing with a source
12337
+ * that has no slot: there is no restream to dial. Without this the picker
12338
+ * can name such a stream, and each consumer discovers the dead end for
12339
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12340
+ * falls back, and HomeKit would have had to grow the same function again.
12341
+ *
12342
+ * Default `false`, and deliberately so: the BROKER itself picks through
12343
+ * here when it decides which source to BIND to a slot
12344
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12345
+ * could never bind them.
12346
+ */
12347
+ requireProfileBound: boolean().optional()
12332
12348
  }).readonly();
12333
12349
  var PickStreamPreferencesSchema = object({
12334
12350
  /**
@@ -12369,7 +12385,43 @@ var PickedCamStreamSchema = object({
12369
12385
  */
12370
12386
  transcodes: boolean(),
12371
12387
  /** One-line explanation of why this stream won — for logs / debug UI. */
12372
- reason: string()
12388
+ reason: string(),
12389
+ /**
12390
+ * The broker profile slot this source is bound to, when it is bound.
12391
+ *
12392
+ * Answered HERE because every consumer needs it and none of them can get it
12393
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12394
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12395
+ * the same function a second time.
12396
+ *
12397
+ * Absent when the source has no slot, which a caller passing
12398
+ * `requireProfileBound` can never see.
12399
+ */
12400
+ profile: CamProfileSchema.optional(),
12401
+ /** The broker id of that slot, for logs that must name what was dialled. */
12402
+ brokerId: string().optional(),
12403
+ /**
12404
+ * The broker restream URL to dial for this stream.
12405
+ *
12406
+ * An exporter must never open the camera's own URL — the broker is the one
12407
+ * that dials the camera, and every consumer goes through its restream. So
12408
+ * the picker answers with the thing a consumer may actually use, instead of
12409
+ * naming a source and leaving each caller to look the URL up.
12410
+ */
12411
+ url: string().optional(),
12412
+ /**
12413
+ * Frames per second this stream really delivers, and where the number came
12414
+ * from.
12415
+ *
12416
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12417
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12418
+ * and the controller rendered nothing at all. The source is carried with the
12419
+ * value for the same reason the bitrate evidence is: `published` is what the
12420
+ * publisher declares and `measured` is what the broker observed, and they
12421
+ * are not interchangeable.
12422
+ */
12423
+ fps: number().positive().optional(),
12424
+ fpsSource: _enum(["published", "measured"]).optional()
12373
12425
  });
12374
12426
  /**
12375
12427
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13569,6 +13621,70 @@ var LocationIconAssignmentSchema = object({
13569
13621
  locationKey: string(),
13570
13622
  icon: LocationIconIdSchema
13571
13623
  });
13624
+ /**
13625
+ * One (location, description) assignment as it travels.
13626
+ *
13627
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13628
+ * reason: this lived for a while in the post-analysis addon's own settings,
13629
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13630
+ * the Locations page carried the icon and silently orphaned the description —
13631
+ * two authorities for one thing, joined by two different rules. Now both hang
13632
+ * off the location itself, on `locationIconKey`.
13633
+ */
13634
+ var LocationDescriptionAssignmentSchema = object({
13635
+ locationKey: string(),
13636
+ description: string()
13637
+ });
13638
+ /**
13639
+ * A SITE ZONE — a named part of the property that several locations belong to.
13640
+ *
13641
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13642
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13643
+ * one zone, so a camera's zone is derived and never stored on the device: the
13644
+ * whole point of this entity is that grouping rooms touches no device row.
13645
+ *
13646
+ * ## Why not `zone`
13647
+ *
13648
+ * Because `zone` is already the most loaded word in this product: 612 source
13649
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13650
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13651
+ * set of rooms — and a reader who confuses them will look for a camera's
13652
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13653
+ * word by calling the drawn one what it actually is: a detection zone.
13654
+ *
13655
+ * ## The key
13656
+ *
13657
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13658
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13659
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13660
+ * silently-dropped location description.
13661
+ *
13662
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13663
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13664
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13665
+ */
13666
+ /**
13667
+ * One zone as it travels: its key, the label the operator typed, its icon and
13668
+ * the locations inside it.
13669
+ *
13670
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13671
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13672
+ * here, rather than left to a second call, because every consumer wants both
13673
+ * at once and a viewer that asked twice could render a zone whose membership
13674
+ * it has not fetched yet.
13675
+ *
13676
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13677
+ * of those two is a choice, and a picker has to draw them differently.
13678
+ */
13679
+ var SiteZoneSchema = object({
13680
+ zoneKey: string(),
13681
+ label: string(),
13682
+ icon: LocationIconIdSchema.nullable(),
13683
+ /** Folded location keys, sorted. A location listed here need not be
13684
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13685
+ * the ones that most want grouping. */
13686
+ locationKeys: array(string())
13687
+ });
13572
13688
  var ProviderStatusSchema = object({
13573
13689
  connected: boolean(),
13574
13690
  deviceCount: number(),
@@ -14167,6 +14283,33 @@ method(object({
14167
14283
  }), _void(), {
14168
14284
  kind: "mutation",
14169
14285
  auth: "admin"
14286
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14287
+ location: string(),
14288
+ description: string().max(400).nullable()
14289
+ }), _void(), {
14290
+ kind: "mutation",
14291
+ auth: "admin"
14292
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14293
+ name: string(),
14294
+ icon: LocationIconIdSchema.nullable().optional()
14295
+ }), _void(), {
14296
+ kind: "mutation",
14297
+ auth: "admin"
14298
+ }), method(object({ name: string() }), _void(), {
14299
+ kind: "mutation",
14300
+ auth: "admin"
14301
+ }), method(object({
14302
+ from: string(),
14303
+ to: string()
14304
+ }), _void(), {
14305
+ kind: "mutation",
14306
+ auth: "admin"
14307
+ }), method(object({
14308
+ location: string(),
14309
+ zone: string().nullable()
14310
+ }), _void(), {
14311
+ kind: "mutation",
14312
+ auth: "admin"
14170
14313
  }), method(object({
14171
14314
  deviceId: number(),
14172
14315
  disabled: boolean()
@@ -37085,6 +37228,12 @@ Object.freeze({
37085
37228
  addonId: null,
37086
37229
  access: "view"
37087
37230
  },
37231
+ "deviceManager.listLocationDescriptions": {
37232
+ capName: "device-manager",
37233
+ capScope: "system",
37234
+ addonId: null,
37235
+ access: "view"
37236
+ },
37088
37237
  "deviceManager.listLocationIcons": {
37089
37238
  capName: "device-manager",
37090
37239
  capScope: "system",
@@ -37103,6 +37252,12 @@ Object.freeze({
37103
37252
  addonId: null,
37104
37253
  access: "view"
37105
37254
  },
37255
+ "deviceManager.listSiteZones": {
37256
+ capName: "device-manager",
37257
+ capScope: "system",
37258
+ addonId: null,
37259
+ access: "view"
37260
+ },
37106
37261
  "deviceManager.listWrappersForCap": {
37107
37262
  capName: "device-manager",
37108
37263
  capScope: "system",
@@ -37187,12 +37342,24 @@ Object.freeze({
37187
37342
  addonId: null,
37188
37343
  access: "delete"
37189
37344
  },
37345
+ "deviceManager.removeSiteZone": {
37346
+ capName: "device-manager",
37347
+ capScope: "system",
37348
+ addonId: null,
37349
+ access: "delete"
37350
+ },
37190
37351
  "deviceManager.renameLocation": {
37191
37352
  capName: "device-manager",
37192
37353
  capScope: "system",
37193
37354
  addonId: null,
37194
37355
  access: "create"
37195
37356
  },
37357
+ "deviceManager.renameSiteZone": {
37358
+ capName: "device-manager",
37359
+ capScope: "system",
37360
+ addonId: null,
37361
+ access: "create"
37362
+ },
37196
37363
  "deviceManager.runDeviceAction": {
37197
37364
  capName: "device-manager",
37198
37365
  capScope: "system",
@@ -37235,12 +37402,24 @@ Object.freeze({
37235
37402
  addonId: null,
37236
37403
  access: "create"
37237
37404
  },
37405
+ "deviceManager.setLocationDescription": {
37406
+ capName: "device-manager",
37407
+ capScope: "system",
37408
+ addonId: null,
37409
+ access: "create"
37410
+ },
37238
37411
  "deviceManager.setLocationIcon": {
37239
37412
  capName: "device-manager",
37240
37413
  capScope: "system",
37241
37414
  addonId: null,
37242
37415
  access: "create"
37243
37416
  },
37417
+ "deviceManager.setLocationZone": {
37418
+ capName: "device-manager",
37419
+ capScope: "system",
37420
+ addonId: null,
37421
+ access: "create"
37422
+ },
37244
37423
  "deviceManager.setMetadata": {
37245
37424
  capName: "device-manager",
37246
37425
  capScope: "system",
@@ -37271,6 +37450,12 @@ Object.freeze({
37271
37450
  addonId: null,
37272
37451
  access: "create"
37273
37452
  },
37453
+ "deviceManager.setSiteZone": {
37454
+ capName: "device-manager",
37455
+ capScope: "system",
37456
+ addonId: null,
37457
+ access: "create"
37458
+ },
37274
37459
  "deviceManager.setStreamProfileMap": {
37275
37460
  capName: "device-manager",
37276
37461
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -12329,7 +12329,23 @@ var PickStreamRequirementsSchema = object({
12329
12329
  * This is what lets one picker serve both the bypass and the full source
12330
12330
  * choice, instead of a consumer scoring privately when the bypass misses.
12331
12331
  */
12332
- allowTranscode: boolean().optional()
12332
+ allowTranscode: boolean().optional(),
12333
+ /**
12334
+ * Consider ONLY streams the broker has bound to a profile slot.
12335
+ *
12336
+ * A consumer that dials the broker — which is every exporter, since none
12337
+ * of them may open the camera's own URL — can do nothing with a source
12338
+ * that has no slot: there is no restream to dial. Without this the picker
12339
+ * can name such a stream, and each consumer discovers the dead end for
12340
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12341
+ * falls back, and HomeKit would have had to grow the same function again.
12342
+ *
12343
+ * Default `false`, and deliberately so: the BROKER itself picks through
12344
+ * here when it decides which source to BIND to a slot
12345
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12346
+ * could never bind them.
12347
+ */
12348
+ requireProfileBound: boolean().optional()
12333
12349
  }).readonly();
12334
12350
  var PickStreamPreferencesSchema = object({
12335
12351
  /**
@@ -12370,7 +12386,43 @@ var PickedCamStreamSchema = object({
12370
12386
  */
12371
12387
  transcodes: boolean(),
12372
12388
  /** One-line explanation of why this stream won — for logs / debug UI. */
12373
- reason: string()
12389
+ reason: string(),
12390
+ /**
12391
+ * The broker profile slot this source is bound to, when it is bound.
12392
+ *
12393
+ * Answered HERE because every consumer needs it and none of them can get it
12394
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12395
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12396
+ * the same function a second time.
12397
+ *
12398
+ * Absent when the source has no slot, which a caller passing
12399
+ * `requireProfileBound` can never see.
12400
+ */
12401
+ profile: CamProfileSchema.optional(),
12402
+ /** The broker id of that slot, for logs that must name what was dialled. */
12403
+ brokerId: string().optional(),
12404
+ /**
12405
+ * The broker restream URL to dial for this stream.
12406
+ *
12407
+ * An exporter must never open the camera's own URL — the broker is the one
12408
+ * that dials the camera, and every consumer goes through its restream. So
12409
+ * the picker answers with the thing a consumer may actually use, instead of
12410
+ * naming a source and leaving each caller to look the URL up.
12411
+ */
12412
+ url: string().optional(),
12413
+ /**
12414
+ * Frames per second this stream really delivers, and where the number came
12415
+ * from.
12416
+ *
12417
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12418
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12419
+ * and the controller rendered nothing at all. The source is carried with the
12420
+ * value for the same reason the bitrate evidence is: `published` is what the
12421
+ * publisher declares and `measured` is what the broker observed, and they
12422
+ * are not interchangeable.
12423
+ */
12424
+ fps: number().positive().optional(),
12425
+ fpsSource: _enum(["published", "measured"]).optional()
12374
12426
  });
12375
12427
  /**
12376
12428
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13570,6 +13622,70 @@ var LocationIconAssignmentSchema = object({
13570
13622
  locationKey: string(),
13571
13623
  icon: LocationIconIdSchema
13572
13624
  });
13625
+ /**
13626
+ * One (location, description) assignment as it travels.
13627
+ *
13628
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13629
+ * reason: this lived for a while in the post-analysis addon's own settings,
13630
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13631
+ * the Locations page carried the icon and silently orphaned the description —
13632
+ * two authorities for one thing, joined by two different rules. Now both hang
13633
+ * off the location itself, on `locationIconKey`.
13634
+ */
13635
+ var LocationDescriptionAssignmentSchema = object({
13636
+ locationKey: string(),
13637
+ description: string()
13638
+ });
13639
+ /**
13640
+ * A SITE ZONE — a named part of the property that several locations belong to.
13641
+ *
13642
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13643
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13644
+ * one zone, so a camera's zone is derived and never stored on the device: the
13645
+ * whole point of this entity is that grouping rooms touches no device row.
13646
+ *
13647
+ * ## Why not `zone`
13648
+ *
13649
+ * Because `zone` is already the most loaded word in this product: 612 source
13650
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13651
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13652
+ * set of rooms — and a reader who confuses them will look for a camera's
13653
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13654
+ * word by calling the drawn one what it actually is: a detection zone.
13655
+ *
13656
+ * ## The key
13657
+ *
13658
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13659
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13660
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13661
+ * silently-dropped location description.
13662
+ *
13663
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13664
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13665
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13666
+ */
13667
+ /**
13668
+ * One zone as it travels: its key, the label the operator typed, its icon and
13669
+ * the locations inside it.
13670
+ *
13671
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13672
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13673
+ * here, rather than left to a second call, because every consumer wants both
13674
+ * at once and a viewer that asked twice could render a zone whose membership
13675
+ * it has not fetched yet.
13676
+ *
13677
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13678
+ * of those two is a choice, and a picker has to draw them differently.
13679
+ */
13680
+ var SiteZoneSchema = object({
13681
+ zoneKey: string(),
13682
+ label: string(),
13683
+ icon: LocationIconIdSchema.nullable(),
13684
+ /** Folded location keys, sorted. A location listed here need not be
13685
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13686
+ * the ones that most want grouping. */
13687
+ locationKeys: array(string())
13688
+ });
13573
13689
  var ProviderStatusSchema = object({
13574
13690
  connected: boolean(),
13575
13691
  deviceCount: number(),
@@ -14168,6 +14284,33 @@ method(object({
14168
14284
  }), _void(), {
14169
14285
  kind: "mutation",
14170
14286
  auth: "admin"
14287
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14288
+ location: string(),
14289
+ description: string().max(400).nullable()
14290
+ }), _void(), {
14291
+ kind: "mutation",
14292
+ auth: "admin"
14293
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14294
+ name: string(),
14295
+ icon: LocationIconIdSchema.nullable().optional()
14296
+ }), _void(), {
14297
+ kind: "mutation",
14298
+ auth: "admin"
14299
+ }), method(object({ name: string() }), _void(), {
14300
+ kind: "mutation",
14301
+ auth: "admin"
14302
+ }), method(object({
14303
+ from: string(),
14304
+ to: string()
14305
+ }), _void(), {
14306
+ kind: "mutation",
14307
+ auth: "admin"
14308
+ }), method(object({
14309
+ location: string(),
14310
+ zone: string().nullable()
14311
+ }), _void(), {
14312
+ kind: "mutation",
14313
+ auth: "admin"
14171
14314
  }), method(object({
14172
14315
  deviceId: number(),
14173
14316
  disabled: boolean()
@@ -37086,6 +37229,12 @@ Object.freeze({
37086
37229
  addonId: null,
37087
37230
  access: "view"
37088
37231
  },
37232
+ "deviceManager.listLocationDescriptions": {
37233
+ capName: "device-manager",
37234
+ capScope: "system",
37235
+ addonId: null,
37236
+ access: "view"
37237
+ },
37089
37238
  "deviceManager.listLocationIcons": {
37090
37239
  capName: "device-manager",
37091
37240
  capScope: "system",
@@ -37104,6 +37253,12 @@ Object.freeze({
37104
37253
  addonId: null,
37105
37254
  access: "view"
37106
37255
  },
37256
+ "deviceManager.listSiteZones": {
37257
+ capName: "device-manager",
37258
+ capScope: "system",
37259
+ addonId: null,
37260
+ access: "view"
37261
+ },
37107
37262
  "deviceManager.listWrappersForCap": {
37108
37263
  capName: "device-manager",
37109
37264
  capScope: "system",
@@ -37188,12 +37343,24 @@ Object.freeze({
37188
37343
  addonId: null,
37189
37344
  access: "delete"
37190
37345
  },
37346
+ "deviceManager.removeSiteZone": {
37347
+ capName: "device-manager",
37348
+ capScope: "system",
37349
+ addonId: null,
37350
+ access: "delete"
37351
+ },
37191
37352
  "deviceManager.renameLocation": {
37192
37353
  capName: "device-manager",
37193
37354
  capScope: "system",
37194
37355
  addonId: null,
37195
37356
  access: "create"
37196
37357
  },
37358
+ "deviceManager.renameSiteZone": {
37359
+ capName: "device-manager",
37360
+ capScope: "system",
37361
+ addonId: null,
37362
+ access: "create"
37363
+ },
37197
37364
  "deviceManager.runDeviceAction": {
37198
37365
  capName: "device-manager",
37199
37366
  capScope: "system",
@@ -37236,12 +37403,24 @@ Object.freeze({
37236
37403
  addonId: null,
37237
37404
  access: "create"
37238
37405
  },
37406
+ "deviceManager.setLocationDescription": {
37407
+ capName: "device-manager",
37408
+ capScope: "system",
37409
+ addonId: null,
37410
+ access: "create"
37411
+ },
37239
37412
  "deviceManager.setLocationIcon": {
37240
37413
  capName: "device-manager",
37241
37414
  capScope: "system",
37242
37415
  addonId: null,
37243
37416
  access: "create"
37244
37417
  },
37418
+ "deviceManager.setLocationZone": {
37419
+ capName: "device-manager",
37420
+ capScope: "system",
37421
+ addonId: null,
37422
+ access: "create"
37423
+ },
37245
37424
  "deviceManager.setMetadata": {
37246
37425
  capName: "device-manager",
37247
37426
  capScope: "system",
@@ -37272,6 +37451,12 @@ Object.freeze({
37272
37451
  addonId: null,
37273
37452
  access: "create"
37274
37453
  },
37454
+ "deviceManager.setSiteZone": {
37455
+ capName: "device-manager",
37456
+ capScope: "system",
37457
+ addonId: null,
37458
+ access: "create"
37459
+ },
37275
37460
  "deviceManager.setStreamProfileMap": {
37276
37461
  capName: "device-manager",
37277
37462
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.106",
3
+ "version": "0.2.108",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",