@camstack/addon-export-google 0.1.97 → 0.1.98

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.
@@ -5492,7 +5492,7 @@ var ZodIssueCode = {
5492
5492
  var ZodFirstPartyTypeKind;
5493
5493
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5494
5494
  //#endregion
5495
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5495
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5496
5496
  /**
5497
5497
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5498
5498
  * window to float samples (D455).
@@ -17060,7 +17060,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17060
17060
  kind: literal("node"),
17061
17061
  nodeId: string().min(1)
17062
17062
  })]);
17063
+ /**
17064
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17065
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17066
+ * meaning); a rollup keeps the time spent in each state (`states`).
17067
+ */
17063
17068
  var DeviceHistoryKindSchema = _enum([
17069
+ "gauge",
17070
+ "counter",
17071
+ "boolean",
17072
+ "enum"
17073
+ ]);
17074
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17075
+ var DeviceHistoryProducerKindSchema = _enum([
17064
17076
  "gauge",
17065
17077
  "counter",
17066
17078
  "boolean"
@@ -17097,7 +17109,13 @@ var SeriesInfoSchema = object({
17097
17109
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17098
17110
  unit: string().nullable(),
17099
17111
  displayName: string(),
17100
- source: _enum(["cap", "addon"]),
17112
+ source: _enum([
17113
+ "cap",
17114
+ "addon",
17115
+ "derived"
17116
+ ]),
17117
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17118
+ values: array(string()).readonly().nullable(),
17101
17119
  firstTs: number(),
17102
17120
  lastTs: number()
17103
17121
  });
@@ -17111,17 +17129,31 @@ var QueryPointSchema = object({
17111
17129
  twMean: number().nullable(),
17112
17130
  min: number(),
17113
17131
  max: number(),
17114
- /** `null` is unknown, never zero (D393). */
17115
- last: number().nullable()
17132
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17133
+ last: number().nullable(),
17134
+ /**
17135
+ * The increase over the point: a `counter`'s growth since the previous point
17136
+ * or bucket (a drop is a reset, counted from zero), and for
17137
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17138
+ * every other kind, and when it cannot be known.
17139
+ */
17140
+ delta: number().nullable(),
17141
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17142
+ state: string().nullable(),
17143
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17144
+ states: record(string(), number()).nullable()
17116
17145
  });
17117
17146
  var QuerySeriesSchema = object({
17118
17147
  scope: string(),
17119
17148
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17120
17149
  before: object({
17121
17150
  t: number(),
17122
- value: number().nullable()
17151
+ value: number().nullable(),
17152
+ state: string().nullable()
17123
17153
  }).nullable(),
17124
- points: array(QueryPointSchema).readonly()
17154
+ points: array(QueryPointSchema).readonly(),
17155
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17156
+ derivedFrom: string().nullable()
17125
17157
  });
17126
17158
  /** The window part of a query, shared by the device and node forms. */
17127
17159
  var QueryWindowShape = {
@@ -17137,6 +17169,23 @@ var QueryResultSchema = object({
17137
17169
  series: array(QuerySeriesSchema).readonly(),
17138
17170
  truncated: boolean()
17139
17171
  });
17172
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17173
+ var QueryManyItemSchema = union([object({
17174
+ deviceId: number().int(),
17175
+ key: string(),
17176
+ scope: string().optional()
17177
+ }), object({
17178
+ forNodeId: string().min(1),
17179
+ key: string(),
17180
+ scope: string().optional()
17181
+ })]);
17182
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17183
+ ok: literal(true),
17184
+ result: QueryResultSchema
17185
+ }), object({
17186
+ ok: literal(false),
17187
+ error: string()
17188
+ })]);
17140
17189
  var TierStatusSchema = object({
17141
17190
  tier: DeviceHistoryResolutionSchema,
17142
17191
  /** `null` until the first background count answered. */
@@ -17192,16 +17241,22 @@ var DeviceHistoryStatusSchema = object({
17192
17241
  lastRefreshAt: number().nullable()
17193
17242
  })
17194
17243
  });
17195
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17244
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17196
17245
  deviceId: number().int(),
17197
17246
  ...QueryWindowShape
