@camstack/addon-smtp-nodemailer 1.2.12 → 1.2.13

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.
@@ -7226,8 +7226,31 @@ var AdoptionJobSchema = object({
7226
7226
  error: string().nullable()
7227
7227
  });
7228
7228
  /**
7229
- * Per-camera FUNCTION SWITCHES — the one coherent on/off surface over the
7230
- * pipeline functions an operator thinks in terms of.
7229
+ * Per-camera FUNCTION SWITCHES.
7230
+ *
7231
+ * ## The aggregate group is being withdrawn — the BADGE is not (D113)
7232
+ *
7233
+ * This file shipped as "the one coherent on/off surface over the pipeline
7234
+ * functions an operator thinks in terms of". The operator's verdict on
7235
+ * 2026-08-12 was that the coherent surface bought complexity and no clarity:
7236
+ * every function already had a settings page of its own, and a second place to
7237
+ * turn it off is a second place to look. Each switch is going back to its own
7238
+ * component's original options — detection to the detection-pipeline wrapper
7239
+ * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7240
+ * (which was always first-class; the switch was a veneer over
7241
+ * `recording.setDeviceConfig`), notifications to a notification-center
7242
+ * per-device setting, the two camera planes to their own components.
7243
+ *
7244
+ * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
7245
+ * thing that lets a status surface say DISABLED instead of BROKEN, recomposed
7246
+ * straight from the authorities with no group in the middle. That rule was
7247
+ * never about a control panel.
7248
+ *
7249
+ * Everything else here — {@link CAMERA_SWITCH_CATALOG}, {@link CameraSwitch},
7250
+ * {@link deriveCameraSwitches}, the `pipelineOrchestrator.getCameraSwitches` /
7251
+ * `setCameraSwitch` pair — is a COMPATIBILITY surface for as long as deployed
7252
+ * viewers (v1.0.305) and the admin UI still call it. It is deleted when they
7253
+ * stop; nothing new may be built on it.
7231
7254
  *
7232
7255
  * ## This file adds no state
7233
7256
  *
@@ -7578,7 +7601,15 @@ var RecordingConfigSchema = object({
7578
7601
  * Each completed/failed run also lands one durable ops-log row on its owning
7579
7602
  * addon surface.
7580
7603
  */
