@camstack/addon-provider-tuya 0.2.47 → 0.2.48
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 +72 -0
- package/dist/addon.mjs +72 -0
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -19932,6 +19932,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19932
19932
|
totalBytes: number().int(),
|
|
19933
19933
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19934
19934
|
});
|
|
19935
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19936
|
+
var EventMediaKindFootprintSchema = object({
|
|
19937
|
+
kind: MediaFileKindEnum,
|
|
19938
|
+
/** Media rows of this kind. */
|
|
19939
|
+
rows: number().int(),
|
|
19940
|
+
/** Bytes on disk held by those rows. */
|
|
19941
|
+
bytes: number().int()
|
|
19942
|
+
});
|
|
19943
|
+
/**
|
|
19944
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19945
|
+
* actually turns on.
|
|
19946
|
+
*
|
|
19947
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19948
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19949
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19950
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19951
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19952
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19953
|
+
*
|
|
19954
|
+
* ## Why `unaccounted*` exists
|
|
19955
|
+
*
|
|
19956
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19957
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19958
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19959
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19960
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19961
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19962
|
+
* against a denominator smaller than the disk.
|
|
19963
|
+
*
|
|
19964
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19965
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19966
|
+
*/
|
|
19967
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19968
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19969
|
+
totalRows: number().int(),
|
|
19970
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19971
|
+
totalBytes: number().int(),
|
|
19972
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19973
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19974
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19975
|
+
unaccountedRows: number().int(),
|
|
19976
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19977
|
+
unaccountedBytes: number().int()
|
|
19978
|
+
});
|
|
19935
19979
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19936
19980
|
var EventPruneCountsSchema = object({
|
|
19937
19981
|
motion: number().int(),
|
|
@@ -20135,6 +20179,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20135
20179
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
20136
20180
|
kind: "query",
|
|
20137
20181
|
auth: "admin"
|
|
20182
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
20183
|
+
kind: "query",
|
|
20184
|
+
auth: "admin"
|
|
20138
20185
|
}), method(object({
|
|
20139
20186
|
olderThanMs: number(),
|
|
20140
20187
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -22086,6 +22133,20 @@ method(object({
|
|
|
22086
22133
|
error: string().optional()
|
|
22087
22134
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
22088
22135
|
providerId: string(),
|
|
22136
|
+
/**
|
|
22137
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
22138
|
+
*
|
|
22139
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
22140
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
22141
|
+
* credential the operator did not retype — and posting that here
|
|
22142
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
22143
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
22144
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
22145
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
22146
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
22147
|
+
* every value was typed just now and nothing is stored yet.
|
|
22148
|
+
*/
|
|
22149
|
+
locationId: string().optional(),
|
|
22089
22150
|
config: record(string(), unknown())
|
|
22090
22151
|
}), object({
|
|
22091
22152
|
ok: boolean(),
|
|
@@ -36132,6 +36193,12 @@ Object.freeze({
|
|
|
36132
36193
|
addonId: null,
|
|
36133
36194
|
access: "view"
|
|
36134
36195
|
},
|
|
36196
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
36197
|
+
capName: "pipeline-analytics",
|
|
36198
|
+
capScope: "device",
|
|
36199
|
+
addonId: null,
|
|
36200
|
+
access: "view"
|
|
36201
|
+
},
|
|
36135
36202
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
36136
36203
|
capName: "pipeline-analytics",
|
|
36137
36204
|
capScope: "device",
|
|
@@ -39797,6 +39864,11 @@ Object.freeze({
|
|
|
39797
39864
|
form: "single",
|
|
39798
39865
|
optional: false
|
|
39799
39866
|
}],
|
|
39867
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39868
|
+
name: "deviceId",
|
|
39869
|
+
form: "single",
|
|
39870
|
+
optional: true
|
|
39871
|
+
}],
|
|
39800
39872
|
"pipelineAnalytics.getGroup": [{
|
|
39801
39873
|
name: "deviceId",
|
|
39802
39874
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -19931,6 +19931,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19931
19931
|
totalBytes: number().int(),
|
|
19932
19932
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19933
19933
|
});
|
|
19934
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19935
|
+
var EventMediaKindFootprintSchema = object({
|
|
19936
|
+
kind: MediaFileKindEnum,
|
|
19937
|
+
/** Media rows of this kind. */
|
|
19938
|
+
rows: number().int(),
|
|
19939
|
+
/** Bytes on disk held by those rows. */
|
|
19940
|
+
bytes: number().int()
|
|
19941
|
+
});
|
|
19942
|
+
/**
|
|
19943
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19944
|
+
* actually turns on.
|
|
19945
|
+
*
|
|
19946
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19947
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19948
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19949
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19950
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19951
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19952
|
+
*
|
|
19953
|
+
* ## Why `unaccounted*` exists
|
|
19954
|
+
*
|
|
19955
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19956
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19957
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19958
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19959
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19960
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19961
|
+
* against a denominator smaller than the disk.
|
|
19962
|
+
*
|
|
19963
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19964
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19965
|
+
*/
|
|
19966
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19967
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19968
|
+
totalRows: number().int(),
|
|
19969
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19970
|
+
totalBytes: number().int(),
|
|
19971
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19972
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19973
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19974
|
+
unaccountedRows: number().int(),
|
|
19975
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19976
|
+
unaccountedBytes: number().int()
|
|
19977
|
+
});
|
|
19934
19978
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19935
19979
|
var EventPruneCountsSchema = object({
|
|
19936
19980
|
motion: number().int(),
|
|
@@ -20134,6 +20178,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20134
20178
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
20135
20179
|
kind: "query",
|
|
20136
20180
|
auth: "admin"
|
|
20181
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
20182
|
+
kind: "query",
|
|
20183
|
+
auth: "admin"
|
|
20137
20184
|
}), method(object({
|
|
20138
20185
|
olderThanMs: number(),
|
|
20139
20186
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -22085,6 +22132,20 @@ method(object({
|
|
|
22085
22132
|
error: string().optional()
|
|
22086
22133
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
22087
22134
|
providerId: string(),
|
|
22135
|
+
/**
|
|
22136
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
22137
|
+
*
|
|
22138
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
22139
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
22140
|
+
* credential the operator did not retype — and posting that here
|
|
22141
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
22142
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
22143
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
22144
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
22145
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
22146
|
+
* every value was typed just now and nothing is stored yet.
|
|
22147
|
+
*/
|
|
22148
|
+
locationId: string().optional(),
|
|
22088
22149
|
config: record(string(), unknown())
|
|
22089
22150
|
}), object({
|
|
22090
22151
|
ok: boolean(),
|
|
@@ -36131,6 +36192,12 @@ Object.freeze({
|
|
|
36131
36192
|
addonId: null,
|
|
36132
36193
|
access: "view"
|
|
36133
36194
|
},
|
|
36195
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
36196
|
+
capName: "pipeline-analytics",
|
|
36197
|
+
capScope: "device",
|
|
36198
|
+
addonId: null,
|
|
36199
|
+
access: "view"
|
|
36200
|
+
},
|
|
36134
36201
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
36135
36202
|
capName: "pipeline-analytics",
|
|
36136
36203
|
capScope: "device",
|
|
@@ -39796,6 +39863,11 @@ Object.freeze({
|
|
|
39796
39863
|
form: "single",
|
|
39797
39864
|
optional: false
|
|
39798
39865
|
}],
|
|
39866
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39867
|
+
name: "deviceId",
|
|
39868
|
+
form: "single",
|
|
39869
|
+
optional: true
|
|
39870
|
+
}],
|
|
39799
39871
|
"pipelineAnalytics.getGroup": [{
|
|
39800
39872
|
name: "deviceId",
|
|
39801
39873
|
form: "single",
|
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.48",
|
|
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",
|