@camstack/addon-export-alexa 1.2.150 → 1.2.152

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.
@@ -5449,7 +5449,7 @@ var ZodIssueCode = {
5449
5449
  var ZodFirstPartyTypeKind;
5450
5450
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5451
5451
  //#endregion
5452
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5452
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5453
5453
  /**
5454
5454
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5455
5455
  * window to float samples (D455).
@@ -17157,7 +17157,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17157
17157
  kind: literal("node"),
17158
17158
  nodeId: string().min(1)
17159
17159
  })]);
17160
+ /**
17161
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17162
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17163
+ * meaning); a rollup keeps the time spent in each state (`states`).
17164
+ */
17160
17165
  var DeviceHistoryKindSchema = _enum([
17166
+ "gauge",
17167
+ "counter",
17168
+ "boolean",
17169
+ "enum"
17170
+ ]);
17171
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17172
+ var DeviceHistoryProducerKindSchema = _enum([
17161
17173
  "gauge",
17162
17174
  "counter",
17163
17175
  "boolean"
@@ -17194,7 +17206,13 @@ var SeriesInfoSchema = object({
17194
17206
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17195
17207
  unit: string().nullable(),
17196
17208
  displayName: string(),
17197
- source: _enum(["cap", "addon"]),
17209
+ source: _enum([
17210
+ "cap",
17211
+ "addon",
17212
+ "derived"
17213
+ ]),
17214
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17215
+ values: array(string()).readonly().nullable(),
17198
17216
  firstTs: number(),
17199
17217
  lastTs: number()
17200
17218
  });
@@ -17208,17 +17226,31 @@ var QueryPointSchema = object({
17208
17226
  twMean: number().nullable(),
17209
17227
  min: number(),
17210
17228
  max: number(),
17211
- /** `null` is unknown, never zero (D393). */
17212
- last: number().nullable()
17229
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17230
+ last: number().nullable(),
17231
+ /**
17232
+ * The increase over the point: a `counter`'s growth since the previous point
17233
+ * or bucket (a drop is a reset, counted from zero), and for
17234
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17235
+ * every other kind, and when it cannot be known.
17236
+ */
17237
+ delta: number().nullable(),
17238
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17239
+ state: string().nullable(),
17240
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17241
+ states: record(string(), number()).nullable()
17213
17242
  });
17214
17243
  var QuerySeriesSchema = object({
17215
17244
  scope: string(),
17216
17245
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17217
17246
  before: object({
17218
17247
  t: number(),
17219
- value: number().nullable()
17248
+ value: number().nullable(),
17249
+ state: string().nullable()
17220
17250
  }).nullable(),
17221
- points: array(QueryPointSchema).readonly()
17251
+ points: array(QueryPointSchema).readonly(),
17252
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17253
+ derivedFrom: string().nullable()
17222
17254
  });
17223
17255
  /** The window part of a query, shared by the device and node forms. */
17224
17256
  var QueryWindowShape = {
@@ -17234,6 +17266,23 @@ var QueryResultSchema = object({
17234
17266
  series: array(QuerySeriesSchema).readonly(),
17235
17267
  truncated: boolean()
17236
17268
  });
17269
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17270
+ var QueryManyItemSchema = union([object({
17271
+ deviceId: number().int(),
17272
+ key: string(),
17273
+ scope: string().optional()
17274
+ }), object({
17275
+ forNodeId: string().min(1),
17276
+ key: string(),
17277
+ scope: string().optional()
17278
+ })]);
17279
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17280
+ ok: literal(true),
17281
+ result: QueryResultSchema
17282
+ }), object({
17283
+ ok: literal(false),
17284
+ error: string()
17285
+ })]);
17237
17286
  var TierStatusSchema = object({
17238
17287
  tier: DeviceHistoryResolutionSchema,
17239
17288
  /** `null` until the first background count answered. */
@@ -17289,16 +17338,22 @@ var DeviceHistoryStatusSchema = object({
17289
17338
  lastRefreshAt: number().nullable()
17290
17339
  })
17291
17340
  });
17292
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17341
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17293
17342
  deviceId: number().int(),
17294
17343
  ...QueryWindowShape
