@camstack/addon-import-alexa 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
@@ -12516,7 +12516,23 @@ var PickStreamRequirementsSchema = object({
12516
12516
  * This is what lets one picker serve both the bypass and the full source
12517
12517
  * choice, instead of a consumer scoring privately when the bypass misses.
12518
12518
  */
12519
- allowTranscode: boolean().optional()
12519
+ allowTranscode: boolean().optional(),
12520
+ /**
12521
+ * Consider ONLY streams the broker has bound to a profile slot.
12522
+ *
12523
+ * A consumer that dials the broker — which is every exporter, since none
12524
+ * of them may open the camera's own URL — can do nothing with a source
12525
+ * that has no slot: there is no restream to dial. Without this the picker
12526
+ * can name such a stream, and each consumer discovers the dead end for
12527
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12528
+ * falls back, and HomeKit would have had to grow the same function again.
12529
+ *
12530
+ * Default `false`, and deliberately so: the BROKER itself picks through
12531
+ * here when it decides which source to BIND to a slot
12532
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12533
+ * could never bind them.
12534
+ */
12535
+ requireProfileBound: boolean().optional()
12520
12536
  }).readonly();
12521
12537
  var PickStreamPreferencesSchema = object({
12522
12538
  /**
@@ -12557,7 +12573,43 @@ var PickedCamStreamSchema = object({
12557
12573
  */
12558
12574
  transcodes: boolean(),
12559
12575
  /** One-line explanation of why this stream won — for logs / debug UI. */
12560
- reason: string()
12576
+ reason: string(),
12577
+ /**
12578
+ * The broker profile slot this source is bound to, when it is bound.
12579
+ *
12580
+ * Answered HERE because every consumer needs it and none of them can get it
12581
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12582
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12583
+ * the same function a second time.
12584
+ *
12585
+ * Absent when the source has no slot, which a caller passing
12586
+ * `requireProfileBound` can never see.
12587
+ */
12588
+ profile: CamProfileSchema.optional(),
12589
+ /** The broker id of that slot, for logs that must name what was dialled. */
12590
+ brokerId: string().optional(),
12591
+ /**
12592
+ * The broker restream URL to dial for this stream.
12593
+ *
12594
+ * An exporter must never open the camera's own URL — the broker is the one
12595
+ * that dials the camera, and every consumer goes through its restream. So
12596
+ * the picker answers with the thing a consumer may actually use, instead of
12597
+ * naming a source and leaving each caller to look the URL up.
12598
+ */
12599
+ url: string().optional(),
12600
+ /**
12601
+ * Frames per second this stream really delivers, and where the number came
12602
+ * from.
12603
+ *
12604
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12605
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12606
+ * and the controller rendered nothing at all. The source is carried with the
12607
+ * value for the same reason the bitrate evidence is: `published` is what the
12608
+ * publisher declares and `measured` is what the broker observed, and they
12609
+ * are not interchangeable.
12610
+ */
12611
+ fps: number().positive().optional(),
12612
+ fpsSource: _enum(["published", "measured"]).optional()
12561
12613
  });
