@camstack/addon-import-alexa 0.2.67 → 0.2.69

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
@@ -38,7 +38,7 @@ let node_os = require("node:os");
38
38
  let node_fs = require("node:fs");
39
39
  let node_path = require("node:path");
40
40
  node_path = __toESM(node_path);
41
- //#region ../types/dist/event-category-BZL-fdNj.mjs
41
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
42
42
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
43
43
  EventCategory["SystemBoot"] = "system.boot";
44
44
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -410,6 +410,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
410
410
  */
411
411
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
412
412
  /**
413
+ * Cap event fired by every device that registers the `network-link`
414
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
415
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
416
+ * reading that moved.
417
+ */
418
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
419
+ /**
413
420
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
414
421
  * "wake in progress" window — between the Baichuan wake-up issue and
415
422
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19632,6 +19639,33 @@ var RecentTracksQueryInput = object({
19632
19639
  */
19633
19640
  classes: array(string()).optional()
19634
19641
  });
19642
+ /**
19643
+ * A Summary (D359): the per-camera session envelope that references tracks.
19644
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19645
+ * served by the event-media plane by key), null until the first frame with a
19646
+ * member visible has been materialised.
19647
+ */
19648
+ var SummarySchema = object({
19649
+ id: string(),
19650
+ deviceId: number(),
19651
+ openedAt: number(),
19652
+ lastActiveAt: number(),
19653
+ sealedAt: number().nullable(),
19654
+ memberCount: number().int().nonnegative(),
19655
+ groupShotKey: string().nullable()
19656
+ });
19657
+ var SummariesQueryInput = object({
19658
+ deviceIds: array(number()).min(1),
19659
+ since: number().optional(),
19660
+ until: number().optional(),
19661
+ limit: number().int().min(1).max(200).default(50)
19662
+ });
19663
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19664
+ var SummaryDetailSchema = object({
19665
+ summary: SummarySchema,
19666
+ /** Member track ids, in absorption order. */
19667
+ trackIds: array(string()).readonly()
19668
+ });
19635
19669
  var RecentTracksPageSchema = object({
19636
19670
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19637
19671
  tracks: array(TrackSchema).readonly(),
@@ -20032,7 +20066,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20032
20066
  * timeline would read as a camera that saw nothing.
20033
20067
  */
20034
20068
  classes: array(string()).optional()
20035
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
20069
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20036
20070
  kind: "mutation",
20037
20071
  auth: "admin"
20038
20072
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -23965,6 +23999,88 @@ onStatusChanged: { data: object({
23965
23999
  volatileStateFields: ["lastUpdated"]
23966
24000
  };
23967
24001
  /**
24002
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
24003
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24004
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
24005
+ * one Home Assistant projection.
24006
+ */
24007
+ var NetworkLinkStatusSchema = object({
24008
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24009
+ type: _enum([
24010
+ "wifi",
24011
+ "ethernet",
24012
+ "cellular",
24013
+ "unknown"
24014
+ ]),
24015
+ /**
24016
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
24017
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24018
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24019
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
24020
+ * SKIP a null rather than coerce it.
24021
+ */
24022
+ signalPercent: number().min(0).max(100).nullable(),
24023
+ /** Raw received signal strength in dBm, when the firmware reports one. */
24024
+ rssiDbm: number().optional(),
24025
+ /** Network name of a wireless link, when the firmware reports it. */
24026
+ ssid: string().optional(),
24027
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24028
+ lastUpdated: number()
24029
+ });
24030
+ var networkLinkCapability = {
24031
+ name: "network-link",
24032
+ scope: "device",
24033
+ deviceNative: true,
24034
+ mode: "singleton",
24035
+ deviceTypes: [
24036
+ DeviceType.Camera,
24037
+ DeviceType.Sensor,
24038
+ DeviceType.Button,
24039
+ DeviceType.Switch,
24040
+ DeviceType.Light,
24041
+ DeviceType.Lock,
24042
+ DeviceType.Siren
24043
+ ],
24044
+ methods: {},
24045
+ events: {
24046
+ /**
24047
+ * Emitted whenever the cached status changes (a link switch, a signal
24048
+ * reading that moved). Mirrored on the parent chain by the
24049
+ * DeviceEventPropagator like `battery.onStatusChanged`.
24050
+ */
24051
+ onStatusChanged: { data: object({
24052
+ deviceId: number(),
24053
+ status: NetworkLinkStatusSchema
24054
+ }) } },
24055
+ status: {
24056
+ schema: NetworkLinkStatusSchema,
24057
+ kind: "push",
24058
+ empty: {
24059
+ type: "unknown",
24060
+ signalPercent: null,
24061
+ lastUpdated: 0
24062
+ }
24063
+ },
24064
+ /**
24065
+ * Runtime-state slice — every provider stores the same shape under
24066
+ * `device.runtimeState['network-link']`, read once by the badge and the
24067
+ * Home Assistant projector regardless of the driver.
24068
+ */
24069
+ runtimeState: NetworkLinkStatusSchema,
24070
+ /**
24071
+ * Runtime-state durability: **restored** — a link reading is slow to
24072
+ * change and a sleeping battery camera may not report for hours; the
24073
+ * restored slice is what the badge shows until the next read.
24074
+ *
24075
+ * See `RuntimeStateDurability`. Enforced by
24076
+ * `scripts/check-runtime-state-durability.ts`.
24077
+ */
24078
+ durability: "restored",
24079
+ /** Clock fields: written, but excluded from the compare that decides
24080
+ * whether persisting is worth a SQLite commit. */
24081
+ volatileStateFields: ["lastUpdated"]
24082
+ };
24083
+ /**
23968
24084
  * Generic boolean sensor — last-resort fallback when no domain-
23969
24085
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23970
24086
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32366,6 +32482,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32366
32482
  motionTrigger: motionTriggerCapability,
32367
32483
  motionZones: motionZonesCapability,
32368
32484
  nativeObjectDetection: nativeObjectDetectionCapability,
32485
+ networkLink: networkLinkCapability,
32369
32486
  notifier: notifierCapability,
32370
32487
  numericSensor: numericSensorCapability,
32371
32488
  petFeeder: petFeederCapability,
@@ -36783,6 +36900,12 @@ Object.freeze({
36783
36900
  addonId: null,
36784
36901
  access: "view"
36785
36902
  },
36903
+ "pipelineAnalytics.getSummary": {
36904
+ capName: "pipeline-analytics",
36905
+ capScope: "device",
36906
+ addonId: null,
36907
+ access: "view"
36908
+ },
36786
36909
  "pipelineAnalytics.getTrack": {
36787
36910
  capName: "pipeline-analytics",
36788
36911
  capScope: "device",
@@ -36861,6 +36984,12 @@ Object.freeze({
36861
36984
  addonId: null,
36862
36985
  access: "view"
36863
36986
  },
36987
+ "pipelineAnalytics.listSummaries": {
36988
+ capName: "pipeline-analytics",
36989
+ capScope: "device",
36990
+ addonId: null,
36991
+ access: "view"
36992
+ },
36864
36993
  "pipelineAnalytics.listTrackMedia": {
36865
36994
  capName: "pipeline-analytics",
36866
36995
  capScope: "device",
@@ -40556,6 +40685,11 @@ Object.freeze({
40556
40685
  form: "array",
40557
40686
  optional: true
40558
40687
  }],
40688
+ "pipelineAnalytics.listSummaries": [{
40689
+ name: "deviceIds",
40690
+ form: "array",
40691
+ optional: false
40692
+ }],
40559
40693
  "pipelineAnalytics.listTrackMedia": [{
40560
40694
  name: "deviceId",
40561
40695
  form: "single",
package/dist/addon.mjs CHANGED
@@ -38,7 +38,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
38
38
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
39
39
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
40
40
  //#endregion
41
- //#region ../types/dist/event-category-BZL-fdNj.mjs
41
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
42
42
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
43
43
  EventCategory["SystemBoot"] = "system.boot";
44
44
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -410,6 +410,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
410
410
  */
411
411
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
412
412
  /**
413
+ * Cap event fired by every device that registers the `network-link`
414
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
415
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
416
+ * reading that moved.
417
+ */
418
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
419
+ /**
413
420
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
414
421
  * "wake in progress" window — between the Baichuan wake-up issue and
415
422
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -19632,6 +19639,33 @@ var RecentTracksQueryInput = object({
19632
19639
  */
19633
19640
  classes: array(string()).optional()
19634
19641
  });
19642
+ /**
19643
+ * A Summary (D359): the per-camera session envelope that references tracks.
19644
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19645
+ * served by the event-media plane by key), null until the first frame with a
19646
+ * member visible has been materialised.
19647
+ */
19648
+ var SummarySchema = object({
19649
+ id: string(),
19650
+ deviceId: number(),
19651
+ openedAt: number(),
19652
+ lastActiveAt: number(),
19653
+ sealedAt: number().nullable(),
19654
+ memberCount: number().int().nonnegative(),
19655
+ groupShotKey: string().nullable()
19656
+ });
19657
+ var SummariesQueryInput = object({
19658
+ deviceIds: array(number()).min(1),
19659
+ since: number().optional(),
19660
+ until: number().optional(),
19661
+ limit: number().int().min(1).max(200).default(50)
19662
+ });
19663
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19664
+ var SummaryDetailSchema = object({
19665
+ summary: SummarySchema,
19666
+ /** Member track ids, in absorption order. */
19667
+ trackIds: array(string()).readonly()
19668
+ });
19635
19669
  var RecentTracksPageSchema = object({
19636
19670
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
19637
19671
  tracks: array(TrackSchema).readonly(),
@@ -20032,7 +20066,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20032
20066
  * timeline would read as a camera that saw nothing.
20033
20067
  */
20034
20068
  classes: array(string()).optional()
20035
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
20069
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20036
20070
  kind: "mutation",
20037
20071
  auth: "admin"
20038
20072
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -23965,6 +23999,88 @@ onStatusChanged: { data: object({
23965
23999
  volatileStateFields: ["lastUpdated"]
23966
24000
  };
23967
24001
  /**
24002
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
24003
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24004
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
24005
+ * one Home Assistant projection.
24006
+ */
24007
+ var NetworkLinkStatusSchema = object({
24008
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24009
+ type: _enum([
24010
+ "wifi",
24011
+ "ethernet",
24012
+ "cellular",
24013
+ "unknown"
24014
+ ]),
24015
+ /**
24016
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
24017
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24018
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24019
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
24020
+ * SKIP a null rather than coerce it.
24021
+ */
24022
+ signalPercent: number().min(0).max(100).nullable(),
24023
+ /** Raw received signal strength in dBm, when the firmware reports one. */
24024
+ rssiDbm: number().optional(),
24025
+ /** Network name of a wireless link, when the firmware reports it. */
24026
+ ssid: string().optional(),
24027
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24028
+ lastUpdated: number()
24029
+ });
24030
+ var networkLinkCapability = {
24031
+ name: "network-link",
24032
+ scope: "device",
24033
+ deviceNative: true,
24034
+ mode: "singleton",
24035
+ deviceTypes: [
24036
+ DeviceType.Camera,
24037
+ DeviceType.Sensor,
24038
+ DeviceType.Button,
24039
+ DeviceType.Switch,
24040
+ DeviceType.Light,
24041
+ DeviceType.Lock,
24042
+ DeviceType.Siren
24043
+ ],
24044
+ methods: {},
24045
+ events: {
24046
+ /**
24047
+ * Emitted whenever the cached status changes (a link switch, a signal
24048
+ * reading that moved). Mirrored on the parent chain by the
24049
+ * DeviceEventPropagator like `battery.onStatusChanged`.
24050
+ */
24051
+ onStatusChanged: { data: object({
24052
+ deviceId: number(),
24053
+ status: NetworkLinkStatusSchema
24054
+ }) } },
24055
+ status: {
24056
+ schema: NetworkLinkStatusSchema,
24057
+ kind: "push",
24058
+ empty: {
24059
+ type: "unknown",
24060
+ signalPercent: null,
24061
+ lastUpdated: 0
24062
+ }
24063
+ },
24064
+ /**
24065
+ * Runtime-state slice — every provider stores the same shape under
24066
+ * `device.runtimeState['network-link']`, read once by the badge and the
24067
+ * Home Assistant projector regardless of the driver.
24068
+ */
24069
+ runtimeState: NetworkLinkStatusSchema,
24070
+ /**
24071
+ * Runtime-state durability: **restored** — a link reading is slow to
24072
+ * change and a sleeping battery camera may not report for hours; the
24073
+ * restored slice is what the badge shows until the next read.
24074
+ *
24075
+ * See `RuntimeStateDurability`. Enforced by
24076
+ * `scripts/check-runtime-state-durability.ts`.
24077
+ */
24078
+ durability: "restored",
24079
+ /** Clock fields: written, but excluded from the compare that decides
24080
+ * whether persisting is worth a SQLite commit. */
24081
+ volatileStateFields: ["lastUpdated"]
24082
+ };
24083
+ /**
23968
24084
  * Generic boolean sensor — last-resort fallback when no domain-
23969
24085
  * specific binary cap fits (Home Assistant `binary_sensor` without a
23970
24086
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -32366,6 +32482,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32366
32482
  motionTrigger: motionTriggerCapability,
32367
32483
  motionZones: motionZonesCapability,
32368
32484
  nativeObjectDetection: nativeObjectDetectionCapability,
32485
+ networkLink: networkLinkCapability,
32369
32486
  notifier: notifierCapability,
32370
32487
  numericSensor: numericSensorCapability,
32371
32488
  petFeeder: petFeederCapability,
@@ -36783,6 +36900,12 @@ Object.freeze({
36783
36900
  addonId: null,
36784
36901
  access: "view"
36785
36902
  },
36903
+ "pipelineAnalytics.getSummary": {
36904
+ capName: "pipeline-analytics",
36905
+ capScope: "device",
36906
+ addonId: null,
36907
+ access: "view"
36908
+ },
36786
36909
  "pipelineAnalytics.getTrack": {
36787
36910
  capName: "pipeline-analytics",
36788
36911
  capScope: "device",
@@ -36861,6 +36984,12 @@ Object.freeze({
36861
36984
  addonId: null,
36862
36985
  access: "view"
36863
36986
  },
36987
+ "pipelineAnalytics.listSummaries": {
36988
+ capName: "pipeline-analytics",
36989
+ capScope: "device",
36990
+ addonId: null,
36991
+ access: "view"
36992
+ },
36864
36993
  "pipelineAnalytics.listTrackMedia": {
36865
36994
  capName: "pipeline-analytics",
36866
36995
  capScope: "device",
@@ -40556,6 +40685,11 @@ Object.freeze({
40556
40685
  form: "array",
40557
40686
  optional: true
40558
40687
  }],
40688
+ "pipelineAnalytics.listSummaries": [{
40689
+ name: "deviceIds",
40690
+ form: "array",
40691
+ optional: false
40692
+ }],
40559
40693
  "pipelineAnalytics.listTrackMedia": [{
40560
40694
  name: "deviceId",
40561
40695
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.67",
3
+ "version": "0.2.69",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",