17295
17344
  }), QueryResultSchema), method(object({
17296
- nodeId: string().min(1),
17345
+ forNodeId: string().min(1),
17297
17346
  ...QueryWindowShape
17298
17347
  }), QueryResultSchema, { auth: "admin" }), method(object({
17348
+ items: array(QueryManyItemSchema).min(1).max(24),
17349
+ from: QueryWindowShape.from,
17350
+ to: QueryWindowShape.to,
17351
+ resolution: QueryWindowShape.resolution,
17352
+ maxPoints: QueryWindowShape.maxPoints
17353
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17299
17354
  name: string().regex(/^[a-z0-9-]+$/),
17300
17355
  subjectKind: _enum(["device", "node"]),
17301
- kind: DeviceHistoryKindSchema,
17356
+ kind: DeviceHistoryProducerKindSchema,
17302
17357
  unit: string().optional(),
17303
17358
  displayName: string().min(1),
17304
17359
  ingest: _enum(["points", "buckets"])
@@ -40340,14 +40395,106 @@ var LogEntrySchema = object({
40340
40395
  meta: record(string(), unknown()).optional(),
40341
40396
  tags: record(string(), string()).optional()
40342
40397
  });
40343
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40344
- scope: array(string()).optional(),
40398
+ /**
40399
+ * A history READ against one destination (D898).
40400
+ *
40401
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40402
+ * browser applied after the limit is what made a rare device's lines
40403
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40404
+ * minted (opaque to everyone else): a file position for the rotated files, a
40405
+ * nanosecond timestamp for Loki.
40406
+ *
40407
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40408
+ * store answers `done: false` with the cursor it reached and the bytes it
40409
+ * scanned, and the caller decides whether to go on. That is what makes a long
40410
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40411
+ * flight, and not asking for the next slice ends the scan.
40412
+ */
40413
+ var LogReadQuerySchema = object({
40414
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40415
+ requestId: string().min(1).max(64).optional(),
40416
+ /** The device the line is about (`tags.deviceId`, numeric). */
40417
+ deviceId: number().int().optional(),
40418
+ /**
40419
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40420
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40421
+ */
40422
+ fromAddonId: string().min(1).max(200).optional(),
40423
+ /**
40424
+ * The emitting node: matches the agent that emitted the line, the node
40425
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40426
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40427
+ * name as "which node's provider".
40428
+ */
40429
+ fromNodeId: string().min(1).max(200).optional(),
40430
+ /** Any other tag, exact match (AND). */
40431
+ tags: record(string(), union([string(), number()])).optional(),
40432
+ /** Severity FLOOR: this level and above. */
40345
40433
  level: LogLevelSchema.optional(),
40346
- since: date().optional(),
40347
- until: date().optional(),
40348
- limit: number().optional(),
40349
- tags: record(string(), string()).optional()
40350
- }), array(LogEntrySchema).readonly());
40434
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40435
+ text: string().min(1).max(200).optional(),
40436
+ /** Epoch ms, inclusive. */
40437
+ since: number().optional(),
40438
+ /** Epoch ms, inclusive. */
40439
+ until: number().optional(),
40440
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40441
+ before: string().min(1).max(1024).optional(),
40442
+ /** Newer than this cursor (exclusive). */
40443
+ after: string().min(1).max(1024).optional(),
40444
+ limit: number().int().min(1).max(1e3).optional(),
40445
+ /** Wall-clock bound of this slice. The provider caps it. */
40446
+ budgetMs: number().int().min(50).max(1e4).optional()
40447
+ });
40448
+ var LogReadResultSchema = object({
40449
+ /** Newest first. */
40450
+ entries: array(object({
40451
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40452
+ id: string().optional(),
40453
+ /** Epoch ms. */
40454
+ timestamp: number(),
40455
+ level: LogLevelSchema,
40456
+ scope: string().optional(),
40457
+ message: string(),
40458
+ tags: record(string(), union([string(), number()])).optional(),
40459
+ meta: record(string(), unknown()).optional()
40460
+ })),
40461
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40462
+ nextBefore: string().nullable(),
40463
+ /** Pass as `after` to read what arrived since; null when unknown. */
40464
+ nextAfter: string().nullable(),
40465
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40466
+ scannedBytes: number().int().nonnegative(),
40467
+ /**
40468
+ * True when the scan in this direction reached the end of the store.
40469
+ * False with fewer than `limit` entries means the budget ran out first —
40470
+ * call again with `nextBefore` to go on.
40471
+ */
40472
+ done: boolean(),
40473
+ /** True when `cancelRead` ended this slice early. */
40474
+ cancelled: boolean().optional()
40475
+ });
40476
+ var LogReadCapabilitiesSchema = object({
40477
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40478
+ readable: boolean(),
40479
+ /** Why not, when `readable` is false — rendered next to the source. */
40480
+ reason: string().nullable(),
40481
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40482
+ filters: object({
40483
+ deviceId: boolean(),
40484
+ addonId: boolean(),
40485
+ nodeId: boolean(),
40486
+ tags: boolean(),
40487
+ level: boolean(),
40488
+ text: boolean(),
40489
+ timeRange: boolean()
40490
+ }),
40491
+ /** How far back the store reaches, when the provider knows (days). */
40492
+ retentionDays: number().nullable()
40493
+ });
40494
+ 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() }), {
40495
+ kind: "mutation",
40496
+ auth: "admin"
40497
+ });
40351
40498
  /**
40352
40499
  * `login-method` — collection cap through which auth addons contribute
40353
40500
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42903,6 +43050,33 @@ var NcRuleTargetSchema = object({
42903
43050
  params: record(string(), unknown()).optional()
42904
43051
  });
42905
43052
  /**
43053
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43054
+ *
43055
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43056
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43057
+ * to the zone that fired the rule) and renders it once at send time:
43058
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43059
+ * colour and every OTHER track visible at that instant outlined thin, each
43060
+ * labelled with class and confidence ("dog 87%").
43061
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43062
+ * - `clean` — the whole scene with nothing drawn on it.
43063
+ * - `none` — no picture.
43064
+ *
43065
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43066
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43067
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43068
+ * ship a crop on one event and a boxed scene on the next depending on which
43069
+ * stored kind had landed.
43070
+ */
43071
+ var NcMediaImageSchema = _enum([
43072
+ "scene-boxes",
43073
+ "crop",
43074
+ "clean",
43075
+ "none"
43076
+ ]);
43077
+ /**
43078
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43079
+ *
42906
43080
  * Media attachment policy (P1 still-image subset).
42907
43081
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42908
43082
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42916,6 +43090,8 @@ var NcRuleTargetSchema = object({
42916
43090
  * - `none` — no attachment.
42917
43091
  */