17198
17247
  }), QueryResultSchema), method(object({
17199
- nodeId: string().min(1),
17248
+ forNodeId: string().min(1),
17200
17249
  ...QueryWindowShape
17201
17250
  }), QueryResultSchema, { auth: "admin" }), method(object({
17251
+ items: array(QueryManyItemSchema).min(1).max(24),
17252
+ from: QueryWindowShape.from,
17253
+ to: QueryWindowShape.to,
17254
+ resolution: QueryWindowShape.resolution,
17255
+ maxPoints: QueryWindowShape.maxPoints
17256
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17202
17257
  name: string().regex(/^[a-z0-9-]+$/),
17203
17258
  subjectKind: _enum(["device", "node"]),
17204
- kind: DeviceHistoryKindSchema,
17259
+ kind: DeviceHistoryProducerKindSchema,
17205
17260
  unit: string().optional(),
17206
17261
  displayName: string().min(1),
17207
17262
  ingest: _enum(["points", "buckets"])
@@ -40243,14 +40298,106 @@ var LogEntrySchema = object({
40243
40298
  meta: record(string(), unknown()).optional(),
40244
40299
  tags: record(string(), string()).optional()
40245
40300
  });
40246
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40247
- scope: array(string()).optional(),
40301
+ /**
40302
+ * A history READ against one destination (D898).
40303
+ *
40304
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40305
+ * browser applied after the limit is what made a rare device's lines
40306
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40307
+ * minted (opaque to everyone else): a file position for the rotated files, a
40308
+ * nanosecond timestamp for Loki.
40309
+ *
40310
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40311
+ * store answers `done: false` with the cursor it reached and the bytes it
40312
+ * scanned, and the caller decides whether to go on. That is what makes a long
40313
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40314
+ * flight, and not asking for the next slice ends the scan.
40315
+ */
40316
+ var LogReadQuerySchema = object({
40317
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40318
+ requestId: string().min(1).max(64).optional(),
40319
+ /** The device the line is about (`tags.deviceId`, numeric). */
40320
+ deviceId: number().int().optional(),
40321
+ /**
40322
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40323
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40324
+ */
40325
+ fromAddonId: string().min(1).max(200).optional(),
40326
+ /**
40327
+ * The emitting node: matches the agent that emitted the line, the node
40328
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40329
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40330
+ * name as "which node's provider".
40331
+ */
40332
+ fromNodeId: string().min(1).max(200).optional(),
40333
+ /** Any other tag, exact match (AND). */
40334
+ tags: record(string(), union([string(), number()])).optional(),
40335
+ /** Severity FLOOR: this level and above. */
40248
40336
  level: LogLevelSchema.optional(),
40249
- since: date().optional(),
40250
- until: date().optional(),
40251
- limit: number().optional(),
40252
- tags: record(string(), string()).optional()
40253
- }), array(LogEntrySchema).readonly());
40337
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40338
+ text: string().min(1).max(200).optional(),
40339
+ /** Epoch ms, inclusive. */
40340
+ since: number().optional(),
40341
+ /** Epoch ms, inclusive. */
40342
+ until: number().optional(),
40343
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40344
+ before: string().min(1).max(1024).optional(),
40345
+ /** Newer than this cursor (exclusive). */
40346
+ after: string().min(1).max(1024).optional(),
40347
+ limit: number().int().min(1).max(1e3).optional(),
40348
+ /** Wall-clock bound of this slice. The provider caps it. */
40349
+ budgetMs: number().int().min(50).max(1e4).optional()
40350
+ });
40351
+ var LogReadResultSchema = object({
40352
+ /** Newest first. */
40353
+ entries: array(object({
40354
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40355
+ id: string().optional(),
40356
+ /** Epoch ms. */
40357
+ timestamp: number(),
40358
+ level: LogLevelSchema,
40359
+ scope: string().optional(),
40360
+ message: string(),
40361
+ tags: record(string(), union([string(), number()])).optional(),
40362
+ meta: record(string(), unknown()).optional()
40363
+ })),
40364
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40365
+ nextBefore: string().nullable(),
40366
+ /** Pass as `after` to read what arrived since; null when unknown. */
40367
+ nextAfter: string().nullable(),
40368
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40369
+ scannedBytes: number().int().nonnegative(),
40370
+ /**
40371
+ * True when the scan in this direction reached the end of the store.
40372
+ * False with fewer than `limit` entries means the budget ran out first —
40373
+ * call again with `nextBefore` to go on.
40374
+ */
40375
+ done: boolean(),
40376
+ /** True when `cancelRead` ended this slice early. */
40377
+ cancelled: boolean().optional()
40378
+ });
40379
+ var LogReadCapabilitiesSchema = object({
40380
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40381
+ readable: boolean(),
40382
+ /** Why not, when `readable` is false — rendered next to the source. */
40383
+ reason: string().nullable(),
40384
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40385
+ filters: object({
40386
+ deviceId: boolean(),
40387
+ addonId: boolean(),
40388
+ nodeId: boolean(),
40389
+ tags: boolean(),
40390
+ level: boolean(),
40391
+ text: boolean(),
40392
+ timeRange: boolean()
40393
+ }),
40394
+ /** How far back the store reaches, when the provider knows (days). */
40395
+ retentionDays: number().nullable()
40396
+ });
40397
+ 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() }), {
40398
+ kind: "mutation",
40399
+ auth: "admin"
40400
+ });
40254
40401
  /**
40255
40402
  * `login-method` — collection cap through which auth addons contribute
40256
40403
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42806,6 +42953,33 @@ var NcRuleTargetSchema = object({
42806
42953
  params: record(string(), unknown()).optional()
42807
42954
  });
42808
42955
  /**
42956
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
42957
+ *
42958
+ * Every mode starts from the same CLEAN source frame of the trigger moment
42959
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
42960
+ * to the zone that fired the rule) and renders it once at send time:
42961
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
42962
+ * colour and every OTHER track visible at that instant outlined thin, each
42963
+ * labelled with class and confidence ("dog 87%").
42964
+ * - `crop` — the subject cut out of that frame around its box at that instant.
42965
+ * - `clean` — the whole scene with nothing drawn on it.
42966
+ * - `none` — no picture.
42967
+ *
42968
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
42969
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
42970
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
42971
+ * ship a crop on one event and a boxed scene on the next depending on which
42972
+ * stored kind had landed.
42973
+ */
42974
+ var NcMediaImageSchema = _enum([
42975
+ "scene-boxes",
42976
+ "crop",
42977
+ "clean",
42978
+ "none"
42979
+ ]);
42980
+ /**
42981
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42982
+ *
42809
42983
  * Media attachment policy (P1 still-image subset).
42810
42984
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42811
42985
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42819,6 +42993,8 @@ var NcRuleTargetSchema = object({
42819
42993
  * - `none` — no attachment.
42820
42994
  */
