@camstack/addon-provider-amcrest 0.2.142 → 0.2.143
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 +332 -40
- package/dist/addon.mjs +332 -40
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5450,7 +5450,7 @@ var ZodIssueCode = {
|
|
|
5450
5450
|
var ZodFirstPartyTypeKind;
|
|
5451
5451
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5452
5452
|
//#endregion
|
|
5453
|
-
//#region ../types/dist/sleep-
|
|
5453
|
+
//#region ../types/dist/sleep-BSuCCFjf.mjs
|
|
5454
5454
|
/**
|
|
5455
5455
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5456
5456
|
* window to float samples (D455).
|
|
@@ -17054,7 +17054,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
|
|
|
17054
17054
|
kind: literal("node"),
|
|
17055
17055
|
nodeId: string().min(1)
|
|
17056
17056
|
})]);
|
|
17057
|
+
/**
|
|
17058
|
+
* `enum` stores a STATE as the ordinal of its value in the series' value list
|
|
17059
|
+
* (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
|
|
17060
|
+
* meaning); a rollup keeps the time spent in each state (`states`).
|
|
17061
|
+
*/
|
|
17057
17062
|
var DeviceHistoryKindSchema = _enum([
|
|
17063
|
+
"gauge",
|
|
17064
|
+
"counter",
|
|
17065
|
+
"boolean",
|
|
17066
|
+
"enum"
|
|
17067
|
+
]);
|
|
17068
|
+
/** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
|
|
17069
|
+
var DeviceHistoryProducerKindSchema = _enum([
|
|
17058
17070
|
"gauge",
|
|
17059
17071
|
"counter",
|
|
17060
17072
|
"boolean"
|
|
@@ -17091,7 +17103,13 @@ var SeriesInfoSchema = object({
|
|
|
17091
17103
|
/** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
|
|
17092
17104
|
unit: string().nullable(),
|
|
17093
17105
|
displayName: string(),
|
|
17094
|
-
source: _enum([
|
|
17106
|
+
source: _enum([
|
|
17107
|
+
"cap",
|
|
17108
|
+
"addon",
|
|
17109
|
+
"derived"
|
|
17110
|
+
]),
|
|
17111
|
+
/** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
|
|
17112
|
+
values: array(string()).readonly().nullable(),
|
|
17095
17113
|
firstTs: number(),
|
|
17096
17114
|
lastTs: number()
|
|
17097
17115
|
});
|
|
@@ -17105,17 +17123,31 @@ var QueryPointSchema = object({
|
|
|
17105
17123
|
twMean: number().nullable(),
|
|
17106
17124
|
min: number(),
|
|
17107
17125
|
max: number(),
|
|
17108
|
-
/** `null` is unknown, never zero (D393). */
|
|
17109
|
-
last: number().nullable()
|
|
17126
|
+
/** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
|
|
17127
|
+
last: number().nullable(),
|
|
17128
|
+
/**
|
|
17129
|
+
* The increase over the point: a `counter`'s growth since the previous point
|
|
17130
|
+
* or bucket (a drop is a reset, counted from zero), and for
|
|
17131
|
+
* {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
|
|
17132
|
+
* every other kind, and when it cannot be known.
|
|
17133
|
+
*/
|
|
17134
|
+
delta: number().nullable(),
|
|
17135
|
+
/** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
|
|
17136
|
+
state: string().nullable(),
|
|
17137
|
+
/** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
|
|
17138
|
+
states: record(string(), number()).nullable()
|
|
17110
17139
|
});
|
|
17111
17140
|
var QuerySeriesSchema = object({
|
|
17112
17141
|
scope: string(),
|
|
17113
17142
|
/** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
|
|
17114
17143
|
before: object({
|
|
17115
17144
|
t: number(),
|
|
17116
|
-
value: number().nullable()
|
|
17145
|
+
value: number().nullable(),
|
|
17146
|
+
state: string().nullable()
|
|
17117
17147
|
}).nullable(),
|
|
17118
|
-
points: array(QueryPointSchema).readonly()
|
|
17148
|
+
points: array(QueryPointSchema).readonly(),
|
|
17149
|
+
/** A derived key: the stored key its points were computed from; `null` for a stored series. */
|
|
17150
|
+
derivedFrom: string().nullable()
|
|
17119
17151
|
});
|
|
17120
17152
|
/** The window part of a query, shared by the device and node forms. */
|
|
17121
17153
|
var QueryWindowShape = {
|
|
@@ -17131,6 +17163,23 @@ var QueryResultSchema = object({
|
|
|
17131
17163
|
series: array(QuerySeriesSchema).readonly(),
|
|
17132
17164
|
truncated: boolean()
|
|
17133
17165
|
});
|
|
17166
|
+
/** One read of a batch: a device's key or a node's key (exactly one subject). */
|
|
17167
|
+
var QueryManyItemSchema = union([object({
|
|
17168
|
+
deviceId: number().int(),
|
|
17169
|
+
key: string(),
|
|
17170
|
+
scope: string().optional()
|
|
17171
|
+
}), object({
|
|
17172
|
+
forNodeId: string().min(1),
|
|
17173
|
+
key: string(),
|
|
17174
|
+
scope: string().optional()
|
|
17175
|
+
})]);
|
|
17176
|
+
var QueryManyEntrySchema = discriminatedUnion("ok", [object({
|
|
17177
|
+
ok: literal(true),
|
|
17178
|
+
result: QueryResultSchema
|
|
17179
|
+
}), object({
|
|
17180
|
+
ok: literal(false),
|
|
17181
|
+
error: string()
|
|
17182
|
+
})]);
|
|
17134
17183
|
var TierStatusSchema = object({
|
|
17135
17184
|
tier: DeviceHistoryResolutionSchema,
|
|
17136
17185
|
/** `null` until the first background count answered. */
|
|
@@ -17186,16 +17235,22 @@ var DeviceHistoryStatusSchema = object({
|
|
|
17186
17235
|
lastRefreshAt: number().nullable()
|
|
17187
17236
|
})
|
|
17188
17237
|
});
|
|
17189
|
-
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({
|
|
17238
|
+
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
17190
17239
|
deviceId: number().int(),
|
|
17191
17240
|
...QueryWindowShape
|
|
17192
17241
|
}), QueryResultSchema), method(object({
|
|
17193
|
-
|
|
17242
|
+
forNodeId: string().min(1),
|
|
17194
17243
|
...QueryWindowShape
|
|
17195
17244
|
}), QueryResultSchema, { auth: "admin" }), method(object({
|
|
17245
|
+
items: array(QueryManyItemSchema).min(1).max(24),
|
|
17246
|
+
from: QueryWindowShape.from,
|
|
17247
|
+
to: QueryWindowShape.to,
|
|
17248
|
+
resolution: QueryWindowShape.resolution,
|
|
17249
|
+
maxPoints: QueryWindowShape.maxPoints
|
|
17250
|
+
}), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
|
|
17196
17251
|
name: string().regex(/^[a-z0-9-]+$/),
|
|
17197
17252
|
subjectKind: _enum(["device", "node"]),
|
|
17198
|
-
kind:
|
|
17253
|
+
kind: DeviceHistoryProducerKindSchema,
|
|
17199
17254
|
unit: string().optional(),
|
|
17200
17255
|
displayName: string().min(1),
|
|
17201
17256
|
ingest: _enum(["points", "buckets"])
|
|
@@ -40517,14 +40572,106 @@ var LogEntrySchema = object({
|
|
|
40517
40572
|
meta: record(string(), unknown()).optional(),
|
|
40518
40573
|
tags: record(string(), string()).optional()
|
|
40519
40574
|
});
|
|
40520
|
-
|
|
40521
|
-
|
|
40575
|
+
/**
|
|
40576
|
+
* A history READ against one destination (D898).
|
|
40577
|
+
*
|
|
40578
|
+
* Every filter is applied by the PROVIDER, before the limit — a filter the
|
|
40579
|
+
* browser applied after the limit is what made a rare device's lines
|
|
40580
|
+
* unreachable behind a busy one's. `before` / `after` are cursors the provider
|
|
40581
|
+
* minted (opaque to everyone else): a file position for the rotated files, a
|
|
40582
|
+
* nanosecond timestamp for Loki.
|
|
40583
|
+
*
|
|
40584
|
+
* A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
|
|
40585
|
+
* store answers `done: false` with the cursor it reached and the bytes it
|
|
40586
|
+
* scanned, and the caller decides whether to go on. That is what makes a long
|
|
40587
|
+
* scan show progress and stop when asked — `cancelRead` ends the slice in
|
|
40588
|
+
* flight, and not asking for the next slice ends the scan.
|
|
40589
|
+
*/
|
|
40590
|
+
var LogReadQuerySchema = object({
|
|
40591
|
+
/** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
|
|
40592
|
+
requestId: string().min(1).max(64).optional(),
|
|
40593
|
+
/** The device the line is about (`tags.deviceId`, numeric). */
|
|
40594
|
+
deviceId: number().int().optional(),
|
|
40595
|
+
/**
|
|
40596
|
+
* The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
|
|
40597
|
+
* match. Not `addonId`: a cap router reads that name as "which provider".
|
|
40598
|
+
*/
|
|
40599
|
+
fromAddonId: string().min(1).max(200).optional(),
|
|
40600
|
+
/**
|
|
40601
|
+
* The emitting node: matches the agent that emitted the line, the node
|
|
40602
|
+
* itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
|
|
40603
|
+
* semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
|
|
40604
|
+
* name as "which node's provider".
|
|
40605
|
+
*/
|
|
40606
|
+
fromNodeId: string().min(1).max(200).optional(),
|
|
40607
|
+
/** Any other tag, exact match (AND). */
|
|
40608
|
+
tags: record(string(), union([string(), number()])).optional(),
|
|
40609
|
+
/** Severity FLOOR: this level and above. */
|
|
40522
40610
|
level: LogLevelSchema.optional(),
|
|
40523
|
-
|
|
40524
|
-
|
|
40525
|
-
|
|
40526
|
-
|
|
40527
|
-
|
|
40611
|
+
/** Case-insensitive substring over message, scope, tag values and meta values. */
|
|
40612
|
+
text: string().min(1).max(200).optional(),
|
|
40613
|
+
/** Epoch ms, inclusive. */
|
|
40614
|
+
since: number().optional(),
|
|
40615
|
+
/** Epoch ms, inclusive. */
|
|
40616
|
+
until: number().optional(),
|
|
40617
|
+
/** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
|
|
40618
|
+
before: string().min(1).max(1024).optional(),
|
|
40619
|
+
/** Newer than this cursor (exclusive). */
|
|
40620
|
+
after: string().min(1).max(1024).optional(),
|
|
40621
|
+
limit: number().int().min(1).max(1e3).optional(),
|
|
40622
|
+
/** Wall-clock bound of this slice. The provider caps it. */
|
|
40623
|
+
budgetMs: number().int().min(50).max(1e4).optional()
|
|
40624
|
+
});
|
|
40625
|
+
var LogReadResultSchema = object({
|
|
40626
|
+
/** Newest first. */
|
|
40627
|
+
entries: array(object({
|
|
40628
|
+
/** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
|
|
40629
|
+
id: string().optional(),
|
|
40630
|
+
/** Epoch ms. */
|
|
40631
|
+
timestamp: number(),
|
|
40632
|
+
level: LogLevelSchema,
|
|
40633
|
+
scope: string().optional(),
|
|
40634
|
+
message: string(),
|
|
40635
|
+
tags: record(string(), union([string(), number()])).optional(),
|
|
40636
|
+
meta: record(string(), unknown()).optional()
|
|
40637
|
+
})),
|
|
40638
|
+
/** Pass as `before` for the next older page; null when nothing older exists. */
|
|
40639
|
+
nextBefore: string().nullable(),
|
|
40640
|
+
/** Pass as `after` to read what arrived since; null when unknown. */
|
|
40641
|
+
nextAfter: string().nullable(),
|
|
40642
|
+
/** Bytes this slice read (files) or received (remote). Progress, not a promise. */
|
|
40643
|
+
scannedBytes: number().int().nonnegative(),
|
|
40644
|
+
/**
|
|
40645
|
+
* True when the scan in this direction reached the end of the store.
|
|
40646
|
+
* False with fewer than `limit` entries means the budget ran out first —
|
|
40647
|
+
* call again with `nextBefore` to go on.
|
|
40648
|
+
*/
|
|
40649
|
+
done: boolean(),
|
|
40650
|
+
/** True when `cancelRead` ended this slice early. */
|
|
40651
|
+
cancelled: boolean().optional()
|
|
40652
|
+
});
|
|
40653
|
+
var LogReadCapabilitiesSchema = object({
|
|
40654
|
+
/** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
|
|
40655
|
+
readable: boolean(),
|
|
40656
|
+
/** Why not, when `readable` is false — rendered next to the source. */
|
|
40657
|
+
reason: string().nullable(),
|
|
40658
|
+
/** Filters the provider applies itself. A false one is applied by nobody. */
|
|
40659
|
+
filters: object({
|
|
40660
|
+
deviceId: boolean(),
|
|
40661
|
+
addonId: boolean(),
|
|
40662
|
+
nodeId: boolean(),
|
|
40663
|
+
tags: boolean(),
|
|
40664
|
+
level: boolean(),
|
|
40665
|
+
text: boolean(),
|
|
40666
|
+
timeRange: boolean()
|
|
40667
|
+
}),
|
|
40668
|
+
/** How far back the store reaches, when the provider knows (days). */
|
|
40669
|
+
retentionDays: number().nullable()
|
|
40670
|
+
});
|
|
40671
|
+
method(LogEntrySchema, _void(), { kind: "mutation" }), optionalMethod(_void(), LogReadCapabilitiesSchema, { auth: "admin" }), optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }), optionalMethod(object({ requestId: string().min(1).max(64) }), object({ cancelled: boolean() }), {
|
|
40672
|
+
kind: "mutation",
|
|
40673
|
+
auth: "admin"
|
|
40674
|
+
});
|
|
40528
40675
|
/**
|
|
40529
40676
|
* `login-method` — collection cap through which auth addons contribute
|
|
40530
40677
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
@@ -42242,9 +42389,11 @@ var alarmPanelCapability = {
|
|
|
42242
42389
|
*/
|
|
42243
42390
|
durability: "restored",
|
|
42244
42391
|
/**
|
|
42245
|
-
* History (D850):
|
|
42392
|
+
* History (D850): the panel's lifecycle state as an `enum` series —
|
|
42393
|
+
* change-only, no floor, so an `arming -> pending -> triggered` sequence of a
|
|
42394
|
+
* few seconds keeps every step. Who armed it stays in the events ledger.
|
|
42246
42395
|
*/
|
|
42247
|
-
history: "
|
|
42396
|
+
history: { fields: { state: { kind: "enum" } } },
|
|
42248
42397
|
/** Clock fields: written, but excluded from the compare that decides
|
|
42249
42398
|
* whether persisting is worth a SQLite commit. */
|
|
42250
42399
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -43122,6 +43271,33 @@ var NcRuleTargetSchema = object({
|
|
|
43122
43271
|
params: record(string(), unknown()).optional()
|
|
43123
43272
|
});
|
|
43124
43273
|
/**
|
|
43274
|
+
* WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
|
|
43275
|
+
*
|
|
43276
|
+
* Every mode starts from the same CLEAN source frame of the trigger moment
|
|
43277
|
+
* (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
|
|
43278
|
+
* to the zone that fired the rule) and renders it once at send time:
|
|
43279
|
+
* - `scene-boxes` — the whole scene, the subject outlined thick in the accent
|
|
43280
|
+
* colour and every OTHER track visible at that instant outlined thin, each
|
|
43281
|
+
* labelled with class and confidence ("dog 87%").
|
|
43282
|
+
* - `crop` — the subject cut out of that frame around its box at that instant.
|
|
43283
|
+
* - `clean` — the whole scene with nothing drawn on it.
|
|
43284
|
+
* - `none` — no picture.
|
|
43285
|
+
*
|
|
43286
|
+
* A mode that cannot be honoured (no box at that instant, a photograph with no
|
|
43287
|
+
* tracked subject) ships `clean` and names the reason in the log, per camera.
|
|
43288
|
+
* It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
|
|
43289
|
+
* ship a crop on one event and a boxed scene on the next depending on which
|
|
43290
|
+
* stored kind had landed.
|
|
43291
|
+
*/
|
|
43292
|
+
var NcMediaImageSchema = _enum([
|
|
43293
|
+
"scene-boxes",
|
|
43294
|
+
"crop",
|
|
43295
|
+
"clean",
|
|
43296
|
+
"none"
|
|
43297
|
+
]);
|
|
43298
|
+
/**
|
|
43299
|
+
* @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
|
|
43300
|
+
*
|
|
43125
43301
|
* Media attachment policy (P1 still-image subset).
|
|
43126
43302
|
* - `best` — the best AVAILABLE subject image at dispatch time (D-3).
|
|
43127
43303
|
* - `best-matching` — the media that explains WHY the rule fired: a rule
|
|
@@ -43135,6 +43311,8 @@ var NcRuleTargetSchema = object({
|
|
|
43135
43311
|
* - `none` — no attachment.
|
|
43136
43312
|
*/
|
|
43137
43313
|
/**
|
|
43314
|
+
* @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
|
|
43315
|
+
*
|
|
43138
43316
|
* WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
|
|
43139
43317
|
* conflate it with the selection strategy and betray the request: asking for
|
|
43140
43318
|
* the clean scene frame on an object-event owner used to start at
|
|
@@ -43163,16 +43341,29 @@ var NcMediaFrameSchema = _enum([
|
|
|
43163
43341
|
*/
|
|
43164
43342
|
var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
|
|
43165
43343
|
var NcMediaPolicySchema = object({
|
|
43344
|
+
/**
|
|
43345
|
+
* The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
|
|
43346
|
+
* saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
|
|
43347
|
+
* triple below, at load and at every write, and the store keeps only this.
|
|
43348
|
+
*/
|
|
43349
|
+
image: NcMediaImageSchema.optional(),
|
|
43350
|
+
/**
|
|
43351
|
+
* Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
|
|
43352
|
+
* a `crop` never shows it). Valid only on a rule whose trigger is a zone —
|
|
43353
|
+
* `conditions.zones` or an occupancy zone — and refused on save otherwise.
|
|
43354
|
+
* Replaces `zoneCrop`.
|
|
43355
|
+
*/
|
|
43356
|
+
showTriggerZone: boolean().optional(),
|
|
43357
|
+
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
43166
43358
|
attach: _enum([
|
|
43167
43359
|
"best",
|
|
43168
43360
|
"best-matching",
|
|
43169
43361
|
"keyFrame",
|
|
43170
43362
|
"none"
|
|
43171
|
-
]).
|
|
43172
|
-
/**
|
|
43363
|
+
]).optional(),
|
|
43364
|
+
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
43173
43365
|
frame: NcMediaFrameSchema.optional(),
|
|
43174
|
-
/**
|
|
43175
|
-
* "show me the ZONE", not the whole scene or the subject crop. */
|
|
43366
|
+
/** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
|
|
43176
43367
|
zoneCrop: boolean().optional(),
|
|
43177
43368
|
/**
|
|
43178
43369
|
* Also attach a short GIF cut from the stream broker's clip ring around the
|
|
@@ -43344,7 +43535,9 @@ var NcRuleInputSchema = object({
|
|
|
43344
43535
|
* targets.
|
|
43345
43536
|
*/
|
|
43346
43537
|
targetUsers: array(string()).optional(),
|
|
43347
|
-
|
|
43538
|
+
/** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
|
|
43539
|
+
* detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
|
|
43540
|
+
media: NcMediaPolicySchema.default({}),
|
|
43348
43541
|
throttle: NcThrottleSchema.default({
|
|
43349
43542
|
cooldownSec: 60,
|
|
43350
43543
|
scope: "rule-device"
|
|
@@ -44281,13 +44474,37 @@ var NcAlarmModeOpeningsSchema = object({
|
|
|
44281
44474
|
/** Covered devices whose state could not be read (D49): neither open nor closed. */
|
|
44282
44475
|
unknown: array(number().int())
|
|
44283
44476
|
});
|
|
44477
|
+
/**
|
|
44478
|
+
* One alarm INPUT — a (rule, device) pair — the operator bypassed until the
|
|
44479
|
+
* next disarm ("Bypass this input until disarm" on a trigger notification, or
|
|
44480
|
+
* `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
|
|
44481
|
+
* never looks fully armed (D62: off must never look like broken).
|
|
44482
|
+
*/
|
|
44483
|
+
var NcAlarmInputBypassViewSchema = object({
|
|
44484
|
+
ruleId: string(),
|
|
44485
|
+
/** The rule's current name (its frozen name when the rule is gone). */
|
|
44486
|
+
ruleName: string(),
|
|
44487
|
+
/** The input: the sensor of the match, else its camera. */
|
|
44488
|
+
deviceId: number().int(),
|
|
44489
|
+
/** The input's current name. */
|
|
44490
|
+
name: string(),
|
|
44491
|
+
/** When it was bypassed (ms epoch). */
|
|
44492
|
+
since: number(),
|
|
44493
|
+
/** Triggers from this input dropped since. */
|
|
44494
|
+
dropped: number().int().min(0)
|
|
44495
|
+
});
|
|
44284
44496
|
var NcAlarmLiveSchema = object({
|
|
44285
44497
|
state: AlarmStateSchema,
|
|
44286
44498
|
/** The mode being armed into (exit delay) or held; null when disarmed. */
|
|
44287
44499
|
targetMode: AlarmArmModeSchema.nullable(),
|
|
44288
44500
|
availableModes: array(AlarmArmModeSchema),
|
|
44289
44501
|
openings: array(NcAlarmModeOpeningsSchema),
|
|
44290
|
-
exclusions: array(NcAlarmExclusionViewSchema)
|
|
44502
|
+
exclusions: array(NcAlarmExclusionViewSchema),
|
|
44503
|
+
/**
|
|
44504
|
+
* Inputs bypassed for the rest of this arm session; cleared on disarm.
|
|
44505
|
+
* Defaulted so an older hub answer still parses (as "none known").
|
|
44506
|
+
*/
|
|
44507
|
+
bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
|
|
44291
44508
|
});
|
|
44292
44509
|
var NcAlarmConfigSchema = object({
|
|
44293
44510
|
/**
|
|
@@ -55519,9 +55736,11 @@ var connectivityCapability = {
|
|
|
55519
55736
|
*/
|
|
55520
55737
|
durability: "restored",
|
|
55521
55738
|
/**
|
|
55522
|
-
* History (D850):
|
|
55739
|
+
* History (D850): `connected` as a boolean series — change-only, no floor. It
|
|
55740
|
+
* is the upstream entity's own link (a HA connectivity sensor), not the
|
|
55741
|
+
* device's reachability, which stays `device-status.online`.
|
|
55523
55742
|
*/
|
|
55524
|
-
history: "
|
|
55743
|
+
history: { fields: { connected: { kind: "boolean" } } },
|
|
55525
55744
|
/** Clock fields: written, but excluded from the compare that decides
|
|
55526
55745
|
* whether persisting is worth a SQLite commit. */
|
|
55527
55746
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -56345,11 +56564,22 @@ var dishwasherCapability = {
|
|
|
56345
56564
|
},
|
|
56346
56565
|
runtimeState: DishwasherStatusSchema,
|
|
56347
56566
|
durability: "session",
|
|
56348
|
-
history: { fields: {
|
|
56349
|
-
|
|
56350
|
-
|
|
56351
|
-
|
|
56352
|
-
|
|
56567
|
+
history: { fields: {
|
|
56568
|
+
progressPercent: {
|
|
56569
|
+
kind: "gauge",
|
|
56570
|
+
unit: "%",
|
|
56571
|
+
deadband: 2
|
|
56572
|
+
},
|
|
56573
|
+
state: { kind: "enum" },
|
|
56574
|
+
operationState: { kind: "enum" },
|
|
56575
|
+
remainingSeconds: {
|
|
56576
|
+
kind: "gauge",
|
|
56577
|
+
unit: "s",
|
|
56578
|
+
minIntervalMs: 6e4
|
|
56579
|
+
},
|
|
56580
|
+
doorOpen: { kind: "boolean" },
|
|
56581
|
+
powerOn: { kind: "boolean" }
|
|
56582
|
+
} }
|
|
56353
56583
|
};
|
|
56354
56584
|
var DoorbellStatusSchema = object({
|
|
56355
56585
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
@@ -56466,9 +56696,15 @@ var enumSensorCapability = {
|
|
|
56466
56696
|
*/
|
|
56467
56697
|
durability: "restored",
|
|
56468
56698
|
/**
|
|
56469
|
-
* History (D850):
|
|
56699
|
+
* History (D850): the value as an `enum` series (an appliance's program or
|
|
56700
|
+
* operation state, an HVAC action). The option set is per device, so the
|
|
56701
|
+
* value list is LEARNED as values are first seen (bounded). A sensor with a
|
|
56702
|
+
* `format` carries a timestamp, not a state, and is not recorded.
|
|
56470
56703
|
*/
|
|
56471
|
-
history:
|
|
56704
|
+
history: { fields: { value: {
|
|
56705
|
+
kind: "enum",
|
|
56706
|
+
skipWhenSet: "format"
|
|
56707
|
+
} } },
|
|
56472
56708
|
/** Clock fields: written, but excluded from the compare that decides
|
|
56473
56709
|
* whether persisting is worth a SQLite commit. */
|
|
56474
56710
|
volatileStateFields: ["lastFetchedAt"]
|
|
@@ -58442,9 +58678,10 @@ var lockControlCapability = {
|
|
|
58442
58678
|
*/
|
|
58443
58679
|
durability: "restored",
|
|
58444
58680
|
/**
|
|
58445
|
-
* History (D850):
|
|
58681
|
+
* History (D850): the lock's state as an `enum` series — change-only, no
|
|
58682
|
+
* floor: a jam or an unlock lasting seconds is the edge an operator looks for.
|
|
58446
58683
|
*/
|
|
58447
|
-
history: "
|
|
58684
|
+
history: { fields: { state: { kind: "enum" } } },
|
|
58448
58685
|
/** Clock fields: written, but excluded from the compare that decides
|
|
58449
58686
|
* whether persisting is worth a SQLite commit. */
|
|
58450
58687
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -58618,9 +58855,18 @@ var mediaPlayerCapability = {
|
|
|
58618
58855
|
*/
|
|
58619
58856
|
durability: "session",
|
|
58620
58857
|
/**
|
|
58621
|
-
* History (D850):
|
|
58858
|
+
* History (D850): volume (a level an operator or an automation sets; the
|
|
58859
|
+
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
58860
|
+
* `positionMs` is not recorded: it moves continuously while playing.
|
|
58622
58861
|
*/
|
|
58623
|
-
history:
|
|
58862
|
+
history: { fields: {
|
|
58863
|
+
volumeLevel: {
|
|
58864
|
+
kind: "gauge",
|
|
58865
|
+
unit: "%",
|
|
58866
|
+
deadband: 1
|
|
58867
|
+
},
|
|
58868
|
+
isMuted: { kind: "boolean" }
|
|
58869
|
+
} }
|
|
58624
58870
|
};
|
|
58625
58871
|
/**
|
|
58626
58872
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
@@ -64177,9 +64423,29 @@ var streamParamsCapability = {
|
|
|
64177
64423
|
*/
|
|
64178
64424
|
durability: "restored",
|
|
64179
64425
|
/**
|
|
64180
|
-
* History (D850):
|
|
64426
|
+
* History (D850): the configured bitrate and frame rate of the main and sub
|
|
64427
|
+
* profiles. Configuration, so change-only on the default floor: a point is an
|
|
64428
|
+
* operator's (or a tuner's) edit, which is exactly what a chart of a stream's
|
|
64429
|
+
* quality over time must show.
|
|
64181
64430
|
*/
|
|
64182
|
-
history:
|
|
64431
|
+
history: { fields: {
|
|
64432
|
+
"main.bitrate": {
|
|
64433
|
+
kind: "gauge",
|
|
64434
|
+
unit: "kbps"
|
|
64435
|
+
},
|
|
64436
|
+
"main.framerate": {
|
|
64437
|
+
kind: "gauge",
|
|
64438
|
+
unit: "fps"
|
|
64439
|
+
},
|
|
64440
|
+
"sub.bitrate": {
|
|
64441
|
+
kind: "gauge",
|
|
64442
|
+
unit: "kbps"
|
|
64443
|
+
},
|
|
64444
|
+
"sub.framerate": {
|
|
64445
|
+
kind: "gauge",
|
|
64446
|
+
unit: "fps"
|
|
64447
|
+
}
|
|
64448
|
+
} },
|
|
64183
64449
|
/** Clock fields: written, but excluded from the compare that decides
|
|
64184
64450
|
* whether persisting is worth a SQLite commit. */
|
|
64185
64451
|
volatileStateFields: ["lastFetchedAt"]
|
|
@@ -67555,6 +67821,15 @@ var BaseDevice = class {
|
|
|
67555
67821
|
* Drivers can use the `getProbeFlags()` helper to read the flag bag
|
|
67556
67822
|
* with a typed cast.
|
|
67557
67823
|
*
|
|
67824
|
+
* Answer what you KNOW. A plain array is read as the complete list only
|
|
67825
|
+
* while this device is `online` and probed; return
|
|
67826
|
+
* `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
|
|
67827
|
+
* now (no credentials, parent not connected, a failed or partial read) —
|
|
67828
|
+
* the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
|
|
67829
|
+
* to say "connected, and this is the complete list" explicitly. A shrink is
|
|
67830
|
+
* deleted only after a second agreeing complete read on a later probe (D49;
|
|
67831
|
+
* `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
|
|
67832
|
+
*
|
|
67558
67833
|
* Default: no children.
|
|
67559
67834
|
*/
|
|
67560
67835
|
getAccessoryChildren() {
|
|
@@ -71690,7 +71965,19 @@ Object.freeze({
|
|
|
71690
71965
|
addonId: null,
|
|
71691
71966
|
access: "view"
|
|
71692
71967
|
},
|
|
71693
|
-
"logDestination.
|
|
71968
|
+
"logDestination.cancelRead": {
|
|
71969
|
+
capName: "log-destination",
|
|
71970
|
+
capScope: "system",
|
|
71971
|
+
addonId: null,
|
|
71972
|
+
access: "create"
|
|
71973
|
+
},
|
|
71974
|
+
"logDestination.describeRead": {
|
|
71975
|
+
capName: "log-destination",
|
|
71976
|
+
capScope: "system",
|
|
71977
|
+
addonId: null,
|
|
71978
|
+
access: "view"
|
|
71979
|
+
},
|
|
71980
|
+
"logDestination.read": {
|
|
71694
71981
|
capName: "log-destination",
|
|
71695
71982
|
capScope: "system",
|
|
71696
71983
|
addonId: null,
|
|
@@ -77903,6 +78190,11 @@ Object.freeze({
|
|
|
77903
78190
|
form: "single",
|
|
77904
78191
|
optional: false
|
|
77905
78192
|
}],
|
|
78193
|
+
"logDestination.read": [{
|
|
78194
|
+
name: "deviceId",
|
|
78195
|
+
form: "single",
|
|
78196
|
+
optional: true
|
|
78197
|
+
}],
|
|
77906
78198
|
"mediaPlayer.getStatus": [{
|
|
77907
78199
|
name: "deviceId",
|
|
77908
78200
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -5429,7 +5429,7 @@ var ZodIssueCode = {
|
|
|
5429
5429
|
var ZodFirstPartyTypeKind;
|
|
5430
5430
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5431
5431
|
//#endregion
|
|
5432
|
-
//#region ../types/dist/sleep-
|
|
5432
|
+
//#region ../types/dist/sleep-BSuCCFjf.mjs
|
|
5433
5433
|
/**
|
|
5434
5434
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5435
5435
|
* window to float samples (D455).
|
|
@@ -17033,7 +17033,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
|
|
|
17033
17033
|
kind: literal("node"),
|
|
17034
17034
|
nodeId: string().min(1)
|
|
17035
17035
|
})]);
|
|
17036
|
+
/**
|
|
17037
|
+
* `enum` stores a STATE as the ordinal of its value in the series' value list
|
|
17038
|
+
* (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
|
|
17039
|
+
* meaning); a rollup keeps the time spent in each state (`states`).
|
|
17040
|
+
*/
|
|
17036
17041
|
var DeviceHistoryKindSchema = _enum([
|
|
17042
|
+
"gauge",
|
|
17043
|
+
"counter",
|
|
17044
|
+
"boolean",
|
|
17045
|
+
"enum"
|
|
17046
|
+
]);
|
|
17047
|
+
/** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
|
|
17048
|
+
var DeviceHistoryProducerKindSchema = _enum([
|
|
17037
17049
|
"gauge",
|
|
17038
17050
|
"counter",
|
|
17039
17051
|
"boolean"
|
|
@@ -17070,7 +17082,13 @@ var SeriesInfoSchema = object({
|
|
|
17070
17082
|
/** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
|
|
17071
17083
|
unit: string().nullable(),
|
|
17072
17084
|
displayName: string(),
|
|
17073
|
-
source: _enum([
|
|
17085
|
+
source: _enum([
|
|
17086
|
+
"cap",
|
|
17087
|
+
"addon",
|
|
17088
|
+
"derived"
|
|
17089
|
+
]),
|
|
17090
|
+
/** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
|
|
17091
|
+
values: array(string()).readonly().nullable(),
|
|
17074
17092
|
firstTs: number(),
|
|
17075
17093
|
lastTs: number()
|
|
17076
17094
|
});
|
|
@@ -17084,17 +17102,31 @@ var QueryPointSchema = object({
|
|
|
17084
17102
|
twMean: number().nullable(),
|
|
17085
17103
|
min: number(),
|
|
17086
17104
|
max: number(),
|
|
17087
|
-
/** `null` is unknown, never zero (D393). */
|
|
17088
|
-
last: number().nullable()
|
|
17105
|
+
/** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
|
|
17106
|
+
last: number().nullable(),
|
|
17107
|
+
/**
|
|
17108
|
+
* The increase over the point: a `counter`'s growth since the previous point
|
|
17109
|
+
* or bucket (a drop is a reset, counted from zero), and for
|
|
17110
|
+
* {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
|
|
17111
|
+
* every other kind, and when it cannot be known.
|
|
17112
|
+
*/
|
|
17113
|
+
delta: number().nullable(),
|
|
17114
|
+
/** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
|
|
17115
|
+
state: string().nullable(),
|
|
17116
|
+
/** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
|
|
17117
|
+
states: record(string(), number()).nullable()
|
|
17089
17118
|
});
|
|
17090
17119
|
var QuerySeriesSchema = object({
|
|
17091
17120
|
scope: string(),
|
|
17092
17121
|
/** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
|
|
17093
17122
|
before: object({
|
|
17094
17123
|
t: number(),
|
|
17095
|
-
value: number().nullable()
|
|
17124
|
+
value: number().nullable(),
|
|
17125
|
+
state: string().nullable()
|
|
17096
17126
|
}).nullable(),
|
|
17097
|
-
points: array(QueryPointSchema).readonly()
|
|
17127
|
+
points: array(QueryPointSchema).readonly(),
|
|
17128
|
+
/** A derived key: the stored key its points were computed from; `null` for a stored series. */
|
|
17129
|
+
derivedFrom: string().nullable()
|
|
17098
17130
|
});
|
|
17099
17131
|
/** The window part of a query, shared by the device and node forms. */
|
|
17100
17132
|
var QueryWindowShape = {
|
|
@@ -17110,6 +17142,23 @@ var QueryResultSchema = object({
|
|
|
17110
17142
|
series: array(QuerySeriesSchema).readonly(),
|
|
17111
17143
|
truncated: boolean()
|
|
17112
17144
|
});
|
|
17145
|
+
/** One read of a batch: a device's key or a node's key (exactly one subject). */
|
|
17146
|
+
var QueryManyItemSchema = union([object({
|
|
17147
|
+
deviceId: number().int(),
|
|
17148
|
+
key: string(),
|
|
17149
|
+
scope: string().optional()
|
|
17150
|
+
}), object({
|
|
17151
|
+
forNodeId: string().min(1),
|
|
17152
|
+
key: string(),
|
|
17153
|
+
scope: string().optional()
|
|
17154
|
+
})]);
|
|
17155
|
+
var QueryManyEntrySchema = discriminatedUnion("ok", [object({
|
|
17156
|
+
ok: literal(true),
|
|
17157
|
+
result: QueryResultSchema
|
|
17158
|
+
}), object({
|
|
17159
|
+
ok: literal(false),
|
|
17160
|
+
error: string()
|
|
17161
|
+
})]);
|
|
17113
17162
|
var TierStatusSchema = object({
|
|
17114
17163
|
tier: DeviceHistoryResolutionSchema,
|
|
17115
17164
|
/** `null` until the first background count answered. */
|
|
@@ -17165,16 +17214,22 @@ var DeviceHistoryStatusSchema = object({
|
|
|
17165
17214
|
lastRefreshAt: number().nullable()
|
|
17166
17215
|
})
|
|
17167
17216
|
});
|
|
17168
|
-
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({
|
|
17217
|
+
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
17169
17218
|
deviceId: number().int(),
|
|
17170
17219
|
...QueryWindowShape
|
|
17171
17220
|
}), QueryResultSchema), method(object({
|
|
17172
|
-
|
|
17221
|
+
forNodeId: string().min(1),
|
|
17173
17222
|
...QueryWindowShape
|
|
17174
17223
|
}), QueryResultSchema, { auth: "admin" }), method(object({
|
|
17224
|
+
items: array(QueryManyItemSchema).min(1).max(24),
|
|
17225
|
+
from: QueryWindowShape.from,
|
|
17226
|
+
to: QueryWindowShape.to,
|
|
17227
|
+
resolution: QueryWindowShape.resolution,
|
|
17228
|
+
maxPoints: QueryWindowShape.maxPoints
|
|
17229
|
+
}), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
|
|
17175
17230
|
name: string().regex(/^[a-z0-9-]+$/),
|
|
17176
17231
|
subjectKind: _enum(["device", "node"]),
|
|
17177
|
-
kind:
|
|
17232
|
+
kind: DeviceHistoryProducerKindSchema,
|
|
17178
17233
|
unit: string().optional(),
|
|
17179
17234
|
displayName: string().min(1),
|
|
17180
17235
|
ingest: _enum(["points", "buckets"])
|
|
@@ -40496,14 +40551,106 @@ var LogEntrySchema = object({
|
|
|
40496
40551
|
meta: record(string(), unknown()).optional(),
|
|
40497
40552
|
tags: record(string(), string()).optional()
|
|
40498
40553
|
});
|
|
40499
|
-
|
|
40500
|
-
|
|
40554
|
+
/**
|
|
40555
|
+
* A history READ against one destination (D898).
|
|
40556
|
+
*
|
|
40557
|
+
* Every filter is applied by the PROVIDER, before the limit — a filter the
|
|
40558
|
+
* browser applied after the limit is what made a rare device's lines
|
|
40559
|
+
* unreachable behind a busy one's. `before` / `after` are cursors the provider
|
|
40560
|
+
* minted (opaque to everyone else): a file position for the rotated files, a
|
|
40561
|
+
* nanosecond timestamp for Loki.
|
|
40562
|
+
*
|
|
40563
|
+
* A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
|
|
40564
|
+
* store answers `done: false` with the cursor it reached and the bytes it
|
|
40565
|
+
* scanned, and the caller decides whether to go on. That is what makes a long
|
|
40566
|
+
* scan show progress and stop when asked — `cancelRead` ends the slice in
|
|
40567
|
+
* flight, and not asking for the next slice ends the scan.
|
|
40568
|
+
*/
|
|
40569
|
+
var LogReadQuerySchema = object({
|
|
40570
|
+
/** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
|
|
40571
|
+
requestId: string().min(1).max(64).optional(),
|
|
40572
|
+
/** The device the line is about (`tags.deviceId`, numeric). */
|
|
40573
|
+
deviceId: number().int().optional(),
|
|
40574
|
+
/**
|
|
40575
|
+
* The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
|
|
40576
|
+
* match. Not `addonId`: a cap router reads that name as "which provider".
|
|
40577
|
+
*/
|
|
40578
|
+
fromAddonId: string().min(1).max(200).optional(),
|
|
40579
|
+
/**
|
|
40580
|
+
* The emitting node: matches the agent that emitted the line, the node
|
|
40581
|
+
* itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
|
|
40582
|
+
* semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
|
|
40583
|
+
* name as "which node's provider".
|
|
40584
|
+
*/
|
|
40585
|
+
fromNodeId: string().min(1).max(200).optional(),
|
|
40586
|
+
/** Any other tag, exact match (AND). */
|
|
40587
|
+
tags: record(string(), union([string(), number()])).optional(),
|
|
40588
|
+
/** Severity FLOOR: this level and above. */
|
|
40501
40589
|
level: LogLevelSchema.optional(),
|
|
40502
|
-
|
|
40503
|
-
|
|
40504
|
-
|
|
40505
|
-
|
|
40506
|
-
|
|
40590
|
+
/** Case-insensitive substring over message, scope, tag values and meta values. */
|
|
40591
|
+
text: string().min(1).max(200).optional(),
|
|
40592
|
+
/** Epoch ms, inclusive. */
|
|
40593
|
+
since: number().optional(),
|
|
40594
|
+
/** Epoch ms, inclusive. */
|
|
40595
|
+
until: number().optional(),
|
|
40596
|
+
/** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
|
|
40597
|
+
before: string().min(1).max(1024).optional(),
|
|
40598
|
+
/** Newer than this cursor (exclusive). */
|
|
40599
|
+
after: string().min(1).max(1024).optional(),
|
|
40600
|
+
limit: number().int().min(1).max(1e3).optional(),
|
|
40601
|
+
/** Wall-clock bound of this slice. The provider caps it. */
|
|
40602
|
+
budgetMs: number().int().min(50).max(1e4).optional()
|
|
40603
|
+
});
|
|
40604
|
+
var LogReadResultSchema = object({
|
|
40605
|
+
/** Newest first. */
|
|
40606
|
+
entries: array(object({
|
|
40607
|
+
/** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
|
|
40608
|
+
id: string().optional(),
|
|
40609
|
+
/** Epoch ms. */
|
|
40610
|
+
timestamp: number(),
|
|
40611
|
+
level: LogLevelSchema,
|
|
40612
|
+
scope: string().optional(),
|
|
40613
|
+
message: string(),
|
|
40614
|
+
tags: record(string(), union([string(), number()])).optional(),
|
|
40615
|
+
meta: record(string(), unknown()).optional()
|
|
40616
|
+
})),
|
|
40617
|
+
/** Pass as `before` for the next older page; null when nothing older exists. */
|
|
40618
|
+
nextBefore: string().nullable(),
|
|
40619
|
+
/** Pass as `after` to read what arrived since; null when unknown. */
|
|
40620
|
+
nextAfter: string().nullable(),
|
|
40621
|
+
/** Bytes this slice read (files) or received (remote). Progress, not a promise. */
|
|
40622
|
+
scannedBytes: number().int().nonnegative(),
|
|
40623
|
+
/**
|
|
40624
|
+
* True when the scan in this direction reached the end of the store.
|
|
40625
|
+
* False with fewer than `limit` entries means the budget ran out first —
|
|
40626
|
+
* call again with `nextBefore` to go on.
|
|
40627
|
+
*/
|
|
40628
|
+
done: boolean(),
|
|
40629
|
+
/** True when `cancelRead` ended this slice early. */
|
|
40630
|
+
cancelled: boolean().optional()
|
|
40631
|
+
});
|
|
40632
|
+
var LogReadCapabilitiesSchema = object({
|
|
40633
|
+
/** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
|
|
40634
|
+
readable: boolean(),
|
|
40635
|
+
/** Why not, when `readable` is false — rendered next to the source. */
|
|
40636
|
+
reason: string().nullable(),
|
|
40637
|
+
/** Filters the provider applies itself. A false one is applied by nobody. */
|
|
40638
|
+
filters: object({
|
|
40639
|
+
deviceId: boolean(),
|
|
40640
|
+
addonId: boolean(),
|
|
40641
|
+
nodeId: boolean(),
|
|
40642
|
+
tags: boolean(),
|
|
40643
|
+
level: boolean(),
|
|
40644
|
+
text: boolean(),
|
|
40645
|
+
timeRange: boolean()
|
|
40646
|
+
}),
|
|
40647
|
+
/** How far back the store reaches, when the provider knows (days). */
|
|
40648
|
+
retentionDays: number().nullable()
|
|
40649
|
+
});
|
|
40650
|
+
method(LogEntrySchema, _void(), { kind: "mutation" }), optionalMethod(_void(), LogReadCapabilitiesSchema, { auth: "admin" }), optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }), optionalMethod(object({ requestId: string().min(1).max(64) }), object({ cancelled: boolean() }), {
|
|
40651
|
+
kind: "mutation",
|
|
40652
|
+
auth: "admin"
|
|
40653
|
+
});
|
|
40507
40654
|
/**
|
|
40508
40655
|
* `login-method` — collection cap through which auth addons contribute
|
|
40509
40656
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
@@ -42221,9 +42368,11 @@ var alarmPanelCapability = {
|
|
|
42221
42368
|
*/
|
|
42222
42369
|
durability: "restored",
|
|
42223
42370
|
/**
|
|
42224
|
-
* History (D850):
|
|
42371
|
+
* History (D850): the panel's lifecycle state as an `enum` series —
|
|
42372
|
+
* change-only, no floor, so an `arming -> pending -> triggered` sequence of a
|
|
42373
|
+
* few seconds keeps every step. Who armed it stays in the events ledger.
|
|
42225
42374
|
*/
|
|
42226
|
-
history: "
|
|
42375
|
+
history: { fields: { state: { kind: "enum" } } },
|
|
42227
42376
|
/** Clock fields: written, but excluded from the compare that decides
|
|
42228
42377
|
* whether persisting is worth a SQLite commit. */
|
|
42229
42378
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -43101,6 +43250,33 @@ var NcRuleTargetSchema = object({
|
|
|
43101
43250
|
params: record(string(), unknown()).optional()
|
|
43102
43251
|
});
|
|
43103
43252
|
/**
|
|
43253
|
+
* WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
|
|
43254
|
+
*
|
|
43255
|
+
* Every mode starts from the same CLEAN source frame of the trigger moment
|
|
43256
|
+
* (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
|
|
43257
|
+
* to the zone that fired the rule) and renders it once at send time:
|
|
43258
|
+
* - `scene-boxes` — the whole scene, the subject outlined thick in the accent
|
|
43259
|
+
* colour and every OTHER track visible at that instant outlined thin, each
|
|
43260
|
+
* labelled with class and confidence ("dog 87%").
|
|
43261
|
+
* - `crop` — the subject cut out of that frame around its box at that instant.
|
|
43262
|
+
* - `clean` — the whole scene with nothing drawn on it.
|
|
43263
|
+
* - `none` — no picture.
|
|
43264
|
+
*
|
|
43265
|
+
* A mode that cannot be honoured (no box at that instant, a photograph with no
|
|
43266
|
+
* tracked subject) ships `clean` and names the reason in the log, per camera.
|
|
43267
|
+
* It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
|
|
43268
|
+
* ship a crop on one event and a boxed scene on the next depending on which
|
|
43269
|
+
* stored kind had landed.
|
|
43270
|
+
*/
|
|
43271
|
+
var NcMediaImageSchema = _enum([
|
|
43272
|
+
"scene-boxes",
|
|
43273
|
+
"crop",
|
|
43274
|
+
"clean",
|
|
43275
|
+
"none"
|
|
43276
|
+
]);
|
|
43277
|
+
/**
|
|
43278
|
+
* @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
|
|
43279
|
+
*
|
|
43104
43280
|
* Media attachment policy (P1 still-image subset).
|
|
43105
43281
|
* - `best` — the best AVAILABLE subject image at dispatch time (D-3).
|
|
43106
43282
|
* - `best-matching` — the media that explains WHY the rule fired: a rule
|
|
@@ -43114,6 +43290,8 @@ var NcRuleTargetSchema = object({
|
|
|
43114
43290
|
* - `none` — no attachment.
|
|
43115
43291
|
*/
|
|
43116
43292
|
/**
|
|
43293
|
+
* @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
|
|
43294
|
+
*
|
|
43117
43295
|
* WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
|
|
43118
43296
|
* conflate it with the selection strategy and betray the request: asking for
|
|
43119
43297
|
* the clean scene frame on an object-event owner used to start at
|
|
@@ -43142,16 +43320,29 @@ var NcMediaFrameSchema = _enum([
|
|
|
43142
43320
|
*/
|
|
43143
43321
|
var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
|
|
43144
43322
|
var NcMediaPolicySchema = object({
|
|
43323
|
+
/**
|
|
43324
|
+
* The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
|
|
43325
|
+
* saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
|
|
43326
|
+
* triple below, at load and at every write, and the store keeps only this.
|
|
43327
|
+
*/
|
|
43328
|
+
image: NcMediaImageSchema.optional(),
|
|
43329
|
+
/**
|
|
43330
|
+
* Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
|
|
43331
|
+
* a `crop` never shows it). Valid only on a rule whose trigger is a zone —
|
|
43332
|
+
* `conditions.zones` or an occupancy zone — and refused on save otherwise.
|
|
43333
|
+
* Replaces `zoneCrop`.
|
|
43334
|
+
*/
|
|
43335
|
+
showTriggerZone: boolean().optional(),
|
|
43336
|
+
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
43145
43337
|
attach: _enum([
|
|
43146
43338
|
"best",
|
|
43147
43339
|
"best-matching",
|
|
43148
43340
|
"keyFrame",
|
|
43149
43341
|
"none"
|
|
43150
|
-
]).
|
|
43151
|
-
/**
|
|
43342
|
+
]).optional(),
|
|
43343
|
+
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
43152
43344
|
frame: NcMediaFrameSchema.optional(),
|
|
43153
|
-
/**
|
|
43154
|
-
* "show me the ZONE", not the whole scene or the subject crop. */
|
|
43345
|
+
/** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
|
|
43155
43346
|
zoneCrop: boolean().optional(),
|
|
43156
43347
|
/**
|
|
43157
43348
|
* Also attach a short GIF cut from the stream broker's clip ring around the
|
|
@@ -43323,7 +43514,9 @@ var NcRuleInputSchema = object({
|
|
|
43323
43514
|
* targets.
|
|
43324
43515
|
*/
|
|
43325
43516
|
targetUsers: array(string()).optional(),
|
|
43326
|
-
|
|
43517
|
+
/** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
|
|
43518
|
+
* detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
|
|
43519
|
+
media: NcMediaPolicySchema.default({}),
|
|
43327
43520
|
throttle: NcThrottleSchema.default({
|
|
43328
43521
|
cooldownSec: 60,
|
|
43329
43522
|
scope: "rule-device"
|
|
@@ -44260,13 +44453,37 @@ var NcAlarmModeOpeningsSchema = object({
|
|
|
44260
44453
|
/** Covered devices whose state could not be read (D49): neither open nor closed. */
|
|
44261
44454
|
unknown: array(number().int())
|
|
44262
44455
|
});
|
|
44456
|
+
/**
|
|
44457
|
+
* One alarm INPUT — a (rule, device) pair — the operator bypassed until the
|
|
44458
|
+
* next disarm ("Bypass this input until disarm" on a trigger notification, or
|
|
44459
|
+
* `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
|
|
44460
|
+
* never looks fully armed (D62: off must never look like broken).
|
|
44461
|
+
*/
|
|
44462
|
+
var NcAlarmInputBypassViewSchema = object({
|
|
44463
|
+
ruleId: string(),
|
|
44464
|
+
/** The rule's current name (its frozen name when the rule is gone). */
|
|
44465
|
+
ruleName: string(),
|
|
44466
|
+
/** The input: the sensor of the match, else its camera. */
|
|
44467
|
+
deviceId: number().int(),
|
|
44468
|
+
/** The input's current name. */
|
|
44469
|
+
name: string(),
|
|
44470
|
+
/** When it was bypassed (ms epoch). */
|
|
44471
|
+
since: number(),
|
|
44472
|
+
/** Triggers from this input dropped since. */
|
|
44473
|
+
dropped: number().int().min(0)
|
|
44474
|
+
});
|
|
44263
44475
|
var NcAlarmLiveSchema = object({
|
|
44264
44476
|
state: AlarmStateSchema,
|
|
44265
44477
|
/** The mode being armed into (exit delay) or held; null when disarmed. */
|
|
44266
44478
|
targetMode: AlarmArmModeSchema.nullable(),
|
|
44267
44479
|
availableModes: array(AlarmArmModeSchema),
|
|
44268
44480
|
openings: array(NcAlarmModeOpeningsSchema),
|
|
44269
|
-
exclusions: array(NcAlarmExclusionViewSchema)
|
|
44481
|
+
exclusions: array(NcAlarmExclusionViewSchema),
|
|
44482
|
+
/**
|
|
44483
|
+
* Inputs bypassed for the rest of this arm session; cleared on disarm.
|
|
44484
|
+
* Defaulted so an older hub answer still parses (as "none known").
|
|
44485
|
+
*/
|
|
44486
|
+
bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
|
|
44270
44487
|
});
|
|
44271
44488
|
var NcAlarmConfigSchema = object({
|
|
44272
44489
|
/**
|
|
@@ -55498,9 +55715,11 @@ var connectivityCapability = {
|
|
|
55498
55715
|
*/
|
|
55499
55716
|
durability: "restored",
|
|
55500
55717
|
/**
|
|
55501
|
-
* History (D850):
|
|
55718
|
+
* History (D850): `connected` as a boolean series — change-only, no floor. It
|
|
55719
|
+
* is the upstream entity's own link (a HA connectivity sensor), not the
|
|
55720
|
+
* device's reachability, which stays `device-status.online`.
|
|
55502
55721
|
*/
|
|
55503
|
-
history: "
|
|
55722
|
+
history: { fields: { connected: { kind: "boolean" } } },
|
|
55504
55723
|
/** Clock fields: written, but excluded from the compare that decides
|
|
55505
55724
|
* whether persisting is worth a SQLite commit. */
|
|
55506
55725
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -56324,11 +56543,22 @@ var dishwasherCapability = {
|
|
|
56324
56543
|
},
|
|
56325
56544
|
runtimeState: DishwasherStatusSchema,
|
|
56326
56545
|
durability: "session",
|
|
56327
|
-
history: { fields: {
|
|
56328
|
-
|
|
56329
|
-
|
|
56330
|
-
|
|
56331
|
-
|
|
56546
|
+
history: { fields: {
|
|
56547
|
+
progressPercent: {
|
|
56548
|
+
kind: "gauge",
|
|
56549
|
+
unit: "%",
|
|
56550
|
+
deadband: 2
|
|
56551
|
+
},
|
|
56552
|
+
state: { kind: "enum" },
|
|
56553
|
+
operationState: { kind: "enum" },
|
|
56554
|
+
remainingSeconds: {
|
|
56555
|
+
kind: "gauge",
|
|
56556
|
+
unit: "s",
|
|
56557
|
+
minIntervalMs: 6e4
|
|
56558
|
+
},
|
|
56559
|
+
doorOpen: { kind: "boolean" },
|
|
56560
|
+
powerOn: { kind: "boolean" }
|
|
56561
|
+
} }
|
|
56332
56562
|
};
|
|
56333
56563
|
var DoorbellStatusSchema = object({
|
|
56334
56564
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
@@ -56445,9 +56675,15 @@ var enumSensorCapability = {
|
|
|
56445
56675
|
*/
|
|
56446
56676
|
durability: "restored",
|
|
56447
56677
|
/**
|
|
56448
|
-
* History (D850):
|
|
56678
|
+
* History (D850): the value as an `enum` series (an appliance's program or
|
|
56679
|
+
* operation state, an HVAC action). The option set is per device, so the
|
|
56680
|
+
* value list is LEARNED as values are first seen (bounded). A sensor with a
|
|
56681
|
+
* `format` carries a timestamp, not a state, and is not recorded.
|
|
56449
56682
|
*/
|
|
56450
|
-
history:
|
|
56683
|
+
history: { fields: { value: {
|
|
56684
|
+
kind: "enum",
|
|
56685
|
+
skipWhenSet: "format"
|
|
56686
|
+
} } },
|
|
56451
56687
|
/** Clock fields: written, but excluded from the compare that decides
|
|
56452
56688
|
* whether persisting is worth a SQLite commit. */
|
|
56453
56689
|
volatileStateFields: ["lastFetchedAt"]
|
|
@@ -58421,9 +58657,10 @@ var lockControlCapability = {
|
|
|
58421
58657
|
*/
|
|
58422
58658
|
durability: "restored",
|
|
58423
58659
|
/**
|
|
58424
|
-
* History (D850):
|
|
58660
|
+
* History (D850): the lock's state as an `enum` series — change-only, no
|
|
58661
|
+
* floor: a jam or an unlock lasting seconds is the edge an operator looks for.
|
|
58425
58662
|
*/
|
|
58426
|
-
history: "
|
|
58663
|
+
history: { fields: { state: { kind: "enum" } } },
|
|
58427
58664
|
/** Clock fields: written, but excluded from the compare that decides
|
|
58428
58665
|
* whether persisting is worth a SQLite commit. */
|
|
58429
58666
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -58597,9 +58834,18 @@ var mediaPlayerCapability = {
|
|
|
58597
58834
|
*/
|
|
58598
58835
|
durability: "session",
|
|
58599
58836
|
/**
|
|
58600
|
-
* History (D850):
|
|
58837
|
+
* History (D850): volume (a level an operator or an automation sets; the
|
|
58838
|
+
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
58839
|
+
* `positionMs` is not recorded: it moves continuously while playing.
|
|
58601
58840
|
*/
|
|
58602
|
-
history:
|
|
58841
|
+
history: { fields: {
|
|
58842
|
+
volumeLevel: {
|
|
58843
|
+
kind: "gauge",
|
|
58844
|
+
unit: "%",
|
|
58845
|
+
deadband: 1
|
|
58846
|
+
},
|
|
58847
|
+
isMuted: { kind: "boolean" }
|
|
58848
|
+
} }
|
|
58603
58849
|
};
|
|
58604
58850
|
/**
|
|
58605
58851
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
@@ -64156,9 +64402,29 @@ var streamParamsCapability = {
|
|
|
64156
64402
|
*/
|
|
64157
64403
|
durability: "restored",
|
|
64158
64404
|
/**
|
|
64159
|
-
* History (D850):
|
|
64405
|
+
* History (D850): the configured bitrate and frame rate of the main and sub
|
|
64406
|
+
* profiles. Configuration, so change-only on the default floor: a point is an
|
|
64407
|
+
* operator's (or a tuner's) edit, which is exactly what a chart of a stream's
|
|
64408
|
+
* quality over time must show.
|
|
64160
64409
|
*/
|
|
64161
|
-
history:
|
|
64410
|
+
history: { fields: {
|
|
64411
|
+
"main.bitrate": {
|
|
64412
|
+
kind: "gauge",
|
|
64413
|
+
unit: "kbps"
|
|
64414
|
+
},
|
|
64415
|
+
"main.framerate": {
|
|
64416
|
+
kind: "gauge",
|
|
64417
|
+
unit: "fps"
|
|
64418
|
+
},
|
|
64419
|
+
"sub.bitrate": {
|
|
64420
|
+
kind: "gauge",
|
|
64421
|
+
unit: "kbps"
|
|
64422
|
+
},
|
|
64423
|
+
"sub.framerate": {
|
|
64424
|
+
kind: "gauge",
|
|
64425
|
+
unit: "fps"
|
|
64426
|
+
}
|
|
64427
|
+
} },
|
|
64162
64428
|
/** Clock fields: written, but excluded from the compare that decides
|
|
64163
64429
|
* whether persisting is worth a SQLite commit. */
|
|
64164
64430
|
volatileStateFields: ["lastFetchedAt"]
|
|
@@ -67534,6 +67800,15 @@ var BaseDevice = class {
|
|
|
67534
67800
|
* Drivers can use the `getProbeFlags()` helper to read the flag bag
|
|
67535
67801
|
* with a typed cast.
|
|
67536
67802
|
*
|
|
67803
|
+
* Answer what you KNOW. A plain array is read as the complete list only
|
|
67804
|
+
* while this device is `online` and probed; return
|
|
67805
|
+
* `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
|
|
67806
|
+
* now (no credentials, parent not connected, a failed or partial read) —
|
|
67807
|
+
* the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
|
|
67808
|
+
* to say "connected, and this is the complete list" explicitly. A shrink is
|
|
67809
|
+
* deleted only after a second agreeing complete read on a later probe (D49;
|
|
67810
|
+
* `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
|
|
67811
|
+
*
|
|
67537
67812
|
* Default: no children.
|
|
67538
67813
|
*/
|
|
67539
67814
|
getAccessoryChildren() {
|
|
@@ -71669,7 +71944,19 @@ Object.freeze({
|
|
|
71669
71944
|
addonId: null,
|
|
71670
71945
|
access: "view"
|
|
71671
71946
|
},
|
|
71672
|
-
"logDestination.
|
|
71947
|
+
"logDestination.cancelRead": {
|
|
71948
|
+
capName: "log-destination",
|
|
71949
|
+
capScope: "system",
|
|
71950
|
+
addonId: null,
|
|
71951
|
+
access: "create"
|
|
71952
|
+
},
|
|
71953
|
+
"logDestination.describeRead": {
|
|
71954
|
+
capName: "log-destination",
|
|
71955
|
+
capScope: "system",
|
|
71956
|
+
addonId: null,
|
|
71957
|
+
access: "view"
|
|
71958
|
+
},
|
|
71959
|
+
"logDestination.read": {
|
|
71673
71960
|
capName: "log-destination",
|
|
71674
71961
|
capScope: "system",
|
|
71675
71962
|
addonId: null,
|
|
@@ -77882,6 +78169,11 @@ Object.freeze({
|
|
|
77882
78169
|
form: "single",
|
|
77883
78170
|
optional: false
|
|
77884
78171
|
}],
|
|
78172
|
+
"logDestination.read": [{
|
|
78173
|
+
name: "deviceId",
|
|
78174
|
+
form: "single",
|
|
78175
|
+
optional: true
|
|
78176
|
+
}],
|
|
77885
78177
|
"mediaPlayer.getStatus": [{
|
|
77886
78178
|
name: "deviceId",
|
|
77887
78179
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-amcrest",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.143",
|
|
4
4
|
"description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|