@camstack/addon-provider-onvif 1.2.133 → 1.2.135

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.
Files changed (3) hide show
  1. package/dist/addon.js +271 -24
  2. package/dist/addon.mjs +271 -24
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5417,7 +5417,7 @@ var ZodIssueCode = {
5417
5417
  var ZodFirstPartyTypeKind;
5418
5418
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5419
5419
  //#endregion
5420
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5420
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5421
5421
  /**
5422
5422
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5423
5423
  * window to float samples (D455).
@@ -16820,7 +16820,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
16820
16820
  kind: literal("node"),
16821
16821
  nodeId: string().min(1)
16822
16822
  })]);
16823
+ /**
16824
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
16825
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
16826
+ * meaning); a rollup keeps the time spent in each state (`states`).
16827
+ */
16823
16828
  var DeviceHistoryKindSchema = _enum([
16829
+ "gauge",
16830
+ "counter",
16831
+ "boolean",
16832
+ "enum"
16833
+ ]);
16834
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
16835
+ var DeviceHistoryProducerKindSchema = _enum([
16824
16836
  "gauge",
16825
16837
  "counter",
16826
16838
  "boolean"
@@ -16857,7 +16869,13 @@ var SeriesInfoSchema = object({
16857
16869
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
16858
16870
  unit: string().nullable(),
16859
16871
  displayName: string(),
16860
- source: _enum(["cap", "addon"]),
16872
+ source: _enum([
16873
+ "cap",
16874
+ "addon",
16875
+ "derived"
16876
+ ]),
16877
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
16878
+ values: array(string()).readonly().nullable(),
16861
16879
  firstTs: number(),
16862
16880
  lastTs: number()
16863
16881
  });
@@ -16871,17 +16889,31 @@ var QueryPointSchema = object({
16871
16889
  twMean: number().nullable(),
16872
16890
  min: number(),
16873
16891
  max: number(),
16874
- /** `null` is unknown, never zero (D393). */
16875
- last: number().nullable()
16892
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
16893
+ last: number().nullable(),
16894
+ /**
16895
+ * The increase over the point: a `counter`'s growth since the previous point
16896
+ * or bucket (a drop is a reset, counted from zero), and for
16897
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
16898
+ * every other kind, and when it cannot be known.
16899
+ */
16900
+ delta: number().nullable(),
16901
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
16902
+ state: string().nullable(),
16903
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
16904
+ states: record(string(), number()).nullable()
16876
16905
  });
16877
16906
  var QuerySeriesSchema = object({
16878
16907
  scope: string(),
16879
16908
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
16880
16909
  before: object({
16881
16910
  t: number(),
16882
- value: number().nullable()
16911
+ value: number().nullable(),
16912
+ state: string().nullable()
16883
16913
  }).nullable(),
16884
- points: array(QueryPointSchema).readonly()
16914
+ points: array(QueryPointSchema).readonly(),
16915
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
16916
+ derivedFrom: string().nullable()
16885
16917
  });
16886
16918
  /** The window part of a query, shared by the device and node forms. */
16887
16919
  var QueryWindowShape = {
@@ -16897,6 +16929,23 @@ var QueryResultSchema = object({
16897
16929
  series: array(QuerySeriesSchema).readonly(),
16898
16930
  truncated: boolean()
16899
16931
  });
16932
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
16933
+ var QueryManyItemSchema = union([object({
16934
+ deviceId: number().int(),
16935
+ key: string(),
16936
+ scope: string().optional()
16937
+ }), object({
16938
+ forNodeId: string().min(1),
16939
+ key: string(),
16940
+ scope: string().optional()
16941
+ })]);
16942
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
16943
+ ok: literal(true),
16944
+ result: QueryResultSchema
16945
+ }), object({
16946
+ ok: literal(false),
16947
+ error: string()
16948
+ })]);
16900
16949
  var TierStatusSchema = object({
16901
16950
  tier: DeviceHistoryResolutionSchema,
16902
16951
  /** `null` until the first background count answered. */
@@ -16952,16 +17001,22 @@ var DeviceHistoryStatusSchema = object({
16952
17001
  lastRefreshAt: number().nullable()
16953
17002
  })
16954
17003
  });
16955
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17004
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
16956
17005
  deviceId: number().int(),