42918
43092
  /**
43093
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43094
+ *
42919
43095
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42920
43096
  * conflate it with the selection strategy and betray the request: asking for
42921
43097
  * the clean scene frame on an object-event owner used to start at
@@ -42944,16 +43120,29 @@ var NcMediaFrameSchema = _enum([
42944
43120
  */
42945
43121
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
42946
43122
  var NcMediaPolicySchema = object({
43123
+ /**
43124
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43125
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43126
+ * triple below, at load and at every write, and the store keeps only this.
43127
+ */
43128
+ image: NcMediaImageSchema.optional(),
43129
+ /**
43130
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43131
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43132
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43133
+ * Replaces `zoneCrop`.
43134
+ */
43135
+ showTriggerZone: boolean().optional(),
43136
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42947
43137
  attach: _enum([
42948
43138
  "best",
42949
43139
  "best-matching",
42950
43140
  "keyFrame",
42951
43141
  "none"
42952
- ]).default("best"),
42953
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43142
+ ]).optional(),
43143
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42954
43144
  frame: NcMediaFrameSchema.optional(),
42955
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
42956
- * "show me the ZONE", not the whole scene or the subject crop. */
43145
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
42957
43146
  zoneCrop: boolean().optional(),
42958
43147
  /**
42959
43148
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43125,7 +43314,9 @@ var NcRuleInputSchema = object({
43125
43314
  * targets.
43126
43315
  */
43127
43316
  targetUsers: array(string()).optional(),
