@camstack/addon-notifiers 1.2.109 → 1.2.111

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
@@ -13413,6 +13413,107 @@ var ExposeInputSchema = object({
13413
13413
  });
13414
13414
  var UnexposeInputSchema = object({ deviceId: string() });
13415
13415
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13416
+ /** Wire/storage schema for one icon id. */
13417
+ var LocationIconIdSchema = _enum([
13418
+ "map-pin",
13419
+ "house",
13420
+ "door-open",
13421
+ "sofa",
13422
+ "utensils",
13423
+ "bed-double",
13424
+ "bath",
13425
+ "briefcase",
13426
+ "car",
13427
+ "circle-parking",
13428
+ "route",
13429
+ "trees",
13430
+ "umbrella",
13431
+ "waves-ladder",
13432
+ "fence",
13433
+ "package",
13434
+ "warehouse",
13435
+ "store",
13436
+ "sun",
13437
+ "radar"
13438
+ ]);
13439
+ /**
13440
+ * One (location, icon) assignment as it travels.
13441
+ *
13442
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13443
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13444
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13445
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13446
+ * map keyed on the displayed casing would orphan its entry on exactly that
13447
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13448
+ */
13449
+ var LocationIconAssignmentSchema = object({
13450
+ locationKey: string(),
13451
+ icon: LocationIconIdSchema
13452
+ });
13453
+ /**
13454
+ * One (location, description) assignment as it travels.
13455
+ *
13456
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13457
+ * reason: this lived for a while in the post-analysis addon's own settings,
13458
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13459
+ * the Locations page carried the icon and silently orphaned the description —
13460
+ * two authorities for one thing, joined by two different rules. Now both hang
13461
+ * off the location itself, on `locationIconKey`.
13462
+ */
13463
+ var LocationDescriptionAssignmentSchema = object({
13464
+ locationKey: string(),
13465
+ description: string()
13466
+ });
13467
+ /**
13468
+ * A SITE ZONE — a named part of the property that several locations belong to.
13469
+ *
13470
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13471
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13472
+ * one zone, so a camera's zone is derived and never stored on the device: the
13473
+ * whole point of this entity is that grouping rooms touches no device row.
13474
+ *
13475
+ * ## Why not `zone`
13476
+ *
13477
+ * Because `zone` is already the most loaded word in this product: 612 source
13478
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13479
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13480
+ * set of rooms — and a reader who confuses them will look for a camera's
13481
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13482
+ * word by calling the drawn one what it actually is: a detection zone.
13483
+ *
13484
+ * ## The key
13485
+ *
13486
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13487
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13488
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13489
+ * silently-dropped location description.
13490
+ *
13491
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13492
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13493
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13494
+ */
13495
+ /**
13496
+ * One zone as it travels: its key, the label the operator typed, its icon and
13497
+ * the locations inside it.
13498
+ *
13499
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13500
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13501
+ * here, rather than left to a second call, because every consumer wants both
13502
+ * at once and a viewer that asked twice could render a zone whose membership
13503
+ * it has not fetched yet.
13504
+ *
13505
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13506
+ * of those two is a choice, and a picker has to draw them differently.
13507
+ */
13508
+ var SiteZoneSchema = object({
13509
+ zoneKey: string(),
13510
+ label: string(),
13511
+ icon: LocationIconIdSchema.nullable(),
13512
+ /** Folded location keys, sorted. A location listed here need not be
13513
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13514
+ * the ones that most want grouping. */
13515
+ locationKeys: array(string())
13516
+ });
13416
13517
  var ProviderStatusSchema = object({
13417
13518
  connected: boolean(),
13418
13519
  deviceCount: number(),
@@ -13924,6 +14025,39 @@ method(object({
13924
14025
  }), object({ moved: number() }), {
13925
14026
  kind: "mutation",
13926
14027
  auth: "admin"
14028
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14029
+ location: string(),
14030
+ icon: LocationIconIdSchema.nullable()
14031
+ }), _void(), {
14032
+ kind: "mutation",
14033
+ auth: "admin"
14034
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14035
+ location: string(),
14036
+ description: string().max(400).nullable()
14037
+ }), _void(), {
14038
+ kind: "mutation",
14039
+ auth: "admin"
14040
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14041
+ name: string(),
14042
+ icon: LocationIconIdSchema.nullable().optional()
14043
+ }), _void(), {
14044
+ kind: "mutation",
14045
+ auth: "admin"
14046
+ }), method(object({ name: string() }), _void(), {
14047
+ kind: "mutation",
14048
+ auth: "admin"
14049
+ }), method(object({
14050
+ from: string(),
14051
+ to: string()
14052
+ }), _void(), {
14053
+ kind: "mutation",
14054
+ auth: "admin"
14055
+ }), method(object({
14056
+ location: string(),
14057
+ zone: string().nullable()
14058
+ }), _void(), {
14059
+ kind: "mutation",
14060
+ auth: "admin"
13927
14061
  }), method(object({
13928
14062
  deviceId: number(),
13929
14063
  disabled: boolean()
@@ -32761,6 +32895,18 @@ Object.freeze({
32761
32895
  addonId: null,
32762
32896
  access: "view"
32763
32897
  },
32898
+ "deviceManager.listLocationDescriptions": {
32899
+ capName: "device-manager",
32900
+ capScope: "system",
32901
+ addonId: null,
32902
+ access: "view"
32903
+ },
32904
+ "deviceManager.listLocationIcons": {
32905
+ capName: "device-manager",
32906
+ capScope: "system",
32907
+ addonId: null,
32908
+ access: "view"
32909
+ },
32764
32910
  "deviceManager.listLocations": {
32765
32911
  capName: "device-manager",
32766
32912
  capScope: "system",
@@ -32773,6 +32919,12 @@ Object.freeze({
32773
32919
  addonId: null,
32774
32920
  access: "view"
32775
32921
  },
32922
+ "deviceManager.listSiteZones": {
32923
+ capName: "device-manager",
32924
+ capScope: "system",
32925
+ addonId: null,
32926
+ access: "view"
32927
+ },
32776
32928
  "deviceManager.listWrappersForCap": {
32777
32929
  capName: "device-manager",
32778
32930
  capScope: "system",
@@ -32857,12 +33009,24 @@ Object.freeze({
32857
33009
  addonId: null,
32858
33010
  access: "delete"
32859
33011
  },
33012
+ "deviceManager.removeSiteZone": {
33013
+ capName: "device-manager",
33014
+ capScope: "system",
33015
+ addonId: null,
33016
+ access: "delete"
33017
+ },
32860
33018
  "deviceManager.renameLocation": {
32861
33019
  capName: "device-manager",
32862
33020
  capScope: "system",
32863
33021
  addonId: null,
32864
33022
  access: "create"
32865
33023
  },
33024
+ "deviceManager.renameSiteZone": {
33025
+ capName: "device-manager",
33026
+ capScope: "system",
33027
+ addonId: null,
33028
+ access: "create"
33029
+ },
32866
33030
  "deviceManager.runDeviceAction": {
32867
33031
  capName: "device-manager",
32868
33032
  capScope: "system",
@@ -32905,6 +33069,24 @@ Object.freeze({
32905
33069
  addonId: null,
32906
33070
  access: "create"
32907
33071
  },
33072
+ "deviceManager.setLocationDescription": {
33073
+ capName: "device-manager",
33074
+ capScope: "system",
33075
+ addonId: null,
33076
+ access: "create"
33077
+ },
33078
+ "deviceManager.setLocationIcon": {
33079
+ capName: "device-manager",
33080
+ capScope: "system",
33081
+ addonId: null,
33082
+ access: "create"
33083
+ },
33084
+ "deviceManager.setLocationZone": {
33085
+ capName: "device-manager",
33086
+ capScope: "system",
33087
+ addonId: null,
33088
+ access: "create"
33089
+ },
32908
33090
  "deviceManager.setMetadata": {
32909
33091
  capName: "device-manager",
32910
33092
  capScope: "system",
@@ -32935,6 +33117,12 @@ Object.freeze({
32935
33117
  addonId: null,
32936
33118
  access: "create"
32937
33119
  },
33120
+ "deviceManager.setSiteZone": {
33121
+ capName: "device-manager",
33122
+ capScope: "system",
33123
+ addonId: null,
33124
+ access: "create"
33125
+ },
32938
33126
  "deviceManager.setStreamProfileMap": {
32939
33127
  capName: "device-manager",
32940
33128
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13386,6 +13386,107 @@ var ExposeInputSchema = object({
13386
13386
  });
13387
13387
  var UnexposeInputSchema = object({ deviceId: string() });
13388
13388
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13389
+ /** Wire/storage schema for one icon id. */
13390
+ var LocationIconIdSchema = _enum([
13391
+ "map-pin",
13392
+ "house",
13393
+ "door-open",
13394
+ "sofa",
13395
+ "utensils",
13396
+ "bed-double",
13397
+ "bath",
13398
+ "briefcase",
13399
+ "car",
13400
+ "circle-parking",
13401
+ "route",
13402
+ "trees",
13403
+ "umbrella",
13404
+ "waves-ladder",
13405
+ "fence",
13406
+ "package",
13407
+ "warehouse",
13408
+ "store",
13409
+ "sun",
13410
+ "radar"
13411
+ ]);
13412
+ /**
13413
+ * One (location, icon) assignment as it travels.
13414
+ *
13415
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13416
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13417
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13418
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13419
+ * map keyed on the displayed casing would orphan its entry on exactly that
13420
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13421
+ */
13422
+ var LocationIconAssignmentSchema = object({
13423
+ locationKey: string(),
13424
+ icon: LocationIconIdSchema
13425
+ });
13426
+ /**
13427
+ * One (location, description) assignment as it travels.
13428
+ *
13429
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13430
+ * reason: this lived for a while in the post-analysis addon's own settings,
13431
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13432
+ * the Locations page carried the icon and silently orphaned the description —
13433
+ * two authorities for one thing, joined by two different rules. Now both hang
13434
+ * off the location itself, on `locationIconKey`.
13435
+ */
13436
+ var LocationDescriptionAssignmentSchema = object({
13437
+ locationKey: string(),
13438
+ description: string()
13439
+ });
13440
+ /**
13441
+ * A SITE ZONE — a named part of the property that several locations belong to.
13442
+ *
13443
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13444
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13445
+ * one zone, so a camera's zone is derived and never stored on the device: the
13446
+ * whole point of this entity is that grouping rooms touches no device row.
13447
+ *
13448
+ * ## Why not `zone`
13449
+ *
13450
+ * Because `zone` is already the most loaded word in this product: 612 source
13451
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13452
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13453
+ * set of rooms — and a reader who confuses them will look for a camera's
13454
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13455
+ * word by calling the drawn one what it actually is: a detection zone.
13456
+ *
13457
+ * ## The key
13458
+ *
13459
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13460
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13461
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13462
+ * silently-dropped location description.
13463
+ *
13464
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13465
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13466
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13467
+ */
13468
+ /**
13469
+ * One zone as it travels: its key, the label the operator typed, its icon and
13470
+ * the locations inside it.
13471
+ *
13472
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13473
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13474
+ * here, rather than left to a second call, because every consumer wants both
13475
+ * at once and a viewer that asked twice could render a zone whose membership
13476
+ * it has not fetched yet.
13477
+ *
13478
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13479
+ * of those two is a choice, and a picker has to draw them differently.
13480
+ */
13481
+ var SiteZoneSchema = object({
13482
+ zoneKey: string(),
13483
+ label: string(),
13484
+ icon: LocationIconIdSchema.nullable(),
13485
+ /** Folded location keys, sorted. A location listed here need not be
13486
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13487
+ * the ones that most want grouping. */
13488
+ locationKeys: array(string())
13489
+ });
13389
13490
  var ProviderStatusSchema = object({
13390
13491
  connected: boolean(),
13391
13492
  deviceCount: number(),
@@ -13897,6 +13998,39 @@ method(object({
13897
13998
  }), object({ moved: number() }), {
13898
13999
  kind: "mutation",
13899
14000
  auth: "admin"
14001
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14002
+ location: string(),
14003
+ icon: LocationIconIdSchema.nullable()
14004
+ }), _void(), {
14005
+ kind: "mutation",
14006
+ auth: "admin"
14007
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14008
+ location: string(),
14009
+ description: string().max(400).nullable()
14010
+ }), _void(), {
14011
+ kind: "mutation",
14012
+ auth: "admin"
14013
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14014
+ name: string(),
14015
+ icon: LocationIconIdSchema.nullable().optional()
14016
+ }), _void(), {
14017
+ kind: "mutation",
14018
+ auth: "admin"
14019
+ }), method(object({ name: string() }), _void(), {
14020
+ kind: "mutation",
14021
+ auth: "admin"
14022
+ }), method(object({
14023
+ from: string(),
14024
+ to: string()
14025
+ }), _void(), {
14026
+ kind: "mutation",
14027
+ auth: "admin"
14028
+ }), method(object({
14029
+ location: string(),
14030
+ zone: string().nullable()
14031
+ }), _void(), {
14032
+ kind: "mutation",
14033
+ auth: "admin"
13900
14034
  }), method(object({
13901
14035
  deviceId: number(),
13902
14036
  disabled: boolean()
@@ -32734,6 +32868,18 @@ Object.freeze({
32734
32868
  addonId: null,
32735
32869
  access: "view"
32736
32870
  },
32871
+ "deviceManager.listLocationDescriptions": {
32872
+ capName: "device-manager",
32873
+ capScope: "system",
32874
+ addonId: null,
32875
+ access: "view"
32876
+ },
32877
+ "deviceManager.listLocationIcons": {
32878
+ capName: "device-manager",
32879
+ capScope: "system",
32880
+ addonId: null,
32881
+ access: "view"
32882
+ },
32737
32883
  "deviceManager.listLocations": {
32738
32884
  capName: "device-manager",
32739
32885
  capScope: "system",
@@ -32746,6 +32892,12 @@ Object.freeze({
32746
32892
  addonId: null,
32747
32893
  access: "view"
32748
32894
  },
32895
+ "deviceManager.listSiteZones": {
32896
+ capName: "device-manager",
32897
+ capScope: "system",
32898
+ addonId: null,
32899
+ access: "view"
32900
+ },
32749
32901
  "deviceManager.listWrappersForCap": {
32750
32902
  capName: "device-manager",
32751
32903
  capScope: "system",
@@ -32830,12 +32982,24 @@ Object.freeze({
32830
32982
  addonId: null,
32831
32983
  access: "delete"
32832
32984
  },
32985
+ "deviceManager.removeSiteZone": {
32986
+ capName: "device-manager",
32987
+ capScope: "system",
32988
+ addonId: null,
32989
+ access: "delete"
32990
+ },
32833
32991
  "deviceManager.renameLocation": {
32834
32992
  capName: "device-manager",
32835
32993
  capScope: "system",
32836
32994
  addonId: null,
32837
32995
  access: "create"
32838
32996
  },
32997
+ "deviceManager.renameSiteZone": {
32998
+ capName: "device-manager",
32999
+ capScope: "system",
33000
+ addonId: null,
33001
+ access: "create"
33002
+ },
32839
33003
  "deviceManager.runDeviceAction": {
32840
33004
  capName: "device-manager",
32841
33005
  capScope: "system",
@@ -32878,6 +33042,24 @@ Object.freeze({
32878
33042
  addonId: null,
32879
33043
  access: "create"
32880
33044
  },
33045
+ "deviceManager.setLocationDescription": {
33046
+ capName: "device-manager",
33047
+ capScope: "system",
33048
+ addonId: null,
33049
+ access: "create"
33050
+ },
33051
+ "deviceManager.setLocationIcon": {
33052
+ capName: "device-manager",
33053
+ capScope: "system",
33054
+ addonId: null,
33055
+ access: "create"
33056
+ },
33057
+ "deviceManager.setLocationZone": {
33058
+ capName: "device-manager",
33059
+ capScope: "system",
33060
+ addonId: null,
33061
+ access: "create"
33062
+ },
32881
33063
  "deviceManager.setMetadata": {
32882
33064
  capName: "device-manager",
32883
33065
  capScope: "system",
@@ -32908,6 +33090,12 @@ Object.freeze({
32908
33090
  addonId: null,
32909
33091
  access: "create"
32910
33092
  },
33093
+ "deviceManager.setSiteZone": {
33094
+ capName: "device-manager",
33095
+ capScope: "system",
33096
+ addonId: null,
33097
+ access: "create"
33098
+ },
32911
33099
  "deviceManager.setStreamProfileMap": {
32912
33100
  capName: "device-manager",
32913
33101
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.2.109",
3
+ "version": "1.2.111",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",