16957
17006
  ...QueryWindowShape
16958
17007
  }), QueryResultSchema), method(object({
16959
- nodeId: string().min(1),
17008
+ forNodeId: string().min(1),
16960
17009
  ...QueryWindowShape
16961
17010
  }), QueryResultSchema, { auth: "admin" }), method(object({
17011
+ items: array(QueryManyItemSchema).min(1).max(24),
17012
+ from: QueryWindowShape.from,
17013
+ to: QueryWindowShape.to,
17014
+ resolution: QueryWindowShape.resolution,
17015
+ maxPoints: QueryWindowShape.maxPoints
17016
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
16962
17017
  name: string().regex(/^[a-z0-9-]+$/),
16963
17018
  subjectKind: _enum(["device", "node"]),
16964
- kind: DeviceHistoryKindSchema,
17019
+ kind: DeviceHistoryProducerKindSchema,
16965
17020
  unit: string().optional(),
16966
17021
  displayName: string().min(1),
16967
17022
  ingest: _enum(["points", "buckets"])
@@ -40172,14 +40227,106 @@ var LogEntrySchema = object({
40172
40227
  meta: record(string(), unknown()).optional(),
40173
40228
  tags: record(string(), string()).optional()
40174
40229
  });
40175
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40176
- scope: array(string()).optional(),
40230
+ /**
40231
+ * A history READ against one destination (D898).
40232
+ *
40233
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40234
+ * browser applied after the limit is what made a rare device's lines
40235
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40236
+ * minted (opaque to everyone else): a file position for the rotated files, a
40237
+ * nanosecond timestamp for Loki.
40238
+ *
40239
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40240
+ * store answers `done: false` with the cursor it reached and the bytes it
40241
+ * scanned, and the caller decides whether to go on. That is what makes a long
40242
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40243
+ * flight, and not asking for the next slice ends the scan.
40244
+ */
40245
+ var LogReadQuerySchema = object({
40246
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40247
+ requestId: string().min(1).max(64).optional(),
40248
+ /** The device the line is about (`tags.deviceId`, numeric). */
40249
+ deviceId: number().int().optional(),
40250
+ /**
40251
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40252
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40253
+ */
40254
+ fromAddonId: string().min(1).max(200).optional(),
40255
+ /**
40256
+ * The emitting node: matches the agent that emitted the line, the node
40257
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40258
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40259
+ * name as "which node's provider".
40260
+ */
40261
+ fromNodeId: string().min(1).max(200).optional(),
40262
+ /** Any other tag, exact match (AND). */
40263
+ tags: record(string(), union([string(), number()])).optional(),
40264
+ /** Severity FLOOR: this level and above. */
40177
40265
  level: LogLevelSchema.optional(),
40178
- since: date().optional(),
40179
- until: date().optional(),
40180
- limit: number().optional(),
40181
- tags: record(string(), string()).optional()
40182
- }), array(LogEntrySchema).readonly());
40266
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40267
+ text: string().min(1).max(200).optional(),
40268
+ /** Epoch ms, inclusive. */
40269
+ since: number().optional(),
40270
+ /** Epoch ms, inclusive. */
40271
+ until: number().optional(),
40272
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40273
+ before: string().min(1).max(1024).optional(),
40274
+ /** Newer than this cursor (exclusive). */
40275
+ after: string().min(1).max(1024).optional(),
40276
+ limit: number().int().min(1).max(1e3).optional(),
40277
+ /** Wall-clock bound of this slice. The provider caps it. */
40278
+ budgetMs: number().int().min(50).max(1e4).optional()
40279
+ });
40280
+ var LogReadResultSchema = object({
40281
+ /** Newest first. */
40282
+ entries: array(object({
40283
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40284
+ id: string().optional(),
40285
+ /** Epoch ms. */
40286
+ timestamp: number(),
40287
+ level: LogLevelSchema,
40288
+ scope: string().optional(),
40289
+ message: string(),
40290
+ tags: record(string(), union([string(), number()])).optional(),
40291
+ meta: record(string(), unknown()).optional()
40292
+ })),
40293
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40294
+ nextBefore: string().nullable(),
40295
+ /** Pass as `after` to read what arrived since; null when unknown. */
40296
+ nextAfter: string().nullable(),
40297
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40298
+ scannedBytes: number().int().nonnegative(),
40299
+ /**
40300
+ * True when the scan in this direction reached the end of the store.
40301
+ * False with fewer than `limit` entries means the budget ran out first —
40302
+ * call again with `nextBefore` to go on.
40303
+ */
40304
+ done: boolean(),
40305
+ /** True when `cancelRead` ended this slice early. */
40306
+ cancelled: boolean().optional()
40307
+ });
40308
+ var LogReadCapabilitiesSchema = object({
40309
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40310
+ readable: boolean(),
40311
+ /** Why not, when `readable` is false — rendered next to the source. */
40312
+ reason: string().nullable(),
40313
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40314
+ filters: object({
40315
+ deviceId: boolean(),
40316
+ addonId: boolean(),
40317
+ nodeId: boolean(),
40318
+ tags: boolean(),
40319
+ level: boolean(),
40320
+ text: boolean(),
40321
+ timeRange: boolean()
40322
+ }),
40323
+ /** How far back the store reaches, when the provider knows (days). */
40324
+ retentionDays: number().nullable()
40325
+ });
40326
+ 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() }), {
40327
+ kind: "mutation",
40328
+ auth: "admin"
40329
+ });
40183
40330
  /**
40184
40331
  * `login-method` — collection cap through which auth addons contribute
40185
40332
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42735,6 +42882,33 @@ var NcRuleTargetSchema = object({
42735
42882
  params: record(string(), unknown()).optional()
42736
42883
  });
42737
42884
  /**
42885
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
42886
+ *
42887
+ * Every mode starts from the same CLEAN source frame of the trigger moment
42888
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
42889
+ * to the zone that fired the rule) and renders it once at send time:
42890
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
42891
+ * colour and every OTHER track visible at that instant outlined thin, each
42892
+ * labelled with class and confidence ("dog 87%").
42893
+ * - `crop` — the subject cut out of that frame around its box at that instant.
42894
+ * - `clean` — the whole scene with nothing drawn on it.
42895
+ * - `none` — no picture.
42896
+ *
42897
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
42898
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
42899
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
42900
+ * ship a crop on one event and a boxed scene on the next depending on which
42901
+ * stored kind had landed.
42902
+ */
42903
+ var NcMediaImageSchema = _enum([
42904
+ "scene-boxes",
42905
+ "crop",
42906
+ "clean",
42907
+ "none"
42908
+ ]);
42909
+ /**
42910
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42911
+ *
42738
42912
  * Media attachment policy (P1 still-image subset).
42739
42913
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42740
42914
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42748,6 +42922,8 @@ var NcRuleTargetSchema = object({
42748
42922
  * - `none` — no attachment.
42749
42923
  */
