@camstack/addon-provider-wyze 0.2.109 → 0.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
@@ -13528,6 +13528,107 @@ var ExposeInputSchema = object({
13528
13528
  });
13529
13529
  var UnexposeInputSchema = object({ deviceId: string() });
13530
13530
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13531
+ /** Wire/storage schema for one icon id. */
13532
+ var LocationIconIdSchema = _enum([
13533
+ "map-pin",
13534
+ "house",
13535
+ "door-open",
13536
+ "sofa",
13537
+ "utensils",
13538
+ "bed-double",
13539
+ "bath",
13540
+ "briefcase",
13541
+ "car",
13542
+ "circle-parking",
13543
+ "route",
13544
+ "trees",
13545
+ "umbrella",
13546
+ "waves-ladder",
13547
+ "fence",
13548
+ "package",
13549
+ "warehouse",
13550
+ "store",
13551
+ "sun",
13552
+ "radar"
13553
+ ]);
13554
+ /**
13555
+ * One (location, icon) assignment as it travels.
13556
+ *
13557
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13558
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13559
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13560
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13561
+ * map keyed on the displayed casing would orphan its entry on exactly that
13562
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13563
+ */
13564
+ var LocationIconAssignmentSchema = object({
13565
+ locationKey: string(),
13566
+ icon: LocationIconIdSchema
13567
+ });
13568
+ /**
13569
+ * One (location, description) assignment as it travels.
13570
+ *
13571
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13572
+ * reason: this lived for a while in the post-analysis addon's own settings,
13573
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13574
+ * the Locations page carried the icon and silently orphaned the description —
13575
+ * two authorities for one thing, joined by two different rules. Now both hang
13576
+ * off the location itself, on `locationIconKey`.
13577
+ */
13578
+ var LocationDescriptionAssignmentSchema = object({
13579
+ locationKey: string(),
13580
+ description: string()
13581
+ });
13582
+ /**
13583
+ * A SITE ZONE — a named part of the property that several locations belong to.
13584
+ *
13585
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13586
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13587
+ * one zone, so a camera's zone is derived and never stored on the device: the
13588
+ * whole point of this entity is that grouping rooms touches no device row.
13589
+ *
13590
+ * ## Why not `zone`
13591
+ *
13592
+ * Because `zone` is already the most loaded word in this product: 612 source
13593
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13594
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13595
+ * set of rooms — and a reader who confuses them will look for a camera's
13596
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13597
+ * word by calling the drawn one what it actually is: a detection zone.
13598
+ *
13599
+ * ## The key
13600
+ *
13601
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13602
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13603
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13604
+ * silently-dropped location description.
13605
+ *
13606
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13607
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13608
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13609
+ */
13610
+ /**
13611
+ * One zone as it travels: its key, the label the operator typed, its icon and
13612
+ * the locations inside it.
13613
+ *
13614
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13615
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13616
+ * here, rather than left to a second call, because every consumer wants both
13617
+ * at once and a viewer that asked twice could render a zone whose membership
13618
+ * it has not fetched yet.
13619
+ *
13620
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13621
+ * of those two is a choice, and a picker has to draw them differently.
13622
+ */
13623
+ var SiteZoneSchema = object({
13624
+ zoneKey: string(),
13625
+ label: string(),
13626
+ icon: LocationIconIdSchema.nullable(),
13627
+ /** Folded location keys, sorted. A location listed here need not be
13628
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13629
+ * the ones that most want grouping. */
13630
+ locationKeys: array(string())
13631
+ });
13531
13632
  var ProviderStatusSchema = object({
13532
13633
  connected: boolean(),
13533
13634
  deviceCount: number(),
@@ -14120,6 +14221,39 @@ method(object({
14120
14221
  }), object({ moved: number() }), {
14121
14222
  kind: "mutation",
14122
14223
  auth: "admin"
14224
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14225
+ location: string(),
14226
+ icon: LocationIconIdSchema.nullable()
14227
+ }), _void(), {
14228
+ kind: "mutation",
14229
+ auth: "admin"
14230
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14231
+ location: string(),
14232
+ description: string().max(400).nullable()
14233
+ }), _void(), {
14234
+ kind: "mutation",
14235
+ auth: "admin"
14236
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14237
+ name: string(),
14238
+ icon: LocationIconIdSchema.nullable().optional()
14239
+ }), _void(), {
14240
+ kind: "mutation",
14241
+ auth: "admin"
14242
+ }), method(object({ name: string() }), _void(), {
14243
+ kind: "mutation",
14244
+ auth: "admin"
14245
+ }), method(object({
14246
+ from: string(),
14247
+ to: string()
14248
+ }), _void(), {
14249
+ kind: "mutation",
14250
+ auth: "admin"
14251
+ }), method(object({
14252
+ location: string(),
14253
+ zone: string().nullable()
14254
+ }), _void(), {
14255
+ kind: "mutation",
14256
+ auth: "admin"
14123
14257
  }), method(object({
14124
14258
  deviceId: number(),
14125
14259
  disabled: boolean()
@@ -37142,6 +37276,18 @@ Object.freeze({
37142
37276
  addonId: null,
37143
37277
  access: "view"
37144
37278
  },
37279
+ "deviceManager.listLocationDescriptions": {
37280
+ capName: "device-manager",
37281
+ capScope: "system",
37282
+ addonId: null,
37283
+ access: "view"
37284
+ },
37285
+ "deviceManager.listLocationIcons": {
37286
+ capName: "device-manager",
37287
+ capScope: "system",
37288
+ addonId: null,
37289
+ access: "view"
37290
+ },
37145
37291
  "deviceManager.listLocations": {
37146
37292
  capName: "device-manager",
37147
37293
  capScope: "system",
@@ -37154,6 +37300,12 @@ Object.freeze({
37154
37300
  addonId: null,
37155
37301
  access: "view"
37156
37302
  },
37303
+ "deviceManager.listSiteZones": {
37304
+ capName: "device-manager",
37305
+ capScope: "system",
37306
+ addonId: null,
37307
+ access: "view"
37308
+ },
37157
37309
  "deviceManager.listWrappersForCap": {
37158
37310
  capName: "device-manager",
37159
37311
  capScope: "system",
@@ -37238,12 +37390,24 @@ Object.freeze({
37238
37390
  addonId: null,
37239
37391
  access: "delete"
37240
37392
  },
37393
+ "deviceManager.removeSiteZone": {
37394
+ capName: "device-manager",
37395
+ capScope: "system",
37396
+ addonId: null,
37397
+ access: "delete"
37398
+ },
37241
37399
  "deviceManager.renameLocation": {
37242
37400
  capName: "device-manager",
37243
37401
  capScope: "system",
37244
37402
  addonId: null,
37245
37403
  access: "create"
37246
37404
  },
37405
+ "deviceManager.renameSiteZone": {
37406
+ capName: "device-manager",
37407
+ capScope: "system",
37408
+ addonId: null,
37409
+ access: "create"
37410
+ },
37247
37411
  "deviceManager.runDeviceAction": {
37248
37412
  capName: "device-manager",
37249
37413
  capScope: "system",
@@ -37286,6 +37450,24 @@ Object.freeze({
37286
37450
  addonId: null,
37287
37451
  access: "create"
37288
37452
  },
37453
+ "deviceManager.setLocationDescription": {
37454
+ capName: "device-manager",
37455
+ capScope: "system",
37456
+ addonId: null,
37457
+ access: "create"
37458
+ },
37459
+ "deviceManager.setLocationIcon": {
37460
+ capName: "device-manager",
37461
+ capScope: "system",
37462
+ addonId: null,
37463
+ access: "create"
37464
+ },
37465
+ "deviceManager.setLocationZone": {
37466
+ capName: "device-manager",
37467
+ capScope: "system",
37468
+ addonId: null,
37469
+ access: "create"
37470
+ },
37289
37471
  "deviceManager.setMetadata": {
37290
37472
  capName: "device-manager",
37291
37473
  capScope: "system",
@@ -37316,6 +37498,12 @@ Object.freeze({
37316
37498
  addonId: null,
37317
37499
  access: "create"
37318
37500
  },
37501
+ "deviceManager.setSiteZone": {
37502
+ capName: "device-manager",
37503
+ capScope: "system",
37504
+ addonId: null,
37505
+ access: "create"
37506
+ },
37319
37507
  "deviceManager.setStreamProfileMap": {
37320
37508
  capName: "device-manager",
37321
37509
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13507,6 +13507,107 @@ var ExposeInputSchema = object({
13507
13507
  });
13508
13508
  var UnexposeInputSchema = object({ deviceId: string() });
13509
13509
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13510
+ /** Wire/storage schema for one icon id. */
13511
+ var LocationIconIdSchema = _enum([
13512
+ "map-pin",
13513
+ "house",
13514
+ "door-open",
13515
+ "sofa",
13516
+ "utensils",
13517
+ "bed-double",
13518
+ "bath",
13519
+ "briefcase",
13520
+ "car",
13521
+ "circle-parking",
13522
+ "route",
13523
+ "trees",
13524
+ "umbrella",
13525
+ "waves-ladder",
13526
+ "fence",
13527
+ "package",
13528
+ "warehouse",
13529
+ "store",
13530
+ "sun",
13531
+ "radar"
13532
+ ]);
13533
+ /**
13534
+ * One (location, icon) assignment as it travels.
13535
+ *
13536
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13537
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13538
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13539
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13540
+ * map keyed on the displayed casing would orphan its entry on exactly that
13541
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13542
+ */
13543
+ var LocationIconAssignmentSchema = object({
13544
+ locationKey: string(),
13545
+ icon: LocationIconIdSchema
13546
+ });
13547
+ /**
13548
+ * One (location, description) assignment as it travels.
13549
+ *
13550
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13551
+ * reason: this lived for a while in the post-analysis addon's own settings,
13552
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13553
+ * the Locations page carried the icon and silently orphaned the description —
13554
+ * two authorities for one thing, joined by two different rules. Now both hang
13555
+ * off the location itself, on `locationIconKey`.
13556
+ */
13557
+ var LocationDescriptionAssignmentSchema = object({
13558
+ locationKey: string(),
13559
+ description: string()
13560
+ });
13561
+ /**
13562
+ * A SITE ZONE — a named part of the property that several locations belong to.
13563
+ *
13564
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13565
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13566
+ * one zone, so a camera's zone is derived and never stored on the device: the
13567
+ * whole point of this entity is that grouping rooms touches no device row.
13568
+ *
13569
+ * ## Why not `zone`
13570
+ *
13571
+ * Because `zone` is already the most loaded word in this product: 612 source
13572
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13573
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13574
+ * set of rooms — and a reader who confuses them will look for a camera's
13575
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13576
+ * word by calling the drawn one what it actually is: a detection zone.
13577
+ *
13578
+ * ## The key
13579
+ *
13580
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13581
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13582
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13583
+ * silently-dropped location description.
13584
+ *
13585
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13586
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13587
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13588
+ */
13589
+ /**
13590
+ * One zone as it travels: its key, the label the operator typed, its icon and
13591
+ * the locations inside it.
13592
+ *
13593
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13594
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13595
+ * here, rather than left to a second call, because every consumer wants both
13596
+ * at once and a viewer that asked twice could render a zone whose membership
13597
+ * it has not fetched yet.
13598
+ *
13599
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13600
+ * of those two is a choice, and a picker has to draw them differently.
13601
+ */
13602
+ var SiteZoneSchema = object({
13603
+ zoneKey: string(),
13604
+ label: string(),
13605
+ icon: LocationIconIdSchema.nullable(),
13606
+ /** Folded location keys, sorted. A location listed here need not be
13607
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13608
+ * the ones that most want grouping. */
13609
+ locationKeys: array(string())
13610
+ });
13510
13611
  var ProviderStatusSchema = object({
13511
13612
  connected: boolean(),
13512
13613
  deviceCount: number(),
@@ -14099,6 +14200,39 @@ method(object({
14099
14200
  }), object({ moved: number() }), {
14100
14201
  kind: "mutation",
14101
14202
  auth: "admin"
14203
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
14204
+ location: string(),
14205
+ icon: LocationIconIdSchema.nullable()
14206
+ }), _void(), {
14207
+ kind: "mutation",
14208
+ auth: "admin"
14209
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
14210
+ location: string(),
14211
+ description: string().max(400).nullable()
14212
+ }), _void(), {
14213
+ kind: "mutation",
14214
+ auth: "admin"
14215
+ }), method(_void(), array(SiteZoneSchema)), method(object({
14216
+ name: string(),
14217
+ icon: LocationIconIdSchema.nullable().optional()
14218
+ }), _void(), {
14219
+ kind: "mutation",
14220
+ auth: "admin"
14221
+ }), method(object({ name: string() }), _void(), {
14222
+ kind: "mutation",
14223
+ auth: "admin"
14224
+ }), method(object({
14225
+ from: string(),
14226
+ to: string()
14227
+ }), _void(), {
14228
+ kind: "mutation",
14229
+ auth: "admin"
14230
+ }), method(object({
14231
+ location: string(),
14232
+ zone: string().nullable()
14233
+ }), _void(), {
14234
+ kind: "mutation",
14235
+ auth: "admin"
14102
14236
  }), method(object({
14103
14237
  deviceId: number(),
14104
14238
  disabled: boolean()
@@ -37121,6 +37255,18 @@ Object.freeze({
37121
37255
  addonId: null,
37122
37256
  access: "view"
37123
37257
  },
37258
+ "deviceManager.listLocationDescriptions": {
37259
+ capName: "device-manager",
37260
+ capScope: "system",
37261
+ addonId: null,
37262
+ access: "view"
37263
+ },
37264
+ "deviceManager.listLocationIcons": {
37265
+ capName: "device-manager",
37266
+ capScope: "system",
37267
+ addonId: null,
37268
+ access: "view"
37269
+ },
37124
37270
  "deviceManager.listLocations": {
37125
37271
  capName: "device-manager",
37126
37272
  capScope: "system",
@@ -37133,6 +37279,12 @@ Object.freeze({
37133
37279
  addonId: null,
37134
37280
  access: "view"
37135
37281
  },
37282
+ "deviceManager.listSiteZones": {
37283
+ capName: "device-manager",
37284
+ capScope: "system",
37285
+ addonId: null,
37286
+ access: "view"
37287
+ },
37136
37288
  "deviceManager.listWrappersForCap": {
37137
37289
  capName: "device-manager",
37138
37290
  capScope: "system",
@@ -37217,12 +37369,24 @@ Object.freeze({
37217
37369
  addonId: null,
37218
37370
  access: "delete"
37219
37371
  },
37372
+ "deviceManager.removeSiteZone": {
37373
+ capName: "device-manager",
37374
+ capScope: "system",
37375
+ addonId: null,
37376
+ access: "delete"
37377
+ },
37220
37378
  "deviceManager.renameLocation": {
37221
37379
  capName: "device-manager",
37222
37380
  capScope: "system",
37223
37381
  addonId: null,
37224
37382
  access: "create"
37225
37383
  },
37384
+ "deviceManager.renameSiteZone": {
37385
+ capName: "device-manager",
37386
+ capScope: "system",
37387
+ addonId: null,
37388
+ access: "create"
37389
+ },
37226
37390
  "deviceManager.runDeviceAction": {
37227
37391
  capName: "device-manager",
37228
37392
  capScope: "system",
@@ -37265,6 +37429,24 @@ Object.freeze({
37265
37429
  addonId: null,
37266
37430
  access: "create"
37267
37431
  },
37432
+ "deviceManager.setLocationDescription": {
37433
+ capName: "device-manager",
37434
+ capScope: "system",
37435
+ addonId: null,
37436
+ access: "create"
37437
+ },
37438
+ "deviceManager.setLocationIcon": {
37439
+ capName: "device-manager",
37440
+ capScope: "system",
37441
+ addonId: null,
37442
+ access: "create"
37443
+ },
37444
+ "deviceManager.setLocationZone": {
37445
+ capName: "device-manager",
37446
+ capScope: "system",
37447
+ addonId: null,
37448
+ access: "create"
37449
+ },
37268
37450
  "deviceManager.setMetadata": {
37269
37451
  capName: "device-manager",
37270
37452
  capScope: "system",
@@ -37295,6 +37477,12 @@ Object.freeze({
37295
37477
  addonId: null,
37296
37478
  access: "create"
37297
37479
  },
37480
+ "deviceManager.setSiteZone": {
37481
+ capName: "device-manager",
37482
+ capScope: "system",
37483
+ addonId: null,
37484
+ access: "create"
37485
+ },
37298
37486
  "deviceManager.setStreamProfileMap": {
37299
37487
  capName: "device-manager",
37300
37488
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.109",
3
+ "version": "0.2.111",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",