@camstack/addon-provider-dreame 0.2.68 → 0.2.70

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
@@ -50504,7 +50504,7 @@ objectType({
50504
50504
  })
50505
50505
  });
50506
50506
  //#endregion
50507
- //#region ../types/dist/event-category-BZL-fdNj.mjs
50507
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
50508
50508
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
50509
50509
  EventCategory["SystemBoot"] = "system.boot";
50510
50510
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -50876,6 +50876,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
50876
50876
  */
50877
50877
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
50878
50878
  /**
50879
+ * Cap event fired by every device that registers the `network-link`
50880
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
50881
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
50882
+ * reading that moved.
50883
+ */
50884
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
50885
+ /**
50879
50886
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
50880
50887
  * "wake in progress" window — between the Baichuan wake-up issue and
50881
50888
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -69911,6 +69918,33 @@ var RecentTracksQueryInput = object({
69911
69918
  */
69912
69919
  classes: array(string()).optional()
69913
69920
  });
69921
+ /**
69922
+ * A Summary (D359): the per-camera session envelope that references tracks.
69923
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
69924
+ * served by the event-media plane by key), null until the first frame with a
69925
+ * member visible has been materialised.
69926
+ */
69927
+ var SummarySchema = object({
69928
+ id: string(),
69929
+ deviceId: number(),
69930
+ openedAt: number(),
69931
+ lastActiveAt: number(),
69932
+ sealedAt: number().nullable(),
69933
+ memberCount: number().int().nonnegative(),
69934
+ groupShotKey: string().nullable()
69935
+ });
69936
+ var SummariesQueryInput = object({
69937
+ deviceIds: array(number()).min(1),
69938
+ since: number().optional(),
69939
+ until: number().optional(),
69940
+ limit: number().int().min(1).max(200).default(50)
69941
+ });
69942
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
69943
+ var SummaryDetailSchema = object({
69944
+ summary: SummarySchema,
69945
+ /** Member track ids, in absorption order. */
69946
+ trackIds: array(string()).readonly()
69947
+ });
69914
69948
  var RecentTracksPageSchema = object({
69915
69949
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
69916
69950
  tracks: array(TrackSchema).readonly(),
@@ -70311,7 +70345,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
70311
70345
  * timeline would read as a camera that saw nothing.
70312
70346
  */
70313
70347
  classes: array(string()).optional()
70314
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
70348
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
70315
70349
  kind: "mutation",
70316
70350
  auth: "admin"
70317
70351
  }), 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({
@@ -74244,6 +74278,88 @@ onStatusChanged: { data: object({
74244
74278
  volatileStateFields: ["lastUpdated"]
74245
74279
  };
74246
74280
  /**
74281
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
74282
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
74283
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
74284
+ * one Home Assistant projection.
74285
+ */
74286
+ var NetworkLinkStatusSchema = object({
74287
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
74288
+ type: _enum([
74289
+ "wifi",
74290
+ "ethernet",
74291
+ "cellular",
74292
+ "unknown"
74293
+ ]),
74294
+ /**
74295
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
74296
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
74297
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
74298
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
74299
+ * SKIP a null rather than coerce it.
74300
+ */
74301
+ signalPercent: number().min(0).max(100).nullable(),
74302
+ /** Raw received signal strength in dBm, when the firmware reports one. */
74303
+ rssiDbm: number().optional(),
74304
+ /** Network name of a wireless link, when the firmware reports it. */
74305
+ ssid: string().optional(),
74306
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
74307
+ lastUpdated: number()
74308
+ });
74309
+ var networkLinkCapability = {
74310
+ name: "network-link",
74311
+ scope: "device",
74312
+ deviceNative: true,
74313
+ mode: "singleton",
74314
+ deviceTypes: [
74315
+ DeviceType.Camera,
74316
+ DeviceType.Sensor,
74317
+ DeviceType.Button,
74318
+ DeviceType.Switch,
74319
+ DeviceType.Light,
74320
+ DeviceType.Lock,
74321
+ DeviceType.Siren
74322
+ ],
74323
+ methods: {},
74324
+ events: {
74325
+ /**
74326
+ * Emitted whenever the cached status changes (a link switch, a signal
74327
+ * reading that moved). Mirrored on the parent chain by the
74328
+ * DeviceEventPropagator like `battery.onStatusChanged`.
74329
+ */
74330
+ onStatusChanged: { data: object({
74331
+ deviceId: number(),
74332
+ status: NetworkLinkStatusSchema
74333
+ }) } },
74334
+ status: {
74335
+ schema: NetworkLinkStatusSchema,
74336
+ kind: "push",
74337
+ empty: {
74338
+ type: "unknown",
74339
+ signalPercent: null,
74340
+ lastUpdated: 0
74341
+ }
74342
+ },
74343
+ /**
74344
+ * Runtime-state slice — every provider stores the same shape under
74345
+ * `device.runtimeState['network-link']`, read once by the badge and the
74346
+ * Home Assistant projector regardless of the driver.
74347
+ */
74348
+ runtimeState: NetworkLinkStatusSchema,
74349
+ /**
74350
+ * Runtime-state durability: **restored** — a link reading is slow to
74351
+ * change and a sleeping battery camera may not report for hours; the
74352
+ * restored slice is what the badge shows until the next read.
74353
+ *
74354
+ * See `RuntimeStateDurability`. Enforced by
74355
+ * `scripts/check-runtime-state-durability.ts`.
74356
+ */
74357
+ durability: "restored",
74358
+ /** Clock fields: written, but excluded from the compare that decides
74359
+ * whether persisting is worth a SQLite commit. */
74360
+ volatileStateFields: ["lastUpdated"]
74361
+ };
74362
+ /**
74247
74363
  * Generic boolean sensor — last-resort fallback when no domain-
74248
74364
  * specific binary cap fits (Home Assistant `binary_sensor` without a
74249
74365
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -82653,6 +82769,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
82653
82769
  motionTrigger: motionTriggerCapability,
82654
82770
  motionZones: motionZonesCapability,
82655
82771
  nativeObjectDetection: nativeObjectDetectionCapability,
82772
+ networkLink: networkLinkCapability,
82656
82773
  notifier: notifierCapability,
82657
82774
  numericSensor: numericSensorCapability,
82658
82775
  petFeeder: petFeederCapability,
@@ -87070,6 +87187,12 @@ Object.freeze({
87070
87187
  addonId: null,
87071
87188
  access: "view"
87072
87189
  },
87190
+ "pipelineAnalytics.getSummary": {
87191
+ capName: "pipeline-analytics",
87192
+ capScope: "device",
87193
+ addonId: null,
87194
+ access: "view"
87195
+ },
87073
87196
  "pipelineAnalytics.getTrack": {
87074
87197
  capName: "pipeline-analytics",
87075
87198
  capScope: "device",
@@ -87148,6 +87271,12 @@ Object.freeze({
87148
87271
  addonId: null,
87149
87272
  access: "view"
87150
87273
  },
87274
+ "pipelineAnalytics.listSummaries": {
87275
+ capName: "pipeline-analytics",
87276
+ capScope: "device",
87277
+ addonId: null,
87278
+ access: "view"
87279
+ },
87151
87280
  "pipelineAnalytics.listTrackMedia": {
87152
87281
  capName: "pipeline-analytics",
87153
87282
  capScope: "device",
@@ -90843,6 +90972,11 @@ Object.freeze({
90843
90972
  form: "array",
90844
90973
  optional: true
90845
90974
  }],
90975
+ "pipelineAnalytics.listSummaries": [{
90976
+ name: "deviceIds",
90977
+ form: "array",
90978
+ optional: false
90979
+ }],
90846
90980
  "pipelineAnalytics.listTrackMedia": [{
90847
90981
  name: "deviceId",
90848
90982
  form: "single",
package/dist/addon.mjs CHANGED
@@ -50504,7 +50504,7 @@ objectType({
50504
50504
  })
50505
50505
  });
50506
50506
  //#endregion
50507
- //#region ../types/dist/event-category-BZL-fdNj.mjs
50507
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
50508
50508
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
50509
50509
  EventCategory["SystemBoot"] = "system.boot";
50510
50510
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -50876,6 +50876,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
50876
50876
  */
50877
50877
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
50878
50878
  /**
50879
+ * Cap event fired by every device that registers the `network-link`
50880
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
50881
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
50882
+ * reading that moved.
50883
+ */
50884
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
50885
+ /**
50879
50886
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
50880
50887
  * "wake in progress" window — between the Baichuan wake-up issue and
50881
50888
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -69911,6 +69918,33 @@ var RecentTracksQueryInput = object({
69911
69918
  */
69912
69919
  classes: array(string()).optional()
69913
69920
  });
69921
+ /**
69922
+ * A Summary (D359): the per-camera session envelope that references tracks.
69923
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
69924
+ * served by the event-media plane by key), null until the first frame with a
69925
+ * member visible has been materialised.
69926
+ */
69927
+ var SummarySchema = object({
69928
+ id: string(),
69929
+ deviceId: number(),
69930
+ openedAt: number(),
69931
+ lastActiveAt: number(),
69932
+ sealedAt: number().nullable(),
69933
+ memberCount: number().int().nonnegative(),
69934
+ groupShotKey: string().nullable()
69935
+ });
69936
+ var SummariesQueryInput = object({
69937
+ deviceIds: array(number()).min(1),
69938
+ since: number().optional(),
69939
+ until: number().optional(),
69940
+ limit: number().int().min(1).max(200).default(50)
69941
+ });
69942
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
69943
+ var SummaryDetailSchema = object({
69944
+ summary: SummarySchema,
69945
+ /** Member track ids, in absorption order. */
69946
+ trackIds: array(string()).readonly()
69947
+ });
69914
69948
  var RecentTracksPageSchema = object({
69915
69949
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
69916
69950
  tracks: array(TrackSchema).readonly(),
@@ -70311,7 +70345,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
70311
70345
  * timeline would read as a camera that saw nothing.
70312
70346
  */
70313
70347
  classes: array(string()).optional()
70314
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
70348
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
70315
70349
  kind: "mutation",
70316
70350
  auth: "admin"
70317
70351
  }), 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({
@@ -74244,6 +74278,88 @@ onStatusChanged: { data: object({
74244
74278
  volatileStateFields: ["lastUpdated"]
74245
74279
  };
74246
74280
  /**
74281
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
74282
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
74283
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
74284
+ * one Home Assistant projection.
74285
+ */
74286
+ var NetworkLinkStatusSchema = object({
74287
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
74288
+ type: _enum([
74289
+ "wifi",
74290
+ "ethernet",
74291
+ "cellular",
74292
+ "unknown"
74293
+ ]),
74294
+ /**
74295
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
74296
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
74297
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
74298
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
74299
+ * SKIP a null rather than coerce it.
74300
+ */
74301
+ signalPercent: number().min(0).max(100).nullable(),
74302
+ /** Raw received signal strength in dBm, when the firmware reports one. */
74303
+ rssiDbm: number().optional(),
74304
+ /** Network name of a wireless link, when the firmware reports it. */
74305
+ ssid: string().optional(),
74306
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
74307
+ lastUpdated: number()
74308
+ });
74309
+ var networkLinkCapability = {
74310
+ name: "network-link",
74311
+ scope: "device",
74312
+ deviceNative: true,
74313
+ mode: "singleton",
74314
+ deviceTypes: [
74315
+ DeviceType.Camera,
74316
+ DeviceType.Sensor,
74317
+ DeviceType.Button,
74318
+ DeviceType.Switch,
74319
+ DeviceType.Light,
74320
+ DeviceType.Lock,
74321
+ DeviceType.Siren
74322
+ ],
74323
+ methods: {},
74324
+ events: {
74325
+ /**
74326
+ * Emitted whenever the cached status changes (a link switch, a signal
74327
+ * reading that moved). Mirrored on the parent chain by the
74328
+ * DeviceEventPropagator like `battery.onStatusChanged`.
74329
+ */
74330
+ onStatusChanged: { data: object({
74331
+ deviceId: number(),
74332
+ status: NetworkLinkStatusSchema
74333
+ }) } },
74334
+ status: {
74335
+ schema: NetworkLinkStatusSchema,
74336
+ kind: "push",
74337
+ empty: {
74338
+ type: "unknown",
74339
+ signalPercent: null,
74340
+ lastUpdated: 0
74341
+ }
74342
+ },
74343
+ /**
74344
+ * Runtime-state slice — every provider stores the same shape under
74345
+ * `device.runtimeState['network-link']`, read once by the badge and the
74346
+ * Home Assistant projector regardless of the driver.
74347
+ */
74348
+ runtimeState: NetworkLinkStatusSchema,
74349
+ /**
74350
+ * Runtime-state durability: **restored** — a link reading is slow to
74351
+ * change and a sleeping battery camera may not report for hours; the
74352
+ * restored slice is what the badge shows until the next read.
74353
+ *
74354
+ * See `RuntimeStateDurability`. Enforced by
74355
+ * `scripts/check-runtime-state-durability.ts`.
74356
+ */
74357
+ durability: "restored",
74358
+ /** Clock fields: written, but excluded from the compare that decides
74359
+ * whether persisting is worth a SQLite commit. */
74360
+ volatileStateFields: ["lastUpdated"]
74361
+ };
74362
+ /**
74247
74363
  * Generic boolean sensor — last-resort fallback when no domain-
74248
74364
  * specific binary cap fits (Home Assistant `binary_sensor` without a
74249
74365
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -82653,6 +82769,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
82653
82769
  motionTrigger: motionTriggerCapability,
82654
82770
  motionZones: motionZonesCapability,
82655
82771
  nativeObjectDetection: nativeObjectDetectionCapability,
82772
+ networkLink: networkLinkCapability,
82656
82773
  notifier: notifierCapability,
82657
82774
  numericSensor: numericSensorCapability,
82658
82775
  petFeeder: petFeederCapability,
@@ -87070,6 +87187,12 @@ Object.freeze({
87070
87187
  addonId: null,
87071
87188
  access: "view"
87072
87189
  },
87190
+ "pipelineAnalytics.getSummary": {
87191
+ capName: "pipeline-analytics",
87192
+ capScope: "device",
87193
+ addonId: null,
87194
+ access: "view"
87195
+ },
87073
87196
  "pipelineAnalytics.getTrack": {
87074
87197
  capName: "pipeline-analytics",
87075
87198
  capScope: "device",
@@ -87148,6 +87271,12 @@ Object.freeze({
87148
87271
  addonId: null,
87149
87272
  access: "view"
87150
87273
  },
87274
+ "pipelineAnalytics.listSummaries": {
87275
+ capName: "pipeline-analytics",
87276
+ capScope: "device",
87277
+ addonId: null,
87278
+ access: "view"
87279
+ },
87151
87280
  "pipelineAnalytics.listTrackMedia": {
87152
87281
  capName: "pipeline-analytics",
87153
87282
  capScope: "device",
@@ -90843,6 +90972,11 @@ Object.freeze({
90843
90972
  form: "array",
90844
90973
  optional: true
90845
90974
  }],
90975
+ "pipelineAnalytics.listSummaries": [{
90976
+ name: "deviceIds",
90977
+ form: "array",
90978
+ optional: false
90979
+ }],
90846
90980
  "pipelineAnalytics.listTrackMedia": [{
90847
90981
  name: "deviceId",
90848
90982
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.68",
3
+ "version": "0.2.70",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",