42821
42995
  /**
42996
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42997
+ *
42822
42998
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42823
42999
  * conflate it with the selection strategy and betray the request: asking for
42824
43000
  * the clean scene frame on an object-event owner used to start at
@@ -42847,16 +43023,29 @@ var NcMediaFrameSchema = _enum([
42847
43023
  */
42848
43024
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
42849
43025
  var NcMediaPolicySchema = object({
43026
+ /**
43027
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43028
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43029
+ * triple below, at load and at every write, and the store keeps only this.
43030
+ */
43031
+ image: NcMediaImageSchema.optional(),
43032
+ /**
43033
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43034
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43035
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43036
+ * Replaces `zoneCrop`.
43037
+ */
43038
+ showTriggerZone: boolean().optional(),
43039
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42850
43040
  attach: _enum([
42851
43041
  "best",
42852
43042
  "best-matching",
42853
43043
  "keyFrame",
42854
43044
  "none"
42855
- ]).default("best"),
42856
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43045
+ ]).optional(),
43046
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42857
43047
  frame: NcMediaFrameSchema.optional(),
42858
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
42859
- * "show me the ZONE", not the whole scene or the subject crop. */
43048
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
42860
43049
  zoneCrop: boolean().optional(),
42861
43050
  /**
42862
43051
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43028,7 +43217,9 @@ var NcRuleInputSchema = object({
43028
43217
  * targets.
43029
43218
  */
43030
43219
  targetUsers: array(string()).optional(),