42750
42924
  /**
42925
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42926
+ *
42751
42927
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42752
42928
  * conflate it with the selection strategy and betray the request: asking for
42753
42929
  * the clean scene frame on an object-event owner used to start at
@@ -42776,16 +42952,29 @@ var NcMediaFrameSchema = _enum([
42776
42952
  */
42777
42953
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
42778
42954
  var NcMediaPolicySchema = object({
42955
+ /**
42956
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
42957
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
42958
+ * triple below, at load and at every write, and the store keeps only this.
42959
+ */
42960
+ image: NcMediaImageSchema.optional(),
42961
+ /**
42962
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
42963
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
42964
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
42965
+ * Replaces `zoneCrop`.
42966
+ */
42967
+ showTriggerZone: boolean().optional(),
42968
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42779
42969
  attach: _enum([
42780
42970
  "best",
42781
42971
  "best-matching",
42782
42972
  "keyFrame",
42783
42973
  "none"
42784
- ]).default("best"),
42785
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
42974
+ ]).optional(),
42975
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42786
42976
  frame: NcMediaFrameSchema.optional(),
42787
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
42788
- * "show me the ZONE", not the whole scene or the subject crop. */
42977
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
42789
42978
  zoneCrop: boolean().optional(),
42790
42979
  /**
42791
42980
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -42957,7 +43146,9 @@ var NcRuleInputSchema = object({
42957
43146
  * targets.
42958
43147
  */
42959
43148
  targetUsers: array(string()).optional(),