43128
- media: NcMediaPolicySchema.default({ attach: "best" }),
43317
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43318
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43319
+ media: NcMediaPolicySchema.default({}),
43129
43320
  throttle: NcThrottleSchema.default({
43130
43321
  cooldownSec: 60,
43131
43322
  scope: "rule-device"
@@ -44062,13 +44253,37 @@ var NcAlarmModeOpeningsSchema = object({
44062
44253
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44063
44254
  unknown: array(number().int())
44064
44255
  });
44256
+ /**
44257
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44258
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44259
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44260
+ * never looks fully armed (D62: off must never look like broken).
44261
+ */
44262
+ var NcAlarmInputBypassViewSchema = object({
44263
+ ruleId: string(),
44264
+ /** The rule's current name (its frozen name when the rule is gone). */
44265
+ ruleName: string(),
44266
+ /** The input: the sensor of the match, else its camera. */
44267
+ deviceId: number().int(),
44268
+ /** The input's current name. */
44269
+ name: string(),
44270
+ /** When it was bypassed (ms epoch). */
44271
+ since: number(),
44272
+ /** Triggers from this input dropped since. */
44273
+ dropped: number().int().min(0)
44274
+ });
44065
44275
  var NcAlarmLiveSchema = object({
44066
44276
  state: AlarmStateSchema,
44067
44277
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44068
44278
  targetMode: AlarmArmModeSchema.nullable(),
44069
44279
  availableModes: array(AlarmArmModeSchema),
44070
44280
  openings: array(NcAlarmModeOpeningsSchema),
44071
- exclusions: array(NcAlarmExclusionViewSchema)
44281
+ exclusions: array(NcAlarmExclusionViewSchema),
44282
+ /**
44283
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44284
+ * Defaulted so an older hub answer still parses (as "none known").
44285
+ */
44286
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44072
44287
  });
44073
44288
  var NcAlarmConfigSchema = object({
44074
44289
  /**
@@ -58013,9 +58228,24 @@ var NpuInfoSchema = object({
58013
58228
  name: string().optional(),
58014
58229
  generation: _enum(["xdna1", "xdna2"]).optional()
58015
58230
  });
58231
+ var CoralBusSchema = _enum(["usb", "pci"]);
58016
58232
  var CoralInfoSchema = object({
58017
58233
  type: literal("coral-edgetpu"),
58018
- bus: string().optional()
58234
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
58235
+ bus: string().optional(),
58236
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
58237
+ count: number().int().nonnegative().optional(),
58238
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
58239
+ units: array(object({
58240
+ bus: CoralBusSchema,
58241
+ count: number().int().nonnegative()
58242
+ })).readonly().optional(),
58243
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
58244
+ unavailable: array(object({
58245
+ bus: CoralBusSchema,
58246
+ count: number().int().nonnegative(),
58247
+ reason: _enum(["driver-missing", "device-not-accessible"])
58248
+ })).readonly().optional()
58019
58249
  });
58020
58250
  var HardwareInfoSchema = object({
58021
58251
  platform: HardwarePlatformSchema,
@@ -65778,7 +66008,19 @@ Object.freeze({
65778
66008
  addonId: null,
65779
66009
  access: "view"
65780
66010
  },
65781
- "logDestination.query": {
66011
+ "logDestination.cancelRead": {
66012
+ capName: "log-destination",
66013
+ capScope: "system",
66014
+ addonId: null,
66015
+ access: "create"
66016
+ },
66017
+ "logDestination.describeRead": {
66018
+ capName: "log-destination",
66019
+ capScope: "system",
66020
+ addonId: null,
66021
+ access: "view"
66022
+ },
66023
+ "logDestination.read": {
65782
66024
  capName: "log-destination",
65783
66025
  capScope: "system",
65784
66026
  addonId: null,
@@ -71785,6 +72027,11 @@ Object.freeze({
71785
72027
  form: "single",
71786
72028
  optional: false
71787
72029
  }],
72030
+ "logDestination.read": [{
72031
+ name: "deviceId",
72032
+ form: "single",
72033
+ optional: true
72034
+ }],
71788
72035
  "mediaPlayer.getStatus": [{
71789
72036
  name: "deviceId",
71790
72037
  form: "single",
@@ -5420,7 +5420,7 @@ var ZodIssueCode = {
5420
5420
  var ZodFirstPartyTypeKind;
5421
5421
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5422
5422
  //#endregion
5423
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5423
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5424
5424
  /**
5425
5425
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5426
5426
  * window to float samples (D455).
@@ -17128,7 +17128,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17128
17128
  kind: literal("node"),
17129
17129
  nodeId: string().min(1)
17130
17130
  })]);
17131
+ /**
17132
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17133
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17134
+ * meaning); a rollup keeps the time spent in each state (`states`).
17135
+ */
17131
17136
  var DeviceHistoryKindSchema = _enum([
17137
+ "gauge",
17138
+ "counter",
17139
+ "boolean",
17140
+ "enum"
17141
+ ]);
17142
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17143
+ var DeviceHistoryProducerKindSchema = _enum([
17132
17144
  "gauge",
17133
17145
  "counter",
17134
17146
  "boolean"
@@ -17165,7 +17177,13 @@ var SeriesInfoSchema = object({
17165
17177
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17166
17178
  unit: string().nullable(),
17167
17179
  displayName: string(),
17168
- source: _enum(["cap", "addon"]),
17180
+ source: _enum([
17181
+ "cap",
17182
+ "addon",
17183
+ "derived"
17184
+ ]),
17185
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17186
+ values: array(string()).readonly().nullable(),
17169
17187
  firstTs: number(),
17170
17188
  lastTs: number()
17171
17189
  });
@@ -17179,17 +17197,31 @@ var QueryPointSchema = object({
17179
17197
  twMean: number().nullable(),
17180
17198
  min: number(),
17181
17199
  max: number(),
17182
- /** `null` is unknown, never zero (D393). */
17183
- last: number().nullable()
17200
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17201
+ last: number().nullable(),
17202
+ /**
17203
+ * The increase over the point: a `counter`'s growth since the previous point
17204
+ * or bucket (a drop is a reset, counted from zero), and for
17205
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17206
+ * every other kind, and when it cannot be known.
17207
+ */
17208
+ delta: number().nullable(),
17209
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17210
+ state: string().nullable(),
17211
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17212
+ states: record(string(), number()).nullable()
17184
17213
  });
17185
17214
  var QuerySeriesSchema = object({
17186
17215
  scope: string(),
17187
17216
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17188
17217
  before: object({
17189
17218
  t: number(),
17190
- value: number().nullable()
17219
+ value: number().nullable(),
17220
+ state: string().nullable()
17191
17221
  }).nullable(),
17192
- points: array(QueryPointSchema).readonly()
17222
+ points: array(QueryPointSchema).readonly(),
17223
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17224
+ derivedFrom: string().nullable()
17193
17225
  });
17194
17226
  /** The window part of a query, shared by the device and node forms. */
17195
17227
  var QueryWindowShape = {
@@ -17205,6 +17237,23 @@ var QueryResultSchema = object({
17205
17237
  series: array(QuerySeriesSchema).readonly(),
17206
17238
  truncated: boolean()
17207
17239
  });
17240
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17241
+ var QueryManyItemSchema = union([object({
17242
+ deviceId: number().int(),
17243
+ key: string(),
17244
+ scope: string().optional()
17245
+ }), object({
17246
+ forNodeId: string().min(1),
17247
+ key: string(),
17248
+ scope: string().optional()
17249
+ })]);
17250
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17251
+ ok: literal(true),
17252
+ result: QueryResultSchema
17253
+ }), object({
17254
+ ok: literal(false),
17255
+ error: string()
17256
+ })]);
17208
17257
  var TierStatusSchema = object({
17209
17258
  tier: DeviceHistoryResolutionSchema,
17210
17259
  /** `null` until the first background count answered. */
@@ -17260,16 +17309,22 @@ var DeviceHistoryStatusSchema = object({
17260
17309
  lastRefreshAt: number().nullable()
17261
17310
  })
17262
17311
  });
17263
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17312
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17264
17313
  deviceId: number().int(),
17265
17314
  ...QueryWindowShape
17266
17315
  }), QueryResultSchema), method(object({
17267
- nodeId: string().min(1),
17316
+ forNodeId: string().min(1),
17268
17317
  ...QueryWindowShape
17269
17318
  }), QueryResultSchema, { auth: "admin" }), method(object({
17319
+ items: array(QueryManyItemSchema).min(1).max(24),
17320
+ from: QueryWindowShape.from,
17321
+ to: QueryWindowShape.to,
17322
+ resolution: QueryWindowShape.resolution,
17323
+ maxPoints: QueryWindowShape.maxPoints
17324
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17270
17325
  name: string().regex(/^[a-z0-9-]+$/),
17271
17326
  subjectKind: _enum(["device", "node"]),
17272
- kind: DeviceHistoryKindSchema,
17327
+ kind: DeviceHistoryProducerKindSchema,
17273
17328
  unit: string().optional(),
17274
17329
  displayName: string().min(1),
17275
17330
  ingest: _enum(["points", "buckets"])
@@ -40311,14 +40366,106 @@ var LogEntrySchema = object({
40311
40366
  meta: record(string(), unknown()).optional(),
40312
40367
  tags: record(string(), string()).optional()
40313
40368
  });
40314
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40315
- scope: array(string()).optional(),
40369
+ /**
40370
+ * A history READ against one destination (D898).
40371
+ *
40372
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40373
+ * browser applied after the limit is what made a rare device's lines
40374
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40375
+ * minted (opaque to everyone else): a file position for the rotated files, a
40376
+ * nanosecond timestamp for Loki.
40377
+ *
40378
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40379
+ * store answers `done: false` with the cursor it reached and the bytes it
40380
+ * scanned, and the caller decides whether to go on. That is what makes a long
40381
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40382
+ * flight, and not asking for the next slice ends the scan.
40383
+ */
40384
+ var LogReadQuerySchema = object({
40385
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40386
+ requestId: string().min(1).max(64).optional(),
40387
+ /** The device the line is about (`tags.deviceId`, numeric). */
40388
+ deviceId: number().int().optional(),
40389
+ /**
40390
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40391
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40392
+ */
40393
+ fromAddonId: string().min(1).max(200).optional(),
40394
+ /**
40395
+ * The emitting node: matches the agent that emitted the line, the node
40396
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40397
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40398
+ * name as "which node's provider".
40399
+ */
40400
+ fromNodeId: string().min(1).max(200).optional(),
40401
+ /** Any other tag, exact match (AND). */
40402
+ tags: record(string(), union([string(), number()])).optional(),
40403
+ /** Severity FLOOR: this level and above. */
40316
40404
  level: LogLevelSchema.optional(),
40317
- since: date().optional(),
40318
- until: date().optional(),
40319
- limit: number().optional(),
40320
- tags: record(string(), string()).optional()
40321
- }), array(LogEntrySchema).readonly());
40405
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40406
+ text: string().min(1).max(200).optional(),
40407
+ /** Epoch ms, inclusive. */
40408
+ since: number().optional(),
40409
+ /** Epoch ms, inclusive. */
40410
+ until: number().optional(),
40411
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40412
+ before: string().min(1).max(1024).optional(),
40413
+ /** Newer than this cursor (exclusive). */
40414
+ after: string().min(1).max(1024).optional(),
40415
+ limit: number().int().min(1).max(1e3).optional(),
40416
+ /** Wall-clock bound of this slice. The provider caps it. */
40417
+ budgetMs: number().int().min(50).max(1e4).optional()
40418
+ });
40419
+ var LogReadResultSchema = object({
40420
+ /** Newest first. */
40421
+ entries: array(object({
40422
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40423
+ id: string().optional(),
40424
+ /** Epoch ms. */
40425
+ timestamp: number(),
40426
+ level: LogLevelSchema,
40427
+ scope: string().optional(),
40428
+ message: string(),
40429
+ tags: record(string(), union([string(), number()])).optional(),
40430
+ meta: record(string(), unknown()).optional()
40431
+ })),
40432
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40433
+ nextBefore: string().nullable(),
40434
+ /** Pass as `after` to read what arrived since; null when unknown. */
40435
+ nextAfter: string().nullable(),
40436
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40437
+ scannedBytes: number().int().nonnegative(),
40438
+ /**
40439
+ * True when the scan in this direction reached the end of the store.
40440
+ * False with fewer than `limit` entries means the budget ran out first —
40441
+ * call again with `nextBefore` to go on.
40442
+ */
40443
+ done: boolean(),
40444
+ /** True when `cancelRead` ended this slice early. */
40445
+ cancelled: boolean().optional()
40446
+ });
40447
+ var LogReadCapabilitiesSchema = object({
40448
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40449
+ readable: boolean(),
40450
+ /** Why not, when `readable` is false — rendered next to the source. */
40451
+ reason: string().nullable(),
40452
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40453
+ filters: object({
40454
+ deviceId: boolean(),
40455
+ addonId: boolean(),
40456
+ nodeId: boolean(),
40457
+ tags: boolean(),
40458
+ level: boolean(),
40459
+ text: boolean(),
40460
+ timeRange: boolean()
40461
+ }),
40462
+ /** How far back the store reaches, when the provider knows (days). */
40463
+ retentionDays: number().nullable()
40464
+ });
40465
+ 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() }), {
40466
+ kind: "mutation",
40467
+ auth: "admin"
40468
+ });
40322
40469
  /**
40323
40470
  * `login-method` — collection cap through which auth addons contribute
40324
40471
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42874,6 +43021,33 @@ var NcRuleTargetSchema = object({
42874
43021
  params: record(string(), unknown()).optional()
42875
43022
  });
42876
43023
  /**
43024
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
43025
+ *
43026
+ * Every mode starts from the same CLEAN source frame of the trigger moment
43027
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
43028
+ * to the zone that fired the rule) and renders it once at send time:
43029
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
43030
+ * colour and every OTHER track visible at that instant outlined thin, each
43031
+ * labelled with class and confidence ("dog 87%").
43032
+ * - `crop` — the subject cut out of that frame around its box at that instant.
43033
+ * - `clean` — the whole scene with nothing drawn on it.
43034
+ * - `none` — no picture.
43035
+ *
43036
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
43037
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
43038
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
43039
+ * ship a crop on one event and a boxed scene on the next depending on which
43040
+ * stored kind had landed.
43041
+ */
43042
+ var NcMediaImageSchema = _enum([
43043
+ "scene-boxes",
43044
+ "crop",
43045
+ "clean",
43046
+ "none"
43047
+ ]);
43048
+ /**
43049
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43050
+ *
42877
43051
  * Media attachment policy (P1 still-image subset).
42878
43052
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42879
43053
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42887,6 +43061,8 @@ var NcRuleTargetSchema = object({
42887
43061
  * - `none` — no attachment.
42888
43062
  */