7604
+ /**
7605
+ * `queued` exists because the recorder mover is SINGLE-FLIGHT and an operator
7606
+ * rebalance enqueues one job per (camera, profile). Refusing the second job —
7607
+ * what the engine did before — turned a fifteen-camera rebalance into fifteen
7608
+ * manual retries. Queued jobs run FIFO; a queued job that is cancelled never
7609
+ * runs at all.
7610
+ */
7581
7611
  var RelocateJobStateSchema = _enum([
7612
+ "queued",
7582
7613
  "running",
7583
7614
  "done",
7584
7615
  "failed",
@@ -7613,6 +7644,15 @@ var RelocateFootageInputSchema = object({
7613
7644
  /** Limits relocation to the logical profile class. Omit only for the
7614
7645
  * pre-orchestration compatibility path. */
7615
7646
  footageClass: RelocateFootageClassSchema.optional(),
7647
+ /** Scope the move to ONE camera. Absent = every camera on the source, which
7648
+ * is what a whole-disk drain means. The rebalance path always sets it: its
7649
+ * unit is a (camera, profile) pile, not a disk. */
7650
+ deviceId: number().int().optional(),
7651
+ /** Scope the move to specific segment profiles (`high` / `mid` / `low`).
7652
+ * Finer than `footageClass`, which cannot separate high from mid — and the
7653
+ * placement plan assigns those two independently, so a rebalance that could
7654
+ * only say "recordings" would move footage the plan never asked to move. */
7655
+ profiles: array(string()).optional(),
7616
7656
  /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7617
7657
  * never allowed to starve live writers. */
7618
7658
  throttleMbps: number().min(1).max(1e3).optional()
@@ -7748,6 +7788,21 @@ var StorageLocationSchema = object({
7748
7788
  nodeId: string().optional(),
7749
7789
  isDefault: boolean().default(false),
7750
7790
  isSystem: boolean().default(false),
7791
+ /**
7792
+ * Operator opt-in: whether consumers that BALANCE across several locations
7793
+ * of a type may write here. Recordings reads it today; event media and
7794
+ * backups are the next consumers, which is why the flag lives on the
7795
+ * location rather than in any one addon's store — nothing has to be
7796
+ * extended to add the next consumer.
7797
+ *
7798
+ * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
7799
+ * flag existed reads back with no flag and keeps working exactly as before;
7800
+ * that is the whole compat story, and it is why no migration ships with it.
7801
+ * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
7802
+ * disk must not silently start writing to it); the default of a type is
7803
+ * always stamped `true`.
7804
+ */
7805
+ enabled: boolean().optional(),
7751
7806
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7752
7807
  * for node-local locations it can reach) — never persisted, absent when the
7753
7808
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -12050,7 +12105,8 @@ method(object({
12050
12105
  }), EmbeddingResultSchema), method(object({ text: string() }), EmbeddingResultSchema), method(_void(), EmbeddingInfoSchema);
12051
12106
  /**
12052
12107
  * filesystem-browse — per-node capability for browsing the node's local
12053
- * filesystem, sandboxed to operator-configured allowed roots. Used by the
12108
+ * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12109
+ * are sandboxed to operator-configured allowed roots (D115). Used by the
12054
12110
  * admin "Add filesystem location" flow to pick a node + path. `mode:'per-node'`
12055
12111
  * (one provider per node); the hub calls it with `{nodeId}` so the codegen
12056
12112
  * routes to that exact node (default `nodeIdMode:'routing'`).
@@ -13863,6 +13919,13 @@ var MaskGridDimsSchema = object({
13863
13919
  * `package-event` are pure trigger kinds (no urgency dimension). Extending
13864
13920
  * this one field keeps the schema additive — a rule still declares exactly
13865
13921
  * one trigger.
13922
+ *
13923
+ * AUDIO rules add no member here, for the reason occupancy added none: the
13924
+ * enum is mirrored by hand in the viewer (`scripts/check-viewer-condition-
13925
+ * mirror.ts` fails the build on a member the app cannot render) and every
13926
+ * member costs a release train. A sustained-sound rule is therefore an
13927
+ * `immediate` rule carrying {@link NcConditions.audio} — the condition is the
13928
+ * trigger discriminator, exactly as `occupancy` is on `device-event`.
13866
13929
  */
13867
13930
  var NcDeliverySchema = _enum([
13868
13931
  "immediate",
@@ -13877,15 +13940,32 @@ var NcDeliverySchema = _enum([
13877
13940
  * depend on a provider's raw event name or payload shape.
13878
13941
  */
13879
13942
  var NcSystemEventKindSchema = _enum([
13880
- "camera-online",
13881
- "camera-offline",
13943
+ "device-online",
13944
+ "device-offline",
13945
+ "device-disabled",
13946
+ "device-enabled",
13882
13947
  "stream-online",
13883
13948
  "stream-offline",
13884
13949
  "node-online",
13885
13950
  "node-offline",
13886
13951
  "addon-update-available",
13887
- "server-update-available"
13952
+ "server-update-available",
13953
+ "alarm-triggered",
13954
+ "alarm-armed",
13955
+ "alarm-disarmed",
13956
+ "camera-online",
13957
+ "camera-offline",
13958
+ "camera-disabled",
13959
+ "camera-enabled"
13960
+ ]);
13961
+ /** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
13962
+ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
13963
+ "camera-online",
13964
+ "camera-offline",
13965
+ "camera-disabled",
13966
+ "camera-enabled"
13888
13967
  ]);
13968
+ NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
13889
13969
  /**
13890
13970
  * One coherent system-event condition. `kinds` is the required opt-in safety
13891
13971
  * gate; the remaining lists are optional narrowing filters relevant to the
@@ -13894,6 +13974,18 @@ var NcSystemEventKindSchema = _enum([
13894
13974
  var NcSystemEventConditionSchema = object({
13895
13975
  kinds: array(NcSystemEventKindSchema).min(1),
13896
13976
  deviceIds: array(number().int()).min(1).optional(),
13977
+ /**
13978
+ * Narrow a `device-*` kind to these device TYPES (`DeviceType` values —
13979
+ * `camera`, `switch`, `sensor`, `container`, …). Absent = every type, which
13980
+ * is what a liveness rule means when nobody said otherwise.
13981
+ *
13982
+ * This is where "only my cameras" is expressed, and it lives on the rule for
13983
+ * one reason: the intake cannot know which devices this household cares
13984
+ * about, and a producer-side filter is one no operator can change. Fails
13985
+ * CLOSED — a subject whose device type is unknown (an id the device mirror
13986
+ * does not carry) matches no `deviceTypes` list.
13987
+ */
13988
+ deviceTypes: array(string().min(1)).min(1).optional(),
13897
13989
  nodeIds: array(string().min(1)).min(1).optional(),
13898
13990
  packageNames: array(string().min(1)).min(1).optional()
13899
13991
  });
@@ -13944,6 +14036,47 @@ var NcOccupancyConditionSchema = object({
13944
14036
  sustainSeconds: number().int().min(0).max(3600).default(15)
13945
14037
  });
13946
14038
  /**
14039
+ * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14040
+ *
14041
+ * Operator-approved vocabulary (2026-08-12, option A — the same one the
14042
+ * reference notifier uses, so an operator moving between them re-uses what
14043
+ * they already know): a rule matches when, over a sampling window of
14044
+ * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14045
+ * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14046
+ *
14047
+ * - `dbThreshold` — its level is at or above this many dBFS (see
14048
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14049
+ * - `labels` — the classifier put at least one of these labels on it.
14050
+ *
14051
+ * Both are OPTIONAL and independent, which is the point of the shape: a
14052
+ * loudness rule ("something loud at 3am") needs no model to be right, and a
14053
+ * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14054
+ * is given** — a window in which every sample is trivially a hit would fire on
14055
+ * silence, so the engine refuses such a condition rather than notifying on
14056
+ * nothing (the schema cannot express "at least one of" without becoming a
14057
+ * ZodEffects the cap path would have to special-case).
14058
+ *
14059
+ * `hitPercent` is over the samples the window actually HOLDS, and the window
14060
+ * must be FULL before it can match — a window that has been open for two
14061
+ * seconds of its ten is 100% of nothing, and firing on it would make
14062
+ * `samplingSeconds` decorative.
14063
+ *
14064
+ * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14065
+ * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
14066
+ * `audio-` prefix away on both sides, so a picker that offers taxonomy ids and
14067
+ * an operator who typed `dog` mean the same thing.
14068
+ */
14069
+ var NcAudioConditionSchema = object({
14070
+ /** Audio macro labels; absent = any sound (level-only rule). */
14071
+ labels: array(string().min(1)).min(1).optional(),
14072
+ /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14073
+ dbThreshold: number().min(-96).max(0).optional(),
14074
+ /** Percentage of the window's samples that must be hits (1–100). */
14075
+ hitPercent: number().int().min(1).max(100).default(60),
14076
+ /** Length of the sampling window in seconds. */
14077
+ samplingSeconds: number().int().min(1).max(300).default(10)
14078
+ });
14079
+ /**
13947
14080
  * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
13948
14081
  *
13949
14082
  * The values are not symmetric, and deliberately so — the absent value has to
@@ -14216,7 +14349,33 @@ var NcConditionsSchema = object({
14216
14349
  * threshold and holds for `sustainSeconds`. Fail-closed on missing
14217
14350
  * substrate (no snapshot / missing zone). See {@link NcOccupancyCondition}.
14218
14351
  */
14219
- occupancy: NcOccupancyConditionSchema.optional()
14352
+ occupancy: NcOccupancyConditionSchema.optional(),
14353
+ /**
14354
+ * IMMEDIATE only. Sustained-sound matcher — `hitPercent` of the samples in a
14355
+ * `samplingSeconds` window clear the optional `dbThreshold` and carry one of
14356
+ * the optional `labels`. Fail-closed on missing substrate (no audio samples,
14357
+ * a window that is not full yet, neither filter given). See
14358
+ * {@link NcAudioCondition}.
14359
+ *
14360
+ * Presence of this key is what makes a rule an AUDIO rule: the engine fires
14361
+ * it ONLY on a confirmed audio window, and a rule carrying it never fires on
14362
+ * a detection, a track or a device event (the same fail-closed pairing
14363
+ * `occupancy` has with the `device-event` trigger). That is how audio labels
14364
+ * leave `classes`: an audio rule names its sounds HERE, and the legacy path
14365
+ * (an `immediate` rule naming an `audio-*` class, one notification per
14366
+ * classified sample) stays exactly as it was for rules that already use it.
14367
+ *
14368
+ * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14369
+ * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14370
+ * (`camstack/src/data/notification-center.ts`, guarded by
14371
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14372
+ * condition fields it does not know when a rule is saved from the phone.
14373
+ * Publishing an editor for a condition the app cannot round-trip is how an
14374
+ * operator loses a rule's conditions by opening it — so the descriptor, the
14375
+ * admin widget and the viewer mirror land together (P2 + P3), and only then
14376
+ * does an audio rule become authorable.
14377
+ */
14378
+ audio: NcAudioConditionSchema.optional()
14220
14379
  });
14221
14380
  /** One delivery target: a `notification-output` Target ref + passthrough params. */
14222
14381
  var NcRuleTargetSchema = object({
@@ -14330,6 +14489,73 @@ var NcThrottleSchema = object({
14330
14489
  */
14331
14490
  granularity: NcThrottleGranularitySchema.optional()
14332
14491
  });
14492
+ /**
14493
+ * How long the confirm gate may hold ONE notification, and how big the picture
14494
+ * it judges may be.
14495
+ *
14496
+ * The clamp is the product decision, not a coincidence of the model: p50 was
14497
+ * 4.9 s warm and 15.3 s cold against qwen3-vl-8b, and a notification that
14498
+ * arrives after the visitor has gone is not a notification. 448 px was enough
14499
+ * to score 16/16 on the operator's parking scenario — bigger costs latency and
14500
+ * tokens for pixels the model pools away.
14501
+ */
14502
+ var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
14503
+ var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
14504
+ var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
14505
+ /** Comparison the model's COUNT must satisfy for the notification to fire. */
14506
+ var NcConfirmExpectSchema = object({
14507
+ op: _enum([
14508
+ ">=",
14509
+ ">",
14510
+ "<=",
14511
+ "<",
14512
+ "=="
14513
+ ]),
14514
+ count: number().int().min(0).max(1e3)
14515
+ });
14516
+ /**
14517
+ * AI CONFIRM — a vision model looks at the picture this notification is about
14518
+ * to ship and says whether it agrees with the rule.
14519
+ *
14520
+ * It runs AFTER the attachments resolve, deliberately: the crop JUDGED is the
14521
+ * crop SHIPPED (D52). A verdict about a different pixel rectangle than the one
14522
+ * on the operator's phone is not a verdict about this notification.
14523
+ *
14524
+ * FAIL-OPEN is the only safe default. A gate that cannot reach its model, or
14525
+ * whose model is cold, must not silence a camera — so `onTimeout: 'fire'` is
14526
+ * the default and every fail-open is COUNTED, because a gate that always fails
14527
+ * open looks in the log exactly like a gate that works.
14528
+ *
14529
+ * Every field is `.optional()` rather than relied on as a Zod default at the
14530
+ * runtime seam: a Zod default does NOT run on the addon→addon cap path (three
14531
+ * production failures in one day), so the gate reads absent as the constant
14532
+ * above rather than trusting a parse it may never have seen.
14533
+ */
14534
+ var NcConfirmSchema = object({
14535
+ /** Off unless asked for. An absent `confirm` and `enabled:false` are the
14536
+ * same thing, and both mean "deliver exactly as before". */
14537
+ enabled: boolean().default(false),
14538
+ /** Explicit vision profile; absent = the `purpose:'vision'` cluster default. */
14539
+ profileId: string().optional(),
14540
+ /**
14541
+ * The operator's question, in his own words. Absent = a question derived
14542
+ * from the rule (its class and its expectation).
14543
+ *
14544
+ * NEVER composed with text READ OUT OF THE FRAME. The model reads OSD
14545
+ * banners, signage and plates as instructions if you let them reach the
14546
+ * prompt — proven live — so the authoritative contract stays in the system
14547
+ * turn and only rule-authored words land here.
14548
+ */
14549
+ prompt: string().max(1e3).optional(),
14550
+ /** Fire only when the model's count satisfies this. Absent = the model's
14551
+ * own boolean verdict decides. */
14552
+ expect: NcConfirmExpectSchema.optional(),
14553
+ timeoutMs: number().int().min(NC_CONFIRM_MIN_TIMEOUT_MS).max(NC_CONFIRM_MAX_TIMEOUT_MS).default(NC_CONFIRM_DEFAULT_TIMEOUT_MS),
14554
+ /** What a timeout / unreachable model MEANS. `fire` (default) = fail-open. */
14555
+ onTimeout: _enum(["fire", "suppress"]).default("fire"),
14556
+ /** Longest edge the judged image is downscaled to before it is sent. */
14557
+ maxImagePx: number().int().min(64).max(2048).default(448)
14558
+ });
14333
14559
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
14334
14560
  var NcRuleInputSchema = object({
14335
14561
  name: string().min(1).max(200),
@@ -14390,7 +14616,13 @@ var NcRuleInputSchema = object({
14390
14616
  * `{ cap: 'alarm-panel', method: 'arm', args: { mode: 'away' } }`, the same
14391
14617
  * shape as every other actuation.
14392
14618
  */
14393
- actions: NcRuleActionsSchema.optional()
14619
+ actions: NcRuleActionsSchema.optional(),
14620
+ /**
14621
+ * AI CONFIRM — see {@link NcConfirmSchema}. `.optional()`, never defaulted:
14622
+ * a rule that predates the gate must keep delivering byte-for-byte as it
14623
+ * did, and absent is the only way to say that without a migration.
14624
+ */
14625
+ confirm: NcConfirmSchema.optional()
14394
14626
  });
14395
14627
  /**
14396
14628
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14401,7 +14633,37 @@ var NcRuleInputSchema = object({
14401
14633
  * still flow through `nc.setRuleTargetEnabled` (owner-checked), never a raw
14402
14634
  * `updateRule` patch.
14403
14635
  */
14404
- var NcRulePatchSchema = NcRuleInputSchema.partial().extend({ disabledTargetIds: array(string()).optional() });
14636
+ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
14637
+ disabledTargetIds: array(string()).optional(),
14638
+ /**
14639
+ * `.partial()` DOES NOT REMOVE A FIELD'S `.default()`.
14640
+ *
14641
+ * It makes the key optional to SUPPLY; the parse still materialises the
14642
+ * default when the key is absent. And `NcRuleStore.update` merges with
14643
+ * `{ ...existing, ...patch }`, so a materialised key OVERWRITES the stored
14644
+ * one — which made every partial edit destructive:
14645
+ *
14646
+ * nc.updateRule({ throttle }) → conditions reset to `{}`
14647
+ * nc.setRuleTargetEnabled(...) → conditions reset to `{}`
14648
+ * setEnabled(ruleId, false) → conditions reset to `{}`
14649
+ *
14650
+ * A rule scoped to one camera and one zone silently became a rule that
14651
+ * matches EVERY event on EVERY camera, and lost its `media` policy
14652
+ * (zoneCrop / gif / clip / frame) and its `priority` at the same time. Seen
14653
+ * live on 2026-08-12: a rule scoped to device 617 fired on 590 and 615
14654
+ * within a minute of a two-field patch.
14655
+ *
14656
+ * So every defaulted field is re-declared here WITHOUT its default. The
14657
+ * inner defaults still apply when the caller DOES send the key — `{}` for
14658
+ * conditions remains a real instruction ("clear them") — and only the
14659
+ * absent key is now genuinely absent.
14660
+ */
14661
+ enabled: boolean().optional(),
14662
+ conditions: NcConditionsSchema.optional(),
14663
+ media: NcMediaPolicySchema.optional(),
14664
+ throttle: NcThrottleSchema.optional(),
14665
+ priority: number().int().min(1).max(5).optional()
14666
+ });
14405
14667
  /** A persisted rule. */
14406
14668
  var NcRuleSchema = NcRuleInputSchema.extend({
14407
14669
  id: string(),
@@ -14702,6 +14964,25 @@ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
14702
14964
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
14703
14965
  * copy would lie the first time a rule is disabled.
14704
14966
  */
14967
+ /**
14968
+ * Why a device a mode NAMES is nonetheless not armed by it.
14969
+ *
14970
+ * Each value is an existing authority, never a new flag (D62): `muted` is the
14971
+ * per-camera notification switch the Notification Center already owns,
14972
+ * `detection-off` is the device's own detection binding being inactive, and
14973
+ * `offline` is the device manager's liveness. A fourth reason would mean a
14974
+ * fourth authority, and inventing one here is how a panel starts disagreeing
14975
+ * with the switches the operator actually used.
14976
+ */
14977
+ var NcAlarmSkipReasonSchema = _enum([
14978
+ "muted",
14979
+ "detection-off",
14980
+ "offline"
14981
+ ]);
14982
+ var NcAlarmSkippedDeviceSchema = object({
14983
+ deviceId: number().int(),
14984
+ reason: NcAlarmSkipReasonSchema
14985
+ });
14705
14986
  var NcAlarmModeCoverageSchema = object({
14706
14987
  mode: AlarmArmModeSchema,
14707
14988
  /** Enabled rules gated on `armed_<mode>`. Zero means the mode does nothing. */
@@ -14709,7 +14990,18 @@ var NcAlarmModeCoverageSchema = object({
14709
14990
  /** At least one covering rule has no device scope, so the mode covers all. */
14710
14991
  allDevices: boolean(),
14711
14992
  /** Ids named by the covering rules. A SUBSET when `allDevices` is true. */
14712
- deviceIds: array(number().int())
14993
+ deviceIds: array(number().int()),
14994
+ /**
14995
+ * Devices this mode NAMES but cannot actually arm, each with the switch that
14996
+ * excludes it.
14997
+ *
14998
+ * "Away armed — 12 cameras" is a promise, and a muted camera among those
14999
+ * twelve makes it false in exactly the way nobody notices until an incident.
15000
+ * Defaulted to `[]` so a coverage answer computed before this field existed
15001
+ * still parses as "nothing known to be skipped" rather than failing the whole
15002
+ * alarm tab.
15003
+ */
15004
+ skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
14713
15005
  });
14714
15006
  var NcAlarmConfigSchema = object({
14715
15007
  /**
@@ -17508,9 +17800,16 @@ var CameraStatusSchema = object({
17508
17800
  audio: CameraAudioStatusSchema.nullable(),
17509
17801
  recording: CameraRecordingStatusSchema.nullable(),
17510
17802
  /**
17511
- * Per-camera function switches an OPERATOR has turned off
17803
+ * Per-camera functions an OPERATOR has turned off
17512
17804
  * ([D61](../../../../docs/decisions/adr-0067.md)).
17513
17805
  *
17806
+ * Composed from the AUTHORITIES themselves — the wrapper bindings,
17807
+ * `RecordingConfig.enabled`, the notification mute, the broker's audio
17808
+ * policy, the camera's own microphone — via `composeSwitchedOff`, not from
17809
+ * the deprecated `getCameraSwitches` group ([D113](../../../../docs/decisions/adr-0113.md)).
17810
+ * The badge outlives the control panel: the panel was a convenience, this is
17811
+ * the difference between a camera being off and a camera being dead.
17812
+ *
17514
17813
  * This is the difference between DISABLED and BROKEN. A camera whose
17515
17814
  * `detection` block reports zero fps and whose `switchedOff` contains
17516
17815
  * `'object-detection'` was switched off by a person; the same camera with an
@@ -23032,7 +23331,19 @@ var RecordingManifestSchema = object({
23032
23331
  * profiles/subtrees/locations on this node). */
23033
23332
  var RecordingDeviceUsageSchema = object({
23034
23333
  deviceId: number(),
23035
- usedBytes: number()
23334
+ usedBytes: number(),
23335
+ /**
23336
+ * Start of this camera's OLDEST indexed segment, across every profile and
23337
+ * location — the "Oldest footage" column in Recordings → Storage, and the
23338
+ * only honest answer to "is retention actually holding?" per camera.
23339
+ *
23340
+ * `null` = the camera has no footage. OPTIONAL because a recorder that
23341
+ * predates this field omits it entirely, and a hub whose types carry the
23342
+ * field must keep validating that older provider's payload: the framework
23343
+ * (types) and the addon ship on different trains, and the addon is usually
23344
+ * the later of the two.
23345
+ */
23346
+ oldestMs: number().nullable().optional()
23036
23347
  });
23037
23348
  /** Recording storage usage + capacity for one storage location. */
23038
23349
  var RecordingLocationUsageSchema = object({
@@ -23060,6 +23371,57 @@ var RecordingStorageUsageSchema = object({
23060
23371
  locations: array(RecordingLocationUsageSchema)
23061
23372
  });
23062
23373
  /**
23374
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
23375
+ *
23376
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
23377
+ * is the operator asking for the EXISTING archive to be brought into line with
23378
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
23379
+ * location, run FIFO behind the single-flight mover.
23380
+ *
23381
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
23382
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
23383
+ * (empty on the plan).
23384
+ */
23385
+ var RecordingRebalanceMoveSchema = object({
23386
+ deviceId: number(),
23387
+ profile: string(),
23388
+ fromLocationId: string(),
23389
+ toLocationId: string(),
23390
+ bytes: number(),
23391
+ files: number().int()
23392
+ });
23393
+ /** Why a pile that is out of place is staying there. Every refusal is
23394
+ * reported: a rebalance that silently drops a camera reads exactly like one
23395
+ * that had nothing to do. */
23396
+ var RecordingRebalanceSkipReasonSchema = _enum([
23397
+ "unassigned",
23398
+ "target-not-writable",
23399
+ "below-threshold",
23400
+ "no-headroom"
23401
+ ]);
23402
+ var RecordingRebalanceSkipSchema = object({
23403
+ deviceId: number(),
23404
+ profile: string(),
23405
+ fromLocationId: string(),
23406
+ /** The location the plan wants; null when the camera has no assignment. */
23407
+ toLocationId: string().nullable(),
23408
+ bytes: number(),
23409
+ reason: RecordingRebalanceSkipReasonSchema
23410
+ });
23411
+ var RecordingRebalancePlanSchema = object({
23412
+ moves: array(RecordingRebalanceMoveSchema),
23413
+ skipped: array(RecordingRebalanceSkipSchema),
23414
+ bytesToMove: number(),
23415
+ /** Relocate job ids enqueued. Always empty for the plan (dry-run) call. */
23416
+ jobIds: array(string())
23417
+ });
23418
+ var RecordingRebalanceInputSchema = object({
23419
+ /** Copy throttle in MB/s (default 40) — a rebalance is a background chore. */
23420
+ throttleMbps: number().min(1).max(1e3).optional(),
23421
+ /** Ignore piles smaller than this (default 1 GB). */
23422
+ minMoveGb: number().min(0).optional()
23423
+ });
23424
+ /**
23063
23425
  * Result of locating footage at a wall-clock instant for one device/profile.
23064
23426
  * `segment` carries the covering segment's window; `gap` reports the forward
23065
23427
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -23222,9 +23584,24 @@ method(object({
23222
23584
  }), method(object({ jobId: string() }), RelocateJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23223
23585
  kind: "mutation",
23224
23586
  auth: "admin"
23587
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
23588
+ kind: "mutation",
23589
+ auth: "admin"
23590
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
23591
+ kind: "query",
23592
+ auth: "admin"
23593
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23594
+ kind: "mutation",
23595
+ auth: "admin"
23596
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23597
+ kind: "query",
23598
+ auth: "admin"
23599
+ }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
23600
+ kind: "mutation",
23601
+ auth: "admin"
23225
23602
  });
23226
23603
  /**
23227
- * `recordingExport` cap — render a footage time range into a single downloadable
23604
+ * `recording-export` cap — render a footage time range into a single downloadable
23228
23605
  * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
23229
23606
  * bounded lifetime with a durable history, auto-expiry, and optional
23230
23607
  * delete-after-download.
@@ -23239,10 +23616,42 @@ method(object({
23239
23616
  */
23240
23617
  /** Playback-speed multiplier for the render (1 = realtime). */
23241
23618
  var ExportSpeedSchema = number().min(.25).max(32);
23619
+ /**
23620
+ * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
23621
+ *
23622
+ * Relative and not absolute epoch on purpose: the renderer's frame-select
23623
+ * expression sees ffmpeg's `t`, which starts at 0 for the export's source
23624
+ * playlist. Handing it absolute epochs would make every call site responsible
23625
+ * for the same subtraction, and the one that forgot would emit a filter that
23626
+ * selects nothing — silently, as a uniform timelapse.
23627
+ */
23628
+ var ExportDenseRangeSchema = object({
23629
+ fromSec: number().nonnegative(),
23630
+ toSec: number().nonnegative()
23631
+ }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
23632
+ /**
23633
+ * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
23634
+ * listed ranges and at the base `everyMs` everywhere else.
23635
+ *
23636
+ * `everyMs` must be strictly smaller than the base cadence — a dense rate that
23637
+ * is not denser renders a uniform timelapse the operator believes is two-rate.
23638
+ */
23639
+ var ExportDenseSchema = object({
23640
+ everyMs: number().int().positive(),
23641
+ ranges: array(ExportDenseRangeSchema).min(1).max(200)
23642
+ });
23242
23643
  /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
23243
23644
  var ExportTimelapseSchema = object({
23244
23645
  everyMs: number().int().positive(),
23245
- outputFps: number().int().min(1).max(60).optional()
23646
+ outputFps: number().int().min(1).max(60).optional(),
23647
+ /** Optional second, FASTER rate over the intervals that matter. */
23648
+ dense: ExportDenseSchema.optional()
23649
+ }).superRefine((v, ctx) => {
23650
+ if (v.dense !== void 0 && v.dense.everyMs >= v.everyMs) ctx.addIssue({
23651
+ code: ZodIssueCode.custom,
23652
+ message: "dense.everyMs must be strictly smaller than the base everyMs",
23653
+ path: ["dense", "everyMs"]
23654
+ });
23246
23655
  });
23247
23656
  /**
23248
23657
  * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
@@ -23300,6 +23709,19 @@ var ExportDownloadSchema = object({
23300
23709
  url: string(),
23301
23710
  endpoints: array(string())
23302
23711
  });
23712
+ /**
23713
+ * A finished export's bytes, inline.
23714
+ *
23715
+ * `bytes` is the DECODED length — the number the caller bounds and logs
23716
+ * against, so nobody has to infer it from the base64 length.
23717
+ */
23718
+ var ExportBytesSchema = object({
23719
+ base64: string(),
23720
+ contentType: string(),
23721
+ /** Suggested filename, extension included. */
23722
+ name: string(),
23723
+ bytes: number().int().nonnegative()
23724
+ });
23303
23725
  method(object({
23304
23726
  deviceId: number(),
23305
23727
  profile: string(),
@@ -23324,6 +23746,9 @@ method(object({
23324
23746
  }), method(object({ exportId: string() }), ExportDownloadSchema, {
23325
23747
  kind: "query",
23326
23748
  auth: "protected"
23749
+ }), method(object({ exportId: string() }), ExportBytesSchema, {
23750
+ kind: "query",
23751
+ auth: "protected"
23327
23752
  });
23328
23753
  /**
23329
23754
  * scene-monitor — device-scoped reference-region state cap. An operator marks
@@ -28517,6 +28942,12 @@ Object.freeze({
28517
28942
  addonId: null,
28518
28943
  access: "create"
28519
28944
  },
28945
+ "recording.cancelRelocateJob": {
28946
+ capName: "recording",
28947
+ capScope: "system",
28948
+ addonId: null,
28949
+ access: "create"
28950
+ },
28520
28951
  "recording.cancelStorageMigrationMove": {
28521
28952
  capName: "recording",
28522
28953
  capScope: "system",
@@ -28571,6 +29002,12 @@ Object.freeze({
28571
29002
  addonId: null,
28572
29003
  access: "view"
28573
29004
  },
29005
+ "recording.listRelocateJobs": {
29006
+ capName: "recording",
29007
+ capScope: "system",
29008
+ addonId: null,
29009
+ access: "view"
29010
+ },
28574
29011
  "recording.locateSegment": {
28575
29012
  capName: "recording",
28576
29013
  capScope: "system",
@@ -28583,6 +29020,12 @@ Object.freeze({
28583
29020
  addonId: null,
28584
29021
  access: "create"
28585
29022
  },
29023
+ "recording.planStorageRebalance": {
29024
+ capName: "recording",
29025
+ capScope: "system",
29026
+ addonId: null,
29027
+ access: "view"
29028
+ },
28586
29029
  "recording.pruneFootage": {
28587
29030
  capName: "recording",
28588
29031
  capScope: "system",
@@ -28607,6 +29050,12 @@ Object.freeze({
28607
29050
  addonId: null,
28608
29051
  access: "create"
28609
29052
  },
29053
+ "recording.relocateFootage": {
29054
+ capName: "recording",
29055
+ capScope: "system",
29056
+ addonId: null,
29057
+ access: "create"
29058
+ },
28610
29059
  "recording.renderClip": {
28611
29060
  capName: "recording",
28612
29061
  capScope: "system",
@@ -28643,38 +29092,50 @@ Object.freeze({
28643
29092
  addonId: null,
28644
29093
  access: "create"
28645
29094
  },
29095
+ "recording.startStorageRebalance": {
29096
+ capName: "recording",
29097
+ capScope: "system",
29098
+ addonId: null,
29099
+ access: "create"
29100
+ },
28646
29101
  "recordingExport.cancelExport": {
28647
- capName: "recordingExport",
29102
+ capName: "recording-export",
28648
29103
  capScope: "system",
28649
29104
  addonId: null,
28650
29105
  access: "create"
28651
29106
  },
28652
29107
  "recordingExport.createExport": {
28653
- capName: "recordingExport",
29108
+ capName: "recording-export",
28654
29109
  capScope: "system",
28655
29110
  addonId: null,
28656
29111
  access: "create"
28657
29112
  },
28658
29113
  "recordingExport.deleteExport": {
28659
- capName: "recordingExport",
29114
+ capName: "recording-export",
28660
29115
  capScope: "system",
28661
29116
  addonId: null,
28662
29117
  access: "delete"
28663
29118
  },
28664
29119
  "recordingExport.getDownloadUrl": {
28665
- capName: "recordingExport",
29120
+ capName: "recording-export",
28666
29121
  capScope: "system",
28667
29122
  addonId: null,
28668
29123
  access: "view"
28669
29124
  },
28670
29125
  "recordingExport.getExport": {
28671
- capName: "recordingExport",
29126
+ capName: "recording-export",
28672
29127
  capScope: "system",
28673
29128
  addonId: null,
28674
29129
  access: "view"
28675
29130
  },
28676
29131
  "recordingExport.listExports": {
28677
- capName: "recordingExport",
29132
+ capName: "recording-export",
29133
+ capScope: "system",
29134
+ addonId: null,
29135
+ access: "view"
29136
+ },
29137
+ "recordingExport.readExportBytes": {
29138
+ capName: "recording-export",
28678
29139
  capScope: "system",
28679
29140
  addonId: null,
28680
29141
  access: "view"
@@ -30051,6 +30512,104 @@ var FramerateField = number().int().min(1).max(60);
30051
30512
  var TargetsField = array(NcRuleTargetSchema).min(1);
30052
30513
  var PriorityField = number().int().min(1).max(5);
30053
30514
  /**
30515
+ * Explicit override of the DENSE sampling cadence, seconds.
30516
+ *
30517
+ * Absent ⇒ derived as `max(1s, cadenceSec / 30)` — a 30 s base samples every
30518
+ * 1 s inside a detection range. (It was `base / 10` until 2026-08-12, which
30519
+ * made that same base 3 s and rendered a person pass as two frames.)
30520
+ *
30521
+ * THE ARITHMETIC. A detection range of `rangeSec` seconds sampled every
30522
+ * `denseCadenceSec` and played at `framerate` occupies
30523
+ *
30524
+ * outputSeconds = (rangeSec / denseCadenceSec) / framerate
30525
+ *
30526
+ * so a 7 s pass at 1 s / 12 fps is 0.58 s of video, and at 0.5 s it is 1.17 s.
30527
+ * Halving this field doubles the frames INSIDE ranges only — the base cadence,
30528
+ * and therefore the length of a quiet night, does not move.
30529
+ *
30530
+ * Floored at {@link TIMELAPSE_DENSE_FLOOR_SEC}: asking for frames faster than
30531
+ * the recording has them returns the same frames, requested twice. Must be
30532
+ * STRICTLY smaller than `cadenceSec` — a dense rate that is not denser renders
30533
+ * a uniform video the operator believes is two-rate — and upsert refuses it
30534
+ * rather than letting the export cap reject the render hours after the window.
30535
+ */
30536
+ var DenseCadenceSecField = number().min(.1).max(3600);
30537
+ /**
30538
+ * Minimum seconds of OUTPUT video each detection range must occupy.
30539
+ *
30540
+ * The operator-facing form of the arithmetic above: instead of solving for a
30541
+ * cadence, state the dwell and let the renderer solve. `minDwellSec: 1` on a
30542
+ * 30 s base at 12 fps turns a 7 s pass into a full second of video by sampling
30543
+ * that range every ~583 ms.
30544
+ *
30545
+ * ONE CADENCE SERVES EVERY RANGE. `ExportDenseSchema.everyMs` is global — the
30546
+ * ranges are terms of a single ffmpeg `select` expression that cannot vary rate
30547
+ * per term — so the MOST DEMANDING (shortest) range sets the rate and longer
30548
+ * ranges are sampled denser than they need. Per-range cadences require a cap
30549
+ * schema change and are the tracked follow-up.
30550
+ *
30551
+ * A range too short to reach the dwell even at {@link TIMELAPSE_DENSE_FLOOR_SEC}
30552
+ * is rendered with every frame that EXISTS and no more: the guarantee is capped
30553
+ * by real footage, never met by duplicating frames into motion that never
30554
+ * happened.
30555
+ */
30556
+ var MinDwellSecField = number().min(0).max(60);
30557
+ /**
30558
+ * Caption burned into the notification's preview frame.
30559
+ *
30560
+ * Same `{{var}}` vocabulary as {@link TimelapseTemplateSchema} (`camera`,
30561
+ * `rule`, `from`, `to`) and rendered by the SAME renderer — a second
30562
+ * templating dialect for one field would be a second thing to explain.
30563
+ *
30564
+ * Absent ⇒ {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}. An EMPTY STRING is the
30565
+ * operator saying "the frame, no caption" — a distinct, reachable answer, and
30566
+ * the reason this is not `.min(1)`.
30567
+ */
30568
+ var PreviewTextField = string().max(200);
30569
+ /**
30570
+ * Whether the notification's preview is a STILL or a short animation.
30571
+ *
30572
+ * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
30573
+ * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
30574
+ * night reads better as three seconds of motion than as one frame of it. Both
30575
+ * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
30576
+ * simply applies it to a dozen frames sampled across the render and assembles
30577
+ * them.
30578
+ *
30579
+ * `'image'` is the default and stays the default: a GIF costs a dozen ffmpeg
30580
+ * seeks and a palette pass, and no rule that never asked for one should start
30581
+ * paying that on the deploy that shipped it.
30582
+ *
30583
+ * A GIF that cannot be assembled DEGRADES to the still — never to nothing.
30584
+ */
30585
+ var PreviewModeField = _enum(["image", "gif"]);
30586
+ /**
30587
+ * Which detection classes the notification reports counts for.
30588
+ *
30589
+ * The counts come from the tracks the render ALREADY fetched for its dense-range
30590
+ * plan — no second query — aggregated per class. Absent or empty means "every
30591
+ * class the window actually contained", which is what an operator who never
30592
+ * opened the field wants; a list narrows it (`['person']` on a driveway that
30593
+ * counts cars all night).
30594
+ *
30595
+ * Class names are the tracker's own (`person`, `vehicle`, `animal`, `package`,
30596
+ * …). An unknown name simply never matches and reports nothing — it is not an
30597
+ * error, because a rule may legitimately name a class this camera's model does
30598
+ * not emit.
30599
+ *
30600
+ * The counts are exposed to {@link TimelapseTemplateSchema} as:
30601
+ * - `{{detections}}` — total over the reported classes
30602
+ * - `{{detectionSummary}}` — `2 persone, 1 veicolo`
30603
+ * - `{{count_person}}` / `{{count_vehicle}}` / `{{count_animal}}` / … —
30604
+ * one per class, `count_` + the class name
30605
+ *
30606
+ * With NO custom body template the summary is appended to the derived body, and
30607
+ * only when the total is non-zero: a nightly `0 rilevamenti` is a line nobody
30608
+ * reads. With a custom template the operator owns every word — nothing is
30609
+ * appended, so `{{detectionSummary}}` is how he asks for it.
30610
+ */
30611
+ var ReportClassesField = array(string().min(1).max(40)).max(20);
30612
+ /**
30054
30613
  * Client-supplied timelapse-rule fields. The server stamps id / createdBy /
30055
30614
  * createdAt / updatedAt / ownerUserId / lastGeneratedAt — none of them appear
30056
30615
  * here (see the ownership note above).
@@ -30070,9 +30629,30 @@ var TimelapseRuleInputSchema = object({
30070
30629
  cadenceSec: CadenceSecField.default(15),
30071
30630
  /** Output frames per second of the assembled mp4 (predecessor parity). */
30072
30631
  framerate: FramerateField.default(10),
30632
+ /**
30633
+ * Explicit dense cadence — see {@link DenseCadenceSecField}. Absent ⇒ derived
30634
+ * as `max(1s, cadenceSec / 30)`, which is what every rule written before this
30635
+ * field gets.
30636
+ */
30637
+ denseCadenceSec: DenseCadenceSecField.optional(),
30638
+ /** Output-seconds guarantee per detection range — see {@link MinDwellSecField}. */
30639
+ minDwellSec: MinDwellSecField.optional(),
30073
30640
  /** `notification-output` targets the finished video/thumbnail is sent to. */
30074
30641
  targets: TargetsField,
30075
30642
  template: TimelapseTemplateSchema.optional(),
30643
+ /**
30644
+ * Caption on the notification's PREVIEW FRAME — see {@link PreviewTextField}
30645
+ * and {@link DEFAULT_TIMELAPSE_PREVIEW_TEXT}.
30646
+ *
30647
+ * Deliberately NOT part of {@link TimelapseTemplateSchema}: that object is
30648
+ * the notification's title/body, and clearing it (`template: null`) must not
30649
+ * silently clear the caption too.
30650
+ */
30651
+ previewText: PreviewTextField.optional(),
30652
+ /** Still or animation — see {@link PreviewModeField}. */
30653
+ previewMode: PreviewModeField.default("image"),
30654
+ /** Classes the notification counts — see {@link ReportClassesField}. */
30655
+ reportClasses: ReportClassesField.optional(),
30076
30656
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
30077
30657
  priority: PriorityField.default(3)
30078
30658
  });
@@ -30083,8 +30663,13 @@ object({
30083
30663
  schedule: NcScheduleSchema.optional(),
30084
30664
  cadenceSec: CadenceSecField.optional(),
30085
30665
  framerate: FramerateField.optional(),
30666
+ denseCadenceSec: DenseCadenceSecField.optional(),
30667
+ minDwellSec: MinDwellSecField.optional(),
30086
30668
  targets: TargetsField.optional(),
30087
30669
  template: TimelapseTemplateSchema.nullable().optional(),
30670
+ previewText: PreviewTextField.optional(),
30671
+ previewMode: PreviewModeField.optional(),
30672
+ reportClasses: ReportClassesField.optional(),
30088
30673
  priority: PriorityField.optional()
30089
30674
  });
30090
30675
  TimelapseRuleInputSchema.extend({
@@ -30096,10 +30681,28 @@ TimelapseRuleInputSchema.extend({
30096
30681
  */
30097
30682
  ownerUserId: string().optional(),
30098
30683
  /**
30099
- * Epoch-ms of the last successful generation the 1-hour re-generation
30100
- * guard's durable state (predecessor parity). Absent = never generated.
30684
+ * Epoch-ms of the NEWEST successful generation across every camera of this
30685
+ * rule. What a UI shows, and the compatibility floor for
30686
+ * {@link readTimelapseGeneratedAt}. Absent = never generated.
30101
30687
  */
30102
30688
  lastGeneratedAt: number().optional(),
30689
+ /**
30690
+ * PER-CAMERA generation state, keyed by `String(deviceId)` — the
30691
+ * re-generation guard's real durable state.
30692
+ *
30693
+ * One rule covers several cameras and each renders its own video, so a rule
30694
+ * -wide stamp is wrong in the direction that DESTROYS work: camera A
30695
+ * succeeding at 06:05 tells camera B, whose render failed, that it is
30696
+ * already done — and B's night is gone for good, because the window will not
30697
+ * come back.
30698
+ *
30699
+ * ADDITIVE, so the migration is free: a row written before this field simply
30700
+ * has no map, and {@link readTimelapseGeneratedAt} falls back to
30701
+ * {@link TimelapseRuleSchema.shape.lastGeneratedAt}. Reading an old row as
30702
+ * "never generated" would re-render and re-notify every camera of every rule
30703
+ * once, on the deploy that shipped the map.
30704
+ */
30705
+ generatedByDevice: record(string(), number()).optional(),
30103
30706
  /** userId of the caller who created the rule (server-stamped). */
30104
30707
  createdBy: string(),
30105
30708
  createdAt: number(),