@camstack/addon-mqtt-broker 1.2.68 → 1.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/mqtt-broker.addon.js +86 -2
- package/dist/mqtt-broker.addon.mjs +86 -2
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ let crypto$10 = __toESM(crypto$1, 1);
|
|
|
44
44
|
crypto$1 = __toESM(crypto$1);
|
|
45
45
|
let node_fs = require("node:fs");
|
|
46
46
|
let node_path = require("node:path");
|
|
47
|
-
//#region ../types/dist/event-category-
|
|
47
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
48
48
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
49
49
|
EventCategory["SystemBoot"] = "system.boot";
|
|
50
50
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -416,6 +416,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
416
416
|
*/
|
|
417
417
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
418
418
|
/**
|
|
419
|
+
* Cap event fired by every device that registers the `network-link`
|
|
420
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
421
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
422
|
+
* reading that moved.
|
|
423
|
+
*/
|
|
424
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
425
|
+
/**
|
|
419
426
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
420
427
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
421
428
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -19118,6 +19125,33 @@ var RecentTracksQueryInput = object({
|
|
|
19118
19125
|
*/
|
|
19119
19126
|
classes: array(string()).optional()
|
|
19120
19127
|
});
|
|
19128
|
+
/**
|
|
19129
|
+
* A Summary (D359): the per-camera session envelope that references tracks.
|
|
19130
|
+
* `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
|
|
19131
|
+
* served by the event-media plane by key), null until the first frame with a
|
|
19132
|
+
* member visible has been materialised.
|
|
19133
|
+
*/
|
|
19134
|
+
var SummarySchema = object({
|
|
19135
|
+
id: string(),
|
|
19136
|
+
deviceId: number(),
|
|
19137
|
+
openedAt: number(),
|
|
19138
|
+
lastActiveAt: number(),
|
|
19139
|
+
sealedAt: number().nullable(),
|
|
19140
|
+
memberCount: number().int().nonnegative(),
|
|
19141
|
+
groupShotKey: string().nullable()
|
|
19142
|
+
});
|
|
19143
|
+
var SummariesQueryInput = object({
|
|
19144
|
+
deviceIds: array(number()).min(1),
|
|
19145
|
+
since: number().optional(),
|
|
19146
|
+
until: number().optional(),
|
|
19147
|
+
limit: number().int().min(1).max(200).default(50)
|
|
19148
|
+
});
|
|
19149
|
+
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
19150
|
+
var SummaryDetailSchema = object({
|
|
19151
|
+
summary: SummarySchema,
|
|
19152
|
+
/** Member track ids, in absorption order. */
|
|
19153
|
+
trackIds: array(string()).readonly()
|
|
19154
|
+
});
|
|
19121
19155
|
var RecentTracksPageSchema = object({
|
|
19122
19156
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
19123
19157
|
tracks: array(TrackSchema).readonly(),
|
|
@@ -19518,7 +19552,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19518
19552
|
* timeline would read as a camera that saw nothing.
|
|
19519
19553
|
*/
|
|
19520
19554
|
classes: array(string()).optional()
|
|
19521
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
19555
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
19522
19556
|
kind: "mutation",
|
|
19523
19557
|
auth: "admin"
|
|
19524
19558
|
}), 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({
|
|
@@ -23251,6 +23285,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
|
|
|
23251
23285
|
deviceId: number(),
|
|
23252
23286
|
status: BatteryStatusSchema
|
|
23253
23287
|
});
|
|
23288
|
+
/**
|
|
23289
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23290
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23291
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23292
|
+
* one Home Assistant projection.
|
|
23293
|
+
*/
|
|
23294
|
+
var NetworkLinkStatusSchema = object({
|
|
23295
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23296
|
+
type: _enum([
|
|
23297
|
+
"wifi",
|
|
23298
|
+
"ethernet",
|
|
23299
|
+
"cellular",
|
|
23300
|
+
"unknown"
|
|
23301
|
+
]),
|
|
23302
|
+
/**
|
|
23303
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23304
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23305
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23306
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23307
|
+
* SKIP a null rather than coerce it.
|
|
23308
|
+
*/
|
|
23309
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
23310
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23311
|
+
rssiDbm: number().optional(),
|
|
23312
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
23313
|
+
ssid: string().optional(),
|
|
23314
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23315
|
+
lastUpdated: number()
|
|
23316
|
+
});
|
|
23317
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
23318
|
+
deviceId: number(),
|
|
23319
|
+
status: NetworkLinkStatusSchema
|
|
23320
|
+
});
|
|
23254
23321
|
object({
|
|
23255
23322
|
on: boolean(),
|
|
23256
23323
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -32473,6 +32540,12 @@ Object.freeze({
|
|
|
32473
32540
|
addonId: null,
|
|
32474
32541
|
access: "view"
|
|
32475
32542
|
},
|
|
32543
|
+
"pipelineAnalytics.getSummary": {
|
|
32544
|
+
capName: "pipeline-analytics",
|
|
32545
|
+
capScope: "device",
|
|
32546
|
+
addonId: null,
|
|
32547
|
+
access: "view"
|
|
32548
|
+
},
|
|
32476
32549
|
"pipelineAnalytics.getTrack": {
|
|
32477
32550
|
capName: "pipeline-analytics",
|
|
32478
32551
|
capScope: "device",
|
|
@@ -32551,6 +32624,12 @@ Object.freeze({
|
|
|
32551
32624
|
addonId: null,
|
|
32552
32625
|
access: "view"
|
|
32553
32626
|
},
|
|
32627
|
+
"pipelineAnalytics.listSummaries": {
|
|
32628
|
+
capName: "pipeline-analytics",
|
|
32629
|
+
capScope: "device",
|
|
32630
|
+
addonId: null,
|
|
32631
|
+
access: "view"
|
|
32632
|
+
},
|
|
32554
32633
|
"pipelineAnalytics.listTrackMedia": {
|
|
32555
32634
|
capName: "pipeline-analytics",
|
|
32556
32635
|
capScope: "device",
|
|
@@ -36246,6 +36325,11 @@ Object.freeze({
|
|
|
36246
36325
|
form: "array",
|
|
36247
36326
|
optional: true
|
|
36248
36327
|
}],
|
|
36328
|
+
"pipelineAnalytics.listSummaries": [{
|
|
36329
|
+
name: "deviceIds",
|
|
36330
|
+
form: "array",
|
|
36331
|
+
optional: false
|
|
36332
|
+
}],
|
|
36249
36333
|
"pipelineAnalytics.listTrackMedia": [{
|
|
36250
36334
|
name: "deviceId",
|
|
36251
36335
|
form: "single",
|
|
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
39
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
40
40
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region ../types/dist/event-category-
|
|
42
|
+
//#region ../types/dist/event-category-zAv7pMUz.mjs
|
|
43
43
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
44
44
|
EventCategory["SystemBoot"] = "system.boot";
|
|
45
45
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -411,6 +411,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
411
411
|
*/
|
|
412
412
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
413
413
|
/**
|
|
414
|
+
* Cap event fired by every device that registers the `network-link`
|
|
415
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
416
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
417
|
+
* reading that moved.
|
|
418
|
+
*/
|
|
419
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
420
|
+
/**
|
|
414
421
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
415
422
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
416
423
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -19113,6 +19120,33 @@ var RecentTracksQueryInput = object({
|
|
|
19113
19120
|
*/
|
|
19114
19121
|
classes: array(string()).optional()
|
|
19115
19122
|
});
|
|
19123
|
+
/**
|
|
19124
|
+
* A Summary (D359): the per-camera session envelope that references tracks.
|
|
19125
|
+
* `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
|
|
19126
|
+
* served by the event-media plane by key), null until the first frame with a
|
|
19127
|
+
* member visible has been materialised.
|
|
19128
|
+
*/
|
|
19129
|
+
var SummarySchema = object({
|
|
19130
|
+
id: string(),
|
|
19131
|
+
deviceId: number(),
|
|
19132
|
+
openedAt: number(),
|
|
19133
|
+
lastActiveAt: number(),
|
|
19134
|
+
sealedAt: number().nullable(),
|
|
19135
|
+
memberCount: number().int().nonnegative(),
|
|
19136
|
+
groupShotKey: string().nullable()
|
|
19137
|
+
});
|
|
19138
|
+
var SummariesQueryInput = object({
|
|
19139
|
+
deviceIds: array(number()).min(1),
|
|
19140
|
+
since: number().optional(),
|
|
19141
|
+
until: number().optional(),
|
|
19142
|
+
limit: number().int().min(1).max(200).default(50)
|
|
19143
|
+
});
|
|
19144
|
+
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
19145
|
+
var SummaryDetailSchema = object({
|
|
19146
|
+
summary: SummarySchema,
|
|
19147
|
+
/** Member track ids, in absorption order. */
|
|
19148
|
+
trackIds: array(string()).readonly()
|
|
19149
|
+
});
|
|
19116
19150
|
var RecentTracksPageSchema = object({
|
|
19117
19151
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
19118
19152
|
tracks: array(TrackSchema).readonly(),
|
|
@@ -19513,7 +19547,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19513
19547
|
* timeline would read as a camera that saw nothing.
|
|
19514
19548
|
*/
|
|
19515
19549
|
classes: array(string()).optional()
|
|
19516
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
19550
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
19517
19551
|
kind: "mutation",
|
|
19518
19552
|
auth: "admin"
|
|
19519
19553
|
}), 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({
|
|
@@ -23246,6 +23280,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
|
|
|
23246
23280
|
deviceId: number(),
|
|
23247
23281
|
status: BatteryStatusSchema
|
|
23248
23282
|
});
|
|
23283
|
+
/**
|
|
23284
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23285
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23286
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23287
|
+
* one Home Assistant projection.
|
|
23288
|
+
*/
|
|
23289
|
+
var NetworkLinkStatusSchema = object({
|
|
23290
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23291
|
+
type: _enum([
|
|
23292
|
+
"wifi",
|
|
23293
|
+
"ethernet",
|
|
23294
|
+
"cellular",
|
|
23295
|
+
"unknown"
|
|
23296
|
+
]),
|
|
23297
|
+
/**
|
|
23298
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23299
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23300
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23301
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23302
|
+
* SKIP a null rather than coerce it.
|
|
23303
|
+
*/
|
|
23304
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
23305
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23306
|
+
rssiDbm: number().optional(),
|
|
23307
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
23308
|
+
ssid: string().optional(),
|
|
23309
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23310
|
+
lastUpdated: number()
|
|
23311
|
+
});
|
|
23312
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
23313
|
+
deviceId: number(),
|
|
23314
|
+
status: NetworkLinkStatusSchema
|
|
23315
|
+
});
|
|
23249
23316
|
object({
|
|
23250
23317
|
on: boolean(),
|
|
23251
23318
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -32468,6 +32535,12 @@ Object.freeze({
|
|
|
32468
32535
|
addonId: null,
|
|
32469
32536
|
access: "view"
|
|
32470
32537
|
},
|
|
32538
|
+
"pipelineAnalytics.getSummary": {
|
|
32539
|
+
capName: "pipeline-analytics",
|
|
32540
|
+
capScope: "device",
|
|
32541
|
+
addonId: null,
|
|
32542
|
+
access: "view"
|
|
32543
|
+
},
|
|
32471
32544
|
"pipelineAnalytics.getTrack": {
|
|
32472
32545
|
capName: "pipeline-analytics",
|
|
32473
32546
|
capScope: "device",
|
|
@@ -32546,6 +32619,12 @@ Object.freeze({
|
|
|
32546
32619
|
addonId: null,
|
|
32547
32620
|
access: "view"
|
|
32548
32621
|
},
|
|
32622
|
+
"pipelineAnalytics.listSummaries": {
|
|
32623
|
+
capName: "pipeline-analytics",
|
|
32624
|
+
capScope: "device",
|
|
32625
|
+
addonId: null,
|
|
32626
|
+
access: "view"
|
|
32627
|
+
},
|
|
32549
32628
|
"pipelineAnalytics.listTrackMedia": {
|
|
32550
32629
|
capName: "pipeline-analytics",
|
|
32551
32630
|
capScope: "device",
|
|
@@ -36241,6 +36320,11 @@ Object.freeze({
|
|
|
36241
36320
|
form: "array",
|
|
36242
36321
|
optional: true
|
|
36243
36322
|
}],
|
|
36323
|
+
"pipelineAnalytics.listSummaries": [{
|
|
36324
|
+
name: "deviceIds",
|
|
36325
|
+
form: "array",
|
|
36326
|
+
optional: false
|
|
36327
|
+
}],
|
|
36244
36328
|
"pipelineAnalytics.listTrackMedia": [{
|
|
36245
36329
|
name: "deviceId",
|
|
36246
36330
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.70",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|