@camstack/addon-provider-velux 0.2.105 → 0.2.107

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
@@ -13479,6 +13479,107 @@ var ExposeInputSchema = object({
13479
13479
  });
13480
13480
  var UnexposeInputSchema = object({ deviceId: string() });
13481
13481
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13482
+ /** Wire/storage schema for one icon id. */
13483
+ var LocationIconIdSchema = _enum([
13484
+ "map-pin",
13485
+ "house",
13486
+ "door-open",
13487
+ "sofa",
13488
+ "utensils",
13489
+ "bed-double",
13490
+ "bath",
13491
+ "briefcase",
13492
+ "car",
13493
+ "circle-parking",
13494
+ "route",
13495
+ "trees",
13496
+ "umbrella",
13497
+ "waves-ladder",
13498
+ "fence",
13499
+ "package",
13500
+ "warehouse",
13501
+ "store",
13502
+ "sun",
13503
+ "radar"
13504
+ ]);
13505
+ /**
13506
+ * One (location, icon) assignment as it travels.
13507
+ *
13508
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13509
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13510
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13511
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13512
+ * map keyed on the displayed casing would orphan its entry on exactly that
13513
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13514
+ */
13515
+ var LocationIconAssignmentSchema = object({
13516
+ locationKey: string(),
13517
+ icon: LocationIconIdSchema
13518
+ });
13519
+ /**
13520
+ * One (location, description) assignment as it travels.
13521
+ *
13522
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13523
+ * reason: this lived for a while in the post-analysis addon's own settings,
13524
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13525
+ * the Locations page carried the icon and silently orphaned the description —
13526
+ * two authorities for one thing, joined by two different rules. Now both hang
13527
+ * off the location itself, on `locationIconKey`.
13528
+ */
13529
+ var LocationDescriptionAssignmentSchema = object({
13530
+ locationKey: string(),
13531
+ description: string()
13532
+ });
13533
+ /**
13534
+ * A SITE ZONE — a named part of the property that several locations belong to.
13535
+ *
13536
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13537
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13538
+ * one zone, so a camera's zone is derived and never stored on the device: the
13539
+ * whole point of this entity is that grouping rooms touches no device row.
13540
+ *
13541
+ * ## Why not `zone`
13542
+ *
13543
+ * Because `zone` is already the most loaded word in this product: 612 source
13544
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13545
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13546
+ * set of rooms — and a reader who confuses them will look for a camera's
13547
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13548
+ * word by calling the drawn one what it actually is: a detection zone.
13549
+ *
13550
+ * ## The key
13551
+ *
13552
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13553
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13554
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13555
+ * silently-dropped location description.
13556
+ *
13557
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13558
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13559
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13560
+ */
13561
+ /**
13562
+ * One zone as it travels: its key, the label the operator typed, its icon and
13563
+ * the locations inside it.
13564
+ *
13565
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13566
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13567
+ * here, rather than left to a second call, because every consumer wants both
13568
+ * at once and a viewer that asked twice could render a zone whose membership
13569
+ * it has not fetched yet.
13570
+ *
13571
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13572
+ * of those two is a choice, and a picker has to draw them differently.
13573
+ */
13574
+ var SiteZoneSchema = object({
13575
+ zoneKey: string(),
13576
+ label: string(),
13577
+ icon: LocationIconIdSchema.nullable(),
13578
+ /** Folded location keys, sorted. A location listed here need not be
13579
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13580
+ * the ones that most want grouping. */
13581
+ locationKeys: array(string())
13582
+ });
13482
13583
  var ProviderStatusSchema = object({
13483
13584
  connected: boolean(),
13484
13585
  deviceCount: number(),
@@ -14071,6 +14172,39 @@ method(object({
14071
14172
  }), object({ moved: number() }), {
14072
14173
  kind: "mutation",
14073
14174
  auth: "admin"
14175
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14176
+ location: string(),
14177
+ icon: LocationIconIdSchema.nullable()
14178
+ }), _void(), {
14179
+ kind: "mutation",
14180
+ auth: "admin"
14181
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14182
+ location: string(),
14183
+ description: string().max(400).nullable()
14184
+ }), _void(), {
14185
+ kind: "mutation",
14186
+ auth: "admin"
14187
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14188
+ name: string(),
14189
+ icon: LocationIconIdSchema.nullable().optional()
14190
+ }), _void(), {
14191
+ kind: "mutation",
14192
+ auth: "admin"
14193
+ }), method(object({ name: string() }), _void(), {
14194
+ kind: "mutation",
14195
+ auth: "admin"
14196
+ }), method(object({
14197
+ from: string(),
14198
+ to: string()
14199
+ }), _void(), {
14200
+ kind: "mutation",
14201
+ auth: "admin"
14202
+ }), method(object({
14203
+ location: string(),
14204
+ zone: string().nullable()
14205
+ }), _void(), {
14206
+ kind: "mutation",
14207
+ auth: "admin"
14074
14208
  }), method(object({
14075
14209
  deviceId: number(),
14076
14210
  disabled: boolean()
@@ -36981,6 +37115,18 @@ Object.freeze({
36981
37115
  addonId: null,
36982
37116
  access: "view"
36983
37117
  },
37118
+ "deviceManager.listLocationDescriptions": {
37119
+ capName: "device-manager",
37120
+ capScope: "system",
37121
+ addonId: null,
37122
+ access: "view"
37123
+ },
37124
+ "deviceManager.listLocationIcons": {
37125
+ capName: "device-manager",
37126
+ capScope: "system",
37127
+ addonId: null,
37128
+ access: "view"
37129
+ },
36984
37130
  "deviceManager.listLocations": {
36985
37131
  capName: "device-manager",
36986
37132
  capScope: "system",
@@ -36993,6 +37139,12 @@ Object.freeze({
36993
37139
  addonId: null,
36994
37140
  access: "view"
36995
37141
  },
37142
+ "deviceManager.listSiteZones": {
37143
+ capName: "device-manager",
37144
+ capScope: "system",
37145
+ addonId: null,
37146
+ access: "view"
37147
+ },
36996
37148
  "deviceManager.listWrappersForCap": {
36997
37149
  capName: "device-manager",
36998
37150
  capScope: "system",
@@ -37077,12 +37229,24 @@ Object.freeze({
37077
37229
  addonId: null,
37078
37230
  access: "delete"
37079
37231
  },
37232
+ "deviceManager.removeSiteZone": {
37233
+ capName: "device-manager",
37234
+ capScope: "system",
37235
+ addonId: null,
37236
+ access: "delete"
37237
+ },
37080
37238
  "deviceManager.renameLocation": {
37081
37239
  capName: "device-manager",
37082
37240
  capScope: "system",
37083
37241
  addonId: null,
37084
37242
  access: "create"
37085
37243
  },
37244
+ "deviceManager.renameSiteZone": {
37245
+ capName: "device-manager",
37246
+ capScope: "system",
37247
+ addonId: null,
37248
+ access: "create"
37249
+ },
37086
37250
  "deviceManager.runDeviceAction": {
37087
37251
  capName: "device-manager",
37088
37252
  capScope: "system",
@@ -37125,6 +37289,24 @@ Object.freeze({
37125
37289
  addonId: null,
37126
37290
  access: "create"
37127
37291
  },
37292
+ "deviceManager.setLocationDescription": {
37293
+ capName: "device-manager",
37294
+ capScope: "system",
37295
+ addonId: null,
37296
+ access: "create"
37297
+ },
37298
+ "deviceManager.setLocationIcon": {
37299
+ capName: "device-manager",
37300
+ capScope: "system",
37301
+ addonId: null,
37302
+ access: "create"
37303
+ },
37304
+ "deviceManager.setLocationZone": {
37305
+ capName: "device-manager",
37306
+ capScope: "system",
37307
+ addonId: null,
37308
+ access: "create"
37309
+ },
37128
37310
  "deviceManager.setMetadata": {
37129
37311
  capName: "device-manager",
37130
37312
  capScope: "system",
@@ -37155,6 +37337,12 @@ Object.freeze({
37155
37337
  addonId: null,
37156
37338
  access: "create"
37157
37339
  },
37340
+ "deviceManager.setSiteZone": {
37341
+ capName: "device-manager",
37342
+ capScope: "system",
37343
+ addonId: null,
37344
+ access: "create"
37345
+ },
37158
37346
  "deviceManager.setStreamProfileMap": {
37159
37347
  capName: "device-manager",
37160
37348
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13478,6 +13478,107 @@ var ExposeInputSchema = object({
13478
13478
  });
13479
13479
  var UnexposeInputSchema = object({ deviceId: string() });
13480
13480
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13481
+ /** Wire/storage schema for one icon id. */
13482
+ var LocationIconIdSchema = _enum([
13483
+ "map-pin",
13484
+ "house",
13485
+ "door-open",
13486
+ "sofa",
13487
+ "utensils",
13488
+ "bed-double",
13489
+ "bath",
13490
+ "briefcase",
13491
+ "car",
13492
+ "circle-parking",
13493
+ "route",
13494
+ "trees",
13495
+ "umbrella",
13496
+ "waves-ladder",
13497
+ "fence",
13498
+ "package",
13499
+ "warehouse",
13500
+ "store",
13501
+ "sun",
13502
+ "radar"
13503
+ ]);
13504
+ /**
13505
+ * One (location, icon) assignment as it travels.
13506
+ *
13507
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13508
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13509
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13510
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13511
+ * map keyed on the displayed casing would orphan its entry on exactly that
13512
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13513
+ */
13514
+ var LocationIconAssignmentSchema = object({
13515
+ locationKey: string(),
13516
+ icon: LocationIconIdSchema
13517
+ });
13518
+ /**
13519
+ * One (location, description) assignment as it travels.
13520
+ *
13521
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13522
+ * reason: this lived for a while in the post-analysis addon's own settings,
13523
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13524
+ * the Locations page carried the icon and silently orphaned the description —
13525
+ * two authorities for one thing, joined by two different rules. Now both hang
13526
+ * off the location itself, on `locationIconKey`.
13527
+ */
13528
+ var LocationDescriptionAssignmentSchema = object({
13529
+ locationKey: string(),
13530
+ description: string()
13531
+ });
13532
+ /**
13533
+ * A SITE ZONE — a named part of the property that several locations belong to.
13534
+ *
13535
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13536
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13537
+ * one zone, so a camera's zone is derived and never stored on the device: the
13538
+ * whole point of this entity is that grouping rooms touches no device row.
13539
+ *
13540
+ * ## Why not `zone`
13541
+ *
13542
+ * Because `zone` is already the most loaded word in this product: 612 source
13543
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13544
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13545
+ * set of rooms — and a reader who confuses them will look for a camera's
13546
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13547
+ * word by calling the drawn one what it actually is: a detection zone.
13548
+ *
13549
+ * ## The key
13550
+ *
13551
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13552
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13553
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13554
+ * silently-dropped location description.
13555
+ *
13556
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13557
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13558
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13559
+ */
13560
+ /**
13561
+ * One zone as it travels: its key, the label the operator typed, its icon and
13562
+ * the locations inside it.
13563
+ *
13564
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13565
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13566
+ * here, rather than left to a second call, because every consumer wants both
13567
+ * at once and a viewer that asked twice could render a zone whose membership
13568
+ * it has not fetched yet.
13569
+ *
13570
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13571
+ * of those two is a choice, and a picker has to draw them differently.
13572
+ */
13573
+ var SiteZoneSchema = object({
13574
+ zoneKey: string(),
13575
+ label: string(),
13576
+ icon: LocationIconIdSchema.nullable(),
13577
+ /** Folded location keys, sorted. A location listed here need not be
13578
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13579
+ * the ones that most want grouping. */
13580
+ locationKeys: array(string())
13581
+ });
13481
13582
  var ProviderStatusSchema = object({
13482
13583
  connected: boolean(),
13483
13584
  deviceCount: number(),
@@ -14070,6 +14171,39 @@ method(object({
14070
14171
  }), object({ moved: number() }), {
14071
14172
  kind: "mutation",
14072
14173
  auth: "admin"
14174
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14175
+ location: string(),
14176
+ icon: LocationIconIdSchema.nullable()
14177
+ }), _void(), {
14178
+ kind: "mutation",
14179
+ auth: "admin"
14180
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14181
+ location: string(),
14182
+ description: string().max(400).nullable()
14183
+ }), _void(), {
14184
+ kind: "mutation",
14185
+ auth: "admin"
14186
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14187
+ name: string(),
14188
+ icon: LocationIconIdSchema.nullable().optional()
14189
+ }), _void(), {
14190
+ kind: "mutation",
14191
+ auth: "admin"
14192
+ }), method(object({ name: string() }), _void(), {
14193
+ kind: "mutation",
14194
+ auth: "admin"
14195
+ }), method(object({
14196
+ from: string(),
14197
+ to: string()
14198
+ }), _void(), {
14199
+ kind: "mutation",
14200
+ auth: "admin"
14201
+ }), method(object({
14202
+ location: string(),
14203
+ zone: string().nullable()
14204
+ }), _void(), {
14205
+ kind: "mutation",
14206
+ auth: "admin"
14073
14207
  }), method(object({
14074
14208
  deviceId: number(),
14075
14209
  disabled: boolean()
@@ -36980,6 +37114,18 @@ Object.freeze({
36980
37114
  addonId: null,
36981
37115
  access: "view"
36982
37116
  },
37117
+ "deviceManager.listLocationDescriptions": {
37118
+ capName: "device-manager",
37119
+ capScope: "system",
37120
+ addonId: null,
37121
+ access: "view"
37122
+ },
37123
+ "deviceManager.listLocationIcons": {
37124
+ capName: "device-manager",
37125
+ capScope: "system",
37126
+ addonId: null,
37127
+ access: "view"
37128
+ },
36983
37129
  "deviceManager.listLocations": {
36984
37130
  capName: "device-manager",
36985
37131
  capScope: "system",
@@ -36992,6 +37138,12 @@ Object.freeze({
36992
37138
  addonId: null,
36993
37139
  access: "view"
36994
37140
  },
37141
+ "deviceManager.listSiteZones": {
37142
+ capName: "device-manager",
37143
+ capScope: "system",
37144
+ addonId: null,
37145
+ access: "view"
37146
+ },
36995
37147
  "deviceManager.listWrappersForCap": {
36996
37148
  capName: "device-manager",
36997
37149
  capScope: "system",
@@ -37076,12 +37228,24 @@ Object.freeze({
37076
37228
  addonId: null,
37077
37229
  access: "delete"
37078
37230
  },
37231
+ "deviceManager.removeSiteZone": {
37232
+ capName: "device-manager",
37233
+ capScope: "system",
37234
+ addonId: null,
37235
+ access: "delete"
37236
+ },
37079
37237
  "deviceManager.renameLocation": {
37080
37238
  capName: "device-manager",
37081
37239
  capScope: "system",
37082
37240
  addonId: null,
37083
37241
  access: "create"
37084
37242
  },
37243
+ "deviceManager.renameSiteZone": {
37244
+ capName: "device-manager",
37245
+ capScope: "system",
37246
+ addonId: null,
37247
+ access: "create"
37248
+ },
37085
37249
  "deviceManager.runDeviceAction": {
37086
37250
  capName: "device-manager",
37087
37251
  capScope: "system",
@@ -37124,6 +37288,24 @@ Object.freeze({
37124
37288
  addonId: null,
37125
37289
  access: "create"
37126
37290
  },
37291
+ "deviceManager.setLocationDescription": {
37292
+ capName: "device-manager",
37293
+ capScope: "system",
37294
+ addonId: null,
37295
+ access: "create"
37296
+ },
37297
+ "deviceManager.setLocationIcon": {
37298
+ capName: "device-manager",
37299
+ capScope: "system",
37300
+ addonId: null,
37301
+ access: "create"
37302
+ },
37303
+ "deviceManager.setLocationZone": {
37304
+ capName: "device-manager",
37305
+ capScope: "system",
37306
+ addonId: null,
37307
+ access: "create"
37308
+ },
37127
37309
  "deviceManager.setMetadata": {
37128
37310
  capName: "device-manager",
37129
37311
  capScope: "system",
@@ -37154,6 +37336,12 @@ Object.freeze({
37154
37336
  addonId: null,
37155
37337
  access: "create"
37156
37338
  },
37339
+ "deviceManager.setSiteZone": {
37340
+ capName: "device-manager",
37341
+ capScope: "system",
37342
+ addonId: null,
37343
+ access: "create"
37344
+ },
37157
37345
  "deviceManager.setStreamProfileMap": {
37158
37346
  capName: "device-manager",
37159
37347
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-velux",
3
- "version": "0.2.105",
3
+ "version": "0.2.107",
4
4
  "description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
5
5
  "keywords": [
6
6
  "camstack",