42960
- media: NcMediaPolicySchema.default({ attach: "best" }),
43149
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43150
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43151
+ media: NcMediaPolicySchema.default({}),
42961
43152
  throttle: NcThrottleSchema.default({
42962
43153
  cooldownSec: 60,
42963
43154
  scope: "rule-device"
@@ -43894,13 +44085,37 @@ var NcAlarmModeOpeningsSchema = object({
43894
44085
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
43895
44086
  unknown: array(number().int())
43896
44087
  });
44088
+ /**
44089
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44090
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44091
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44092
+ * never looks fully armed (D62: off must never look like broken).
44093
+ */
44094
+ var NcAlarmInputBypassViewSchema = object({
44095
+ ruleId: string(),
44096
+ /** The rule's current name (its frozen name when the rule is gone). */
44097
+ ruleName: string(),
44098
+ /** The input: the sensor of the match, else its camera. */
44099
+ deviceId: number().int(),
44100
+ /** The input's current name. */
44101
+ name: string(),
44102
+ /** When it was bypassed (ms epoch). */
44103
+ since: number(),
44104
+ /** Triggers from this input dropped since. */
44105
+ dropped: number().int().min(0)
44106
+ });
43897
44107
  var NcAlarmLiveSchema = object({
43898
44108
  state: AlarmStateSchema,
43899
44109
  /** The mode being armed into (exit delay) or held; null when disarmed. */
43900
44110
  targetMode: AlarmArmModeSchema.nullable(),
43901
44111
  availableModes: array(AlarmArmModeSchema),
43902
44112
  openings: array(NcAlarmModeOpeningsSchema),
43903
- exclusions: array(NcAlarmExclusionViewSchema)
44113
+ exclusions: array(NcAlarmExclusionViewSchema),
44114
+ /**
44115
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44116
+ * Defaulted so an older hub answer still parses (as "none known").
44117
+ */
44118
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
43904
44119
  });
43905
44120
  var NcAlarmConfigSchema = object({
43906
44121
  /**
@@ -57901,9 +58116,24 @@ var NpuInfoSchema = object({
57901
58116
  name: string().optional(),
57902
58117
  generation: _enum(["xdna1", "xdna2"]).optional()
57903
58118
  });
58119
+ var CoralBusSchema = _enum(["usb", "pci"]);
57904
58120
  var CoralInfoSchema = object({
57905
58121
  type: literal("coral-edgetpu"),
57906
- bus: string().optional()
58122
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
58123
+ bus: string().optional(),
58124
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
58125
+ count: number().int().nonnegative().optional(),
58126
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
58127
+ units: array(object({
58128
+ bus: CoralBusSchema,
58129
+ count: number().int().nonnegative()
58130
+ })).readonly().optional(),
58131
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
58132
+ unavailable: array(object({
58133
+ bus: CoralBusSchema,
58134
+ count: number().int().nonnegative(),
58135
+ reason: _enum(["driver-missing", "device-not-accessible"])
58136
+ })).readonly().optional()
57907
58137
  });
57908
58138
  var HardwareInfoSchema = object({
57909
58139
  platform: HardwarePlatformSchema,
@@ -66560,7 +66790,19 @@ Object.freeze({
66560
66790
  addonId: null,
66561
66791
  access: "view"
66562
66792
  },
66563
- "logDestination.query": {
66793
+ "logDestination.cancelRead": {
66794
+ capName: "log-destination",
66795
+ capScope: "system",
66796
+ addonId: null,
66797
+ access: "create"
66798
+ },
66799
+ "logDestination.describeRead": {
66800
+ capName: "log-destination",
66801
+ capScope: "system",
66802
+ addonId: null,
66803
+ access: "view"
66804
+ },
66805
+ "logDestination.read": {
66564
66806
  capName: "log-destination",
66565
66807
  capScope: "system",
66566
66808
  addonId: null,
@@ -72633,6 +72875,11 @@ Object.freeze({
72633
72875
  form: "single",
72634
72876
  optional: false
72635
72877
  }],
72878
+ "logDestination.read": [{
72879
+ name: "deviceId",
72880
+ form: "single",
72881
+ optional: true
72882
+ }],
72636
72883
  "mediaPlayer.getStatus": [{
72637
72884
  name: "deviceId",
72638
72885
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5418,7 +5418,7 @@ var ZodIssueCode = {
5418
5418
  var ZodFirstPartyTypeKind;
5419
5419
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5420
5420
  //#endregion
5421
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5421
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5422
5422
  /**
5423
5423
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5424
5424
  * window to float samples (D455).
@@ -16821,7 +16821,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
16821
16821
  kind: literal("node"),
16822
16822
  nodeId: string().min(1)
16823
16823
  })]);
16824
+ /**
16825
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
16826
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
16827
+ * meaning); a rollup keeps the time spent in each state (`states`).
16828
+ */
16824
16829
  var DeviceHistoryKindSchema = _enum([
16830
+ "gauge",
16831
+ "counter",
16832
+ "boolean",
16833
+ "enum"
16834
+ ]);
16835
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
16836
+ var DeviceHistoryProducerKindSchema = _enum([
16825
16837
  "gauge",
16826
16838
  "counter",
16827
16839
  "boolean"
@@ -16858,7 +16870,13 @@ var SeriesInfoSchema = object({
16858
16870
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
16859
16871
  unit: string().nullable(),
16860
16872
  displayName: string(),
16861
- source: _enum(["cap", "addon"]),
16873
+ source: _enum([
16874
+ "cap",
16875
+ "addon",
16876
+ "derived"
16877
+ ]),
16878
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
16879
+ values: array(string()).readonly().nullable(),
16862
16880
  firstTs: number(),
16863
16881
  lastTs: number()
16864
16882
  });
@@ -16872,17 +16890,31 @@ var QueryPointSchema = object({
16872
16890
  twMean: number().nullable(),
16873
16891
  min: number(),
16874
16892
  max: number(),
16875
- /** `null` is unknown, never zero (D393). */
16876
- last: number().nullable()
16893
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
16894
+ last: number().nullable(),
16895
+ /**
16896
+ * The increase over the point: a `counter`'s growth since the previous point
16897
+ * or bucket (a drop is a reset, counted from zero), and for
16898
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
16899
+ * every other kind, and when it cannot be known.
16900
+ */
16901
+ delta: number().nullable(),
16902
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
16903
+ state: string().nullable(),
16904
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
16905
+ states: record(string(), number()).nullable()
16877
16906
  });
16878
16907
  var QuerySeriesSchema = object({
16879
16908
  scope: string(),
16880
16909
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
16881
16910
  before: object({
16882
16911
  t: number(),
16883
- value: number().nullable()
16912
+ value: number().nullable(),
16913
+ state: string().nullable()
16884
16914
  }).nullable(),
16885
- points: array(QueryPointSchema).readonly()
16915
+ points: array(QueryPointSchema).readonly(),
16916
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
16917
+ derivedFrom: string().nullable()
16886
16918
  });
16887
16919
  /** The window part of a query, shared by the device and node forms. */
16888
16920
  var QueryWindowShape = {
@@ -16898,6 +16930,23 @@ var QueryResultSchema = object({
16898
16930
  series: array(QuerySeriesSchema).readonly(),
16899
16931
  truncated: boolean()
16900
16932
  });
16933
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
16934
+ var QueryManyItemSchema = union([object({
16935
+ deviceId: number().int(),
16936
+ key: string(),
16937
+ scope: string().optional()
16938
+ }), object({
16939
+ forNodeId: string().min(1),
16940
+ key: string(),
16941
+ scope: string().optional()
16942
+ })]);
16943
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
16944
+ ok: literal(true),
16945
+ result: QueryResultSchema
16946
+ }), object({
16947
+ ok: literal(false),
16948
+ error: string()
16949
+ })]);
16901
16950
  var TierStatusSchema = object({
16902
16951
  tier: DeviceHistoryResolutionSchema,
16903
16952
  /** `null` until the first background count answered. */
@@ -16953,16 +17002,22 @@ var DeviceHistoryStatusSchema = object({
16953
17002
  lastRefreshAt: number().nullable()
16954
17003
  })
16955
17004
  });
16956
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17005
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
16957
17006
  deviceId: number().int(),
16958
17007
  ...QueryWindowShape
16959
17008
  }), QueryResultSchema), method(object({
16960
- nodeId: string().min(1),
17009
+ forNodeId: string().min(1),
16961
17010
  ...QueryWindowShape
16962
17011
  }), QueryResultSchema, { auth: "admin" }), method(object({
17012
+ items: array(QueryManyItemSchema).min(1).max(24),
17013
+ from: QueryWindowShape.from,
17014
+ to: QueryWindowShape.to,
17015
+ resolution: QueryWindowShape.resolution,
17016
+ maxPoints: QueryWindowShape.maxPoints
17017
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
16963
17018
  name: string().regex(/^[a-z0-9-]+$/),
16964
17019
  subjectKind: _enum(["device", "node"]),
16965
- kind: DeviceHistoryKindSchema,
17020
+ kind: DeviceHistoryProducerKindSchema,
16966
17021
  unit: string().optional(),
16967
17022
  displayName: string().min(1),
16968
17023
  ingest: _enum(["points", "buckets"])
@@ -40173,14 +40228,106 @@ var LogEntrySchema = object({
40173
40228
  meta: record(string(), unknown()).optional(),
40174
40229
  tags: record(string(), string()).optional()
40175
40230
  });
40176
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40177
- scope: array(string()).optional(),
40231
+ /**
40232
+ * A history READ against one destination (D898).
40233
+ *
40234
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40235
+ * browser applied after the limit is what made a rare device's lines
40236
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40237
+ * minted (opaque to everyone else): a file position for the rotated files, a
40238
+ * nanosecond timestamp for Loki.
40239
+ *
40240
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40241
+ * store answers `done: false` with the cursor it reached and the bytes it
40242
+ * scanned, and the caller decides whether to go on. That is what makes a long
40243
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40244
+ * flight, and not asking for the next slice ends the scan.
40245
+ */
40246
+ var LogReadQuerySchema = object({
40247
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40248
+ requestId: string().min(1).max(64).optional(),
40249
+ /** The device the line is about (`tags.deviceId`, numeric). */
40250
+ deviceId: number().int().optional(),
40251
+ /**
40252
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40253
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40254
+ */
40255
+ fromAddonId: string().min(1).max(200).optional(),
40256
+ /**
40257
+ * The emitting node: matches the agent that emitted the line, the node
40258
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40259
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40260
+ * name as "which node's provider".
40261
+ */
40262
+ fromNodeId: string().min(1).max(200).optional(),
40263
+ /** Any other tag, exact match (AND). */
40264
+ tags: record(string(), union([string(), number()])).optional(),
40265
+ /** Severity FLOOR: this level and above. */
40178
40266
  level: LogLevelSchema.optional(),
40179
- since: date().optional(),
40180
- until: date().optional(),
40181
- limit: number().optional(),
40182
- tags: record(string(), string()).optional()
40183
- }), array(LogEntrySchema).readonly());
40267
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40268
+ text: string().min(1).max(200).optional(),
40269
+ /** Epoch ms, inclusive. */
40270
+ since: number().optional(),
40271
+ /** Epoch ms, inclusive. */
40272
+ until: number().optional(),
40273
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40274
+ before: string().min(1).max(1024).optional(),
40275
+ /** Newer than this cursor (exclusive). */
40276
+ after: string().min(1).max(1024).optional(),
40277
+ limit: number().int().min(1).max(1e3).optional(),
40278
+ /** Wall-clock bound of this slice. The provider caps it. */
40279
+ budgetMs: number().int().min(50).max(1e4).optional()
40280
+ });
40281
+ var LogReadResultSchema = object({
40282
+ /** Newest first. */
40283
+ entries: array(object({
40284
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40285
+ id: string().optional(),
40286
+ /** Epoch ms. */
40287
+ timestamp: number(),
40288
+ level: LogLevelSchema,
40289
+ scope: string().optional(),
40290
+ message: string(),
40291
+ tags: record(string(), union([string(), number()])).optional(),
40292
+ meta: record(string(), unknown()).optional()
40293
+ })),
40294
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40295
+ nextBefore: string().nullable(),
40296
+ /** Pass as `after` to read what arrived since; null when unknown. */
40297
+ nextAfter: string().nullable(),
40298
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40299
+ scannedBytes: number().int().nonnegative(),
40300
+ /**
40301
+ * True when the scan in this direction reached the end of the store.
40302
+ * False with fewer than `limit` entries means the budget ran out first —
40303
+ * call again with `nextBefore` to go on.
40304
+ */
40305
+ done: boolean(),
40306
+ /** True when `cancelRead` ended this slice early. */
40307
+ cancelled: boolean().optional()
40308
+ });
40309
+ var LogReadCapabilitiesSchema = object({
40310
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40311
+ readable: boolean(),
40312
+ /** Why not, when `readable` is false — rendered next to the source. */
40313
+ reason: string().nullable(),
40314
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40315
+ filters: object({
40316
+ deviceId: boolean(),
40317
+ addonId: boolean(),
40318
+ nodeId: boolean(),
40319
+ tags: boolean(),
40320
+ level: boolean(),
40321
+ text: boolean(),
40322
+ timeRange: boolean()
40323
+ }),
40324
+ /** How far back the store reaches, when the provider knows (days). */
40325
+ retentionDays: number().nullable()
40326
+ });
40327
+ 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() }), {
40328
+ kind: "mutation",
40329
+ auth: "admin"
40330
+ });
40184
40331
  /**
40185
40332
  * `login-method` — collection cap through which auth addons contribute
40186
40333
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42736,6 +42883,33 @@ var NcRuleTargetSchema = object({
42736
42883
  params: record(string(), unknown()).optional()
42737
42884
  });
42738
42885
  /**
42886
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
42887
+ *
42888
+ * Every mode starts from the same CLEAN source frame of the trigger moment
42889
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
42890
+ * to the zone that fired the rule) and renders it once at send time:
42891
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
42892
+ * colour and every OTHER track visible at that instant outlined thin, each
42893
+ * labelled with class and confidence ("dog 87%").
42894
+ * - `crop` — the subject cut out of that frame around its box at that instant.
42895
+ * - `clean` — the whole scene with nothing drawn on it.
42896
+ * - `none` — no picture.
42897
+ *
42898
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
42899
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
42900
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
42901
+ * ship a crop on one event and a boxed scene on the next depending on which
42902
+ * stored kind had landed.
42903
+ */
42904
+ var NcMediaImageSchema = _enum([
42905
+ "scene-boxes",
42906
+ "crop",
42907
+ "clean",
42908
+ "none"
42909
+ ]);
42910
+ /**
42911
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42912
+ *
42739
42913
  * Media attachment policy (P1 still-image subset).
42740
42914
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42741
42915
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42749,6 +42923,8 @@ var NcRuleTargetSchema = object({
42749
42923
  * - `none` — no attachment.
42750
42924
  */
