@camstack/addon-provider-amcrest 0.2.107 → 0.2.109

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
@@ -13474,6 +13474,107 @@ var ExposeInputSchema = object({
13474
13474
  });
13475
13475
  var UnexposeInputSchema = object({ deviceId: string() });
13476
13476
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13477
+ /** Wire/storage schema for one icon id. */
13478
+ var LocationIconIdSchema = _enum([
13479
+ "map-pin",
13480
+ "house",
13481
+ "door-open",
13482
+ "sofa",
13483
+ "utensils",
13484
+ "bed-double",
13485
+ "bath",
13486
+ "briefcase",
13487
+ "car",
13488
+ "circle-parking",
13489
+ "route",
13490
+ "trees",
13491
+ "umbrella",
13492
+ "waves-ladder",
13493
+ "fence",
13494
+ "package",
13495
+ "warehouse",
13496
+ "store",
13497
+ "sun",
13498
+ "radar"
13499
+ ]);
13500
+ /**
13501
+ * One (location, icon) assignment as it travels.
13502
+ *
13503
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13504
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13505
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13506
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13507
+ * map keyed on the displayed casing would orphan its entry on exactly that
13508
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13509
+ */
13510
+ var LocationIconAssignmentSchema = object({
13511
+ locationKey: string(),
13512
+ icon: LocationIconIdSchema
13513
+ });
13514
+ /**
13515
+ * One (location, description) assignment as it travels.
13516
+ *
13517
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13518
+ * reason: this lived for a while in the post-analysis addon's own settings,
13519
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13520
+ * the Locations page carried the icon and silently orphaned the description —
13521
+ * two authorities for one thing, joined by two different rules. Now both hang
13522
+ * off the location itself, on `locationIconKey`.
13523
+ */
13524
+ var LocationDescriptionAssignmentSchema = object({
13525
+ locationKey: string(),
13526
+ description: string()
13527
+ });
13528
+ /**
13529
+ * A SITE ZONE — a named part of the property that several locations belong to.
13530
+ *
13531
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13532
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13533
+ * one zone, so a camera's zone is derived and never stored on the device: the
13534
+ * whole point of this entity is that grouping rooms touches no device row.
13535
+ *
13536
+ * ## Why not `zone`
13537
+ *
13538
+ * Because `zone` is already the most loaded word in this product: 612 source
13539
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13540
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13541
+ * set of rooms — and a reader who confuses them will look for a camera's
13542
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13543
+ * word by calling the drawn one what it actually is: a detection zone.
13544
+ *
13545
+ * ## The key
13546
+ *
13547
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13548
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13549
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13550
+ * silently-dropped location description.
13551
+ *
13552
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13553
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13554
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13555
+ */
13556
+ /**
13557
+ * One zone as it travels: its key, the label the operator typed, its icon and
13558
+ * the locations inside it.
13559
+ *
13560
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13561
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13562
+ * here, rather than left to a second call, because every consumer wants both
13563
+ * at once and a viewer that asked twice could render a zone whose membership
13564
+ * it has not fetched yet.
13565
+ *
13566
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13567
+ * of those two is a choice, and a picker has to draw them differently.
13568
+ */
13569
+ var SiteZoneSchema = object({
13570
+ zoneKey: string(),
13571
+ label: string(),
13572
+ icon: LocationIconIdSchema.nullable(),
13573
+ /** Folded location keys, sorted. A location listed here need not be
13574
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13575
+ * the ones that most want grouping. */
13576
+ locationKeys: array(string())
13577
+ });
13477
13578
  var ProviderStatusSchema = object({
13478
13579
  connected: boolean(),
13479
13580
  deviceCount: number(),
@@ -14066,6 +14167,39 @@ method(object({
14066
14167
  }), object({ moved: number() }), {
14067
14168
  kind: "mutation",
14068
14169
  auth: "admin"
14170
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14171
+ location: string(),
14172
+ icon: LocationIconIdSchema.nullable()
14173
+ }), _void(), {
14174
+ kind: "mutation",
14175
+ auth: "admin"
14176
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14177
+ location: string(),
14178
+ description: string().max(400).nullable()
14179
+ }), _void(), {
14180
+ kind: "mutation",
14181
+ auth: "admin"
14182
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14183
+ name: string(),
14184
+ icon: LocationIconIdSchema.nullable().optional()
14185
+ }), _void(), {
14186
+ kind: "mutation",
14187
+ auth: "admin"
14188
+ }), method(object({ name: string() }), _void(), {
14189
+ kind: "mutation",
14190
+ auth: "admin"
14191
+ }), method(object({
14192
+ from: string(),
14193
+ to: string()
14194
+ }), _void(), {
14195
+ kind: "mutation",
14196
+ auth: "admin"
14197
+ }), method(object({
14198
+ location: string(),
14199
+ zone: string().nullable()
14200
+ }), _void(), {
14201
+ kind: "mutation",
14202
+ auth: "admin"
14069
14203
  }), method(object({
14070
14204
  deviceId: number(),
14071
14205
  disabled: boolean()
@@ -37617,6 +37751,18 @@ Object.freeze({
37617
37751
  addonId: null,
37618
37752
  access: "view"
37619
37753
  },
37754
+ "deviceManager.listLocationDescriptions": {
37755
+ capName: "device-manager",
37756
+ capScope: "system",
37757
+ addonId: null,
37758
+ access: "view"
37759
+ },
37760
+ "deviceManager.listLocationIcons": {
37761
+ capName: "device-manager",
37762
+ capScope: "system",
37763
+ addonId: null,
37764
+ access: "view"
37765
+ },
37620
37766
  "deviceManager.listLocations": {
37621
37767
  capName: "device-manager",
37622
37768
  capScope: "system",
@@ -37629,6 +37775,12 @@ Object.freeze({
37629
37775
  addonId: null,
37630
37776
  access: "view"
37631
37777
  },
37778
+ "deviceManager.listSiteZones": {
37779
+ capName: "device-manager",
37780
+ capScope: "system",
37781
+ addonId: null,
37782
+ access: "view"
37783
+ },
37632
37784
  "deviceManager.listWrappersForCap": {
37633
37785
  capName: "device-manager",
37634
37786
  capScope: "system",
@@ -37713,12 +37865,24 @@ Object.freeze({
37713
37865
  addonId: null,
37714
37866
  access: "delete"
37715
37867
  },
37868
+ "deviceManager.removeSiteZone": {
37869
+ capName: "device-manager",
37870
+ capScope: "system",
37871
+ addonId: null,
37872
+ access: "delete"
37873
+ },
37716
37874
  "deviceManager.renameLocation": {
37717
37875
  capName: "device-manager",
37718
37876
  capScope: "system",
37719
37877
  addonId: null,
37720
37878
  access: "create"
37721
37879
  },
37880
+ "deviceManager.renameSiteZone": {
37881
+ capName: "device-manager",
37882
+ capScope: "system",
37883
+ addonId: null,
37884
+ access: "create"
37885
+ },
37722
37886
  "deviceManager.runDeviceAction": {
37723
37887
  capName: "device-manager",
37724
37888
  capScope: "system",
@@ -37761,6 +37925,24 @@ Object.freeze({
37761
37925
  addonId: null,
37762
37926
  access: "create"
37763
37927
  },
37928
+ "deviceManager.setLocationDescription": {
37929
+ capName: "device-manager",
37930
+ capScope: "system",
37931
+ addonId: null,
37932
+ access: "create"
37933
+ },
37934
+ "deviceManager.setLocationIcon": {
37935
+ capName: "device-manager",
37936
+ capScope: "system",
37937
+ addonId: null,
37938
+ access: "create"
37939
+ },
37940
+ "deviceManager.setLocationZone": {
37941
+ capName: "device-manager",
37942
+ capScope: "system",
37943
+ addonId: null,
37944
+ access: "create"
37945
+ },
37764
37946
  "deviceManager.setMetadata": {
37765
37947
  capName: "device-manager",
37766
37948
  capScope: "system",
@@ -37791,6 +37973,12 @@ Object.freeze({
37791
37973
  addonId: null,
37792
37974
  access: "create"
37793
37975
  },
37976
+ "deviceManager.setSiteZone": {
37977
+ capName: "device-manager",
37978
+ capScope: "system",
37979
+ addonId: null,
37980
+ access: "create"
37981
+ },
37794
37982
  "deviceManager.setStreamProfileMap": {
37795
37983
  capName: "device-manager",
37796
37984
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13475,6 +13475,107 @@ var ExposeInputSchema = object({
13475
13475
  });
13476
13476
  var UnexposeInputSchema = object({ deviceId: string() });
13477
13477
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13478
+ /** Wire/storage schema for one icon id. */
13479
+ var LocationIconIdSchema = _enum([
13480
+ "map-pin",
13481
+ "house",
13482
+ "door-open",
13483
+ "sofa",
13484
+ "utensils",
13485
+ "bed-double",
13486
+ "bath",
13487
+ "briefcase",
13488
+ "car",
13489
+ "circle-parking",
13490
+ "route",
13491
+ "trees",
13492
+ "umbrella",
13493
+ "waves-ladder",
13494
+ "fence",
13495
+ "package",
13496
+ "warehouse",
13497
+ "store",
13498
+ "sun",
13499
+ "radar"
13500
+ ]);
13501
+ /**
13502
+ * One (location, icon) assignment as it travels.
13503
+ *
13504
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13505
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13506
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13507
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13508
+ * map keyed on the displayed casing would orphan its entry on exactly that
13509
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13510
+ */
13511
+ var LocationIconAssignmentSchema = object({
13512
+ locationKey: string(),
13513
+ icon: LocationIconIdSchema
13514
+ });
13515
+ /**
13516
+ * One (location, description) assignment as it travels.
13517
+ *
13518
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13519
+ * reason: this lived for a while in the post-analysis addon's own settings,
13520
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13521
+ * the Locations page carried the icon and silently orphaned the description —
13522
+ * two authorities for one thing, joined by two different rules. Now both hang
13523
+ * off the location itself, on `locationIconKey`.
13524
+ */
13525
+ var LocationDescriptionAssignmentSchema = object({
13526
+ locationKey: string(),
13527
+ description: string()
13528
+ });
13529
+ /**
13530
+ * A SITE ZONE — a named part of the property that several locations belong to.
13531
+ *
13532
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13533
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13534
+ * one zone, so a camera's zone is derived and never stored on the device: the
13535
+ * whole point of this entity is that grouping rooms touches no device row.
13536
+ *
13537
+ * ## Why not `zone`
13538
+ *
13539
+ * Because `zone` is already the most loaded word in this product: 612 source
13540
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13541
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13542
+ * set of rooms — and a reader who confuses them will look for a camera's
13543
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13544
+ * word by calling the drawn one what it actually is: a detection zone.
13545
+ *
13546
+ * ## The key
13547
+ *
13548
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13549
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13550
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13551
+ * silently-dropped location description.
13552
+ *
13553
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13554
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13555
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13556
+ */
13557
+ /**
13558
+ * One zone as it travels: its key, the label the operator typed, its icon and
13559
+ * the locations inside it.
13560
+ *
13561
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13562
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13563
+ * here, rather than left to a second call, because every consumer wants both
13564
+ * at once and a viewer that asked twice could render a zone whose membership
13565
+ * it has not fetched yet.
13566
+ *
13567
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13568
+ * of those two is a choice, and a picker has to draw them differently.
13569
+ */
13570
+ var SiteZoneSchema = object({
13571
+ zoneKey: string(),
13572
+ label: string(),
13573
+ icon: LocationIconIdSchema.nullable(),
13574
+ /** Folded location keys, sorted. A location listed here need not be
13575
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13576
+ * the ones that most want grouping. */
13577
+ locationKeys: array(string())
13578
+ });
13478
13579
  var ProviderStatusSchema = object({
13479
13580
  connected: boolean(),
13480
13581
  deviceCount: number(),
@@ -14067,6 +14168,39 @@ method(object({
14067
14168
  }), object({ moved: number() }), {
14068
14169
  kind: "mutation",
14069
14170
  auth: "admin"
14171
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14172
+ location: string(),
14173
+ icon: LocationIconIdSchema.nullable()
14174
+ }), _void(), {
14175
+ kind: "mutation",
14176
+ auth: "admin"
14177
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14178
+ location: string(),
14179
+ description: string().max(400).nullable()
14180
+ }), _void(), {
14181
+ kind: "mutation",
14182
+ auth: "admin"
14183
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14184
+ name: string(),
14185
+ icon: LocationIconIdSchema.nullable().optional()
14186
+ }), _void(), {
14187
+ kind: "mutation",
14188
+ auth: "admin"
14189
+ }), method(object({ name: string() }), _void(), {
14190
+ kind: "mutation",
14191
+ auth: "admin"
14192
+ }), method(object({
14193
+ from: string(),
14194
+ to: string()
14195
+ }), _void(), {
14196
+ kind: "mutation",
14197
+ auth: "admin"
14198
+ }), method(object({
14199
+ location: string(),
14200
+ zone: string().nullable()
14201
+ }), _void(), {
14202
+ kind: "mutation",
14203
+ auth: "admin"
14070
14204
  }), method(object({
14071
14205
  deviceId: number(),
14072
14206
  disabled: boolean()
@@ -37618,6 +37752,18 @@ Object.freeze({
37618
37752
  addonId: null,
37619
37753
  access: "view"
37620
37754
  },
37755
+ "deviceManager.listLocationDescriptions": {
37756
+ capName: "device-manager",
37757
+ capScope: "system",
37758
+ addonId: null,
37759
+ access: "view"
37760
+ },
37761
+ "deviceManager.listLocationIcons": {
37762
+ capName: "device-manager",
37763
+ capScope: "system",
37764
+ addonId: null,
37765
+ access: "view"
37766
+ },
37621
37767
  "deviceManager.listLocations": {
37622
37768
  capName: "device-manager",
37623
37769
  capScope: "system",
@@ -37630,6 +37776,12 @@ Object.freeze({
37630
37776
  addonId: null,
37631
37777
  access: "view"
37632
37778
  },
37779
+ "deviceManager.listSiteZones": {
37780
+ capName: "device-manager",
37781
+ capScope: "system",
37782
+ addonId: null,
37783
+ access: "view"
37784
+ },
37633
37785
  "deviceManager.listWrappersForCap": {
37634
37786
  capName: "device-manager",
37635
37787
  capScope: "system",
@@ -37714,12 +37866,24 @@ Object.freeze({
37714
37866
  addonId: null,
37715
37867
  access: "delete"
37716
37868
  },
37869
+ "deviceManager.removeSiteZone": {
37870
+ capName: "device-manager",
37871
+ capScope: "system",
37872
+ addonId: null,
37873
+ access: "delete"
37874
+ },
37717
37875
  "deviceManager.renameLocation": {
37718
37876
  capName: "device-manager",
37719
37877
  capScope: "system",
37720
37878
  addonId: null,
37721
37879
  access: "create"
37722
37880
  },
37881
+ "deviceManager.renameSiteZone": {
37882
+ capName: "device-manager",
37883
+ capScope: "system",
37884
+ addonId: null,
37885
+ access: "create"
37886
+ },
37723
37887
  "deviceManager.runDeviceAction": {
37724
37888
  capName: "device-manager",
37725
37889
  capScope: "system",
@@ -37762,6 +37926,24 @@ Object.freeze({
37762
37926
  addonId: null,
37763
37927
  access: "create"
37764
37928
  },
37929
+ "deviceManager.setLocationDescription": {
37930
+ capName: "device-manager",
37931
+ capScope: "system",
37932
+ addonId: null,
37933
+ access: "create"
37934
+ },
37935
+ "deviceManager.setLocationIcon": {
37936
+ capName: "device-manager",
37937
+ capScope: "system",
37938
+ addonId: null,
37939
+ access: "create"
37940
+ },
37941
+ "deviceManager.setLocationZone": {
37942
+ capName: "device-manager",
37943
+ capScope: "system",
37944
+ addonId: null,
37945
+ access: "create"
37946
+ },
37765
37947
  "deviceManager.setMetadata": {
37766
37948
  capName: "device-manager",
37767
37949
  capScope: "system",
@@ -37792,6 +37974,12 @@ Object.freeze({
37792
37974
  addonId: null,
37793
37975
  access: "create"
37794
37976
  },
37977
+ "deviceManager.setSiteZone": {
37978
+ capName: "device-manager",
37979
+ capScope: "system",
37980
+ addonId: null,
37981
+ access: "create"
37982
+ },
37795
37983
  "deviceManager.setStreamProfileMap": {
37796
37984
  capName: "device-manager",
37797
37985
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.107",
3
+ "version": "0.2.109",
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",