@camstack/addon-provider-homeassistant 1.2.60 → 1.2.61
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-C9c_O8wh.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-device-source.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-
|
|
1
|
+
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-DoPggq1j.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-device-source.ts
|
|
@@ -19483,6 +19483,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19483
19483
|
totalBytes: number().int(),
|
|
19484
19484
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19485
19485
|
});
|
|
19486
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19487
|
+
var EventMediaKindFootprintSchema = object({
|
|
19488
|
+
kind: MediaFileKindEnum,
|
|
19489
|
+
/** Media rows of this kind. */
|
|
19490
|
+
rows: number().int(),
|
|
19491
|
+
/** Bytes on disk held by those rows. */
|
|
19492
|
+
bytes: number().int()
|
|
19493
|
+
});
|
|
19494
|
+
/**
|
|
19495
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19496
|
+
* actually turns on.
|
|
19497
|
+
*
|
|
19498
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19499
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19500
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19501
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19502
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19503
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19504
|
+
*
|
|
19505
|
+
* ## Why `unaccounted*` exists
|
|
19506
|
+
*
|
|
19507
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19508
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19509
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19510
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19511
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19512
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19513
|
+
* against a denominator smaller than the disk.
|
|
19514
|
+
*
|
|
19515
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19516
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19517
|
+
*/
|
|
19518
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19519
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19520
|
+
totalRows: number().int(),
|
|
19521
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19522
|
+
totalBytes: number().int(),
|
|
19523
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19524
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19525
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19526
|
+
unaccountedRows: number().int(),
|
|
19527
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19528
|
+
unaccountedBytes: number().int()
|
|
19529
|
+
});
|
|
19486
19530
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19487
19531
|
var EventPruneCountsSchema = object({
|
|
19488
19532
|
motion: number().int(),
|
|
@@ -19686,6 +19730,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19686
19730
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19687
19731
|
kind: "query",
|
|
19688
19732
|
auth: "admin"
|
|
19733
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19734
|
+
kind: "query",
|
|
19735
|
+
auth: "admin"
|
|
19689
19736
|
}), method(object({
|
|
19690
19737
|
olderThanMs: number(),
|
|
19691
19738
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21637,6 +21684,20 @@ method(object({
|
|
|
21637
21684
|
error: string().optional()
|
|
21638
21685
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21639
21686
|
providerId: string(),
|
|
21687
|
+
/**
|
|
21688
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21689
|
+
*
|
|
21690
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21691
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21692
|
+
* credential the operator did not retype — and posting that here
|
|
21693
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21694
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21695
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21696
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21697
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21698
|
+
* every value was typed just now and nothing is stored yet.
|
|
21699
|
+
*/
|
|
21700
|
+
locationId: string().optional(),
|
|
21640
21701
|
config: record(string(), unknown())
|
|
21641
21702
|
}), object({
|
|
21642
21703
|
ok: boolean(),
|
|
@@ -35764,6 +35825,12 @@ Object.freeze({
|
|
|
35764
35825
|
addonId: null,
|
|
35765
35826
|
access: "view"
|
|
35766
35827
|
},
|
|
35828
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35829
|
+
capName: "pipeline-analytics",
|
|
35830
|
+
capScope: "device",
|
|
35831
|
+
addonId: null,
|
|
35832
|
+
access: "view"
|
|
35833
|
+
},
|
|
35767
35834
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35768
35835
|
capName: "pipeline-analytics",
|
|
35769
35836
|
capScope: "device",
|
|
@@ -39429,6 +39496,11 @@ Object.freeze({
|
|
|
39429
39496
|
form: "single",
|
|
39430
39497
|
optional: false
|
|
39431
39498
|
}],
|
|
39499
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39500
|
+
name: "deviceId",
|
|
39501
|
+
form: "single",
|
|
39502
|
+
optional: true
|
|
39503
|
+
}],
|
|
39432
39504
|
"pipelineAnalytics.getGroup": [{
|
|
39433
39505
|
name: "deviceId",
|
|
39434
39506
|
form: "single",
|
|
@@ -19483,6 +19483,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19483
19483
|
totalBytes: number().int(),
|
|
19484
19484
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19485
19485
|
});
|
|
19486
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19487
|
+
var EventMediaKindFootprintSchema = object({
|
|
19488
|
+
kind: MediaFileKindEnum,
|
|
19489
|
+
/** Media rows of this kind. */
|
|
19490
|
+
rows: number().int(),
|
|
19491
|
+
/** Bytes on disk held by those rows. */
|
|
19492
|
+
bytes: number().int()
|
|
19493
|
+
});
|
|
19494
|
+
/**
|
|
19495
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19496
|
+
* actually turns on.
|
|
19497
|
+
*
|
|
19498
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19499
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19500
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19501
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19502
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19503
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19504
|
+
*
|
|
19505
|
+
* ## Why `unaccounted*` exists
|
|
19506
|
+
*
|
|
19507
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19508
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19509
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19510
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19511
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19512
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19513
|
+
* against a denominator smaller than the disk.
|
|
19514
|
+
*
|
|
19515
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19516
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19517
|
+
*/
|
|
19518
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19519
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19520
|
+
totalRows: number().int(),
|
|
19521
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19522
|
+
totalBytes: number().int(),
|
|
19523
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19524
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19525
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19526
|
+
unaccountedRows: number().int(),
|
|
19527
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19528
|
+
unaccountedBytes: number().int()
|
|
19529
|
+
});
|
|
19486
19530
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19487
19531
|
var EventPruneCountsSchema = object({
|
|
19488
19532
|
motion: number().int(),
|
|
@@ -19686,6 +19730,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19686
19730
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19687
19731
|
kind: "query",
|
|
19688
19732
|
auth: "admin"
|
|
19733
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19734
|
+
kind: "query",
|
|
19735
|
+
auth: "admin"
|
|
19689
19736
|
}), method(object({
|
|
19690
19737
|
olderThanMs: number(),
|
|
19691
19738
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -21637,6 +21684,20 @@ method(object({
|
|
|
21637
21684
|
error: string().optional()
|
|
21638
21685
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21639
21686
|
providerId: string(),
|
|
21687
|
+
/**
|
|
21688
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21689
|
+
*
|
|
21690
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21691
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21692
|
+
* credential the operator did not retype — and posting that here
|
|
21693
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21694
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21695
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21696
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21697
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21698
|
+
* every value was typed just now and nothing is stored yet.
|
|
21699
|
+
*/
|
|
21700
|
+
locationId: string().optional(),
|
|
21640
21701
|
config: record(string(), unknown())
|
|
21641
21702
|
}), object({
|
|
21642
21703
|
ok: boolean(),
|
|
@@ -35764,6 +35825,12 @@ Object.freeze({
|
|
|
35764
35825
|
addonId: null,
|
|
35765
35826
|
access: "view"
|
|
35766
35827
|
},
|
|
35828
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35829
|
+
capName: "pipeline-analytics",
|
|
35830
|
+
capScope: "device",
|
|
35831
|
+
addonId: null,
|
|
35832
|
+
access: "view"
|
|
35833
|
+
},
|
|
35767
35834
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35768
35835
|
capName: "pipeline-analytics",
|
|
35769
35836
|
capScope: "device",
|
|
@@ -39429,6 +39496,11 @@ Object.freeze({
|
|
|
39429
39496
|
form: "single",
|
|
39430
39497
|
optional: false
|
|
39431
39498
|
}],
|
|
39499
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39500
|
+
name: "deviceId",
|
|
39501
|
+
form: "single",
|
|
39502
|
+
optional: true
|
|
39503
|
+
}],
|
|
39432
39504
|
"pipelineAnalytics.getGroup": [{
|
|
39433
39505
|
name: "deviceId",
|
|
39434
39506
|
form: "single",
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#endregion
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-C9c_O8wh.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-
|
|
1
|
+
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-DoPggq1j.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|