@camstack/addon-provider-unifi 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
|
@@ -19095,6 +19095,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19095
19095
|
totalBytes: number().int(),
|
|
19096
19096
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19097
19097
|
});
|
|
19098
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19099
|
+
var EventMediaKindFootprintSchema = object({
|
|
19100
|
+
kind: MediaFileKindEnum,
|
|
19101
|
+
/** Media rows of this kind. */
|
|
19102
|
+
rows: number().int(),
|
|
19103
|
+
/** Bytes on disk held by those rows. */
|
|
19104
|
+
bytes: number().int()
|
|
19105
|
+
});
|
|
19106
|
+
/**
|
|
19107
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19108
|
+
* actually turns on.
|
|
19109
|
+
*
|
|
19110
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19111
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19112
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19113
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19114
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19115
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19116
|
+
*
|
|
19117
|
+
* ## Why `unaccounted*` exists
|
|
19118
|
+
*
|
|
19119
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19120
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19121
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19122
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19123
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19124
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19125
|
+
* against a denominator smaller than the disk.
|
|
19126
|
+
*
|
|
19127
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19128
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19129
|
+
*/
|
|
19130
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19131
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19132
|
+
totalRows: number().int(),
|
|
19133
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19134
|
+
totalBytes: number().int(),
|
|
19135
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19136
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19137
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19138
|
+
unaccountedRows: number().int(),
|
|
19139
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19140
|
+
unaccountedBytes: number().int()
|
|
19141
|
+
});
|
|
19098
19142
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19099
19143
|
var EventPruneCountsSchema = object({
|
|
19100
19144
|
motion: number().int(),
|
|
@@ -19298,6 +19342,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19298
19342
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19299
19343
|
kind: "query",
|
|
19300
19344
|
auth: "admin"
|
|
19345
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19346
|
+
kind: "query",
|
|
19347
|
+
auth: "admin"
|
|
19301
19348
|
}), method(object({
|
|
19302
19349
|
olderThanMs: number(),
|
|
19303
19350
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21249,6 +21296,20 @@ method(object({
|
|
|
21249
21296
|
error: string().optional()
|
|
21250
21297
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21251
21298
|
providerId: string(),
|
|
21299
|
+
/**
|
|
21300
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21301
|
+
*
|
|
21302
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21303
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21304
|
+
* credential the operator did not retype — and posting that here
|
|
21305
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21306
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21307
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21308
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21309
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21310
|
+
* every value was typed just now and nothing is stored yet.
|
|
21311
|
+
*/
|
|
21312
|
+
locationId: string().optional(),
|
|
21252
21313
|
config: record(string(), unknown())
|
|
21253
21314
|
}), object({
|
|
21254
21315
|
ok: boolean(),
|
|
@@ -35304,6 +35365,12 @@ Object.freeze({
|
|
|
35304
35365
|
addonId: null,
|
|
35305
35366
|
access: "view"
|
|
35306
35367
|
},
|
|
35368
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35369
|
+
capName: "pipeline-analytics",
|
|
35370
|
+
capScope: "device",
|
|
35371
|
+
addonId: null,
|
|
35372
|
+
access: "view"
|
|
35373
|
+
},
|
|
35307
35374
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35308
35375
|
capName: "pipeline-analytics",
|
|
35309
35376
|
capScope: "device",
|
|
@@ -38969,6 +39036,11 @@ Object.freeze({
|
|
|
38969
39036
|
form: "single",
|
|
38970
39037
|
optional: false
|
|
38971
39038
|
}],
|
|
39039
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39040
|
+
name: "deviceId",
|
|
39041
|
+
form: "single",
|
|
39042
|
+
optional: true
|
|
39043
|
+
}],
|
|
38972
39044
|
"pipelineAnalytics.getGroup": [{
|
|
38973
39045
|
name: "deviceId",
|
|
38974
39046
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -19094,6 +19094,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19094
19094
|
totalBytes: number().int(),
|
|
19095
19095
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19096
19096
|
});
|
|
19097
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19098
|
+
var EventMediaKindFootprintSchema = object({
|
|
19099
|
+
kind: MediaFileKindEnum,
|
|
19100
|
+
/** Media rows of this kind. */
|
|
19101
|
+
rows: number().int(),
|
|
19102
|
+
/** Bytes on disk held by those rows. */
|
|
19103
|
+
bytes: number().int()
|
|
19104
|
+
});
|
|
19105
|
+
/**
|
|
19106
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19107
|
+
* actually turns on.
|
|
19108
|
+
*
|
|
19109
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19110
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19111
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19112
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19113
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19114
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19115
|
+
*
|
|
19116
|
+
* ## Why `unaccounted*` exists
|
|
19117
|
+
*
|
|
19118
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19119
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19120
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19121
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19122
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19123
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19124
|
+
* against a denominator smaller than the disk.
|
|
19125
|
+
*
|
|
19126
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19127
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19128
|
+
*/
|
|
19129
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19130
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19131
|
+
totalRows: number().int(),
|
|
19132
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19133
|
+
totalBytes: number().int(),
|
|
19134
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19135
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19136
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19137
|
+
unaccountedRows: number().int(),
|
|
19138
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19139
|
+
unaccountedBytes: number().int()
|
|
19140
|
+
});
|
|
19097
19141
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19098
19142
|
var EventPruneCountsSchema = object({
|
|
19099
19143
|
motion: number().int(),
|
|
@@ -19297,6 +19341,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19297
19341
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19298
19342
|
kind: "query",
|
|
19299
19343
|
auth: "admin"
|
|
19344
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19345
|
+
kind: "query",
|
|
19346
|
+
auth: "admin"
|
|
19300
19347
|
}), method(object({
|
|
19301
19348
|
olderThanMs: number(),
|
|
19302
19349
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21248,6 +21295,20 @@ method(object({
|
|
|
21248
21295
|
error: string().optional()
|
|
21249
21296
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21250
21297
|
providerId: string(),
|
|
21298
|
+
/**
|
|
21299
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21300
|
+
*
|
|
21301
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21302
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21303
|
+
* credential the operator did not retype — and posting that here
|
|
21304
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21305
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21306
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21307
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21308
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21309
|
+
* every value was typed just now and nothing is stored yet.
|
|
21310
|
+
*/
|
|
21311
|
+
locationId: string().optional(),
|
|
21251
21312
|
config: record(string(), unknown())
|
|
21252
21313
|
}), object({
|
|
21253
21314
|
ok: boolean(),
|
|
@@ -35303,6 +35364,12 @@ Object.freeze({
|
|
|
35303
35364
|
addonId: null,
|
|
35304
35365
|
access: "view"
|
|
35305
35366
|
},
|
|
35367
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35368
|
+
capName: "pipeline-analytics",
|
|
35369
|
+
capScope: "device",
|
|
35370
|
+
addonId: null,
|
|
35371
|
+
access: "view"
|
|
35372
|
+
},
|
|
35306
35373
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35307
35374
|
capName: "pipeline-analytics",
|
|
35308
35375
|
capScope: "device",
|
|
@@ -38968,6 +39035,11 @@ Object.freeze({
|
|
|
38968
39035
|
form: "single",
|
|
38969
39036
|
optional: false
|
|
38970
39037
|
}],
|
|
39038
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39039
|
+
name: "deviceId",
|
|
39040
|
+
form: "single",
|
|
39041
|
+
optional: true
|
|
39042
|
+
}],
|
|
38971
39043
|
"pipelineAnalytics.getGroup": [{
|
|
38972
39044
|
name: "deviceId",
|
|
38973
39045
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.48",
|
|
4
4
|
"description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|