@camstack/addon-provider-hikvision 1.2.114 → 1.2.116

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
@@ -12580,7 +12580,23 @@ var PickStreamRequirementsSchema = object({
12580
12580
  * This is what lets one picker serve both the bypass and the full source
12581
12581
  * choice, instead of a consumer scoring privately when the bypass misses.
12582
12582
  */
12583
- allowTranscode: boolean().optional()
12583
+ allowTranscode: boolean().optional(),
12584
+ /**
12585
+ * Consider ONLY streams the broker has bound to a profile slot.
12586
+ *
12587
+ * A consumer that dials the broker — which is every exporter, since none
12588
+ * of them may open the camera's own URL — can do nothing with a source
12589
+ * that has no slot: there is no restream to dial. Without this the picker
12590
+ * can name such a stream, and each consumer discovers the dead end for
12591
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12592
+ * falls back, and HomeKit would have had to grow the same function again.
12593
+ *
12594
+ * Default `false`, and deliberately so: the BROKER itself picks through
12595
+ * here when it decides which source to BIND to a slot
12596
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12597
+ * could never bind them.
12598
+ */
12599
+ requireProfileBound: boolean().optional()
12584
12600
  }).readonly();
12585
12601
  var PickStreamPreferencesSchema = object({
12586
12602
  /**
@@ -12621,7 +12637,43 @@ var PickedCamStreamSchema = object({
12621
12637
  */
12622
12638
  transcodes: boolean(),
12623
12639
  /** One-line explanation of why this stream won — for logs / debug UI. */
12624
- reason: string()
12640
+ reason: string(),
12641
+ /**
12642
+ * The broker profile slot this source is bound to, when it is bound.
12643
+ *
12644
+ * Answered HERE because every consumer needs it and none of them can get it
12645
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12646
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12647
+ * the same function a second time.
12648
+ *
12649
+ * Absent when the source has no slot, which a caller passing
12650
+ * `requireProfileBound` can never see.
12651
+ */
12652
+ profile: CamProfileSchema.optional(),
12653
+ /** The broker id of that slot, for logs that must name what was dialled. */
12654
+ brokerId: string().optional(),
12655
+ /**
12656
+ * The broker restream URL to dial for this stream.
12657
+ *
12658
+ * An exporter must never open the camera's own URL — the broker is the one
12659
+ * that dials the camera, and every consumer goes through its restream. So
12660
+ * the picker answers with the thing a consumer may actually use, instead of
12661
+ * naming a source and leaving each caller to look the URL up.
12662
+ */
12663
+ url: string().optional(),
12664
+ /**
12665
+ * Frames per second this stream really delivers, and where the number came
12666
+ * from.
12667
+ *
12668
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12669
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12670
+ * and the controller rendered nothing at all. The source is carried with the
12671
+ * value for the same reason the bitrate evidence is: `published` is what the
12672
+ * publisher declares and `measured` is what the broker observed, and they
12673
+ * are not interchangeable.
12674
+ */
12675
+ fps: number().positive().optional(),
12676
+ fpsSource: _enum(["published", "measured"]).optional()
12625
12677
  });
