@camstack/addon-export-alexa 1.2.113 → 1.2.115

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.
@@ -12591,7 +12591,23 @@ var PickStreamRequirementsSchema = object({
12591
12591
  * This is what lets one picker serve both the bypass and the full source
12592
12592
  * choice, instead of a consumer scoring privately when the bypass misses.
12593
12593
  */
12594
- allowTranscode: boolean().optional()
12594
+ allowTranscode: boolean().optional(),
12595
+ /**
12596
+ * Consider ONLY streams the broker has bound to a profile slot.
12597
+ *
12598
+ * A consumer that dials the broker — which is every exporter, since none
12599
+ * of them may open the camera's own URL — can do nothing with a source
12600
+ * that has no slot: there is no restream to dial. Without this the picker
12601
+ * can name such a stream, and each consumer discovers the dead end for
12602
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12603
+ * falls back, and HomeKit would have had to grow the same function again.
12604
+ *
12605
+ * Default `false`, and deliberately so: the BROKER itself picks through
12606
+ * here when it decides which source to BIND to a slot
12607
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12608
+ * could never bind them.
12609
+ */
12610
+ requireProfileBound: boolean().optional()
12595
12611
  }).readonly();
12596
12612
  var PickStreamPreferencesSchema = object({
12597
12613
  /**
@@ -12632,7 +12648,43 @@ var PickedCamStreamSchema = object({
12632
12648
  */
12633
12649
  transcodes: boolean(),
12634
12650
  /** One-line explanation of why this stream won — for logs / debug UI. */
12635
- reason: string()
12651
+ reason: string(),
12652
+ /**
12653
+ * The broker profile slot this source is bound to, when it is bound.
12654
+ *
12655
+ * Answered HERE because every consumer needs it and none of them can get it
12656
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12657
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12658
+ * the same function a second time.
12659
+ *
12660
+ * Absent when the source has no slot, which a caller passing
12661
+ * `requireProfileBound` can never see.
12662
+ */
12663
+ profile: CamProfileSchema.optional(),
12664
+ /** The broker id of that slot, for logs that must name what was dialled. */
12665
+ brokerId: string().optional(),
12666
+ /**
12667
+ * The broker restream URL to dial for this stream.
12668
+ *
12669
+ * An exporter must never open the camera's own URL — the broker is the one
12670
+ * that dials the camera, and every consumer goes through its restream. So
12671
+ * the picker answers with the thing a consumer may actually use, instead of
12672
+ * naming a source and leaving each caller to look the URL up.
12673
+ */
12674
+ url: string().optional(),
12675
+ /**
12676
+ * Frames per second this stream really delivers, and where the number came
12677
+ * from.
12678
+ *
12679
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12680
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12681
+ * and the controller rendered nothing at all. The source is carried with the
12682
+ * value for the same reason the bitrate evidence is: `published` is what the
12683
+ * publisher declares and `measured` is what the broker observed, and they
12684
+ * are not interchangeable.
12685
+ */
12686
+ fps: number().positive().optional(),
12687
+ fpsSource: _enum(["published", "measured"]).optional()
12636
12688
  });