12562
12614
  /**
12563
12615
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13757,6 +13809,70 @@ var LocationIconAssignmentSchema = object({
13757
13809
  locationKey: string(),
13758
13810
  icon: LocationIconIdSchema
13759
13811
  });
13812
+ /**
13813
+ * One (location, description) assignment as it travels.
13814
+ *
13815
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13816
+ * reason: this lived for a while in the post-analysis addon's own settings,
13817
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13818
+ * the Locations page carried the icon and silently orphaned the description —
13819
+ * two authorities for one thing, joined by two different rules. Now both hang
13820
+ * off the location itself, on `locationIconKey`.
13821
+ */
13822
+ var LocationDescriptionAssignmentSchema = object({
13823
+ locationKey: string(),
13824
+ description: string()
13825
+ });
13826
+ /**
13827
+ * A SITE ZONE — a named part of the property that several locations belong to.
13828
+ *
13829
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13830
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13831
+ * one zone, so a camera's zone is derived and never stored on the device: the
13832
+ * whole point of this entity is that grouping rooms touches no device row.
13833
+ *
13834
+ * ## Why not `zone`
13835
+ *
13836
+ * Because `zone` is already the most loaded word in this product: 612 source
13837
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13838
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13839
+ * set of rooms — and a reader who confuses them will look for a camera's
13840
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13841
+ * word by calling the drawn one what it actually is: a detection zone.
13842
+ *
13843
+ * ## The key
13844
+ *
13845
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13846
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13847
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13848
+ * silently-dropped location description.
13849
+ *
13850
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13851
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13852
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13853
+ */
13854
+ /**
13855
+ * One zone as it travels: its key, the label the operator typed, its icon and
13856
+ * the locations inside it.
13857
+ *
13858
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13859
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13860
+ * here, rather than left to a second call, because every consumer wants both
13861
+ * at once and a viewer that asked twice could render a zone whose membership
13862
+ * it has not fetched yet.
13863
+ *
13864
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13865
+ * of those two is a choice, and a picker has to draw them differently.
13866
+ */
13867
+ var SiteZoneSchema = object({
13868
+ zoneKey: string(),
13869
+ label: string(),
13870
+ icon: LocationIconIdSchema.nullable(),
13871
+ /** Folded location keys, sorted. A location listed here need not be
13872
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13873
+ * the ones that most want grouping. */
13874
+ locationKeys: array(string())
13875
+ });
13760
13876
  var ProviderStatusSchema = object({
13761
13877
  connected: boolean(),
13762
13878
  deviceCount: number(),
@@ -14355,6 +14471,33 @@ method(object({
14355
14471
  }), _void(), {
14356
14472
  kind: "mutation",
14357
14473
  auth: "admin"
14474
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14475
+ location: string(),
14476
+ description: string().max(400).nullable()
14477
+ }), _void(), {
14478
+ kind: "mutation",
14479
+ auth: "admin"
14480
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14481
+ name: string(),
14482
+ icon: LocationIconIdSchema.nullable().optional()
14483
+ }), _void(), {
14484
+ kind: "mutation",
14485
+ auth: "admin"
14486
+ }), method(object({ name: string() }), _void(), {
14487
+ kind: "mutation",
14488
+ auth: "admin"
14489
+ }), method(object({
14490
+ from: string(),
14491
+ to: string()
14492
+ }), _void(), {
14493
+ kind: "mutation",
14494
+ auth: "admin"
14495
+ }), method(object({
14496
+ location: string(),
14497
+ zone: string().nullable()
14498
+ }), _void(), {
14499
+ kind: "mutation",
14500
+ auth: "admin"
14358
14501
  }), method(object({
14359
14502
  deviceId: number(),
14360
14503
  disabled: boolean()
@@ -37282,6 +37425,12 @@ Object.freeze({
37282
37425
  addonId: null,
37283
37426
  access: "view"
37284
37427
  },
37428
+ "deviceManager.listLocationDescriptions": {
37429
+ capName: "device-manager",
37430
+ capScope: "system",
37431
+ addonId: null,
37432
+ access: "view"
37433
+ },
37285
37434
  "deviceManager.listLocationIcons": {
37286
37435
  capName: "device-manager",
37287
37436
  capScope: "system",
@@ -37300,6 +37449,12 @@ Object.freeze({
37300
37449
  addonId: null,
37301
37450
  access: "view"
37302
37451
  },
37452
+ "deviceManager.listSiteZones": {
37453
+ capName: "device-manager",
37454
+ capScope: "system",
37455
+ addonId: null,
37456
+ access: "view"
37457
+ },
37303
37458
  "deviceManager.listWrappersForCap": {
37304
37459
  capName: "device-manager",
37305
37460
  capScope: "system",
@@ -37384,12 +37539,24 @@ Object.freeze({
37384
37539
  addonId: null,
37385
37540
  access: "delete"
37386
37541
  },
37542
+ "deviceManager.removeSiteZone": {
37543
+ capName: "device-manager",
37544
+ capScope: "system",
37545
+ addonId: null,
37546
+ access: "delete"
37547
+ },
37387
37548
  "deviceManager.renameLocation": {
37388
37549
  capName: "device-manager",
37389
37550
  capScope: "system",
37390
37551
  addonId: null,
37391
37552
  access: "create"
37392
37553
  },
37554
+ "deviceManager.renameSiteZone": {
37555
+ capName: "device-manager",
37556
+ capScope: "system",
37557
+ addonId: null,
37558
+ access: "create"
37559
+ },
37393
37560
  "deviceManager.runDeviceAction": {
37394
37561
  capName: "device-manager",
37395
37562
  capScope: "system",
@@ -37432,12 +37599,24 @@ Object.freeze({
37432
37599
  addonId: null,
37433
37600
  access: "create"
37434
37601
  },
37602
+ "deviceManager.setLocationDescription": {
37603
+ capName: "device-manager",
37604
+ capScope: "system",
37605
+ addonId: null,
37606
+ access: "create"
37607
+ },
37435
37608
  "deviceManager.setLocationIcon": {
37436
37609
  capName: "device-manager",
37437
37610
  capScope: "system",
37438
37611
  addonId: null,
37439
37612
  access: "create"
37440
37613
  },
37614
+ "deviceManager.setLocationZone": {
37615
+ capName: "device-manager",
37616
+ capScope: "system",
37617
+ addonId: null,
37618
+ access: "create"
37619
+ },
37441
37620
  "deviceManager.setMetadata": {
37442
37621
  capName: "device-manager",
37443
37622
  capScope: "system",
@@ -37468,6 +37647,12 @@ Object.freeze({
37468
37647
  addonId: null,
37469
37648
  access: "create"
37470
37649
  },
37650
+ "deviceManager.setSiteZone": {
37651
+ capName: "device-manager",
37652
+ capScope: "system",
37653
+ addonId: null,
37654
+ access: "create"
37655
+ },
37471
37656
  "deviceManager.setStreamProfileMap": {
37472
37657
  capName: "device-manager",
37473
37658
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -12516,7 +12516,23 @@ var PickStreamRequirementsSchema = object({
12516
12516
  * This is what lets one picker serve both the bypass and the full source
12517
12517
  * choice, instead of a consumer scoring privately when the bypass misses.
12518
12518
  */
12519
- allowTranscode: boolean().optional()
12519
+ allowTranscode: boolean().optional(),
12520
+ /**
12521
+ * Consider ONLY streams the broker has bound to a profile slot.
12522
+ *
12523
+ * A consumer that dials the broker — which is every exporter, since none
12524
+ * of them may open the camera's own URL — can do nothing with a source
12525
+ * that has no slot: there is no restream to dial. Without this the picker
12526
+ * can name such a stream, and each consumer discovers the dead end for
12527
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12528
+ * falls back, and HomeKit would have had to grow the same function again.
12529
+ *
12530
+ * Default `false`, and deliberately so: the BROKER itself picks through
12531
+ * here when it decides which source to BIND to a slot
12532
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12533
+ * could never bind them.
12534
+ */
12535
+ requireProfileBound: boolean().optional()
12520
12536
  }).readonly();
12521
12537
  var PickStreamPreferencesSchema = object({
12522
12538
  /**
@@ -12557,7 +12573,43 @@ var PickedCamStreamSchema = object({
12557
12573
  */
12558
12574
  transcodes: boolean(),
12559
12575
  /** One-line explanation of why this stream won — for logs / debug UI. */
12560
- reason: string()
12576
+ reason: string(),
12577
+ /**
12578
+ * The broker profile slot this source is bound to, when it is bound.
12579
+ *
12580
+ * Answered HERE because every consumer needs it and none of them can get it
12581
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12582
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12583
+ * the same function a second time.
12584
+ *
12585
+ * Absent when the source has no slot, which a caller passing
12586
+ * `requireProfileBound` can never see.
12587
+ */
12588
+ profile: CamProfileSchema.optional(),
12589
+ /** The broker id of that slot, for logs that must name what was dialled. */
12590
+ brokerId: string().optional(),
12591
+ /**
12592
+ * The broker restream URL to dial for this stream.
12593
+ *
12594
+ * An exporter must never open the camera's own URL — the broker is the one
12595
+ * that dials the camera, and every consumer goes through its restream. So
12596
+ * the picker answers with the thing a consumer may actually use, instead of
12597
+ * naming a source and leaving each caller to look the URL up.
12598
+ */
12599
+ url: string().optional(),
12600
+ /**
12601
+ * Frames per second this stream really delivers, and where the number came
12602
+ * from.
12603
+ *
12604
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12605
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12606
+ * and the controller rendered nothing at all. The source is carried with the
12607
+ * value for the same reason the bitrate evidence is: `published` is what the
12608
+ * publisher declares and `measured` is what the broker observed, and they
12609
+ * are not interchangeable.
12610
+ */
12611
+ fps: number().positive().optional(),
12612
+ fpsSource: _enum(["published", "measured"]).optional()
12561
12613
  });
12562
12614
  /**
12563
12615
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13757,6 +13809,70 @@ var LocationIconAssignmentSchema = object({
13757
13809
  locationKey: string(),
13758
13810
  icon: LocationIconIdSchema
13759
13811
  });
13812
+ /**
13813
+ * One (location, description) assignment as it travels.
13814
+ *
13815
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13816
+ * reason: this lived for a while in the post-analysis addon's own settings,
13817
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13818
+ * the Locations page carried the icon and silently orphaned the description —
13819
+ * two authorities for one thing, joined by two different rules. Now both hang
13820
+ * off the location itself, on `locationIconKey`.
13821
+ */
13822
+ var LocationDescriptionAssignmentSchema = object({
13823
+ locationKey: string(),
13824
+ description: string()
13825
+ });
13826
+ /**
13827
+ * A SITE ZONE — a named part of the property that several locations belong to.
13828
+ *
13829
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13830
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13831
+ * one zone, so a camera's zone is derived and never stored on the device: the
13832
+ * whole point of this entity is that grouping rooms touches no device row.
13833
+ *
13834
+ * ## Why not `zone`
13835
+ *
13836
+ * Because `zone` is already the most loaded word in this product: 612 source
13837
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13838
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13839
+ * set of rooms — and a reader who confuses them will look for a camera's
13840
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13841
+ * word by calling the drawn one what it actually is: a detection zone.
13842
+ *
13843
+ * ## The key
13844
+ *
13845
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13846
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13847
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13848
+ * silently-dropped location description.
13849
+ *
13850
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13851
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13852
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13853
+ */
13854
+ /**
13855
+ * One zone as it travels: its key, the label the operator typed, its icon and
13856
+ * the locations inside it.
13857
+ *
13858
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13859
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13860
+ * here, rather than left to a second call, because every consumer wants both
13861
+ * at once and a viewer that asked twice could render a zone whose membership
13862
+ * it has not fetched yet.
13863
+ *
13864
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13865
+ * of those two is a choice, and a picker has to draw them differently.
13866
+ */
13867
+ var SiteZoneSchema = object({
13868
+ zoneKey: string(),
13869
+ label: string(),
13870
+ icon: LocationIconIdSchema.nullable(),
13871
+ /** Folded location keys, sorted. A location listed here need not be
13872
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13873
+ * the ones that most want grouping. */
13874
+ locationKeys: array(string())
13875
+ });
13760
13876
  var ProviderStatusSchema = object({
13761
13877
  connected: boolean(),
13762
13878
  deviceCount: number(),
@@ -14355,6 +14471,33 @@ method(object({
14355
14471
  }), _void(), {
14356
14472
  kind: "mutation",
14357
14473
  auth: "admin"
14474
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14475
+ location: string(),
14476
+ description: string().max(400).nullable()
14477
+ }), _void(), {
14478
+ kind: "mutation",
14479
+ auth: "admin"
14480
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14481
+ name: string(),
14482
+ icon: LocationIconIdSchema.nullable().optional()
14483
+ }), _void(), {
14484
+ kind: "mutation",
14485
+ auth: "admin"
14486
+ }), method(object({ name: string() }), _void(), {
14487
+ kind: "mutation",
14488
+ auth: "admin"
14489
+ }), method(object({
14490
+ from: string(),
14491
+ to: string()
14492
+ }), _void(), {
14493
+ kind: "mutation",
14494
+ auth: "admin"
14495
+ }), method(object({
14496
+ location: string(),
14497
+ zone: string().nullable()
14498
+ }), _void(), {
14499
+ kind: "mutation",
14500
+ auth: "admin"
14358
14501
  }), method(object({
14359
14502
  deviceId: number(),
14360
14503
  disabled: boolean()
@@ -37282,6 +37425,12 @@ Object.freeze({
37282
37425
  addonId: null,
37283
37426
  access: "view"
37284
37427
  },
37428
+ "deviceManager.listLocationDescriptions": {
37429
+ capName: "device-manager",
37430
+ capScope: "system",
37431
+ addonId: null,
37432
+ access: "view"
37433
+ },
37285
37434
  "deviceManager.listLocationIcons": {
37286
37435
  capName: "device-manager",
37287
37436
  capScope: "system",
@@ -37300,6 +37449,12 @@ Object.freeze({
37300
37449
  addonId: null,
37301
37450
  access: "view"
37302
37451
  },
37452
+ "deviceManager.listSiteZones": {
37453
+ capName: "device-manager",
37454
+ capScope: "system",
37455
+ addonId: null,
37456
+ access: "view"
37457
+ },
37303
37458
  "deviceManager.listWrappersForCap": {
37304
37459
  capName: "device-manager",
37305
37460
  capScope: "system",
@@ -37384,12 +37539,24 @@ Object.freeze({
37384
37539
  addonId: null,
37385
37540
  access: "delete"
37386
37541
  },
37542
+ "deviceManager.removeSiteZone": {
37543
+ capName: "device-manager",
37544
+ capScope: "system",
37545
+ addonId: null,
37546
+ access: "delete"
37547
+ },
37387
37548
  "deviceManager.renameLocation": {
37388
37549
  capName: "device-manager",
37389
37550
  capScope: "system",
37390
37551
  addonId: null,
37391
37552
  access: "create"
37392
37553
  },
37554
+ "deviceManager.renameSiteZone": {
37555
+ capName: "device-manager",
37556
+ capScope: "system",
37557
+ addonId: null,
37558
+ access: "create"
37559
+ },
37393
37560
  "deviceManager.runDeviceAction": {
37394
37561
  capName: "device-manager",
37395
37562
  capScope: "system",
@@ -37432,12 +37599,24 @@ Object.freeze({
37432
37599
  addonId: null,
37433
37600
  access: "create"
37434
37601
  },
37602
+ "deviceManager.setLocationDescription": {
37603
+ capName: "device-manager",
37604
+ capScope: "system",
37605
+ addonId: null,
37606
+ access: "create"
37607
+ },
37435
37608
  "deviceManager.setLocationIcon": {
37436
37609
  capName: "device-manager",
37437
37610
  capScope: "system",
37438
37611
  addonId: null,
37439
37612
  access: "create"
37440
37613
  },
37614
+ "deviceManager.setLocationZone": {
37615
+ capName: "device-manager",
37616
+ capScope: "system",
37617
+ addonId: null,
37618
+ access: "create"
37619
+ },
37441
37620
  "deviceManager.setMetadata": {
37442
37621
  capName: "device-manager",
37443
37622
  capScope: "system",
@@ -37468,6 +37647,12 @@ Object.freeze({
37468
37647
  addonId: null,
37469
37648
  access: "create"
37470
37649
  },
37650
+ "deviceManager.setSiteZone": {
37651
+ capName: "device-manager",
37652
+ capScope: "system",
37653
+ addonId: null,
37654
+ access: "create"
37655
+ },
37471
37656
  "deviceManager.setStreamProfileMap": {
37472
37657
  capName: "device-manager",
37473
37658
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.105",
3
+ "version": "0.2.107",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",