42889
43063
  /**
43064
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
43065
+ *
42890
43066
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42891
43067
  * conflate it with the selection strategy and betray the request: asking for
42892
43068
  * the clean scene frame on an object-event owner used to start at
@@ -42915,16 +43091,29 @@ var NcMediaFrameSchema = _enum([
42915
43091
  */
42916
43092
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
42917
43093
  var NcMediaPolicySchema = object({
43094
+ /**
43095
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43096
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43097
+ * triple below, at load and at every write, and the store keeps only this.
43098
+ */
43099
+ image: NcMediaImageSchema.optional(),
43100
+ /**
43101
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43102
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43103
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43104
+ * Replaces `zoneCrop`.
43105
+ */
43106
+ showTriggerZone: boolean().optional(),
43107
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42918
43108
  attach: _enum([
42919
43109
  "best",
42920
43110
  "best-matching",
42921
43111
  "keyFrame",
42922
43112
  "none"
42923
- ]).default("best"),
42924
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43113
+ ]).optional(),
43114
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42925
43115
  frame: NcMediaFrameSchema.optional(),
42926
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
42927
- * "show me the ZONE", not the whole scene or the subject crop. */
43116
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
42928
43117
  zoneCrop: boolean().optional(),
42929
43118
  /**
42930
43119
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43096,7 +43285,9 @@ var NcRuleInputSchema = object({
43096
43285
  * targets.
43097
43286
  */