12637
12689
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CameraStreamSchema).readonly()), method(object({ deviceId: number().int().nonnegative() }), array(ProfileSlotSchema).readonly()), method(object({
12638
12690
  deviceId: number().int().nonnegative(),
@@ -13631,6 +13683,70 @@ var LocationIconAssignmentSchema = object({
13631
13683
  locationKey: string(),
13632
13684
  icon: LocationIconIdSchema
13633
13685
  });
13686
+ /**
13687
+ * One (location, description) assignment as it travels.
13688
+ *
13689
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13690
+ * reason: this lived for a while in the post-analysis addon's own settings,
13691
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13692
+ * the Locations page carried the icon and silently orphaned the description —
13693
+ * two authorities for one thing, joined by two different rules. Now both hang
13694
+ * off the location itself, on `locationIconKey`.
13695
+ */
13696
+ var LocationDescriptionAssignmentSchema = object({
13697
+ locationKey: string(),
13698
+ description: string()
13699
+ });
13700
+ /**
13701
+ * A SITE ZONE — a named part of the property that several locations belong to.
13702
+ *
13703
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13704
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13705
+ * one zone, so a camera's zone is derived and never stored on the device: the
13706
+ * whole point of this entity is that grouping rooms touches no device row.
13707
+ *
13708
+ * ## Why not `zone`
13709
+ *
13710
+ * Because `zone` is already the most loaded word in this product: 612 source
13711
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13712
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13713
+ * set of rooms — and a reader who confuses them will look for a camera's
13714
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13715
+ * word by calling the drawn one what it actually is: a detection zone.
13716
+ *
13717
+ * ## The key
13718
+ *
13719
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13720
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13721
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13722
+ * silently-dropped location description.
13723
+ *
13724
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13725
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13726
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13727
+ */
13728
+ /**
13729
+ * One zone as it travels: its key, the label the operator typed, its icon and
13730
+ * the locations inside it.
13731
+ *
13732
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13733
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13734
+ * here, rather than left to a second call, because every consumer wants both
13735
+ * at once and a viewer that asked twice could render a zone whose membership
13736
+ * it has not fetched yet.
13737
+ *
13738
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13739
+ * of those two is a choice, and a picker has to draw them differently.
13740
+ */
13741
+ var SiteZoneSchema = object({
13742
+ zoneKey: string(),
13743
+ label: string(),
13744
+ icon: LocationIconIdSchema.nullable(),
13745
+ /** Folded location keys, sorted. A location listed here need not be
13746
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13747
+ * the ones that most want grouping. */
13748
+ locationKeys: array(string())
13749
+ });
13634
13750
  var ProviderStatusSchema = object({
13635
13751
  connected: boolean(),
13636
13752
  deviceCount: number(),
@@ -14148,6 +14264,33 @@ method(object({
14148
14264
  }), _void(), {
14149
14265
  kind: "mutation",
14150
14266
  auth: "admin"
14267
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14268
+ location: string(),
14269
+ description: string().max(400).nullable()
14270
+ }), _void(), {
14271
+ kind: "mutation",
14272
+ auth: "admin"
14273
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14274
+ name: string(),
14275
+ icon: LocationIconIdSchema.nullable().optional()
14276
+ }), _void(), {
14277
+ kind: "mutation",
14278
+ auth: "admin"
14279
+ }), method(object({ name: string() }), _void(), {
14280
+ kind: "mutation",
14281
+ auth: "admin"
14282
+ }), method(object({
14283
+ from: string(),
14284
+ to: string()
14285
+ }), _void(), {
14286
+ kind: "mutation",
14287
+ auth: "admin"
14288
+ }), method(object({
14289
+ location: string(),
14290
+ zone: string().nullable()
14291
+ }), _void(), {
14292
+ kind: "mutation",
14293
+ auth: "admin"
14151
14294
  }), method(object({
14152
14295
  deviceId: number(),
14153
14296
  disabled: boolean()
@@ -32987,6 +33130,12 @@ Object.freeze({
32987
33130
  addonId: null,
32988
33131
  access: "view"
32989
33132
  },
33133
+ "deviceManager.listLocationDescriptions": {
33134
+ capName: "device-manager",
33135
+ capScope: "system",
33136
+ addonId: null,
33137
+ access: "view"
33138
+ },
32990
33139
  "deviceManager.listLocationIcons": {
32991
33140
  capName: "device-manager",
32992
33141
  capScope: "system",
@@ -33005,6 +33154,12 @@ Object.freeze({
33005
33154
  addonId: null,
33006
33155
  access: "view"
33007
33156
  },
33157
+ "deviceManager.listSiteZones": {
33158
+ capName: "device-manager",
33159
+ capScope: "system",
33160
+ addonId: null,
33161
+ access: "view"
33162
+ },
33008
33163
  "deviceManager.listWrappersForCap": {
33009
33164
  capName: "device-manager",
33010
33165
  capScope: "system",
@@ -33089,12 +33244,24 @@ Object.freeze({
33089
33244
  addonId: null,
33090
33245
  access: "delete"
33091
33246
  },
33247
+ "deviceManager.removeSiteZone": {
33248
+ capName: "device-manager",
33249
+ capScope: "system",
33250
+ addonId: null,
33251
+ access: "delete"
33252
+ },
33092
33253
  "deviceManager.renameLocation": {
33093
33254
  capName: "device-manager",
33094
33255
  capScope: "system",
33095
33256
  addonId: null,
33096
33257
  access: "create"
33097
33258
  },
33259
+ "deviceManager.renameSiteZone": {
33260
+ capName: "device-manager",
33261
+ capScope: "system",
33262
+ addonId: null,
33263
+ access: "create"
33264
+ },
33098
33265
  "deviceManager.runDeviceAction": {
33099
33266
  capName: "device-manager",
33100
33267
  capScope: "system",
@@ -33137,12 +33304,24 @@ Object.freeze({
33137
33304
  addonId: null,
33138
33305
  access: "create"
33139
33306
  },
33307
+ "deviceManager.setLocationDescription": {
33308
+ capName: "device-manager",
33309
+ capScope: "system",
33310
+ addonId: null,
33311
+ access: "create"
33312
+ },
33140
33313
  "deviceManager.setLocationIcon": {
33141
33314
  capName: "device-manager",
33142
33315
  capScope: "system",
33143
33316
  addonId: null,
33144
33317
  access: "create"
33145
33318
  },
33319
+ "deviceManager.setLocationZone": {
33320
+ capName: "device-manager",
33321
+ capScope: "system",
33322
+ addonId: null,
33323
+ access: "create"
33324
+ },
33146
33325
  "deviceManager.setMetadata": {
33147
33326
  capName: "device-manager",
33148
33327
  capScope: "system",
@@ -33173,6 +33352,12 @@ Object.freeze({
33173
33352
  addonId: null,
33174
33353
  access: "create"
33175
33354
  },
33355
+ "deviceManager.setSiteZone": {
33356
+ capName: "device-manager",
33357
+ capScope: "system",
33358
+ addonId: null,
33359
+ access: "create"
33360
+ },
33176
33361
  "deviceManager.setStreamProfileMap": {
33177
33362
  capName: "device-manager",
33178
33363
  capScope: "system",
@@ -12564,7 +12564,23 @@ var PickStreamRequirementsSchema = object({
12564
12564
  * This is what lets one picker serve both the bypass and the full source
12565
12565
  * choice, instead of a consumer scoring privately when the bypass misses.
12566
12566
  */
12567
- allowTranscode: boolean().optional()
12567
+ allowTranscode: boolean().optional(),
12568
+ /**
12569
+ * Consider ONLY streams the broker has bound to a profile slot.
12570
+ *
12571
+ * A consumer that dials the broker — which is every exporter, since none
12572
+ * of them may open the camera's own URL — can do nothing with a source
12573
+ * that has no slot: there is no restream to dial. Without this the picker
12574
+ * can name such a stream, and each consumer discovers the dead end for
12575
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12576
+ * falls back, and HomeKit would have had to grow the same function again.
12577
+ *
12578
+ * Default `false`, and deliberately so: the BROKER itself picks through
12579
+ * here when it decides which source to BIND to a slot
12580
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12581
+ * could never bind them.
12582
+ */
12583
+ requireProfileBound: boolean().optional()
12568
12584
  }).readonly();
12569
12585
  var PickStreamPreferencesSchema = object({
12570
12586
  /**
@@ -12605,7 +12621,43 @@ var PickedCamStreamSchema = object({
12605
12621
  */
12606
12622
  transcodes: boolean(),
12607
12623
  /** One-line explanation of why this stream won — for logs / debug UI. */
12608
- reason: string()
12624
+ reason: string(),
12625
+ /**
12626
+ * The broker profile slot this source is bound to, when it is bound.
12627
+ *
12628
+ * Answered HERE because every consumer needs it and none of them can get it
12629
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12630
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12631
+ * the same function a second time.
12632
+ *
12633
+ * Absent when the source has no slot, which a caller passing
12634
+ * `requireProfileBound` can never see.
12635
+ */
12636
+ profile: CamProfileSchema.optional(),
12637
+ /** The broker id of that slot, for logs that must name what was dialled. */
12638
+ brokerId: string().optional(),
12639
+ /**
12640
+ * The broker restream URL to dial for this stream.
12641
+ *
12642
+ * An exporter must never open the camera's own URL — the broker is the one
12643
+ * that dials the camera, and every consumer goes through its restream. So
12644
+ * the picker answers with the thing a consumer may actually use, instead of
12645
+ * naming a source and leaving each caller to look the URL up.
12646
+ */
12647
+ url: string().optional(),
12648
+ /**
12649
+ * Frames per second this stream really delivers, and where the number came
12650
+ * from.
12651
+ *
12652
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12653
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12654
+ * and the controller rendered nothing at all. The source is carried with the
12655
+ * value for the same reason the bitrate evidence is: `published` is what the
12656
+ * publisher declares and `measured` is what the broker observed, and they
12657
+ * are not interchangeable.
12658
+ */
12659
+ fps: number().positive().optional(),
12660
+ fpsSource: _enum(["published", "measured"]).optional()
12609
12661
  });
12610
12662
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CameraStreamSchema).readonly()), method(object({ deviceId: number().int().nonnegative() }), array(ProfileSlotSchema).readonly()), method(object({
12611
12663
  deviceId: number().int().nonnegative(),
@@ -13604,6 +13656,70 @@ var LocationIconAssignmentSchema = object({
13604
13656
  locationKey: string(),
13605
13657
  icon: LocationIconIdSchema
13606
13658
  });
13659
+ /**
13660
+ * One (location, description) assignment as it travels.
13661
+ *
13662
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13663
+ * reason: this lived for a while in the post-analysis addon's own settings,
13664
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13665
+ * the Locations page carried the icon and silently orphaned the description —
13666
+ * two authorities for one thing, joined by two different rules. Now both hang
13667
+ * off the location itself, on `locationIconKey`.
13668
+ */
13669
+ var LocationDescriptionAssignmentSchema = object({
13670
+ locationKey: string(),
13671
+ description: string()
13672
+ });
13673
+ /**
13674
+ * A SITE ZONE — a named part of the property that several locations belong to.
13675
+ *
13676
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13677
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13678
+ * one zone, so a camera's zone is derived and never stored on the device: the
13679
+ * whole point of this entity is that grouping rooms touches no device row.
13680
+ *
13681
+ * ## Why not `zone`
13682
+ *
13683
+ * Because `zone` is already the most loaded word in this product: 612 source
13684
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13685
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13686
+ * set of rooms — and a reader who confuses them will look for a camera's
13687
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13688
+ * word by calling the drawn one what it actually is: a detection zone.
13689
+ *
13690
+ * ## The key
13691
+ *
13692
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13693
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13694
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13695
+ * silently-dropped location description.
13696
+ *
13697
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13698
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13699
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13700
+ */
13701
+ /**
13702
+ * One zone as it travels: its key, the label the operator typed, its icon and
13703
+ * the locations inside it.
13704
+ *
13705
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13706
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13707
+ * here, rather than left to a second call, because every consumer wants both
13708
+ * at once and a viewer that asked twice could render a zone whose membership
13709
+ * it has not fetched yet.
13710
+ *
13711
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13712
+ * of those two is a choice, and a picker has to draw them differently.
13713
+ */
13714
+ var SiteZoneSchema = object({
13715
+ zoneKey: string(),
13716
+ label: string(),
13717
+ icon: LocationIconIdSchema.nullable(),
13718
+ /** Folded location keys, sorted. A location listed here need not be
13719
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13720
+ * the ones that most want grouping. */
13721
+ locationKeys: array(string())
13722
+ });
13607
13723
  var ProviderStatusSchema = object({
13608
13724
  connected: boolean(),
13609
13725
  deviceCount: number(),
@@ -14121,6 +14237,33 @@ method(object({
14121
14237
  }), _void(), {
14122
14238
  kind: "mutation",
14123
14239
  auth: "admin"
14240
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14241
+ location: string(),
14242
+ description: string().max(400).nullable()
14243
+ }), _void(), {
14244
+ kind: "mutation",
14245
+ auth: "admin"
14246
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14247
+ name: string(),
14248
+ icon: LocationIconIdSchema.nullable().optional()
14249
+ }), _void(), {
14250
+ kind: "mutation",
14251
+ auth: "admin"
14252
+ }), method(object({ name: string() }), _void(), {
14253
+ kind: "mutation",
14254
+ auth: "admin"
14255
+ }), method(object({
14256
+ from: string(),
14257
+ to: string()
14258
+ }), _void(), {
14259
+ kind: "mutation",
14260
+ auth: "admin"
14261
+ }), method(object({
14262
+ location: string(),
14263
+ zone: string().nullable()
14264
+ }), _void(), {
14265
+ kind: "mutation",
14266
+ auth: "admin"
14124
14267
  }), method(object({
14125
14268
  deviceId: number(),
14126
14269
  disabled: boolean()
@@ -32960,6 +33103,12 @@ Object.freeze({
32960
33103
  addonId: null,
32961
33104
  access: "view"
32962
33105
  },
33106
+ "deviceManager.listLocationDescriptions": {
33107
+ capName: "device-manager",
33108
+ capScope: "system",
33109
+ addonId: null,
33110
+ access: "view"
33111
+ },
32963
33112
  "deviceManager.listLocationIcons": {
32964
33113
  capName: "device-manager",
32965
33114
  capScope: "system",
@@ -32978,6 +33127,12 @@ Object.freeze({
32978
33127
  addonId: null,
32979
33128
  access: "view"
32980
33129
  },
33130
+ "deviceManager.listSiteZones": {
33131
+ capName: "device-manager",
33132
+ capScope: "system",
33133
+ addonId: null,
33134
+ access: "view"
33135
+ },
32981
33136
  "deviceManager.listWrappersForCap": {
32982
33137
  capName: "device-manager",
32983
33138
  capScope: "system",
@@ -33062,12 +33217,24 @@ Object.freeze({
33062
33217
  addonId: null,
33063
33218
  access: "delete"
33064
33219
  },
33220
+ "deviceManager.removeSiteZone": {
33221
+ capName: "device-manager",
33222
+ capScope: "system",
33223
+ addonId: null,
33224
+ access: "delete"
33225
+ },
33065
33226
  "deviceManager.renameLocation": {
33066
33227
  capName: "device-manager",
33067
33228
  capScope: "system",
33068
33229
  addonId: null,
33069
33230
  access: "create"
33070
33231
  },
33232
+ "deviceManager.renameSiteZone": {
33233
+ capName: "device-manager",
33234
+ capScope: "system",
33235
+ addonId: null,
33236
+ access: "create"
33237
+ },
33071
33238
  "deviceManager.runDeviceAction": {
33072
33239
  capName: "device-manager",
33073
33240
  capScope: "system",
@@ -33110,12 +33277,24 @@ Object.freeze({
33110
33277
  addonId: null,
33111
33278
  access: "create"
33112
33279
  },
33280
+ "deviceManager.setLocationDescription": {
33281
+ capName: "device-manager",
33282
+ capScope: "system",
33283
+ addonId: null,
33284
+ access: "create"
33285
+ },
33113
33286
  "deviceManager.setLocationIcon": {
33114
33287
  capName: "device-manager",
33115
33288
  capScope: "system",
33116
33289
  addonId: null,
33117
33290
  access: "create"
33118
33291
  },
33292
+ "deviceManager.setLocationZone": {
33293
+ capName: "device-manager",
33294
+ capScope: "system",
33295
+ addonId: null,
33296
+ access: "create"
33297
+ },
33119
33298
  "deviceManager.setMetadata": {
33120
33299
  capName: "device-manager",
33121
33300
  capScope: "system",
@@ -33146,6 +33325,12 @@ Object.freeze({
33146
33325
  addonId: null,
33147
33326
  access: "create"
33148
33327
  },
33328
+ "deviceManager.setSiteZone": {
33329
+ capName: "device-manager",
33330
+ capScope: "system",
33331
+ addonId: null,
33332
+ access: "create"
33333
+ },
33149
33334
  "deviceManager.setStreamProfileMap": {
33150
33335
  capName: "device-manager",
33151
33336
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.113",
3
+ "version": "1.2.115",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",