@camstack/addon-provider-amcrest 0.2.108 → 0.2.110

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
@@ -12287,7 +12287,23 @@ var PickStreamRequirementsSchema = object({
12287
12287
  * This is what lets one picker serve both the bypass and the full source
12288
12288
  * choice, instead of a consumer scoring privately when the bypass misses.
12289
12289
  */
12290
- allowTranscode: boolean().optional()
12290
+ allowTranscode: boolean().optional(),
12291
+ /**
12292
+ * Consider ONLY streams the broker has bound to a profile slot.
12293
+ *
12294
+ * A consumer that dials the broker — which is every exporter, since none
12295
+ * of them may open the camera's own URL — can do nothing with a source
12296
+ * that has no slot: there is no restream to dial. Without this the picker
12297
+ * can name such a stream, and each consumer discovers the dead end for
12298
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12299
+ * falls back, and HomeKit would have had to grow the same function again.
12300
+ *
12301
+ * Default `false`, and deliberately so: the BROKER itself picks through
12302
+ * here when it decides which source to BIND to a slot
12303
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12304
+ * could never bind them.
12305
+ */
12306
+ requireProfileBound: boolean().optional()
12291
12307
  }).readonly();
12292
12308
  var PickStreamPreferencesSchema = object({
12293
12309
  /**
@@ -12328,7 +12344,43 @@ var PickedCamStreamSchema = object({
12328
12344
  */
12329
12345
  transcodes: boolean(),
12330
12346
  /** One-line explanation of why this stream won — for logs / debug UI. */
12331
- reason: string()
12347
+ reason: string(),
12348
+ /**
12349
+ * The broker profile slot this source is bound to, when it is bound.
12350
+ *
12351
+ * Answered HERE because every consumer needs it and none of them can get it
12352
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12353
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12354
+ * the same function a second time.
12355
+ *
12356
+ * Absent when the source has no slot, which a caller passing
12357
+ * `requireProfileBound` can never see.
12358
+ */
12359
+ profile: CamProfileSchema.optional(),
12360
+ /** The broker id of that slot, for logs that must name what was dialled. */
12361
+ brokerId: string().optional(),
12362
+ /**
12363
+ * The broker restream URL to dial for this stream.
12364
+ *
12365
+ * An exporter must never open the camera's own URL — the broker is the one
12366
+ * that dials the camera, and every consumer goes through its restream. So
12367
+ * the picker answers with the thing a consumer may actually use, instead of
12368
+ * naming a source and leaving each caller to look the URL up.
12369
+ */
12370
+ url: string().optional(),
12371
+ /**
12372
+ * Frames per second this stream really delivers, and where the number came
12373
+ * from.
12374
+ *
12375
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12376
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12377
+ * and the controller rendered nothing at all. The source is carried with the
12378
+ * value for the same reason the bitrate evidence is: `published` is what the
12379
+ * publisher declares and `measured` is what the broker observed, and they
12380
+ * are not interchangeable.
12381
+ */
12382
+ fps: number().positive().optional(),
12383
+ fpsSource: _enum(["published", "measured"]).optional()
12332
12384
  });