43098
43287
  targetUsers: array(string()).optional(),
43099
- media: NcMediaPolicySchema.default({ attach: "best" }),
43288
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43289
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43290
+ media: NcMediaPolicySchema.default({}),
43100
43291
  throttle: NcThrottleSchema.default({
43101
43292
  cooldownSec: 60,
43102
43293
  scope: "rule-device"
@@ -44033,13 +44224,37 @@ var NcAlarmModeOpeningsSchema = object({
44033
44224
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
44034
44225
  unknown: array(number().int())
44035
44226
  });
44227
+ /**
44228
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44229
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44230
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44231
+ * never looks fully armed (D62: off must never look like broken).
44232
+ */
44233
+ var NcAlarmInputBypassViewSchema = object({
44234
+ ruleId: string(),
44235
+ /** The rule's current name (its frozen name when the rule is gone). */
44236
+ ruleName: string(),
44237
+ /** The input: the sensor of the match, else its camera. */
44238
+ deviceId: number().int(),
44239
+ /** The input's current name. */
44240
+ name: string(),
44241
+ /** When it was bypassed (ms epoch). */
44242
+ since: number(),
44243
+ /** Triggers from this input dropped since. */
44244
+ dropped: number().int().min(0)
44245
+ });
44036
44246
  var NcAlarmLiveSchema = object({
44037
44247
  state: AlarmStateSchema,
44038
44248
  /** The mode being armed into (exit delay) or held; null when disarmed. */
44039
44249
  targetMode: AlarmArmModeSchema.nullable(),
44040
44250
  availableModes: array(AlarmArmModeSchema),
44041
44251
  openings: array(NcAlarmModeOpeningsSchema),
44042
- exclusions: array(NcAlarmExclusionViewSchema)
44252
+ exclusions: array(NcAlarmExclusionViewSchema),
44253
+ /**
44254
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44255
+ * Defaulted so an older hub answer still parses (as "none known").
44256
+ */
44257
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
44043
44258
  });
44044
44259
  var NcAlarmConfigSchema = object({
44045
44260
  /**
@@ -57984,9 +58199,24 @@ var NpuInfoSchema = object({
57984
58199
  name: string().optional(),
57985
58200
  generation: _enum(["xdna1", "xdna2"]).optional()
57986
58201
  });
58202
+ var CoralBusSchema = _enum(["usb", "pci"]);
57987
58203
  var CoralInfoSchema = object({
57988
58204
  type: literal("coral-edgetpu"),
57989
- bus: string().optional()
58205
+ /** Legacy single-bus report (older nodes) — read via `coralUsableUnits`. */
58206
+ bus: string().optional(),
58207
+ /** Legacy USB unit count (older nodes) — read via `coralUsableUnits`. */
58208
+ count: number().int().nonnegative().optional(),
58209
+ /** Usable units per bus — each one is its own `edgetpu:<bus>[:N]` device. */
58210
+ units: array(object({
58211
+ bus: CoralBusSchema,
58212
+ count: number().int().nonnegative()
58213
+ })).readonly().optional(),
58214
+ /** Present-but-unusable units, each with its typed reason (never "absent"). */
58215
+ unavailable: array(object({
58216
+ bus: CoralBusSchema,
58217
+ count: number().int().nonnegative(),
58218
+ reason: _enum(["driver-missing", "device-not-accessible"])
58219
+ })).readonly().optional()
57990
58220
  });
57991
58221
  var HardwareInfoSchema = object({
57992
58222
  platform: HardwarePlatformSchema,
@@ -65749,7 +65979,19 @@ Object.freeze({
65749
65979
  addonId: null,
65750
65980
  access: "view"
65751
65981
  },
65752
- "logDestination.query": {
65982
+ "logDestination.cancelRead": {
65983
+ capName: "log-destination",
65984
+ capScope: "system",
65985
+ addonId: null,
65986
+ access: "create"
65987
+ },
65988
+ "logDestination.describeRead": {
65989
+ capName: "log-destination",
65990
+ capScope: "system",
65991
+ addonId: null,
65992
+ access: "view"
65993
+ },
65994
+ "logDestination.read": {
65753
65995
  capName: "log-destination",
65754
65996
  capScope: "system",
65755
65997
  addonId: null,
@@ -71756,6 +71998,11 @@ Object.freeze({
71756
71998
  form: "single",
71757
71999
  optional: false
71758
72000
  }],
72001
+ "logDestination.read": [{
72002
+ name: "deviceId",
72003
+ form: "single",
72004
+ optional: true
72005
+ }],
71759
72006
  "mediaPlayer.getStatus": [{
71760
72007
  name: "deviceId",
71761
72008
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.150",
3
+ "version": "1.2.152",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",