42751
42925
  /**
42926
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42927
+ *
42752
42928
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42753
42929
  * conflate it with the selection strategy and betray the request: asking for
42754
42930
  * the clean scene frame on an object-event owner used to start at
@@ -42777,16 +42953,29 @@ var NcMediaFrameSchema = _enum([
42777
42953
  */
42778
42954
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
42779
42955
  var NcMediaPolicySchema = object({
42956
+ /**
42957
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
42958
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
42959
+ * triple below, at load and at every write, and the store keeps only this.
42960
+ */
42961
+ image: NcMediaImageSchema.optional(),
42962
+ /**
42963
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
42964
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
42965
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
42966
+ * Replaces `zoneCrop`.
42967
+ */
42968
+ showTriggerZone: boolean().optional(),
42969
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42780
42970
  attach: _enum([
42781
42971
  "best",
42782
42972
  "best-matching",
42783
42973
  "keyFrame",
42784
42974
  "none"
42785
- ]).default("best"),
42786
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
42975
+ ]).optional(),
42976
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42787
42977
  frame: NcMediaFrameSchema.optional(),
42788
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
42789
- * "show me the ZONE", not the whole scene or the subject crop. */
42978
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
42790
42979
  zoneCrop: boolean().optional(),
42791
42980
  /**
42792
42981
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -42958,7 +43147,9 @@ var NcRuleInputSchema = object({
42958
43147
  * targets.
42959
43148
  */
