@camstack/addon-provider-tuya 0.2.106 → 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 +133 -0
- package/dist/addon.mjs +133 -0
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -14353,6 +14353,70 @@ var LocationIconAssignmentSchema = object({
|
|
|
14353
14353
|
locationKey: string(),
|
|
14354
14354
|
icon: LocationIconIdSchema
|
|
14355
14355
|
});
|
|
14356
|
+
/**
|
|
14357
|
+
* One (location, description) assignment as it travels.
|
|
14358
|
+
*
|
|
14359
|
+
* Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
|
|
14360
|
+
* reason: this lived for a while in the post-analysis addon's own settings,
|
|
14361
|
+
* keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
|
|
14362
|
+
* the Locations page carried the icon and silently orphaned the description —
|
|
14363
|
+
* two authorities for one thing, joined by two different rules. Now both hang
|
|
14364
|
+
* off the location itself, on `locationIconKey`.
|
|
14365
|
+
*/
|
|
14366
|
+
var LocationDescriptionAssignmentSchema = object({
|
|
14367
|
+
locationKey: string(),
|
|
14368
|
+
description: string()
|
|
14369
|
+
});
|
|
14370
|
+
/**
|
|
14371
|
+
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
14372
|
+
*
|
|
14373
|
+
* "Zona notte" holds every bedroom; "Zona giorno" the living room and the
|
|
14374
|
+
* kitchen. A camera belongs to exactly one location, and a location to at most
|
|
14375
|
+
* one zone, so a camera's zone is derived and never stored on the device: the
|
|
14376
|
+
* whole point of this entity is that grouping rooms touches no device row.
|
|
14377
|
+
*
|
|
14378
|
+
* ## Why not `zone`
|
|
14379
|
+
*
|
|
14380
|
+
* Because `zone` is already the most loaded word in this product: 612 source
|
|
14381
|
+
* files and 24 Italian strings where it means a DETECTION zone drawn on a
|
|
14382
|
+
* camera. The two are unrelated — one is a polygon in a frame, the other is a
|
|
14383
|
+
* set of rooms — and a reader who confuses them will look for a camera's
|
|
14384
|
+
* bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
|
|
14385
|
+
* word by calling the drawn one what it actually is: a detection zone.
|
|
14386
|
+
*
|
|
14387
|
+
* ## The key
|
|
14388
|
+
*
|
|
14389
|
+
* `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
|
|
14390
|
+
* use (`locationIconKey`). Membership and the icon both hang off it, so a
|
|
14391
|
+
* case-only rename keeps them, which is exactly the orphaning that cost us a
|
|
14392
|
+
* silently-dropped location description.
|
|
14393
|
+
*
|
|
14394
|
+
* The icon vocabulary is the location one, unchanged: a zone is drawn on the
|
|
14395
|
+
* same two surfaces by the same glyph map, so a second vocabulary would be a
|
|
14396
|
+
* second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
|
|
14397
|
+
*/
|
|
14398
|
+
/**
|
|
14399
|
+
* One zone as it travels: its key, the label the operator typed, its icon and
|
|
14400
|
+
* the locations inside it.
|
|
14401
|
+
*
|
|
14402
|
+
* The LABEL is carried alongside the key because the key is lossy on purpose —
|
|
14403
|
+
* a surface must show "Zona notte", not "zona notte". Locations are carried
|
|
14404
|
+
* here, rather than left to a second call, because every consumer wants both
|
|
14405
|
+
* at once and a viewer that asked twice could render a zone whose membership
|
|
14406
|
+
* it has not fetched yet.
|
|
14407
|
+
*
|
|
14408
|
+
* `icon: null` means nobody chose one, which is NOT the fallback pin: only one
|
|
14409
|
+
* of those two is a choice, and a picker has to draw them differently.
|
|
14410
|
+
*/
|
|
14411
|
+
var SiteZoneSchema = object({
|
|
14412
|
+
zoneKey: string(),
|
|
14413
|
+
label: string(),
|
|
14414
|
+
icon: LocationIconIdSchema.nullable(),
|
|
14415
|
+
/** Folded location keys, sorted. A location listed here need not be
|
|
14416
|
+
* REGISTERED — devices carry labels nobody registered, and those rooms are
|
|
14417
|
+
* the ones that most want grouping. */
|
|
14418
|
+
locationKeys: array(string())
|
|
14419
|
+
});
|
|
14356
14420
|
var ProviderStatusSchema = object({
|
|
14357
14421
|
connected: boolean(),
|
|
14358
14422
|
deviceCount: number(),
|
|
@@ -14951,6 +15015,33 @@ method(object({
|
|
|
14951
15015
|
}), _void(), {
|
|
14952
15016
|
kind: "mutation",
|
|
14953
15017
|
auth: "admin"
|
|
15018
|
+
}), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
|
|
15019
|
+
location: string(),
|
|
15020
|
+
description: string().max(400).nullable()
|
|
15021
|
+
}), _void(), {
|
|
15022
|
+
kind: "mutation",
|
|
15023
|
+
auth: "admin"
|
|
15024
|
+
}), method(_void(), array(SiteZoneSchema)), method(object({
|
|
15025
|
+
name: string(),
|
|
15026
|
+
icon: LocationIconIdSchema.nullable().optional()
|
|
15027
|
+
}), _void(), {
|
|
15028
|
+
kind: "mutation",
|
|
15029
|
+
auth: "admin"
|
|
15030
|
+
}), method(object({ name: string() }), _void(), {
|
|
15031
|
+
kind: "mutation",
|
|
15032
|
+
auth: "admin"
|
|
15033
|
+
}), method(object({
|
|
15034
|
+
from: string(),
|
|
15035
|
+
to: string()
|
|
15036
|
+
}), _void(), {
|
|
15037
|
+
kind: "mutation",
|
|
15038
|
+
auth: "admin"
|
|
15039
|
+
}), method(object({
|
|
15040
|
+
location: string(),
|
|
15041
|
+
zone: string().nullable()
|
|
15042
|
+
}), _void(), {
|
|
15043
|
+
kind: "mutation",
|
|
15044
|
+
auth: "admin"
|
|
14954
15045
|
}), method(object({
|
|
14955
15046
|
deviceId: number(),
|
|
14956
15047
|
disabled: boolean()
|
|
@@ -37869,6 +37960,12 @@ Object.freeze({
|
|
|
37869
37960
|
addonId: null,
|
|
37870
37961
|
access: "view"
|
|
37871
37962
|
},
|
|
37963
|
+
"deviceManager.listLocationDescriptions": {
|
|
37964
|
+
capName: "device-manager",
|
|
37965
|
+
capScope: "system",
|
|
37966
|
+
addonId: null,
|
|
37967
|
+
access: "view"
|
|
37968
|
+
},
|
|
37872
37969
|
"deviceManager.listLocationIcons": {
|
|
37873
37970
|
capName: "device-manager",
|
|
37874
37971
|
capScope: "system",
|
|
@@ -37887,6 +37984,12 @@ Object.freeze({
|
|
|
37887
37984
|
addonId: null,
|
|
37888
37985
|
access: "view"
|
|
37889
37986
|
},
|
|
37987
|
+
"deviceManager.listSiteZones": {
|
|
37988
|
+
capName: "device-manager",
|
|
37989
|
+
capScope: "system",
|
|
37990
|
+
addonId: null,
|
|
37991
|
+
access: "view"
|
|
37992
|
+
},
|
|
37890
37993
|
"deviceManager.listWrappersForCap": {
|
|
37891
37994
|
capName: "device-manager",
|
|
37892
37995
|
capScope: "system",
|
|
@@ -37971,12 +38074,24 @@ Object.freeze({
|
|
|
37971
38074
|
addonId: null,
|
|
37972
38075
|
access: "delete"
|
|
37973
38076
|
},
|
|
38077
|
+
"deviceManager.removeSiteZone": {
|
|
38078
|
+
capName: "device-manager",
|
|
38079
|
+
capScope: "system",
|
|
38080
|
+
addonId: null,
|
|
38081
|
+
access: "delete"
|
|
38082
|
+
},
|
|
37974
38083
|
"deviceManager.renameLocation": {
|
|
37975
38084
|
capName: "device-manager",
|
|
37976
38085
|
capScope: "system",
|
|
37977
38086
|
addonId: null,
|
|
37978
38087
|
access: "create"
|
|
37979
38088
|
},
|
|
38089
|
+
"deviceManager.renameSiteZone": {
|
|
38090
|
+
capName: "device-manager",
|
|
38091
|
+
capScope: "system",
|
|
38092
|
+
addonId: null,
|
|
38093
|
+
access: "create"
|
|
38094
|
+
},
|
|
37980
38095
|
"deviceManager.runDeviceAction": {
|
|
37981
38096
|
capName: "device-manager",
|
|
37982
38097
|
capScope: "system",
|
|
@@ -38019,12 +38134,24 @@ Object.freeze({
|
|
|
38019
38134
|
addonId: null,
|
|
38020
38135
|
access: "create"
|
|
38021
38136
|
},
|
|
38137
|
+
"deviceManager.setLocationDescription": {
|
|
38138
|
+
capName: "device-manager",
|
|
38139
|
+
capScope: "system",
|
|
38140
|
+
addonId: null,
|
|
38141
|
+
access: "create"
|
|
38142
|
+
},
|
|
38022
38143
|
"deviceManager.setLocationIcon": {
|
|
38023
38144
|
capName: "device-manager",
|
|
38024
38145
|
capScope: "system",
|
|
38025
38146
|
addonId: null,
|
|
38026
38147
|
access: "create"
|
|
38027
38148
|
},
|
|
38149
|
+
"deviceManager.setLocationZone": {
|
|
38150
|
+
capName: "device-manager",
|
|
38151
|
+
capScope: "system",
|
|
38152
|
+
addonId: null,
|
|
38153
|
+
access: "create"
|
|
38154
|
+
},
|
|
38028
38155
|
"deviceManager.setMetadata": {
|
|
38029
38156
|
capName: "device-manager",
|
|
38030
38157
|
capScope: "system",
|
|
@@ -38055,6 +38182,12 @@ Object.freeze({
|
|
|
38055
38182
|
addonId: null,
|
|
38056
38183
|
access: "create"
|
|
38057
38184
|
},
|
|
38185
|
+
"deviceManager.setSiteZone": {
|
|
38186
|
+
capName: "device-manager",
|
|
38187
|
+
capScope: "system",
|
|
38188
|
+
addonId: null,
|
|
38189
|
+
access: "create"
|
|
38190
|
+
},
|
|
38058
38191
|
"deviceManager.setStreamProfileMap": {
|
|
38059
38192
|
capName: "device-manager",
|
|
38060
38193
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -14352,6 +14352,70 @@ var LocationIconAssignmentSchema = object({
|
|
|
14352
14352
|
locationKey: string(),
|
|
14353
14353
|
icon: LocationIconIdSchema
|
|
14354
14354
|
});
|
|
14355
|
+
/**
|
|
14356
|
+
* One (location, description) assignment as it travels.
|
|
14357
|
+
*
|
|
14358
|
+
* Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
|
|
14359
|
+
* reason: this lived for a while in the post-analysis addon's own settings,
|
|
14360
|
+
* keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
|
|
14361
|
+
* the Locations page carried the icon and silently orphaned the description —
|
|
14362
|
+
* two authorities for one thing, joined by two different rules. Now both hang
|
|
14363
|
+
* off the location itself, on `locationIconKey`.
|
|
14364
|
+
*/
|
|
14365
|
+
var LocationDescriptionAssignmentSchema = object({
|
|
14366
|
+
locationKey: string(),
|
|
14367
|
+
description: string()
|
|
14368
|
+
});
|
|
14369
|
+
/**
|
|
14370
|
+
* A SITE ZONE — a named part of the property that several locations belong to.
|
|
14371
|
+
*
|
|
14372
|
+
* "Zona notte" holds every bedroom; "Zona giorno" the living room and the
|
|
14373
|
+
* kitchen. A camera belongs to exactly one location, and a location to at most
|
|
14374
|
+
* one zone, so a camera's zone is derived and never stored on the device: the
|
|
14375
|
+
* whole point of this entity is that grouping rooms touches no device row.
|
|
14376
|
+
*
|
|
14377
|
+
* ## Why not `zone`
|
|
14378
|
+
*
|
|
14379
|
+
* Because `zone` is already the most loaded word in this product: 612 source
|
|
14380
|
+
* files and 24 Italian strings where it means a DETECTION zone drawn on a
|
|
14381
|
+
* camera. The two are unrelated — one is a polygon in a frame, the other is a
|
|
14382
|
+
* set of rooms — and a reader who confuses them will look for a camera's
|
|
14383
|
+
* bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
|
|
14384
|
+
* word by calling the drawn one what it actually is: a detection zone.
|
|
14385
|
+
*
|
|
14386
|
+
* ## The key
|
|
14387
|
+
*
|
|
14388
|
+
* `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
|
|
14389
|
+
* use (`locationIconKey`). Membership and the icon both hang off it, so a
|
|
14390
|
+
* case-only rename keeps them, which is exactly the orphaning that cost us a
|
|
14391
|
+
* silently-dropped location description.
|
|
14392
|
+
*
|
|
14393
|
+
* The icon vocabulary is the location one, unchanged: a zone is drawn on the
|
|
14394
|
+
* same two surfaces by the same glyph map, so a second vocabulary would be a
|
|
14395
|
+
* second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
|
|
14396
|
+
*/
|
|
14397
|
+
/**
|
|
14398
|
+
* One zone as it travels: its key, the label the operator typed, its icon and
|
|
14399
|
+
* the locations inside it.
|
|
14400
|
+
*
|
|
14401
|
+
* The LABEL is carried alongside the key because the key is lossy on purpose —
|
|
14402
|
+
* a surface must show "Zona notte", not "zona notte". Locations are carried
|
|
14403
|
+
* here, rather than left to a second call, because every consumer wants both
|
|
14404
|
+
* at once and a viewer that asked twice could render a zone whose membership
|
|
14405
|
+
* it has not fetched yet.
|
|
14406
|
+
*
|
|
14407
|
+
* `icon: null` means nobody chose one, which is NOT the fallback pin: only one
|
|
14408
|
+
* of those two is a choice, and a picker has to draw them differently.
|
|
14409
|
+
*/
|
|
14410
|
+
var SiteZoneSchema = object({
|
|
14411
|
+
zoneKey: string(),
|
|
14412
|
+
label: string(),
|
|
14413
|
+
icon: LocationIconIdSchema.nullable(),
|
|
14414
|
+
/** Folded location keys, sorted. A location listed here need not be
|
|
14415
|
+
* REGISTERED — devices carry labels nobody registered, and those rooms are
|
|
14416
|
+
* the ones that most want grouping. */
|
|
14417
|
+
locationKeys: array(string())
|
|
14418
|
+
});
|
|
14355
14419
|
var ProviderStatusSchema = object({
|
|
14356
14420
|
connected: boolean(),
|
|
14357
14421
|
deviceCount: number(),
|
|
@@ -14950,6 +15014,33 @@ method(object({
|
|
|
14950
15014
|
}), _void(), {
|
|
14951
15015
|
kind: "mutation",
|
|
14952
15016
|
auth: "admin"
|
|
15017
|
+
}), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
|
|
15018
|
+
location: string(),
|
|
15019
|
+
description: string().max(400).nullable()
|
|
15020
|
+
}), _void(), {
|
|
15021
|
+
kind: "mutation",
|
|
15022
|
+
auth: "admin"
|
|
15023
|
+
}), method(_void(), array(SiteZoneSchema)), method(object({
|
|
15024
|
+
name: string(),
|
|
15025
|
+
icon: LocationIconIdSchema.nullable().optional()
|
|
15026
|
+
}), _void(), {
|
|
15027
|
+
kind: "mutation",
|
|
15028
|
+
auth: "admin"
|
|
15029
|
+
}), method(object({ name: string() }), _void(), {
|
|
15030
|
+
kind: "mutation",
|
|
15031
|
+
auth: "admin"
|
|
15032
|
+
}), method(object({
|
|
15033
|
+
from: string(),
|
|
15034
|
+
to: string()
|
|
15035
|
+
}), _void(), {
|
|
15036
|
+
kind: "mutation",
|
|
15037
|
+
auth: "admin"
|
|
15038
|
+
}), method(object({
|
|
15039
|
+
location: string(),
|
|
15040
|
+
zone: string().nullable()
|
|
15041
|
+
}), _void(), {
|
|
15042
|
+
kind: "mutation",
|
|
15043
|
+
auth: "admin"
|
|
14953
15044
|
}), method(object({
|
|
14954
15045
|
deviceId: number(),
|
|
14955
15046
|
disabled: boolean()
|
|
@@ -37868,6 +37959,12 @@ Object.freeze({
|
|
|
37868
37959
|
addonId: null,
|
|
37869
37960
|
access: "view"
|
|
37870
37961
|
},
|
|
37962
|
+
"deviceManager.listLocationDescriptions": {
|
|
37963
|
+
capName: "device-manager",
|
|
37964
|
+
capScope: "system",
|
|
37965
|
+
addonId: null,
|
|
37966
|
+
access: "view"
|
|
37967
|
+
},
|
|
37871
37968
|
"deviceManager.listLocationIcons": {
|
|
37872
37969
|
capName: "device-manager",
|
|
37873
37970
|
capScope: "system",
|
|
@@ -37886,6 +37983,12 @@ Object.freeze({
|
|
|
37886
37983
|
addonId: null,
|
|
37887
37984
|
access: "view"
|
|
37888
37985
|
},
|
|
37986
|
+
"deviceManager.listSiteZones": {
|
|
37987
|
+
capName: "device-manager",
|
|
37988
|
+
capScope: "system",
|
|
37989
|
+
addonId: null,
|
|
37990
|
+
access: "view"
|
|
37991
|
+
},
|
|
37889
37992
|
"deviceManager.listWrappersForCap": {
|
|
37890
37993
|
capName: "device-manager",
|
|
37891
37994
|
capScope: "system",
|
|
@@ -37970,12 +38073,24 @@ Object.freeze({
|
|
|
37970
38073
|
addonId: null,
|
|
37971
38074
|
access: "delete"
|
|
37972
38075
|
},
|
|
38076
|
+
"deviceManager.removeSiteZone": {
|
|
38077
|
+
capName: "device-manager",
|
|
38078
|
+
capScope: "system",
|
|
38079
|
+
addonId: null,
|
|
38080
|
+
access: "delete"
|
|
38081
|
+
},
|
|
37973
38082
|
"deviceManager.renameLocation": {
|
|
37974
38083
|
capName: "device-manager",
|
|
37975
38084
|
capScope: "system",
|
|
37976
38085
|
addonId: null,
|
|
37977
38086
|
access: "create"
|
|
37978
38087
|
},
|
|
38088
|
+
"deviceManager.renameSiteZone": {
|
|
38089
|
+
capName: "device-manager",
|
|
38090
|
+
capScope: "system",
|
|
38091
|
+
addonId: null,
|
|
38092
|
+
access: "create"
|
|
38093
|
+
},
|
|
37979
38094
|
"deviceManager.runDeviceAction": {
|
|
37980
38095
|
capName: "device-manager",
|
|
37981
38096
|
capScope: "system",
|
|
@@ -38018,12 +38133,24 @@ Object.freeze({
|
|
|
38018
38133
|
addonId: null,
|
|
38019
38134
|
access: "create"
|
|
38020
38135
|
},
|
|
38136
|
+
"deviceManager.setLocationDescription": {
|
|
38137
|
+
capName: "device-manager",
|
|
38138
|
+
capScope: "system",
|
|
38139
|
+
addonId: null,
|
|
38140
|
+
access: "create"
|
|
38141
|
+
},
|
|
38021
38142
|
"deviceManager.setLocationIcon": {
|
|
38022
38143
|
capName: "device-manager",
|
|
38023
38144
|
capScope: "system",
|
|
38024
38145
|
addonId: null,
|
|
38025
38146
|
access: "create"
|
|
38026
38147
|
},
|
|
38148
|
+
"deviceManager.setLocationZone": {
|
|
38149
|
+
capName: "device-manager",
|
|
38150
|
+
capScope: "system",
|
|
38151
|
+
addonId: null,
|
|
38152
|
+
access: "create"
|
|
38153
|
+
},
|
|
38027
38154
|
"deviceManager.setMetadata": {
|
|
38028
38155
|
capName: "device-manager",
|
|
38029
38156
|
capScope: "system",
|
|
@@ -38054,6 +38181,12 @@ Object.freeze({
|
|
|
38054
38181
|
addonId: null,
|
|
38055
38182
|
access: "create"
|
|
38056
38183
|
},
|
|
38184
|
+
"deviceManager.setSiteZone": {
|
|
38185
|
+
capName: "device-manager",
|
|
38186
|
+
capScope: "system",
|
|
38187
|
+
addonId: null,
|
|
38188
|
+
access: "create"
|
|
38189
|
+
},
|
|
38057
38190
|
"deviceManager.setStreamProfileMap": {
|
|
38058
38191
|
capName: "device-manager",
|
|
38059
38192
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.107",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|