43031
- media: NcMediaPolicySchema.default({ attach: "best" }),
43220
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43221
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43222
+ media: NcMediaPolicySchema.default({}),
43032
43223
  throttle: NcThrottleSchema.default({
43033
43224
  cooldownSec: 60,
43034
43225
  scope: "rule-device"
@@ -43965,13 +44156,37 @@ var NcAlarmModeOpeningsSchema = object({
43965
44156
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
43966
44157
  unknown: array(number().int())
43967
44158
  });
44159
+ /**
44160
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44161
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44162
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44163
+ * never looks fully armed (D62: off must never look like broken).
44164
+ */
44165
+ var NcAlarmInputBypassViewSchema = object({
44166
+ ruleId: string(),
44167
+ /** The rule's current name (its frozen name when the rule is gone). */
44168
+ ruleName: string(),
44169
+ /** The input: the sensor of the match, else its camera. */
44170
+ deviceId: number().int(),
44171
+ /** The input's current name. */
44172
+ name: string(),
44173
+ /** When it was bypassed (ms epoch). */
44174
+ since: number(),
44175
+ /** Triggers from this input dropped since. */
44176
+ dropped: number().int().min(0)
44177
+ });
43968
44178
  var NcAlarmLiveSchema = object({
43969
44179
  state: AlarmStateSchema,
43970
44180
  /** The mode being armed into (exit delay) or held; null when disarmed. */
43971
44181
  targetMode: AlarmArmModeSchema.nullable(),
43972
44182
  availableModes: array(AlarmArmModeSchema),
43973
44183
  openings: array(NcAlarmModeOpeningsSchema),
43974
- exclusions: array(NcAlarmExclusionViewSchema)
44184
+ exclusions: array(NcAlarmExclusionViewSchema),
44185
+ /**
44186
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44187
+ * Defaulted so an older hub answer still parses (as "none known").
44188
+ */
44189
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
43975
44190
  });
43976
44191
  var NcAlarmConfigSchema = object({
43977
44192
  /**
@@ -65645,7 +65860,19 @@ Object.freeze({
65645
65860
  addonId: null,
65646
65861
  access: "view"
65647
65862
  },
65648
- "logDestination.query": {
65863
+ "logDestination.cancelRead": {
65864
+ capName: "log-destination",
65865
+ capScope: "system",
65866
+ addonId: null,
65867
+ access: "create"
65868
+ },
65869
+ "logDestination.describeRead": {
65870
+ capName: "log-destination",
65871
+ capScope: "system",
65872
+ addonId: null,
65873
+ access: "view"
65874
+ },
65875
+ "logDestination.read": {
65649
65876
  capName: "log-destination",
65650
65877
  capScope: "system",
65651
65878
  addonId: null,
@@ -71652,6 +71879,11 @@ Object.freeze({
71652
71879
  form: "single",
71653
71880
  optional: false
71654
71881
  }],
71882
+ "logDestination.read": [{
71883
+ name: "deviceId",
71884
+ form: "single",
71885
+ optional: true
71886
+ }],
71655
71887
  "mediaPlayer.getStatus": [{
71656
71888
  name: "deviceId",
71657
71889
  form: "single",
@@ -5488,7 +5488,7 @@ var ZodIssueCode = {
5488
5488
  var ZodFirstPartyTypeKind;
5489
5489
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5490
5490
  //#endregion
5491
- //#region ../types/dist/sleep-yKL5gfrH.mjs
5491
+ //#region ../types/dist/sleep-BSuCCFjf.mjs
5492
5492
  /**
5493
5493
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5494
5494
  * window to float samples (D455).
@@ -17056,7 +17056,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
17056
17056
  kind: literal("node"),
17057
17057
  nodeId: string().min(1)
17058
17058
  })]);
17059
+ /**
17060
+ * `enum` stores a STATE as the ordinal of its value in the series' value list
17061
+ * (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
17062
+ * meaning); a rollup keeps the time spent in each state (`states`).
17063
+ */
17059
17064
  var DeviceHistoryKindSchema = _enum([
17065
+ "gauge",
17066
+ "counter",
17067
+ "boolean",
17068
+ "enum"
17069
+ ]);
17070
+ /** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
17071
+ var DeviceHistoryProducerKindSchema = _enum([
17060
17072
  "gauge",
17061
17073
  "counter",
17062
17074
  "boolean"
@@ -17093,7 +17105,13 @@ var SeriesInfoSchema = object({
17093
17105
  /** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
17094
17106
  unit: string().nullable(),
17095
17107
  displayName: string(),
17096
- source: _enum(["cap", "addon"]),
17108
+ source: _enum([
17109
+ "cap",
17110
+ "addon",
17111
+ "derived"
17112
+ ]),
17113
+ /** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
17114
+ values: array(string()).readonly().nullable(),
17097
17115
  firstTs: number(),
17098
17116
  lastTs: number()
17099
17117
  });
@@ -17107,17 +17125,31 @@ var QueryPointSchema = object({
17107
17125
  twMean: number().nullable(),
17108
17126
  min: number(),
17109
17127
  max: number(),
17110
- /** `null` is unknown, never zero (D393). */
17111
- last: number().nullable()
17128
+ /** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
17129
+ last: number().nullable(),
17130
+ /**
17131
+ * The increase over the point: a `counter`'s growth since the previous point
17132
+ * or bucket (a drop is a reset, counted from zero), and for
17133
+ * {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
17134
+ * every other kind, and when it cannot be known.
17135
+ */
17136
+ delta: number().nullable(),
17137
+ /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
17138
+ state: string().nullable(),
17139
+ /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
17140
+ states: record(string(), number()).nullable()
17112
17141
  });
17113
17142
  var QuerySeriesSchema = object({
17114
17143
  scope: string(),
17115
17144
  /** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
17116
17145
  before: object({
17117
17146
  t: number(),
17118
- value: number().nullable()
17147
+ value: number().nullable(),
17148
+ state: string().nullable()
17119
17149
  }).nullable(),
17120
- points: array(QueryPointSchema).readonly()
17150
+ points: array(QueryPointSchema).readonly(),
17151
+ /** A derived key: the stored key its points were computed from; `null` for a stored series. */
17152
+ derivedFrom: string().nullable()
17121
17153
  });
17122
17154
  /** The window part of a query, shared by the device and node forms. */
17123
17155
  var QueryWindowShape = {
@@ -17133,6 +17165,23 @@ var QueryResultSchema = object({
17133
17165
  series: array(QuerySeriesSchema).readonly(),
17134
17166
  truncated: boolean()
17135
17167
  });
17168
+ /** One read of a batch: a device's key or a node's key (exactly one subject). */
17169
+ var QueryManyItemSchema = union([object({
17170
+ deviceId: number().int(),
17171
+ key: string(),
17172
+ scope: string().optional()
17173
+ }), object({
17174
+ forNodeId: string().min(1),
17175
+ key: string(),
17176
+ scope: string().optional()
17177
+ })]);
17178
+ var QueryManyEntrySchema = discriminatedUnion("ok", [object({
17179
+ ok: literal(true),
17180
+ result: QueryResultSchema
17181
+ }), object({
17182
+ ok: literal(false),
17183
+ error: string()
17184
+ })]);
17136
17185
  var TierStatusSchema = object({
17137
17186
  tier: DeviceHistoryResolutionSchema,
17138
17187
  /** `null` until the first background count answered. */
@@ -17188,16 +17237,22 @@ var DeviceHistoryStatusSchema = object({
17188
17237
  lastRefreshAt: number().nullable()
17189
17238
  })
17190
17239
  });
17191
- method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17240
+ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
17192
17241
  deviceId: number().int(),
17193
17242
  ...QueryWindowShape
17194
17243
  }), QueryResultSchema), method(object({
17195
- nodeId: string().min(1),
17244
+ forNodeId: string().min(1),
17196
17245
  ...QueryWindowShape
17197
17246
  }), QueryResultSchema, { auth: "admin" }), method(object({
17247
+ items: array(QueryManyItemSchema).min(1).max(24),
17248
+ from: QueryWindowShape.from,
17249
+ to: QueryWindowShape.to,
17250
+ resolution: QueryWindowShape.resolution,
17251
+ maxPoints: QueryWindowShape.maxPoints
17252
+ }), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
17198
17253
  name: string().regex(/^[a-z0-9-]+$/),
17199
17254
  subjectKind: _enum(["device", "node"]),
17200
- kind: DeviceHistoryKindSchema,
17255
+ kind: DeviceHistoryProducerKindSchema,
17201
17256
  unit: string().optional(),
17202
17257
  displayName: string().min(1),
17203
17258
  ingest: _enum(["points", "buckets"])
@@ -40239,14 +40294,106 @@ var LogEntrySchema = object({
40239
40294
  meta: record(string(), unknown()).optional(),
40240
40295
  tags: record(string(), string()).optional()
40241
40296
  });
40242
- method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
40243
- scope: array(string()).optional(),
40297
+ /**
40298
+ * A history READ against one destination (D898).
40299
+ *
40300
+ * Every filter is applied by the PROVIDER, before the limit — a filter the
40301
+ * browser applied after the limit is what made a rare device's lines
40302
+ * unreachable behind a busy one's. `before` / `after` are cursors the provider
40303
+ * minted (opaque to everyone else): a file position for the rotated files, a
40304
+ * nanosecond timestamp for Loki.
40305
+ *
40306
+ * A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
40307
+ * store answers `done: false` with the cursor it reached and the bytes it
40308
+ * scanned, and the caller decides whether to go on. That is what makes a long
40309
+ * scan show progress and stop when asked — `cancelRead` ends the slice in
40310
+ * flight, and not asking for the next slice ends the scan.
40311
+ */
40312
+ var LogReadQuerySchema = object({
40313
+ /** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
40314
+ requestId: string().min(1).max(64).optional(),
40315
+ /** The device the line is about (`tags.deviceId`, numeric). */
40316
+ deviceId: number().int().optional(),
40317
+ /**
40318
+ * The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
40319
+ * match. Not `addonId`: a cap router reads that name as "which provider".
40320
+ */
40321
+ fromAddonId: string().min(1).max(200).optional(),
40322
+ /**
40323
+ * The emitting node: matches the agent that emitted the line, the node
40324
+ * itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
40325
+ * semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
40326
+ * name as "which node's provider".
40327
+ */
40328
+ fromNodeId: string().min(1).max(200).optional(),
40329
+ /** Any other tag, exact match (AND). */
40330
+ tags: record(string(), union([string(), number()])).optional(),
40331
+ /** Severity FLOOR: this level and above. */
40244
40332
  level: LogLevelSchema.optional(),
40245
- since: date().optional(),
40246
- until: date().optional(),
40247
- limit: number().optional(),
40248
- tags: record(string(), string()).optional()
40249
- }), array(LogEntrySchema).readonly());
40333
+ /** Case-insensitive substring over message, scope, tag values and meta values. */
40334
+ text: string().min(1).max(200).optional(),
40335
+ /** Epoch ms, inclusive. */
40336
+ since: number().optional(),
40337
+ /** Epoch ms, inclusive. */
40338
+ until: number().optional(),
40339
+ /** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
40340
+ before: string().min(1).max(1024).optional(),
40341
+ /** Newer than this cursor (exclusive). */
40342
+ after: string().min(1).max(1024).optional(),
40343
+ limit: number().int().min(1).max(1e3).optional(),
40344
+ /** Wall-clock bound of this slice. The provider caps it. */
40345
+ budgetMs: number().int().min(50).max(1e4).optional()
40346
+ });
40347
+ var LogReadResultSchema = object({
40348
+ /** Newest first. */
40349
+ entries: array(object({
40350
+ /** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
40351
+ id: string().optional(),
40352
+ /** Epoch ms. */
40353
+ timestamp: number(),
40354
+ level: LogLevelSchema,
40355
+ scope: string().optional(),
40356
+ message: string(),
40357
+ tags: record(string(), union([string(), number()])).optional(),
40358
+ meta: record(string(), unknown()).optional()
40359
+ })),
40360
+ /** Pass as `before` for the next older page; null when nothing older exists. */
40361
+ nextBefore: string().nullable(),
40362
+ /** Pass as `after` to read what arrived since; null when unknown. */
40363
+ nextAfter: string().nullable(),
40364
+ /** Bytes this slice read (files) or received (remote). Progress, not a promise. */
40365
+ scannedBytes: number().int().nonnegative(),
40366
+ /**
40367
+ * True when the scan in this direction reached the end of the store.
40368
+ * False with fewer than `limit` entries means the budget ran out first —
40369
+ * call again with `nextBefore` to go on.
40370
+ */
40371
+ done: boolean(),
40372
+ /** True when `cancelRead` ended this slice early. */
40373
+ cancelled: boolean().optional()
40374
+ });
40375
+ var LogReadCapabilitiesSchema = object({
40376
+ /** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
40377
+ readable: boolean(),
40378
+ /** Why not, when `readable` is false — rendered next to the source. */
40379
+ reason: string().nullable(),
40380
+ /** Filters the provider applies itself. A false one is applied by nobody. */
40381
+ filters: object({
40382
+ deviceId: boolean(),
40383
+ addonId: boolean(),
40384
+ nodeId: boolean(),
40385
+ tags: boolean(),
40386
+ level: boolean(),
40387
+ text: boolean(),
40388
+ timeRange: boolean()
40389
+ }),
40390
+ /** How far back the store reaches, when the provider knows (days). */
40391
+ retentionDays: number().nullable()
40392
+ });
40393
+ 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() }), {
40394
+ kind: "mutation",
40395
+ auth: "admin"
40396
+ });
40250
40397
  /**
40251
40398
  * `login-method` — collection cap through which auth addons contribute
40252
40399
  * their pre-auth login surfaces to the login page. This is the SINGLE,
@@ -42802,6 +42949,33 @@ var NcRuleTargetSchema = object({
42802
42949
  params: record(string(), unknown()).optional()
42803
42950
  });
42804
42951
  /**
42952
+ * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
42953
+ *
42954
+ * Every mode starts from the same CLEAN source frame of the trigger moment
42955
+ * (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
42956
+ * to the zone that fired the rule) and renders it once at send time:
42957
+ * - `scene-boxes` — the whole scene, the subject outlined thick in the accent
42958
+ * colour and every OTHER track visible at that instant outlined thin, each
42959
+ * labelled with class and confidence ("dog 87%").
42960
+ * - `crop` — the subject cut out of that frame around its box at that instant.
42961
+ * - `clean` — the whole scene with nothing drawn on it.
42962
+ * - `none` — no picture.
42963
+ *
42964
+ * A mode that cannot be honoured (no box at that instant, a photograph with no
42965
+ * tracked subject) ships `clean` and names the reason in the log, per camera.
42966
+ * It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
42967
+ * ship a crop on one event and a boxed scene on the next depending on which
42968
+ * stored kind had landed.
42969
+ */
42970
+ var NcMediaImageSchema = _enum([
42971
+ "scene-boxes",
42972
+ "crop",
42973
+ "clean",
42974
+ "none"
42975
+ ]);
42976
+ /**
42977
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42978
+ *
42805
42979
  * Media attachment policy (P1 still-image subset).
42806
42980
  * - `best` — the best AVAILABLE subject image at dispatch time (D-3).
42807
42981
  * - `best-matching` — the media that explains WHY the rule fired: a rule
@@ -42815,6 +42989,8 @@ var NcRuleTargetSchema = object({
42815
42989
  * - `none` — no attachment.
42816
42990
  */