42960
43149
  targetUsers: array(string()).optional(),
42961
- media: NcMediaPolicySchema.default({ attach: "best" }),
43150
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43151
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43152
+ media: NcMediaPolicySchema.default({}),
42962
43153
  throttle: NcThrottleSchema.default({
42963
43154
  cooldownSec: 60,
42964
43155
  scope: "rule-device"
@@ -43895,13 +44086,37 @@ var NcAlarmModeOpeningsSchema = object({
43895
44086
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
43896
44087
  unknown: array(number().int())
43897
44088
  });
44089
+ /**
44090
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44091
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44092
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44093
+ * never looks fully armed (D62: off must never look like broken).
44094
+ */
44095
+ var NcAlarmInputBypassViewSchema = object({
44096
+ ruleId: string(),
44097
+ /** The rule's current name (its frozen name when the rule is gone). */
44098
+ ruleName: string(),
44099
+ /** The input: the sensor of the match, else its camera. */
44100
+ deviceId: number().int(),
44101
+ /** The input's current name. */
44102
+ name: string(),
44103
+ /** When it was bypassed (ms epoch). */
44104
+ since: number(),
44105
+ /** Triggers from this input dropped since. */
44106
+ dropped: number().int().min(0)
44107
+ });
43898
44108
  var NcAlarmLiveSchema = object({
43899
44109
  state: AlarmStateSchema,
43900
44110
  /** The mode being armed into (exit delay) or held; null when disarmed. */
43901
44111
  targetMode: AlarmArmModeSchema.nullable(),
43902
44112
  availableModes: array(AlarmArmModeSchema),
43903
44113
  openings: array(NcAlarmModeOpeningsSchema),
43904
- exclusions: array(NcAlarmExclusionViewSchema)
44114
+ exclusions: array(NcAlarmExclusionViewSchema),
44115
+ /**
44116
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44117
+ * Defaulted so an older hub answer still parses (as "none known").
44118
+ */
44119
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
43905
44120
  });
43906
44121
  var NcAlarmConfigSchema = object({
43907
44122
  /**
@@ -57902,9 +58117,24 @@ var NpuInfoSchema = object({
57902
58117
  name: string().optional(),
57903
58118
  generation: _enum(["xdna1", "xdna2"]).optional()
57904
58119
  });
58120
+ var CoralBusSchema = _enum(["usb", "pci"]);
57905
58121
  var CoralInfoSchema = object({
57906
58122
  type: literal("coral-edgetpu"),
57907
- bus: string().optional()
58123
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
58124
+ bus: string().optional(),
58125
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
58126
+ count: number().int().nonnegative().optional(),
58127
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
58128
+ units: array(object({
58129
+ bus: CoralBusSchema,
58130
+ count: number().int().nonnegative()
58131
+ })).readonly().optional(),
58132
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
58133
+ unavailable: array(object({
58134
+ bus: CoralBusSchema,
58135
+ count: number().int().nonnegative(),
58136
+ reason: _enum(["driver-missing", "device-not-accessible"])
58137
+ })).readonly().optional()
57908
58138
  });
57909
58139
  var HardwareInfoSchema = object({
57910
58140
  platform: HardwarePlatformSchema,
@@ -66561,7 +66791,19 @@ Object.freeze({
66561
66791
  addonId: null,
66562
66792
  access: "view"
66563
66793
  },
66564
- "logDestination.query": {
66794
+ "logDestination.cancelRead": {
66795
+ capName: "log-destination",
66796
+ capScope: "system",
66797
+ addonId: null,
66798
+ access: "create"
66799
+ },
66800
+ "logDestination.describeRead": {
66801
+ capName: "log-destination",
66802
+ capScope: "system",
66803
+ addonId: null,
66804
+ access: "view"
66805
+ },
66806
+ "logDestination.read": {
66565
66807
  capName: "log-destination",
66566
66808
  capScope: "system",
66567
66809
  addonId: null,
@@ -72634,6 +72876,11 @@ Object.freeze({
72634
72876
  form: "single",
72635
72877
  optional: false
72636
72878
  }],
72879
+ "logDestination.read": [{
72880
+ name: "deviceId",
72881
+ form: "single",
72882
+ optional: true
72883
+ }],
72637
72884
  "mediaPlayer.getStatus": [{
72638
72885
  name: "deviceId",
72639
72886
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.133",
3
+ "version": "1.2.135",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",