12626
12678
  /**
12627
12679
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13804,6 +13856,70 @@ var LocationIconAssignmentSchema = object({
13804
13856
  locationKey: string(),
13805
13857
  icon: LocationIconIdSchema
13806
13858
  });
13859
+ /**
13860
+ * One (location, description) assignment as it travels.
13861
+ *
13862
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13863
+ * reason: this lived for a while in the post-analysis addon's own settings,
13864
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13865
+ * the Locations page carried the icon and silently orphaned the description —
13866
+ * two authorities for one thing, joined by two different rules. Now both hang
13867
+ * off the location itself, on `locationIconKey`.
13868
+ */
13869
+ var LocationDescriptionAssignmentSchema = object({
13870
+ locationKey: string(),
13871
+ description: string()
13872
+ });
13873
+ /**
13874
+ * A SITE ZONE — a named part of the property that several locations belong to.
13875
+ *
13876
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13877
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13878
+ * one zone, so a camera's zone is derived and never stored on the device: the
13879
+ * whole point of this entity is that grouping rooms touches no device row.
13880
+ *
13881
+ * ## Why not `zone`
13882
+ *
13883
+ * Because `zone` is already the most loaded word in this product: 612 source
13884
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13885
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13886
+ * set of rooms — and a reader who confuses them will look for a camera's
13887
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13888
+ * word by calling the drawn one what it actually is: a detection zone.
13889
+ *
13890
+ * ## The key
13891
+ *
13892
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13893
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13894
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13895
+ * silently-dropped location description.
13896
+ *
13897
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13898
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13899
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13900
+ */
13901
+ /**
13902
+ * One zone as it travels: its key, the label the operator typed, its icon and
13903
+ * the locations inside it.
13904
+ *
13905
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13906
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13907
+ * here, rather than left to a second call, because every consumer wants both
13908
+ * at once and a viewer that asked twice could render a zone whose membership
13909
+ * it has not fetched yet.
13910
+ *
13911
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13912
+ * of those two is a choice, and a picker has to draw them differently.
13913
+ */
13914
+ var SiteZoneSchema = object({
13915
+ zoneKey: string(),
13916
+ label: string(),
13917
+ icon: LocationIconIdSchema.nullable(),
13918
+ /** Folded location keys, sorted. A location listed here need not be
13919
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13920
+ * the ones that most want grouping. */
13921
+ locationKeys: array(string())
13922
+ });
13807
13923
  var ProviderStatusSchema = object({
13808
13924
  connected: boolean(),
13809
13925
  deviceCount: number(),
@@ -14402,6 +14518,33 @@ method(object({
14402
14518
  }), _void(), {
14403
14519
  kind: "mutation",
14404
14520
  auth: "admin"
14521
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14522
+ location: string(),
14523
+ description: string().max(400).nullable()
14524
+ }), _void(), {
14525
+ kind: "mutation",
14526
+ auth: "admin"
14527
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14528
+ name: string(),
14529
+ icon: LocationIconIdSchema.nullable().optional()
14530
+ }), _void(), {
14531
+ kind: "mutation",
14532
+ auth: "admin"
14533
+ }), method(object({ name: string() }), _void(), {
14534
+ kind: "mutation",
14535
+ auth: "admin"
14536
+ }), method(object({
14537
+ from: string(),
14538
+ to: string()
14539
+ }), _void(), {
14540
+ kind: "mutation",
14541
+ auth: "admin"
14542
+ }), method(object({
14543
+ location: string(),
14544
+ zone: string().nullable()
14545
+ }), _void(), {
14546
+ kind: "mutation",
14547
+ auth: "admin"
14405
14548
  }), method(object({
14406
14549
  deviceId: number(),
14407
14550
  disabled: boolean()
@@ -38024,6 +38167,12 @@ Object.freeze({
38024
38167
  addonId: null,
38025
38168
  access: "view"
38026
38169
  },
38170
+ "deviceManager.listLocationDescriptions": {
38171
+ capName: "device-manager",
38172
+ capScope: "system",
38173
+ addonId: null,
38174
+ access: "view"
38175
+ },
38027
38176
  "deviceManager.listLocationIcons": {
38028
38177
  capName: "device-manager",
38029
38178
  capScope: "system",
@@ -38042,6 +38191,12 @@ Object.freeze({
38042
38191
  addonId: null,
38043
38192
  access: "view"
38044
38193
  },
38194
+ "deviceManager.listSiteZones": {
38195
+ capName: "device-manager",
38196
+ capScope: "system",
38197
+ addonId: null,
38198
+ access: "view"
38199
+ },
38045
38200
  "deviceManager.listWrappersForCap": {
38046
38201
  capName: "device-manager",
38047
38202
  capScope: "system",
@@ -38126,12 +38281,24 @@ Object.freeze({
38126
38281
  addonId: null,
38127
38282
  access: "delete"
38128
38283
  },
38284
+ "deviceManager.removeSiteZone": {
38285
+ capName: "device-manager",
38286
+ capScope: "system",
38287
+ addonId: null,
38288
+ access: "delete"
38289
+ },
38129
38290
  "deviceManager.renameLocation": {
38130
38291
  capName: "device-manager",
38131
38292
  capScope: "system",
38132
38293
  addonId: null,
38133
38294
  access: "create"
38134
38295
  },
38296
+ "deviceManager.renameSiteZone": {
38297
+ capName: "device-manager",
38298
+ capScope: "system",
38299
+ addonId: null,
38300
+ access: "create"
38301
+ },
38135
38302
  "deviceManager.runDeviceAction": {
38136
38303
  capName: "device-manager",
38137
38304
  capScope: "system",
@@ -38174,12 +38341,24 @@ Object.freeze({
38174
38341
  addonId: null,
38175
38342
  access: "create"
38176
38343
  },
38344
+ "deviceManager.setLocationDescription": {
38345
+ capName: "device-manager",
38346
+ capScope: "system",
38347
+ addonId: null,
38348
+ access: "create"
38349
+ },
38177
38350
  "deviceManager.setLocationIcon": {
38178
38351
  capName: "device-manager",
38179
38352
  capScope: "system",
38180
38353
  addonId: null,
38181
38354
  access: "create"
38182
38355
  },
38356
+ "deviceManager.setLocationZone": {
38357
+ capName: "device-manager",
38358
+ capScope: "system",
38359
+ addonId: null,
38360
+ access: "create"
38361
+ },
38183
38362
  "deviceManager.setMetadata": {
38184
38363
  capName: "device-manager",
38185
38364
  capScope: "system",
@@ -38210,6 +38389,12 @@ Object.freeze({
38210
38389
  addonId: null,
38211
38390
  access: "create"
38212
38391
  },
38392
+ "deviceManager.setSiteZone": {
38393
+ capName: "device-manager",
38394
+ capScope: "system",
38395
+ addonId: null,
38396
+ access: "create"
38397
+ },
38213
38398
  "deviceManager.setStreamProfileMap": {
38214
38399
  capName: "device-manager",
38215
38400
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -12581,7 +12581,23 @@ var PickStreamRequirementsSchema = object({
12581
12581
  * This is what lets one picker serve both the bypass and the full source
12582
12582
  * choice, instead of a consumer scoring privately when the bypass misses.
12583
12583
  */
12584
- allowTranscode: boolean().optional()
12584
+ allowTranscode: boolean().optional(),
12585
+ /**
12586
+ * Consider ONLY streams the broker has bound to a profile slot.
12587
+ *
12588
+ * A consumer that dials the broker — which is every exporter, since none
12589
+ * of them may open the camera's own URL — can do nothing with a source
12590
+ * that has no slot: there is no restream to dial. Without this the picker
12591
+ * can name such a stream, and each consumer discovers the dead end for
12592
+ * itself: Alexa's `profileForCamStream` returns `null` and it quietly
12593
+ * falls back, and HomeKit would have had to grow the same function again.
12594
+ *
12595
+ * Default `false`, and deliberately so: the BROKER itself picks through
12596
+ * here when it decides which source to BIND to a slot
12597
+ * (`computeInitialAssignment`), and it must see the unbound ones or it
12598
+ * could never bind them.
12599
+ */
12600
+ requireProfileBound: boolean().optional()
12585
12601
  }).readonly();
12586
12602
  var PickStreamPreferencesSchema = object({
12587
12603
  /**
@@ -12622,7 +12638,43 @@ var PickedCamStreamSchema = object({
12622
12638
  */
12623
12639
  transcodes: boolean(),
12624
12640
  /** One-line explanation of why this stream won — for logs / debug UI. */
12625
- reason: string()
12641
+ reason: string(),
12642
+ /**
12643
+ * The broker profile slot this source is bound to, when it is bound.
12644
+ *
12645
+ * Answered HERE because every consumer needs it and none of them can get it
12646
+ * from the `camStreamId` alone. Alexa wrote `profileForCamStream` for it —
12647
+ * a second cap read plus a `null` branch — and HomeKit was about to write
12648
+ * the same function a second time.
12649
+ *
12650
+ * Absent when the source has no slot, which a caller passing
12651
+ * `requireProfileBound` can never see.
12652
+ */
12653
+ profile: CamProfileSchema.optional(),
12654
+ /** The broker id of that slot, for logs that must name what was dialled. */
12655
+ brokerId: string().optional(),
12656
+ /**
12657
+ * The broker restream URL to dial for this stream.
12658
+ *
12659
+ * An exporter must never open the camera's own URL — the broker is the one
12660
+ * that dials the camera, and every consumer goes through its restream. So
12661
+ * the picker answers with the thing a consumer may actually use, instead of
12662
+ * naming a source and leaving each caller to look the URL up.
12663
+ */
12664
+ url: string().optional(),
12665
+ /**
12666
+ * Frames per second this stream really delivers, and where the number came
12667
+ * from.
12668
+ *
12669
+ * It is here because getting it wrong is expensive and silent: a HomeKit
12670
+ * accessory advertised 720p at 24 fps while the slot serving it ran at 9,
12671
+ * and the controller rendered nothing at all. The source is carried with the
12672
+ * value for the same reason the bitrate evidence is: `published` is what the
12673
+ * publisher declares and `measured` is what the broker observed, and they
12674
+ * are not interchangeable.
12675
+ */
12676
+ fps: number().positive().optional(),
12677
+ fpsSource: _enum(["published", "measured"]).optional()
12626
12678
  });
12627
12679
  /**
12628
12680
  * Camera streams — device-scoped facade over the system `stream-broker`.
@@ -13805,6 +13857,70 @@ var LocationIconAssignmentSchema = object({
13805
13857
  locationKey: string(),
13806
13858
  icon: LocationIconIdSchema
13807
13859
  });
13860
+ /**
13861
+ * One (location, description) assignment as it travels.
13862
+ *
13863
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13864
+ * reason: this lived for a while in the post-analysis addon's own settings,
13865
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13866
+ * the Locations page carried the icon and silently orphaned the description —
13867
+ * two authorities for one thing, joined by two different rules. Now both hang
13868
+ * off the location itself, on `locationIconKey`.
13869
+ */
13870
+ var LocationDescriptionAssignmentSchema = object({
13871
+ locationKey: string(),
13872
+ description: string()
13873
+ });
13874
+ /**
13875
+ * A SITE ZONE — a named part of the property that several locations belong to.
13876
+ *
13877
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13878
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13879
+ * one zone, so a camera's zone is derived and never stored on the device: the
13880
+ * whole point of this entity is that grouping rooms touches no device row.
13881
+ *
13882
+ * ## Why not `zone`
13883
+ *
13884
+ * Because `zone` is already the most loaded word in this product: 612 source
13885
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13886
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13887
+ * set of rooms — and a reader who confuses them will look for a camera's
13888
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13889
+ * word by calling the drawn one what it actually is: a detection zone.
13890
+ *
13891
+ * ## The key
13892
+ *
13893
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13894
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13895
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13896
+ * silently-dropped location description.
13897
+ *
13898
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13899
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13900
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13901
+ */
13902
+ /**
13903
+ * One zone as it travels: its key, the label the operator typed, its icon and
13904
+ * the locations inside it.
13905
+ *
13906
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13907
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13908
+ * here, rather than left to a second call, because every consumer wants both
13909
+ * at once and a viewer that asked twice could render a zone whose membership
13910
+ * it has not fetched yet.
13911
+ *
13912
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13913
+ * of those two is a choice, and a picker has to draw them differently.
13914
+ */
13915
+ var SiteZoneSchema = object({
13916
+ zoneKey: string(),
13917
+ label: string(),
13918
+ icon: LocationIconIdSchema.nullable(),
13919
+ /** Folded location keys, sorted. A location listed here need not be
13920
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13921
+ * the ones that most want grouping. */
13922
+ locationKeys: array(string())
13923
+ });
13808
13924
  var ProviderStatusSchema = object({
13809
13925
  connected: boolean(),
13810
13926
  deviceCount: number(),
@@ -14403,6 +14519,33 @@ method(object({
14403
14519
  }), _void(), {
14404
14520
  kind: "mutation",
14405
14521
  auth: "admin"
14522
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14523
+ location: string(),
14524
+ description: string().max(400).nullable()
14525
+ }), _void(), {
14526
+ kind: "mutation",
14527
+ auth: "admin"
14528
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14529
+ name: string(),
14530
+ icon: LocationIconIdSchema.nullable().optional()
14531
+ }), _void(), {
14532
+ kind: "mutation",
14533
+ auth: "admin"
14534
+ }), method(object({ name: string() }), _void(), {
14535
+ kind: "mutation",
14536
+ auth: "admin"
14537
+ }), method(object({
14538
+ from: string(),
14539
+ to: string()
14540
+ }), _void(), {
14541
+ kind: "mutation",
14542
+ auth: "admin"
14543
+ }), method(object({
14544
+ location: string(),
14545
+ zone: string().nullable()
14546
+ }), _void(), {
14547
+ kind: "mutation",
14548
+ auth: "admin"
14406
14549
  }), method(object({
14407
14550
  deviceId: number(),
14408
14551
  disabled: boolean()
@@ -38025,6 +38168,12 @@ Object.freeze({
38025
38168
  addonId: null,
38026
38169
  access: "view"
38027
38170
  },
38171
+ "deviceManager.listLocationDescriptions": {
38172
+ capName: "device-manager",
38173
+ capScope: "system",
38174
+ addonId: null,
38175
+ access: "view"
38176
+ },
38028
38177
  "deviceManager.listLocationIcons": {
38029
38178
  capName: "device-manager",
38030
38179
  capScope: "system",
@@ -38043,6 +38192,12 @@ Object.freeze({
38043
38192
  addonId: null,
38044
38193
  access: "view"
38045
38194
  },
38195
+ "deviceManager.listSiteZones": {
38196
+ capName: "device-manager",
38197
+ capScope: "system",
38198
+ addonId: null,
38199
+ access: "view"
38200
+ },
38046
38201
  "deviceManager.listWrappersForCap": {
38047
38202
  capName: "device-manager",
38048
38203
  capScope: "system",
@@ -38127,12 +38282,24 @@ Object.freeze({
38127
38282
  addonId: null,
38128
38283
  access: "delete"
38129
38284
  },
38285
+ "deviceManager.removeSiteZone": {
38286
+ capName: "device-manager",
38287
+ capScope: "system",
38288
+ addonId: null,
38289
+ access: "delete"
38290
+ },
38130
38291
  "deviceManager.renameLocation": {
38131
38292
  capName: "device-manager",
38132
38293
  capScope: "system",
38133
38294
  addonId: null,
38134
38295
  access: "create"
38135
38296
  },
38297
+ "deviceManager.renameSiteZone": {
38298
+ capName: "device-manager",
38299
+ capScope: "system",
38300
+ addonId: null,
38301
+ access: "create"
38302
+ },
38136
38303
  "deviceManager.runDeviceAction": {
38137
38304
  capName: "device-manager",
38138
38305
  capScope: "system",
@@ -38175,12 +38342,24 @@ Object.freeze({
38175
38342
  addonId: null,
38176
38343
  access: "create"
38177
38344
  },
38345
+ "deviceManager.setLocationDescription": {
38346
+ capName: "device-manager",
38347
+ capScope: "system",
38348
+ addonId: null,
38349
+ access: "create"
38350
+ },
38178
38351
  "deviceManager.setLocationIcon": {
38179
38352
  capName: "device-manager",
38180
38353
  capScope: "system",
38181
38354
  addonId: null,
38182
38355
  access: "create"
38183
38356
  },
38357
+ "deviceManager.setLocationZone": {
38358
+ capName: "device-manager",
38359
+ capScope: "system",
38360
+ addonId: null,
38361
+ access: "create"
38362
+ },
38184
38363
  "deviceManager.setMetadata": {
38185
38364
  capName: "device-manager",
38186
38365
  capScope: "system",
@@ -38211,6 +38390,12 @@ Object.freeze({
38211
38390
  addonId: null,
38212
38391
  access: "create"
38213
38392
  },
38393
+ "deviceManager.setSiteZone": {
38394
+ capName: "device-manager",
38395
+ capScope: "system",
38396
+ addonId: null,
38397
+ access: "create"
38398
+ },
38214
38399
  "deviceManager.setStreamProfileMap": {
38215
38400
  capName: "device-manager",
38216
38401
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.114",
3
+ "version": "1.2.116",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",