42817
42991
  /**
42992
+ * @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
42993
+ *
42818
42994
  * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
42819
42995
  * conflate it with the selection strategy and betray the request: asking for
42820
42996
  * the clean scene frame on an object-event owner used to start at
@@ -42843,16 +43019,29 @@ var NcMediaFrameSchema = _enum([
42843
43019
  */
42844
43020
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
42845
43021
  var NcMediaPolicySchema = object({
43022
+ /**
43023
+ * The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
43024
+ * saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
43025
+ * triple below, at load and at every write, and the store keeps only this.
43026
+ */
43027
+ image: NcMediaImageSchema.optional(),
43028
+ /**
43029
+ * Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
43030
+ * a `crop` never shows it). Valid only on a rule whose trigger is a zone —
43031
+ * `conditions.zones` or an occupancy zone — and refused on save otherwise.
43032
+ * Replaces `zoneCrop`.
43033
+ */
43034
+ showTriggerZone: boolean().optional(),
43035
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42846
43036
  attach: _enum([
42847
43037
  "best",
42848
43038
  "best-matching",
42849
43039
  "keyFrame",
42850
43040
  "none"
42851
- ]).default("best"),
42852
- /** What the still shows. Absent = `cropped` (the historical `best` shape). */
43041
+ ]).optional(),
43042
+ /** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
42853
43043
  frame: NcMediaFrameSchema.optional(),
42854
- /** Crop the attached still to the rule's condition-zone bbox (padded) —
42855
- * "show me the ZONE", not the whole scene or the subject crop. */
43044
+ /** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
42856
43045
  zoneCrop: boolean().optional(),
42857
43046
  /**
42858
43047
  * Also attach a short GIF cut from the stream broker's clip ring around the
@@ -43024,7 +43213,9 @@ var NcRuleInputSchema = object({
43024
43213
  * targets.
43025
43214
  */