12333
12385
  /**
12334
12386
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13511,6 +13563,70 @@ var LocationIconAssignmentSchema = object({
13511
13563
  locationKey: string(),
13512
13564
  icon: LocationIconIdSchema
13513
13565
  });
13566
+ /**
13567
+ * One (location, description) assignment as it travels.
13568
+ *
13569
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13570
+ * reason: this lived for a while in the post-analysis addon's own settings,
13571
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13572
+ * the Locations page carried the icon and silently orphaned the description —
13573
+ * two authorities for one thing, joined by two different rules. Now both hang
13574
+ * off the location itself, on `locationIconKey`.
13575
+ */
13576
+ var LocationDescriptionAssignmentSchema = object({
13577
+ locationKey: string(),
13578
+ description: string()
13579
+ });
13580
+ /**
13581
+ * A SITE ZONE — a named part of the property that several locations belong to.
13582
+ *
13583
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13584
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13585
+ * one zone, so a camera's zone is derived and never stored on the device: the
13586
+ * whole point of this entity is that grouping rooms touches no device row.
13587
+ *
13588
+ * ## Why not `zone`
13589
+ *
13590
+ * Because `zone` is already the most loaded word in this product: 612 source
13591
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13592
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13593
+ * set of rooms — and a reader who confuses them will look for a camera's
13594
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13595
+ * word by calling the drawn one what it actually is: a detection zone.
13596
+ *
13597
+ * ## The key
13598
+ *
13599
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13600
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13601
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13602
+ * silently-dropped location description.
13603
+ *
13604
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13605
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13606
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13607
+ */
13608
+ /**
13609
+ * One zone as it travels: its key, the label the operator typed, its icon and
13610
+ * the locations inside it.
13611
+ *
13612
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13613
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13614
+ * here, rather than left to a second call, because every consumer wants both
13615
+ * at once and a viewer that asked twice could render a zone whose membership
13616
+ * it has not fetched yet.
13617
+ *
13618
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13619
+ * of those two is a choice, and a picker has to draw them differently.
13620
+ */
13621
+ var SiteZoneSchema = object({
13622
+ zoneKey: string(),
13623
+ label: string(),
13624
+ icon: LocationIconIdSchema.nullable(),
13625
+ /** Folded location keys, sorted. A location listed here need not be
13626
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13627
+ * the ones that most want grouping. */
13628
+ locationKeys: array(string())
13629
+ });
13514
13630
  var ProviderStatusSchema = object({
13515
13631
  connected: boolean(),
13516
13632
  deviceCount: number(),
@@ -14109,6 +14225,33 @@ method(object({
14109
14225
  }), _void(), {
14110
14226
  kind: "mutation",
14111
14227
  auth: "admin"
14228
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14229
+ location: string(),
14230
+ description: string().max(400).nullable()
14231
+ }), _void(), {
14232
+ kind: "mutation",
14233
+ auth: "admin"
14234
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14235
+ name: string(),
14236
+ icon: LocationIconIdSchema.nullable().optional()
14237
+ }), _void(), {
14238
+ kind: "mutation",
14239
+ auth: "admin"
14240
+ }), method(object({ name: string() }), _void(), {
14241
+ kind: "mutation",
14242
+ auth: "admin"
14243
+ }), method(object({
14244
+ from: string(),
14245
+ to: string()
14246
+ }), _void(), {
14247
+ kind: "mutation",
14248
+ auth: "admin"
14249
+ }), method(object({
14250
+ location: string(),
14251
+ zone: string().nullable()
14252
+ }), _void(), {
14253
+ kind: "mutation",
14254
+ auth: "admin"
14112
14255
  }), method(object({
14113
14256
  deviceId: number(),
14114
14257
  disabled: boolean()
@@ -37660,6 +37803,12 @@ Object.freeze({
37660
37803
  addonId: null,
37661
37804
  access: "view"
37662
37805
  },
37806
+ "deviceManager.listLocationDescriptions": {
37807
+ capName: "device-manager",
37808
+ capScope: "system",
37809
+ addonId: null,
37810
+ access: "view"
37811
+ },
37663
37812
  "deviceManager.listLocationIcons": {
37664
37813
  capName: "device-manager",
37665
37814
  capScope: "system",
@@ -37678,6 +37827,12 @@ Object.freeze({
37678
37827
  addonId: null,
37679
37828
  access: "view"
37680
37829
  },
37830
+ "deviceManager.listSiteZones": {
37831
+ capName: "device-manager",
37832
+ capScope: "system",
37833
+ addonId: null,
37834
+ access: "view"
37835
+ },
37681
37836
  "deviceManager.listWrappersForCap": {
37682
37837
  capName: "device-manager",
37683
37838
  capScope: "system",
@@ -37762,12 +37917,24 @@ Object.freeze({
37762
37917
  addonId: null,
37763
37918
  access: "delete"
37764
37919
  },
37920
+ "deviceManager.removeSiteZone": {
37921
+ capName: "device-manager",
37922
+ capScope: "system",
37923
+ addonId: null,
37924
+ access: "delete"
37925
+ },
37765
37926
  "deviceManager.renameLocation": {
37766
37927
  capName: "device-manager",
37767
37928
  capScope: "system",
37768
37929
  addonId: null,
37769
37930
  access: "create"
37770
37931
  },
37932
+ "deviceManager.renameSiteZone": {
37933
+ capName: "device-manager",
37934
+ capScope: "system",
37935
+ addonId: null,
37936
+ access: "create"
37937
+ },
37771
37938
  "deviceManager.runDeviceAction": {
37772
37939
  capName: "device-manager",
37773
37940
  capScope: "system",
@@ -37810,12 +37977,24 @@ Object.freeze({
37810
37977
  addonId: null,
37811
37978
  access: "create"
37812
37979
  },
37980
+ "deviceManager.setLocationDescription": {
37981
+ capName: "device-manager",
37982
+ capScope: "system",
37983
+ addonId: null,
37984
+ access: "create"
37985
+ },
37813
37986
  "deviceManager.setLocationIcon": {
37814
37987
  capName: "device-manager",
37815
37988
  capScope: "system",
37816
37989
  addonId: null,
37817
37990
  access: "create"
37818
37991
  },
37992
+ "deviceManager.setLocationZone": {
37993
+ capName: "device-manager",
37994
+ capScope: "system",
37995
+ addonId: null,
37996
+ access: "create"
37997
+ },
37819
37998
  "deviceManager.setMetadata": {
37820
37999
  capName: "device-manager",
37821
38000
  capScope: "system",
@@ -37846,6 +38025,12 @@ Object.freeze({
37846
38025
  addonId: null,
37847
38026
  access: "create"
37848
38027
  },
38028
+ "deviceManager.setSiteZone": {
38029
+ capName: "device-manager",
38030
+ capScope: "system",
38031
+ addonId: null,
38032
+ access: "create"
38033
+ },
37849
38034
  "deviceManager.setStreamProfileMap": {
37850
38035
  capName: "device-manager",
37851
38036
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -12288,7 +12288,23 @@ var PickStreamRequirementsSchema = object({
12288
12288
  * This is what lets one picker serve both the bypass and the full source
12289
12289
  * choice, instead of a consumer scoring privately when the bypass misses.
12290
12290
  */
12291
- allowTranscode: boolean().optional()
12291
+ allowTranscode: boolean().optional(),
12292
+ /**
12293
+ * Consider ONLY streams the broker has bound to a profile slot.
12294
+ *
12295
+ * A consumer that dials the broker — which is every exporter, since none
12296
+ * of them may open the camera's own URL — can do nothing with a source
12297
+ * that has no slot: there is no restream to dial. Without this the picker
12298
+ * can name such a stream, and each consumer discovers the dead end for
12299
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12300
+ * falls back, and HomeKit would have had to grow the same function again.
12301
+ *
12302
+ * Default `false`, and deliberately so: the BROKER itself picks through
12303
+ * here when it decides which source to BIND to a slot
12304
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12305
+ * could never bind them.
12306
+ */
12307
+ requireProfileBound: boolean().optional()
12292
12308
  }).readonly();
12293
12309
  var PickStreamPreferencesSchema = object({
12294
12310
  /**
@@ -12329,7 +12345,43 @@ var PickedCamStreamSchema = object({
12329
12345
  */
12330
12346
  transcodes: boolean(),
12331
12347
  /** One-line explanation of why this stream won — for logs / debug UI. */
12332
- reason: string()
12348
+ reason: string(),
12349
+ /**
12350
+ * The broker profile slot this source is bound to, when it is bound.
12351
+ *
12352
+ * Answered HERE because every consumer needs it and none of them can get it
12353
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12354
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12355
+ * the same function a second time.
12356
+ *
12357
+ * Absent when the source has no slot, which a caller passing
12358
+ * `requireProfileBound` can never see.
12359
+ */
12360
+ profile: CamProfileSchema.optional(),
12361
+ /** The broker id of that slot, for logs that must name what was dialled. */
12362
+ brokerId: string().optional(),
12363
+ /**
12364
+ * The broker restream URL to dial for this stream.
12365
+ *
12366
+ * An exporter must never open the camera's own URL — the broker is the one
12367
+ * that dials the camera, and every consumer goes through its restream. So
12368
+ * the picker answers with the thing a consumer may actually use, instead of
12369
+ * naming a source and leaving each caller to look the URL up.
12370
+ */
12371
+ url: string().optional(),
12372
+ /**
12373
+ * Frames per second this stream really delivers, and where the number came
12374
+ * from.
12375
+ *
12376
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12377
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12378
+ * and the controller rendered nothing at all. The source is carried with the
12379
+ * value for the same reason the bitrate evidence is: `published` is what the
12380
+ * publisher declares and `measured` is what the broker observed, and they
12381
+ * are not interchangeable.
12382
+ */
12383
+ fps: number().positive().optional(),
12384
+ fpsSource: _enum(["published", "measured"]).optional()
12333
12385
  });
12334
12386
  /**
12335
12387
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13512,6 +13564,70 @@ var LocationIconAssignmentSchema = object({
13512
13564
  locationKey: string(),
13513
13565
  icon: LocationIconIdSchema
13514
13566
  });
13567
+ /**
13568
+ * One (location, description) assignment as it travels.
13569
+ *
13570
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13571
+ * reason: this lived for a while in the post-analysis addon's own settings,
13572
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13573
+ * the Locations page carried the icon and silently orphaned the description —
13574
+ * two authorities for one thing, joined by two different rules. Now both hang
13575
+ * off the location itself, on `locationIconKey`.
13576
+ */
13577
+ var LocationDescriptionAssignmentSchema = object({
13578
+ locationKey: string(),
13579
+ description: string()
13580
+ });
13581
+ /**
13582
+ * A SITE ZONE — a named part of the property that several locations belong to.
13583
+ *
13584
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13585
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13586
+ * one zone, so a camera's zone is derived and never stored on the device: the
13587
+ * whole point of this entity is that grouping rooms touches no device row.
13588
+ *
13589
+ * ## Why not `zone`
13590
+ *
13591
+ * Because `zone` is already the most loaded word in this product: 612 source
13592
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13593
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13594
+ * set of rooms — and a reader who confuses them will look for a camera's
13595
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13596
+ * word by calling the drawn one what it actually is: a detection zone.
13597
+ *
13598
+ * ## The key
13599
+ *
13600
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13601
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13602
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13603
+ * silently-dropped location description.
13604
+ *
13605
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13606
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13607
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13608
+ */
13609
+ /**
13610
+ * One zone as it travels: its key, the label the operator typed, its icon and
13611
+ * the locations inside it.
13612
+ *
13613
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13614
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13615
+ * here, rather than left to a second call, because every consumer wants both
13616
+ * at once and a viewer that asked twice could render a zone whose membership
13617
+ * it has not fetched yet.
13618
+ *
13619
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13620
+ * of those two is a choice, and a picker has to draw them differently.
13621
+ */
13622
+ var SiteZoneSchema = object({
13623
+ zoneKey: string(),
13624
+ label: string(),
13625
+ icon: LocationIconIdSchema.nullable(),
13626
+ /** Folded location keys, sorted. A location listed here need not be
13627
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13628
+ * the ones that most want grouping. */
13629
+ locationKeys: array(string())
13630
+ });
13515
13631
  var ProviderStatusSchema = object({
13516
13632
  connected: boolean(),
13517
13633
  deviceCount: number(),
@@ -14110,6 +14226,33 @@ method(object({
14110
14226
  }), _void(), {
14111
14227
  kind: "mutation",
14112
14228
  auth: "admin"
14229
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14230
+ location: string(),
14231
+ description: string().max(400).nullable()
14232
+ }), _void(), {
14233
+ kind: "mutation",
14234
+ auth: "admin"
14235
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14236
+ name: string(),
14237
+ icon: LocationIconIdSchema.nullable().optional()
14238
+ }), _void(), {
14239
+ kind: "mutation",
14240
+ auth: "admin"
14241
+ }), method(object({ name: string() }), _void(), {
14242
+ kind: "mutation",
14243
+ auth: "admin"
14244
+ }), method(object({
14245
+ from: string(),
14246
+ to: string()
14247
+ }), _void(), {
14248
+ kind: "mutation",
14249
+ auth: "admin"
14250
+ }), method(object({
14251
+ location: string(),
14252
+ zone: string().nullable()
14253
+ }), _void(), {
14254
+ kind: "mutation",
14255
+ auth: "admin"
14113
14256
  }), method(object({
14114
14257
  deviceId: number(),
14115
14258
  disabled: boolean()
@@ -37661,6 +37804,12 @@ Object.freeze({
37661
37804
  addonId: null,
37662
37805
  access: "view"
37663
37806
  },
37807
+ "deviceManager.listLocationDescriptions": {
37808
+ capName: "device-manager",
37809
+ capScope: "system",
37810
+ addonId: null,
37811
+ access: "view"
37812
+ },
37664
37813
  "deviceManager.listLocationIcons": {
37665
37814
  capName: "device-manager",
37666
37815
  capScope: "system",
@@ -37679,6 +37828,12 @@ Object.freeze({
37679
37828
  addonId: null,
37680
37829
  access: "view"
37681
37830
  },
37831
+ "deviceManager.listSiteZones": {
37832
+ capName: "device-manager",
37833
+ capScope: "system",
37834
+ addonId: null,
37835
+ access: "view"
37836
+ },
37682
37837
  "deviceManager.listWrappersForCap": {
37683
37838
  capName: "device-manager",
37684
37839
  capScope: "system",
@@ -37763,12 +37918,24 @@ Object.freeze({
37763
37918
  addonId: null,
37764
37919
  access: "delete"
37765
37920
  },
37921
+ "deviceManager.removeSiteZone": {
37922
+ capName: "device-manager",
37923
+ capScope: "system",
37924
+ addonId: null,
37925
+ access: "delete"
37926
+ },
37766
37927
  "deviceManager.renameLocation": {
37767
37928
  capName: "device-manager",
37768
37929
  capScope: "system",
37769
37930
  addonId: null,
37770
37931
  access: "create"
37771
37932
  },
37933
+ "deviceManager.renameSiteZone": {
37934
+ capName: "device-manager",
37935
+ capScope: "system",
37936
+ addonId: null,
37937
+ access: "create"
37938
+ },
37772
37939
  "deviceManager.runDeviceAction": {
37773
37940
  capName: "device-manager",
37774
37941
  capScope: "system",
@@ -37811,12 +37978,24 @@ Object.freeze({
37811
37978
  addonId: null,
37812
37979
  access: "create"
37813
37980
  },
37981
+ "deviceManager.setLocationDescription": {
37982
+ capName: "device-manager",
37983
+ capScope: "system",
37984
+ addonId: null,
37985
+ access: "create"
37986
+ },
37814
37987
  "deviceManager.setLocationIcon": {
37815
37988
  capName: "device-manager",
37816
37989
  capScope: "system",
37817
37990
  addonId: null,
37818
37991
  access: "create"
37819
37992
  },
37993
+ "deviceManager.setLocationZone": {
37994
+ capName: "device-manager",
37995
+ capScope: "system",
37996
+ addonId: null,
37997
+ access: "create"
37998
+ },
37820
37999
  "deviceManager.setMetadata": {
37821
38000
  capName: "device-manager",
37822
38001
  capScope: "system",
@@ -37847,6 +38026,12 @@ Object.freeze({
37847
38026
  addonId: null,
37848
38027
  access: "create"
37849
38028
  },
38029
+ "deviceManager.setSiteZone": {
38030
+ capName: "device-manager",
38031
+ capScope: "system",
38032
+ addonId: null,
38033
+ access: "create"
38034
+ },
37850
38035
  "deviceManager.setStreamProfileMap": {
37851
38036
  capName: "device-manager",
37852
38037
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.108",
3
+ "version": "0.2.110",
4
4
  "description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
5
5
  "keywords": [
6
6
  "camstack",