43026
43215
  targetUsers: array(string()).optional(),
43027
- media: NcMediaPolicySchema.default({ attach: "best" }),
43216
+ /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
43217
+ * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
43218
+ media: NcMediaPolicySchema.default({}),
43028
43219
  throttle: NcThrottleSchema.default({
43029
43220
  cooldownSec: 60,
43030
43221
  scope: "rule-device"
@@ -43961,13 +44152,37 @@ var NcAlarmModeOpeningsSchema = object({
43961
44152
  /** Covered devices whose state could not be read (D49): neither open nor closed. */
43962
44153
  unknown: array(number().int())
43963
44154
  });
44155
+ /**
44156
+ * One alarm INPUT — a (rule, device) pair — the operator bypassed until the
44157
+ * next disarm ("Bypass this input until disarm" on a trigger notification, or
44158
+ * `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
44159
+ * never looks fully armed (D62: off must never look like broken).
44160
+ */
44161
+ var NcAlarmInputBypassViewSchema = object({
44162
+ ruleId: string(),
44163
+ /** The rule's current name (its frozen name when the rule is gone). */
44164
+ ruleName: string(),
44165
+ /** The input: the sensor of the match, else its camera. */
44166
+ deviceId: number().int(),
44167
+ /** The input's current name. */
44168
+ name: string(),
44169
+ /** When it was bypassed (ms epoch). */
44170
+ since: number(),
44171
+ /** Triggers from this input dropped since. */
44172
+ dropped: number().int().min(0)
44173
+ });
43964
44174
  var NcAlarmLiveSchema = object({
43965
44175
  state: AlarmStateSchema,
43966
44176
  /** The mode being armed into (exit delay) or held; null when disarmed. */
43967
44177
  targetMode: AlarmArmModeSchema.nullable(),
43968
44178
  availableModes: array(AlarmArmModeSchema),
43969
44179
  openings: array(NcAlarmModeOpeningsSchema),
43970
- exclusions: array(NcAlarmExclusionViewSchema)
44180
+ exclusions: array(NcAlarmExclusionViewSchema),
44181
+ /**
44182
+ * Inputs bypassed for the rest of this arm session; cleared on disarm.
44183
+ * Defaulted so an older hub answer still parses (as "none known").
44184
+ */
44185
+ bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
43971
44186
  });
43972
44187
  var NcAlarmConfigSchema = object({
43973
44188
  /**
@@ -65641,7 +65856,19 @@ Object.freeze({
65641
65856
  addonId: null,
65642
65857
  access: "view"
65643
65858
  },
65644
- "logDestination.query": {
65859
+ "logDestination.cancelRead": {
65860
+ capName: "log-destination",
65861
+ capScope: "system",
65862
+ addonId: null,
65863
+ access: "create"
65864
+ },
65865
+ "logDestination.describeRead": {
65866
+ capName: "log-destination",
65867
+ capScope: "system",
65868
+ addonId: null,
65869
+ access: "view"
65870
+ },
65871
+ "logDestination.read": {
65645
65872
  capName: "log-destination",
65646
65873
  capScope: "system",
65647
65874
  addonId: null,
@@ -71648,6 +71875,11 @@ Object.freeze({
71648
71875
  form: "single",
71649
71876
  optional: false
71650
71877
  }],
71878
+ "logDestination.read": [{
71879
+ name: "deviceId",
71880
+ form: "single",
71881
+ optional: true
71882
+ }],
71651
71883
  "mediaPlayer.getStatus": [{
71652
71884
  name: "deviceId",
71653
71885
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-google",
3
- "version": "0.1.97",
3
+ "version": "0.1.98",
4
4
  "description": "Google Home export — hub-side smart-home fulfillment (SYNC / QUERY / EXECUTE / DISCONNECT) for the non-camera fleet, served over the hub's own OAuth account link. No Google credential is stored, sent or required.",
5
5
  "keywords": [
6
6
  "camstack",